다음을 통해 공유


RealProxy.CreateObjRef(Type) 메서드

정의

지정된 개체 형식에 대해 ObjRef를 만들고 클라이언트 활성 개체로 원격 인프라와 함께 등록합니다.

public:
 virtual System::Runtime::Remoting::ObjRef ^ CreateObjRef(Type ^ requestedType);
public virtual System.Runtime.Remoting.ObjRef CreateObjRef (Type requestedType);
[System.Security.SecurityCritical]
public virtual System.Runtime.Remoting.ObjRef CreateObjRef (Type requestedType);
abstract member CreateObjRef : Type -> System.Runtime.Remoting.ObjRef
override this.CreateObjRef : Type -> System.Runtime.Remoting.ObjRef
[<System.Security.SecurityCritical>]
abstract member CreateObjRef : Type -> System.Runtime.Remoting.ObjRef
override this.CreateObjRef : Type -> System.Runtime.Remoting.ObjRef
Public Overridable Function CreateObjRef (requestedType As Type) As ObjRef

매개 변수

requestedType
Type

ObjRef가 만들어진 개체 형식입니다.

반환

지정된 형식에 대해 만든 ObjRef의 새 인스턴스입니다.

특성

예제

virtual ObjRef^ CreateObjRef( Type^ ServerType ) override
{
   Console::WriteLine( "CreateObjRef Method Called ..." );
   CustomObjRef ^ myObjRef = gcnew CustomObjRef( myMarshalByRefObject,ServerType );
   myObjRef->URI = myUri;
   return myObjRef;
}
public override ObjRef CreateObjRef(Type ServerType)
{
   Console.WriteLine ("CreateObjRef Method Called ...");
   CustomObjRef myObjRef = new CustomObjRef(myMarshalByRefObject,ServerType);
   myObjRef.URI = myUri ;
   return myObjRef;
}
Public Overrides Function CreateObjRef(ServerType As Type) As ObjRef
   Console.WriteLine("CreateObjRef Method Called ...")
   Dim myObjRef As New CustomObjRef(myMarshalByRefObject, ServerType)
   myObjRef.URI = myUri
   Return myObjRef
End Function 'CreateObjRef

적용 대상

추가 정보