Interface ISerializationPolicy
Serialization policy, providing a central location to obtain ISerializer instances, for example when serializing state during a checkpoint, or when deserializing state from a checkpoint where the persisted state contains a name and version for the serializer that was used to write the state.
Namespace: Reaqtor.QueryEngine
Assembly: Reaqtor.QueryEngine.Interfaces.dll
Syntax
public interface ISerializationPolicy
Methods
GetSerializer()
Gets the default serializer. Useful for serialization of new state using the "latest known good" serializer.
Declaration
ISerializer GetSerializer()
Returns
Type | Description |
---|---|
ISerializer | The serializer instance. |
GetSerializer(String, Version)
Gets a serializer with the specified name
and version
. This is used
when recovering from a checkpoint, where serializer names and versions are stored in order to locate the
right (de)serializer to use for reading the state.
Declaration
ISerializer GetSerializer(string name, Version version)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the serializer. |
System.Version | version | The version of the serializer. |
Returns
Type | Description |
---|---|
ISerializer | The serializer instance. |