Interface ISerializationInterceptor<T>
Provides a mechanism to partake in the serialization pipeline.
Namespace: ExtendedXmlSerializer.ExtensionModel.Instances
Assembly: ExtendedXmlSerializer.dll
Syntax
public interface ISerializationInterceptor<T>
Type Parameters
T
The type to serialize. |
Methods
Activating(Type)
Returns the instance to activate during deserialization. If null
is returned, the default internal infrastructure is used to activate the object.
Declaration
T Activating(Type instanceType)
Parameters
System.Type
instanceType
The type to activate. |
Returns
T
An instance of the provided type to activate. If |
Deserialized(IFormatReader, T)
Called after an object has been activated and properties have been assigned their values from deserialization.
Declaration
T Deserialized(IFormatReader reader, T instance)
Parameters
IFormatReader
reader
The reader used to deserialize the provided instance |
T
instance
The instance that was deserialized. |
Returns
T
The actual instance deserialized. |
Serializing(IFormatWriter, T)
Called when an instance is being serialized.
Declaration
T Serializing(IFormatWriter writer, T instance)
Parameters
IFormatWriter
writer
The writer performing the serialization. |
T
instance
The instance to serialize. |
Returns
T
The actual instance to serialize. |