WebTestException 建構函式 (SerializationInfo, StreamingContext)
針對遠端案例,初始化 WebTestException 類別的新執行個體。
命名空間: Microsoft.VisualStudio.TestTools.WebTesting
組件: Microsoft.VisualStudio.QualityTools.WebTestFramework (在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)
語法
'宣告
Protected Sub New ( _
info As SerializationInfo, _
context As StreamingContext _
)
protected WebTestException(
SerializationInfo info,
StreamingContext context
)
protected:
WebTestException(
SerializationInfo^ info,
StreamingContext context
)
new :
info:SerializationInfo *
context:StreamingContext -> WebTestException
protected function WebTestException(
info : SerializationInfo,
context : StreamingContext
)
參數
info
類型:SerializationInfo保存有關擲回之例外狀況的序列化物件資料。
context
類型:StreamingContext包含有關來源或目的端之內容資訊。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | info 為 nullnull 參考 (即 Visual Basic 中的 Nothing)。 |
備註
這個建構函式用於還原序列化 (Deserialization) 的情況。 當例外狀況從伺服器傳送至用戶端時,遠端的案例便需要它。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。