WebRequest.ISerializable.GetObjectData(SerializationInfo, StreamingContext) WebRequest.ISerializable.GetObjectData(SerializationInfo, StreamingContext) Method

定义

当在子代类中重写时,使用序列化 SerializationInfo 所需要的数据来填充 WebRequest 实例。When overridden in a descendant class, populates a SerializationInfo instance with the data needed to serialize the WebRequest.

 virtual void System.Runtime.Serialization.ISerializable.GetObjectData(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext) = System::Runtime::Serialization::ISerializable::GetObjectData;
void ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);

参数

serializationInfo
SerializationInfo SerializationInfo

一个 SerializationInfo,包含 WebRequest 的序列化数据。A SerializationInfo, which holds the serialized data for the WebRequest.

streamingContext
StreamingContext StreamingContext

一个 StreamingContext,它包含与新的 WebRequest 关联的序列化流的目标。A StreamingContext that contains the destination of the serialized stream associated with the new WebRequest.

实现

异常

当未在子代类中重写该接口时,尝试序列化该对象。An attempt is made to serialize the object, when the interface is not overridden in a descendant class.

适用于