InvalidPrinterException.GetObjectData(SerializationInfo, StreamingContext) 方法

定义

重写。Overridden. 使用关于异常的信息设置 SerializationInfoSets the SerializationInfo with information about the exception.

public:
 override void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public override void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Public Overrides Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

包含有关所引发异常的序列化对象数据的 SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

StreamingContext,它包含关于源或目标的上下文信息。The StreamingContext that contains contextual information about the source or destination.

异常

infonullinfo is null.

注解

GetObjectData 方法将使用针对序列化的所有异常对象数据设置 SerializationInfoThe GetObjectData method sets a SerializationInfo with all the exception object data targeted for serialization. 反序列化期间,从通过流传输的 SerializationInfo 重建异常。During deserialization, the exception is reconstituted from the SerializationInfo transmitted over the stream.

安全性

SerializationFormatter
用于序列化和反序列化。for serialization and deserialization. 有关详细信息,请参阅: SerializationFormatterFor more information see: SerializationFormatter

适用于

另请参阅