Namespace: | Sirenix.Serialization |
Assembly: | Sirenix.Serialization |
public abstract class WeakBaseFormatter : IFormatter
System.Runtime.Serialization.IObjectReference,
public WeakBaseFormatter(Type serializedType)
System.Type | serializedType |
protected readonly bool ImplementsIDeserializationCallback
protected readonly bool ImplementsIObjectReference
protected readonly bool ImplementsISerializationCallbackReceiver
protected readonly bool IsValueType
protected readonly WeakBaseFormatter.SerializationCallback[] OnDeserializedCallbacks
protected readonly WeakBaseFormatter.SerializationCallback[] OnDeserializingCallbacks
protected readonly WeakBaseFormatter.SerializationCallback[] OnSerializedCallbacks
protected readonly WeakBaseFormatter.SerializationCallback[] OnSerializingCallbacks
protected readonly Type SerializedType
public object Deserialize(IDataReader reader)
Sirenix.Serialization.IDataReader | reader | The reader to use. |
System.Object | The deserialized value. |
protected abstract void DeserializeImplementation(ref object value, IDataReader reader)
System.Object | value | The uninitialized value to serialize into. This value will have been created earlier using GetUninitializedObject(). |
Sirenix.Serialization.IDataReader | reader | The reader to deserialize with. |
protected virtual object GetUninitializedObject()
System.Object |
WARNING: This method will not be called automatically if you override GetUninitializedObject and return null! You will have to call it manually after having created the object instance during deserialization.
protected void InvokeOnDeserializingCallbacks(object value, DeserializationContext context)
System.Object | value | The value to invoke the callbacks on. |
DeserializationContext | context | The deserialization context. |
NOTE that this method only does anything if
protected void RegisterReferenceID(object value, IDataReader reader)
System.Object | value | The value to register. |
Sirenix.Serialization.IDataReader | reader | The reader which is currently being used. |
public void Serialize(object value, IDataWriter writer)
System.Object | value | The value to serialize. |
Sirenix.Serialization.IDataWriter | writer | The writer to use. |
protected abstract void SerializeImplementation(ref object value, IDataWriter writer)
System.Object | value | The value to serialize. |
Sirenix.Serialization.IDataWriter | writer | The writer to serialize with. |