You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2015/11/20 09:58:10 UTC
[jira] [Created] (IGNITE-1965) .NET: Introduce wrapper for enums,
similar to "IBinaryObject".
Vladimir Ozerov created IGNITE-1965:
---------------------------------------
Summary: .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
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)