ConnectionFailedWebTestException 构造函数 (SerializationInfo, StreamingContext)
用序列化数据初始化 ConnectionFailedWebTestException 类的一个新实例,用于远程方案中。
命名空间: Microsoft.VisualStudio.TestTools.WebTesting
程序集: Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)
语法
声明
Protected Sub New ( _
info As SerializationInfo, _
context As StreamingContext _
)
protected ConnectionFailedWebTestException(
SerializationInfo info,
StreamingContext context
)
protected:
ConnectionFailedWebTestException(
SerializationInfo^ info,
StreamingContext context
)
new :
info:SerializationInfo *
context:StreamingContext -> ConnectionFailedWebTestException
protected function ConnectionFailedWebTestException(
info : SerializationInfo,
context : StreamingContext
)
参数
- info
类型:System.Runtime.Serialization.SerializationInfo
SerializationInfo ,它存有有关所引发异常的序列化的对象数据。
- context
类型:System.Runtime.Serialization.StreamingContext
StreamingContext ,它包含有关源或目标的上下文信息。
异常
异常 | 条件 |
---|---|
ArgumentNullException | info 参数为 nullnull 引用(在 Visual Basic 中为 Nothing)。 |
SerializationException | 类名为 nullnull 引用(在 Visual Basic 中为 Nothing) 或 HResult 为零 (0)。 |
备注
此构造函数用于反序列化的情形。 当异常从服务器传播到客户端时,远程方案需要它。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
ConnectionFailedWebTestException 类
ConnectionFailedWebTestException 重载