Uredi

Deli z drugimi prek


ToolboxItemContainer.GetObjectData Method

Definition

Saves the serialization state for the object.

protected:
 virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Security.SecurityCritical]
protected virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
[<System.Security.SecurityCritical>]
abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Protected Overridable Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The serialization information passed in by the serializer when serializing this object.

context
StreamingContext

The streaming context passed in by the serializer when serializing this object.

Attributes

Notes to Inheritors

Generally, it is not necessary to override the serialization mechanism for a ToolboxItemContainer class. Instead, override the ToolboxData property and add your own data to the data object. The GetObjectData(SerializationInfo, StreamingContext) method internally uses the ToolboxData property to create the serialization info. Override GetObjectData(SerializationInfo, StreamingContext) only if you want to save private information about the ToolboxItemContainer that should not be saved as part of the public data object.

Applies to

See also