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

Применяется к

См. также раздел