Szerkesztés

Megosztás a következőn keresztül:


DesignerSerializationManager.IDesignerSerializationManager.SerializationComplete Event

Definition

Occurs when serialization is complete.

event EventHandler System.ComponentModel.Design.Serialization.IDesignerSerializationManager.SerializationComplete;
member this.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.SerializationComplete : EventHandler 
Custom Event SerializationComplete As EventHandler Implements System.ComponentModel.Design.Serialization.IDesignerSerializationManager

Event Type

Implements

Exceptions

The serialization manager does not have an active serialization session.

Remarks

Typically the serialization process is single-threaded and should be stateless. When these characteristics are not true, the SerializationComplete event can be used to help to organize the process. A serializer can track this event to know that the serialization process is complete.

For example, sometimes a serializer needs to write to another file, such as a resource file. In such a case, it would be inefficient to design the serializer to close the file when it is finished because serialization of an object graph generally requires several serializers; therefore, the resource file would be opened and closed many times. Instead, the resource file could be accessed through an object that tracked the SerializationComplete event, and that object could close the resource file at the end of serialization.

In a related use, this event can be used to remove a temporary service installed in the serialization manager.

Applies to

See also