[
https://issues.apache.org/jira/browse/IGNITE-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409105#comment-15409105
]
ASF GitHub Bot commented on IGNITE-1965:
----------------------------------------
Github user ptupitsyn closed the pull request at:
https://github.com/apache/ignite/pull/254
> .NET: Introduce wrapper for enums, similar to "IBinaryObject".
> --------------------------------------------------------------
>
> Key: IGNITE-1965
> URL: https://issues.apache.org/jira/browse/IGNITE-1965
> Project: Ignite
> Issue Type: Sub-task
> Components: platforms
> Affects Versions: ignite-1.4
> Reporter: Vladimir Ozerov
> Assignee: Vladimir Ozerov
> Fix For: 1.5.0.final
>
>
> *Problem*
> User tries to get a field from an object. If field is an object, we return
> IBinaryObject which is correct. If field is enum we always try to deserialize
> it which is wrong because there could be no matching type in runtime.
> *Proposed solution*
> 1) Introduce "BinaryEnum" class with the following methods:
> - int TypeId() - get type ID
> - int Ordinal() - get ordinal
> - T deserialize() - deserialize using type ID -> class lookup.
> - T deserialize(Type) - deserialize using provided Type. If (typeId != -1 &&
> typeid(Type) != typeId), throw an exception.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)