指定したコンテキストにおける指定した型に適したサロゲートを返します。
Public Overridable Function GetSurrogate( _
ByVal type As Type, _ ByVal context As StreamingContext, _ <Out()> ByRef ssout As ISurrogateSelector _) As ISerializationSurrogate Implements ISurrogateSelector.GetSurrogate
[C#]
public virtual ISerializationSurrogate GetSurrogate(Typetype,StreamingContextcontext, out ISurrogateSelectorssout);
[C++]
public: virtual ISerializationSurrogate* GetSurrogate(Type* type,StreamingContextcontext, [ Out] ISurrogateSelector** ssout);
[JScript]
public function GetSurrogate(
type : Type,context : StreamingContext,ssout : ISurrogateSelector) : ISerializationSurrogate;
パラメータ
- type
サロゲートを要求する対象の Type 。 - context
シリアル化の転送元と転送先。 - ssout
このメソッドから制御が返されるときに、指定したオブジェクト型に適した ISurrogateSelector が格納されます。このパラメータは初期化せずに渡されます。
戻り値
指定したコンテキストにおける指定した型に適したサロゲート。
実装
ISurrogateSelector.GetSurrogate
解説
リモート処理サロゲートは、 MarshalByRefObject から派生したオブジェクトのリモートのシリアル化要求を処理します。 MarshalByRefObject から派生したオブジェクトをリモートの場所にシリアル化するときに、リモート処理サロゲートは、リモート オブジェクトをアクティブ化し、そのオブジェクトと通信するために必要とされる関連情報をすべて格納する ObjRef を作成します。新しく作成された ObjRef は、リモートの場所に送信され、プロキシを作成するために使用できるようになります。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
RemotingSurrogateSelector クラス | RemotingSurrogateSelector メンバ | System.Runtime.Remoting.Messaging 名前空間