2using System.Collections.Generic;
3using System.Reflection;
12 private readonly Type enumType;
13 private readonly TypeInfo enumTypeInfo;
14 private readonly
bool asInt;
22 this.enumType = EnumType;
23 this.enumTypeInfo = EnumType.GetTypeInfo();
24 this.asInt = this.enumTypeInfo.IsDefined(typeof(FlagsAttribute),
false);
54 return Enum.ToObject(this.enumType, Input.
ReadInt32());
56 return Enum.Parse(this.enumType, Input.
ReadString());
int ReadInt32()
Reads a 32-bit signed integer from the input.
string ReadString()
Reads a string from the input.
override void Serialize(Serializer Output, object Value)
Serializes the property value of an object.
override object Deserialize(Deserializer Input, Type ExpectedType)
Deserializes the property value
override Type PropertyType
Property Type
Abstract base class for properties
void WriteInt32(int Value)
Writes a 32-bit signed integer to the output.
void WriteString(string Value)
Writes a string to the output.