Version 3.3.0.0

WeakMinimalBaseFormatter class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public abstract class WeakMinimalBaseFormatter : IFormatter
Inheritance
  • System.Object
  • WeakMinimalBaseFormatter

Constructors

WeakMinimalBaseFormatter(Type)
public WeakMinimalBaseFormatter(Type serializedType)
Parameters
System.Type serializedType

Fields

IsValueType
Whether the serialized value is a value type.
protected readonly bool IsValueType
SerializedType
protected readonly Type SerializedType

Methods

Deserialize(IDataReader)
public object Deserialize(IDataReader reader)
Parameters
Sirenix.Serialization.IDataReader reader

Returns
System.Object

GetUninitializedObject()
Get an uninitialized object of type . WARNING: If you override this and return null, the object's ID will not be automatically registered. You will have to call immediately after creating the object yourself during deserialization.
protected virtual object GetUninitializedObject()
Returns
System.Object

An uninitialized object of type .

Read(ref Object, IDataReader)
Reads into the specified value using the specified reader.
protected abstract void Read(ref object value, IDataReader reader)
Parameters
System.Object value

The value to read into.

Sirenix.Serialization.IDataReader reader

The reader to use.

RegisterReferenceID(Object, IDataReader)
Registers the given object reference in the deserialization context.

NOTE that this method only does anything if the serialized type is not a value type.

protected void RegisterReferenceID(object value, IDataReader reader)
Parameters
System.Object value

The value to register.

Sirenix.Serialization.IDataReader reader

The reader which is currently being used.

Serialize(Object, IDataWriter)
public void Serialize(object value, IDataWriter writer)
Parameters
System.Object value

Sirenix.Serialization.IDataWriter writer

Write(ref Object, IDataWriter)
Writes from the specified value using the specified writer.
protected abstract void Write(ref object value, IDataWriter writer)
Parameters
System.Object value

The value to write from.

Sirenix.Serialization.IDataWriter writer

The writer to use.

Derived Classes