次の方法で共有


ObjectManager コンストラクタ

ObjectManager クラスの新しいインスタンスを初期化します。

Public Sub New( _
   ByVal selector As ISurrogateSelector, _   ByVal context As StreamingContext _)
[C#]
public ObjectManager(
   ISurrogateSelectorselector,StreamingContextcontext);
[C++]
public: ObjectManager(
   ISurrogateSelector* selector,StreamingContextcontext);
[JScript]
public function ObjectManager(
   selector : ISurrogateSelector,context : StreamingContext);

パラメータ

  • selector
    使用するサロゲート セレクタ。 ISurrogateSelector は、指定された型のオブジェクトを逆シリアル化するときに使用する現在のサロゲートを決定します。逆シリアル化時に、サロゲート セレクタは、ストリームで送信された情報からオブジェクトの新しいインスタンスを作成します。
  • context
    ストリーム コンテキスト。 StreamingContext は ObjectManager によっては使用されませんが、 ISerializable を実装している任意のオブジェクト、または ISerializationSurrogate を持っている任意のオブジェクトにパラメータとして渡されます。これらのオブジェクトは、逆シリアル化する情報の元のオブジェクトに応じて特定のアクションを実行できます。

例外

例外の種類 条件
SecurityException 呼び出し元に、必要なアクセス許可がありません。

必要条件

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

.NET Framework セキュリティ:

参照

ObjectManager クラス | ObjectManager メンバ | System.Runtime.Serialization 名前空間