Namespace: | Sirenix.Serialization |
Assembly: | Sirenix.Serialization |
public sealed class GenericCollectionFormatter<TCollection, TElement> : BaseFormatter<TCollection>, IFormatter<TCollection>, IFormatter where TCollection : ICollection<TElement>, new()
Eligibility for formatting by this class is determined by the CanFormat(Type, out Type) method.
The type of the collection.
The type of the element.
public GenericCollectionFormatter()
protected override void DeserializeImplementation(ref TCollection value, IDataReader reader)
TCollection | 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 override TCollection GetUninitializedObject()
TCollection |
A new object of type |
protected override void SerializeImplementation(ref TCollection value, IDataWriter writer)
TCollection | value | The value to serialize. |
Sirenix.Serialization.IDataWriter | writer | The writer to serialize with. |