class BinarySerializer (Niantic.ARDK.Utilities.BinarySerialization.BinarySerializer)
Overview
Class used to serialize objects in binary-format. More…
class BinarySerializer: Niantic.ARDK.Utilities.BinarySerialization.BinarySerializerOrDeserializer { public: // methods BinarySerializer(Stream stream); virtual override void Dispose(); void Serialize(object item); };
Inherited Members
public: // properties Stream Stream; // methods virtual void Dispose(); T GetContext< T >();
Detailed Documentation
Class used to serialize objects in binary-format.
Methods
BinarySerializer(Stream stream)
Creates a new binary-serializer, which will serialize data to the given stream.
virtual override void Dispose()
Releases the resources of this serializer and flushes the stream. Disposing of the stream is not done, on purpose, as we might want to use different serializers to send each message over a NetworkStream or similar.
void Serialize(object item)
Serializes the given item (including null) to the Stream this BinarySerializer is bound to. If an item-serializer for the given type is not found, an exception is thrown.