RealProxy.CreateObjRef(Type) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为指定的对象类型创建 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
参数
返回
为指定类型创建的 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