Class SerializationContext
Maintains the objects and types seen during serialization, to enable polymorphism, single-instanced references (multiple references to same object) and circular dependencies.
Namespace: Microsoft.Psi.Serialization
Assembly: Microsoft.Psi.dll
Syntax
public class SerializationContext : object
Constructors
View SourceSerializationContext()
Initializes a new instance of the SerializationContext class. This will become internal. Use Serializer.Schema instead.
Declaration
public SerializationContext()
SerializationContext(KnownSerializers)
Initializes a new instance of the SerializationContext class, with the specified serialization overrides.
Declaration
public SerializationContext(KnownSerializers serializers)
Parameters
Type | Name | Description |
---|---|---|
KnownSerializers | serializers | The set of custom serializers to use instead of the default ones. |
Methods
View SourceReset()
Clears the object caches used to identify multiple references to the same instance. You must call this method before reusing the context object to serialize another object graph.
Declaration
public void Reset()