次の方法で共有


BinaryClientFormatterSink クラス

BinaryFormatter を使用するクライアント フォーマッタ シンクの実装を提供します。

この型のすべてのメンバの一覧については、BinaryClientFormatterSink メンバ を参照してください。

System.Object
   System.Runtime.Remoting.Channels.BinaryClientFormatterSink

Public Class BinaryClientFormatterSink
   Implements IClientFormatterSink, IMessageSink, _
   IClientChannelSink, IChannelSinkBase
[C#]
public class BinaryClientFormatterSink : IClientFormatterSink,
   IMessageSink, IClientChannelSink, IChannelSinkBase
[C++]
public __gc class BinaryClientFormatterSink : public
   IClientFormatterSink, IMessageSink, IClientChannelSink,
   IChannelSinkBase
[JScript]
public class BinaryClientFormatterSink implements
   IClientFormatterSink, IMessageSink, IClientChannelSink,
   IChannelSinkBase

スレッドセーフ

この型の public static (Visual Basicでは Shared) のすべてのメンバは、マルチスレッド操作で安全に使用できます。インスタンスのメンバの場合は、スレッドセーフであるとは限りません。

解説

フォーマッタ シンクの関数では、必要なヘッダーを生成し、ストリームにメッセージをシリアル化します。フォーマッタ シンクに到達すると、 ProcessMessage の呼び出しまたは AsyncProcessRequest の呼び出しを通じて、 IMessage がチャンネル シンク チェインのすべてのシンクに転送されます。この段階では、メッセージが既にシリアル化されており、情報としてだけ提供されます。メッセージを作成または変更する必要があるシンクは、フォーマッタの前に、シンク チェイン内に配置する必要があります。これは、フォーマッタ シンクへの参照を持っていると考えられる IClientFormatterSink インターフェイスを実装することによって簡単に実行できます。その後、実際のフォーマッタ シンクをシンクチェインに配置できます。

プロパティ 説明
includeVersions true または false 。フォーマッタにバージョン情報が含まれるかどうかを指定します。

必要条件

名前空間: System.Runtime.Remoting.Channels

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

アセンブリ: System.Runtime.Remoting (System.Runtime.Remoting.dll 内)

参照

BinaryClientFormatterSink メンバ | System.Runtime.Remoting.Channels 名前空間 | シンクとシンク チェイン