Compartilhar via


RealProxy.CreateObjRef(Type) Método

Definição

Cria um ObjRef para o tipo de objeto especificado e o registra com a infraestrutura de comunicação remota como um objeto ativado pelo cliente.

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

Parâmetros

requestedType
Type

O tipo de objeto para o qual um ObjRef é criado.

Retornos

Uma nova instância de ObjRef que é criada para o tipo especificado.

Atributos

Exemplos

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

Aplica-se a

Confira também