class EnumSerializer (Niantic.ARDK.Utilities.BinarySerialization.ItemSerializers.EnumSerializer)¶
Overview¶
class EnumSerializer: Niantic.ARDK.Utilities.BinarySerialization.IItemSerializer { public: // properties Type DataType; // methods static IItemSerializer ForType(Type enumType); static IItemSerializer<T> ForType< T >(); static void RegisterSerializerForAllEnumsOf(Assembly assembly); object Deserialize(BinaryDeserializer deserializer); void Serialize(BinarySerializer serializer, object item); };
Inherited Members¶
public: // properties Type DataType; // methods object Deserialize(BinaryDeserializer deserializer); T Deserialize(BinaryDeserializer deserializer); void Serialize(BinarySerializer serializer, object item); void Serialize(BinarySerializer serializer, T item);
Detailed Documentation¶
Methods¶
static void RegisterSerializerForAllEnumsOf(Assembly assembly)
Registers an EnumSerializer instance for each enum type found in the given assembly.
object Deserialize(BinaryDeserializer deserializer)
Deserializes an item. The given BinarySerializer is the one calling this item deserializer and can be used if the current item-serializer needs to deserialize data of other types before being able to provide the final item.
void Serialize(BinarySerializer serializer, object item)
Serializes the given object into the stream of the given “generic purpose” serializer. To avoid any confusion, this item-serializer only knows how to serialize a single type, while the serializer given as argument is the one invoking this item serializer, but might be used if to serialize the current item, items of different types need to be serialized. Example: To serialize a Vector3, we also need to serialize 3 floats, the the BinarySerializer can help the Vector3Serializer to do this.