Share via


BinaryClientFormatterSinkProvider 類別

定義

提供二進位用戶端格式子 (Formatter) 接收提供者 (Provider) 的實作。

public ref class BinaryClientFormatterSinkProvider : System::Runtime::Remoting::Channels::IClientFormatterSinkProvider
public class BinaryClientFormatterSinkProvider : System.Runtime.Remoting.Channels.IClientFormatterSinkProvider
type BinaryClientFormatterSinkProvider = class
    interface IClientFormatterSinkProvider
    interface IClientChannelSinkProvider
Public Class BinaryClientFormatterSinkProvider
Implements IClientFormatterSinkProvider
繼承
BinaryClientFormatterSinkProvider
實作

備註

BinaryClientFormatterSinkProvider 建立用戶端格式器接收,用來 BinaryFormatter 串行化用戶端通道的訊息,以便透過該通道串流訊息。

格式器接收的功能是產生所需的標頭,並序列化訊息到資料流。 在格式器接收之後,會 IMessage 透過 ProcessMessageAsyncProcessRequest 呼叫,轉送到通道接收鏈結中的所有接收。 在這個階段中,訊息已經串行化,而且只會以資訊的形式提供。 需要建立或修改訊息的接收,必須在格式器之前放在接收鏈結中。 您可以藉由實作 IMessageSinkIClientChannelSink 介面來執行此動作。 然後,格式器接收可以放在接收鏈結中。

Formatter 接收會使用接收組態屬性在運行時間設定通道。 接收屬性可以在組態檔中指定,或以程序設計方式在內部 IDictionary指定。 在組態檔中,所有值都是以字串表示,但以程序設計方式建置屬性 IDictionary 時,可以使用其原生值或字串來指定實值型別。

下表顯示可指定給目前接收提供者的接收組態屬性。

屬性 描述
includeVersions 指定格式器是否包含版本控制資訊。 true值為 或 false

重要

使用此對象的實例搭配不受信任的數據,或跨不安全通道使用是安全性風險。 僅搭配信任的數據,以及跨安全通道使用此物件。 如需詳細資訊,請參閱 驗證所有輸入

建構函式

BinaryClientFormatterSinkProvider()

使用預設值,初始化 BinaryClientFormatterSinkProvider 類別的新執行個體。

BinaryClientFormatterSinkProvider(IDictionary, ICollection)

使用指定屬性和提供者資料,初始化 BinaryClientFormatterSinkProvider 類別的新執行個體。

屬性

Next

取得或設定接收提供者鏈結中的下一個 IClientChannelSinkProvider

方法

CreateSink(IChannelSender, String, Object)

建立接收鏈結。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱