Edit

Share via


DesignerSerializationManager.CreateSession Method

Definition

Creates a new serialization session.

public:
 IDisposable ^ CreateSession();
public IDisposable CreateSession ();
member this.CreateSession : unit -> IDisposable
Public Function CreateSession () As IDisposable

Returns

An IDisposable that represents a new serialization session.

Exceptions

The serialization manager is already within a session. This version of DesignerSerializationManager does not support simultaneous sessions.

Remarks

Most data within the serialization manager is transient and only lives for the life of a serialization session. When a session is disposed, serialization is considered to be complete and this transient state is cleared. This allows a single instance of a serialization manager to be used to serialize multiple object trees. Some state, including the service provider and any custom serialization providers that were added to the serialization manager, span sessions.

Applies to

See also