RemotingServices.Unmarshal 메서드

정의

지정된 ObjRef를 프록시 개체로 변환합니다.

오버로드

Unmarshal(ObjRef)

ObjRef를 가져오고 이를 사용하여 프록시 개체를 만듭니다.

Unmarshal(ObjRef, Boolean)

ObjRef를 가져오고, 이를 사용하여 프록시 개체를 만들고, 서버의 형식으로 구체화합니다.

Unmarshal(ObjRef)

ObjRef를 가져오고 이를 사용하여 프록시 개체를 만듭니다.

public:
 static System::Object ^ Unmarshal(System::Runtime::Remoting::ObjRef ^ objectRef);
public static object Unmarshal (System.Runtime.Remoting.ObjRef objectRef);
[System.Security.SecurityCritical]
public static object Unmarshal (System.Runtime.Remoting.ObjRef objectRef);
static member Unmarshal : System.Runtime.Remoting.ObjRef -> obj
[<System.Security.SecurityCritical>]
static member Unmarshal : System.Runtime.Remoting.ObjRef -> obj
Public Shared Function Unmarshal (objectRef As ObjRef) As Object

매개 변수

objectRef
ObjRef

프록시가 만들어질 원격 개체를 나타내는 ObjRef입니다.

반환

Object

지정된 ObjRef가 나타내는 개체의 프록시입니다.

특성

예외

objectRef 매개 변수에 지정된 ObjRef 인스턴스의 형식이 잘못된 경우

호출 스택의 상위 호출자 중 하나 이상에게 원격 형식 및 채널을 구성하기 위한 권한이 없는 경우

예제

다음 코드 예제에서는 개체의 역마샬링 하는 방법에 설명 합니다.

ChannelServices::RegisterChannel( gcnew HttpChannel );

SampleService ^ objectSample = (SampleService^)( Activator::GetObject( SampleService::typeid,
   "http://localhost:9000/MySampleService/SampleService.soap" ) );

// The GetManuallyMarshaledObject() method uses RemotingServices::Marshal()
// to create an ObjRef object for a SampleTwo object.
ObjRef^ objRefSampleTwo = objectSample->GetManuallyMarshaledObject();

SampleTwo ^ objectSampleTwo = (SampleTwo^)( RemotingServices::Unmarshal( objRefSampleTwo ) );

objectSampleTwo->PrintMessage( "ObjRef successfuly unmarshaled." );
ChannelServices.RegisterChannel(new HttpChannel());

SampleService objectSample = (SampleService)Activator.GetObject(typeof(SampleService),
    "http://localhost:9000/MySampleService/SampleService.soap");

// The GetManuallyMarshaledObject() method uses RemotingServices.Marshal()
// to create an ObjRef object for a SampleTwo object.
ObjRef objRefSampleTwo = objectSample.GetManuallyMarshaledObject();

SampleTwo objectSampleTwo = (SampleTwo)RemotingServices.Unmarshal(objRefSampleTwo);

objectSampleTwo.PrintMessage("ObjRef successfuly unmarshaled.");
ChannelServices.RegisterChannel(New HttpChannel())

Dim objectSample As SampleService = CType(Activator.GetObject(GetType(SampleService), _ 
      "http://localhost:9000/MySampleService/SampleService.soap"), SampleService)

' The GetManuallyMarshaledObject() method uses RemotingServices.Marshal()
' to create an ObjRef object for a SampleTwo object.
Dim objRefSampleTwo As ObjRef = objectSample.GetManuallyMarshaledObject()

Dim objectSampleTwo As SampleTwo = CType(RemotingServices.Unmarshal(objRefSampleTwo), SampleTwo)

objectSampleTwo.PrintMessage("I successfully unmarshaled your ObjRef.  Thanks.")

설명

ObjRef 애플리케이션 도메인 경계를 넘어 개체 참조를 전송 하는 데 사용 하는 개체의 직렬화 표현입니다. 만들기는 ObjRef 에 개체 마샬링 이라고 합니다. ObjRef 채널을 통해 다른 애플리케이션 도메인에 전송할 수 있습니다 (가능한 경우 다른 프로세스 또는 컴퓨터에서). 다른 애플리케이션 도메인에 한 번의 ObjRef 일반적으로 실제 개체에 연결 하는 개체에 대 한 프록시를 만드는 구문 분석 되어야 합니다. 이 작업은 역마샬링 이라고 합니다. 역마샬링 하는 동안 합니다 ObjRef 원격 개체와 투명 프록시 개체의 메서드 정보를 추출 하려면 구문 분석 및 RealProxy 개체가 만들어집니다. 구문 분석 된 내용의 ObjRef 투명 프록시 공용 언어 런타임에 등록 되기 전에 투명 프록시에 추가 됩니다.

A ObjRef 설명 하는 정보를 포함 합니다 Type 및 클래스는 마샬링하는 개체의 특정 개체 인스턴스 및 통신을 고유 하 게 식별 하는 URI 관련 원격 하위 영역에 도달 하는 방법에 대 한 정보 개체가 위치한 합니다.

추가 정보

적용 대상

Unmarshal(ObjRef, Boolean)

ObjRef를 가져오고, 이를 사용하여 프록시 개체를 만들고, 서버의 형식으로 구체화합니다.

public:
 static System::Object ^ Unmarshal(System::Runtime::Remoting::ObjRef ^ objectRef, bool fRefine);
public static object Unmarshal (System.Runtime.Remoting.ObjRef objectRef, bool fRefine);
[System.Security.SecurityCritical]
public static object Unmarshal (System.Runtime.Remoting.ObjRef objectRef, bool fRefine);
static member Unmarshal : System.Runtime.Remoting.ObjRef * bool -> obj
[<System.Security.SecurityCritical>]
static member Unmarshal : System.Runtime.Remoting.ObjRef * bool -> obj
Public Shared Function Unmarshal (objectRef As ObjRef, fRefine As Boolean) As Object

매개 변수

objectRef
ObjRef

프록시가 만들어질 원격 개체를 나타내는 ObjRef입니다.

fRefine
Boolean

프록시를 서버의 형식으로 구체화하려면 true이고, 그렇지 않으면 false입니다.

반환

Object

지정된 ObjRef가 나타내는 개체의 프록시입니다.

특성

예외

objectRef 매개 변수에 지정된 ObjRef 인스턴스의 형식이 잘못된 경우

호출 스택의 상위 호출자 중 하나 이상에게 원격 형식 및 채널을 구성하기 위한 권한이 없는 경우

설명

ObjRef 애플리케이션 도메인 경계를 넘어 개체 참조를 전송 하는 데 사용 하는 개체의 직렬화 표현입니다. 만들기는 ObjRef 에 개체 마샬링 이라고 합니다. ObjRef 채널을 통해 다른 애플리케이션 도메인에 전송할 수 있습니다 (가능한 경우 다른 프로세스 또는 컴퓨터에서). 다른 애플리케이션 도메인에 한 번의 ObjRef 일반적으로 실제 개체에 연결 하는 개체에 대 한 프록시를 만드는 구문 분석 되어야 합니다. 이 작업은 역마샬링 이라고 합니다. 역마샬링 하는 동안 합니다 ObjRef 원격 개체와 투명 프록시 개체의 메서드 정보를 추출 하려면 구문 분석 및 RealProxy 개체가 만들어집니다. 구문 분석 된 내용의 ObjRef 투명 프록시 공용 언어 런타임에 등록 되기 전에 투명 프록시에 추가 됩니다.

A ObjRef 설명 하는 정보를 포함 합니다 Type 및 클래스는 마샬링하는 개체의 특정 개체 인스턴스 및 통신을 고유 하 게 식별 하는 URI 관련 원격 하위 영역에 도달 하는 방법에 대 한 정보 개체가 위치한 합니다.

형식 프록시는를 처음 만들면 MarshalByRefObject합니다. 다른 형식으로 캐스팅 하면 원격 인프라는 추적 하 불필요 하 게 형식을 로드 하지 않으려면 자주 사용 하는 형식입니다.

추가 정보

적용 대상