StreamingContext 結構

定義

描述給定序列化資料流的來源和目的端,並且提供其他呼叫端定義的內容。

public value class StreamingContext
public struct StreamingContext
public readonly struct StreamingContext
[System.Serializable]
public struct StreamingContext
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct StreamingContext
type StreamingContext = struct
[<System.Serializable>]
type StreamingContext = struct
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type StreamingContext = struct
Public Structure StreamingContext
繼承
StreamingContext
屬性

備註

指出格式器所使用的位來源或目的地。 具有 Surrogates 或 ISerializable 實作的類別可以根據串流內容中儲存的資訊來序列化或忽略欄位和值。 例如,如果 State 屬性設定為 System.Runtime.Serialization.StreamingContextStates.CrossProcess ,則視窗控制碼仍然有效。

建構函式

StreamingContext(StreamingContextStates)
已淘汰.

使用指定的內容狀態,初始化 StreamingContext 類別的新執行個體。

StreamingContext(StreamingContextStates, Object)
已淘汰.

使用指定的內容狀態和某些額外的資訊,初始化 StreamingContext 類別的新執行個體。

屬性

Context

取得已指定為額外內容的一部分的內容。

State
已淘汰.

取得已傳輸資料的來源或目的端。

方法

Equals(Object)

判斷兩個 StreamingContext 執行個體是否具有相同的值。

GetHashCode()

傳回這個物件的雜湊程式碼。

適用於

另請參閱