Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-1956 Portable object requires to have a class to get Enum field value
  3. IGNITE-1965

.NET: Introduce wrapper for enums, similar to "IBinaryObject".

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • ignite-1.4
    • 1.5.0.final
    • platforms
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              vozerov Vladimir Ozerov
              vozerov Vladimir Ozerov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: