RemotingServices.IsObjectOutOfAppDomain メソッドとは何? わかりやすく解説 Weblio辞書 (original) (raw)

特定の透過プロキシ指定したオブジェクトが、現在のメソッド呼び出したオブジェクトとは異なアプリケーション ドメイン格納されているかどうかを示す Boolean 値を返します

名前空間: System.Runtime.Remoting
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

解説解説

使用例使用例

' Create remote version of TempConverter.Converter. Dim converter1 As TempConverter.Converter

converter1 = CType(Activator.GetObject(GetType( _ TempConverter.Converter), _ "http://localhost:8085/TempConverter"), _ TempConverter.Converter) ' Create local version of TempConverter.Converter. Dim converter2 As New TempConverter.Converter()

' Returns true, converter1 is remote and in a different appdomain. System.Runtime.Remoting.RemotingServices.IsObjectOutOfAppDomain( _ converter1)

' Returns false, converter2 is local and running in this appdomain. System.Runtime.Remoting.RemotingServices.IsObjectOutOfAppDomain( _ converter2)

' Returns true, converter1 is remote and in a different context. System.Runtime.Remoting.RemotingServices.IsObjectOutOfContext( _ converter1)

' Returns false, converter2 is local and running in this context. System.Runtime.Remoting.RemotingServices.IsObjectOutOfContext( _ converter2)

// Create a remote version of TempConverter.Converter. TempConverter.Converter converter1 = (TempConverter.Converter) Activator.GetObject( typeof(TempConverter.Converter), "http://localhost:8085/TempConverter");

// Create a local version of TempConverter.Converter. TempConverter.Converter converter2 = new TempConverter.Converter();

// Returns true, converter1 is remote and in a different appdomain. System.Runtime.Remoting.RemotingServices.IsObjectOutOfAppDomain( converter1);

// Returns false, converter2 is local and running in this appdomain. System.Runtime.Remoting.RemotingServices.IsObjectOutOfAppDomain( converter2);

// Returns true, converter1 is remote and in a different context. System.Runtime.Remoting.RemotingServices.IsObjectOutOfContext( converter1);

// Returns false, converter2 is local and running in this context. System.Runtime.Remoting.RemotingServices.IsObjectOutOfContext( converter2);

プラットフォームプラットフォーム

バージョン情報バージョン情報

参照参照