Version 3.3.1.2

ReflectionFormatter<T> class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public class ReflectionFormatter<T> : BaseFormatter<T>, IFormatter<T>, IFormatter
Final fallback formatter for all types which have no other formatters. This formatter relies on reflection to work, and is thus comparatively slow and creates more garbage than a custom formatter.
Inheritance
See Also

Type Parameters

T

The type which can be serialized and deserialized by the formatter.

Constructors

ReflectionFormatter()
public ReflectionFormatter()
ReflectionFormatter(ISerializationPolicy)
public ReflectionFormatter(ISerializationPolicy overridePolicy)
Parameters
Sirenix.Serialization.ISerializationPolicy overridePolicy

Properties

OverridePolicy
public ISerializationPolicy OverridePolicy { get; }

Methods

DeserializeImplementation(ref T, IDataReader)
Provides the actual implementation for deserializing a value of type .
protected override void DeserializeImplementation(ref T value, IDataReader reader)
Parameters
T 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.

SerializeImplementation(ref T, IDataWriter)
Provides the actual implementation for serializing a value of type .
protected override void SerializeImplementation(ref T value, IDataWriter writer)
Parameters
T value

The value to serialize.

Sirenix.Serialization.IDataWriter writer

The writer to serialize with.