Esempio n. 1
0
 /// <summary>
 ///   Builds an instance of an enum
 /// </summary>
 private static object BuildEnumInstance(EnumNativeObjectInfo enoi, Type enumClass)
 {
     return Enum.Parse(enumClass, enoi.GetEnumValue(), false);
 }
Esempio n. 2
0
 private long WriteEnumNativeObject(EnumNativeObjectInfo anoi, bool writeInTransaction)
 {
     var startPosition = FileSystemProcessor.FileSystemInterface.GetPosition();
     var odbTypeId = anoi.GetOdbTypeId();
     WriteNativeObjectHeader(odbTypeId, anoi.IsNull(), BlockTypes.BlockTypeNativeObject, writeInTransaction);
     // Writes the Enum ClassName
     FileSystemProcessor.FileSystemInterface.WriteLong(anoi.GetEnumClassInfo().ClassInfoId.ObjectId, writeInTransaction); //enum class info id
     // Write the Enum String value
     FileSystemProcessor.FileSystemInterface.WriteString(anoi.GetObject().ToString(), writeInTransaction);
     return startPosition;
 }