RemotingServices.IsObjectOutOfAppDomain 메서드
주어진 투명 프록시로 지정된 개체가 현재 메서드를 호출한 개체가 아닌 다른 응용 프로그램 도메인에 포함되어 있는지 여부를 나타내는 부울 값을 반환합니다.
네임스페이스: System.Runtime.Remoting
어셈블리: mscorlib(mscorlib.dll)
구문
‘선언
Public Shared Function IsObjectOutOfAppDomain ( _
tp As Object _
) As Boolean
‘사용 방법
Dim tp As Object
Dim returnValue As Boolean
returnValue = RemotingServices.IsObjectOutOfAppDomain(tp)
public static bool IsObjectOutOfAppDomain (
Object tp
)
public:
static bool IsObjectOutOfAppDomain (
Object^ tp
)
public static boolean IsObjectOutOfAppDomain (
Object tp
)
public static function IsObjectOutOfAppDomain (
tp : Object
) : boolean
매개 변수
- tp
검사할 개체입니다.
반환 값
개체가 현재 응용 프로그램 도메인 외부에 있으면 true이고, 그렇지 않으면 false입니다.
설명
응용 프로그램 도메인에 대한 자세한 내용은 응용 프로그램 도메인을 참조하십시오.
예제
' Create remote version of TempConverter.Converter.
Dim converter1 As TempConverter.Converter
converter1 = CType(Activator.GetObject(GetType( _
TempConverter.Converter), _
"https://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),
"https://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);
// Create a remote version of TempConverter::Converter.
TempConverter::Converter^ converter1 =
dynamic_cast<TempConverter::Converter^>(Activator::GetObject(
TempConverter::Converter::typeid,
"https://localhost:8085/TempConverter" ));
// Create a local version of TempConverter::Converter.
TempConverter::Converter^ converter2 = gcnew 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 );
플랫폼
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
2.0, 1.1, 1.0에서 지원
참고 항목
참조
RemotingServices 클래스
RemotingServices 멤버
System.Runtime.Remoting 네임스페이스