[ https://issues.apache.org/jira/browse/IGNITE-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn reassigned IGNITE-1965: --------------------------------------- Assignee: Pavel Tupitsyn > .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: interop > Affects Versions: ignite-1.4 > Reporter: Vladimir Ozerov > Assignee: Pavel Tupitsyn > Fix For: 1.5 > > > *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)