WeakReference.GetObjectData(SerializationInfo, StreamingContext) WeakReference.GetObjectData(SerializationInfo, StreamingContext) WeakReference.GetObjectData(SerializationInfo, StreamingContext) WeakReference.GetObjectData(SerializationInfo, StreamingContext) Method

定义

使用序列化当前的 SerializationInfo 对象所需的所有数据填充 WeakReference 对象。Populates a SerializationInfo object with all the data needed to serialize the current WeakReference object.

public:
 virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Security.SecurityCritical]
public 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
Public Overridable Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo SerializationInfo SerializationInfo SerializationInfo

保存序列化或反序列化当前的 WeakReference 对象所需的全部数据的对象。An object that holds all the data needed to serialize or deserialize the current WeakReference object.

context
StreamingContext StreamingContext StreamingContext StreamingContext

(保留)存储和检索序列化数据的位置。(Reserved) The location where serialized data is stored and retrieved.

实现

异常

注解

此方法将存储中的所有信息info序列化当前所需WeakReference对象。This method stores all the information in info necessary to serialize the current WeakReference object.

context参数保留并当前未使用此方法的执行过程中。The context parameter is reserved and is not currently used in the execution of this method.

安全性

SecurityCriticalAttribute
直接调用方需要完全信任。requires full trust for the immediate caller. 不能由部分受信任的或透明的代码使用此成员。This member cannot be used by partially trusted or transparent code.

适用于

另请参阅