MarshalByRefObject.CreateObjRef(Type) MarshalByRefObject.CreateObjRef(Type) MarshalByRefObject.CreateObjRef(Type) MarshalByRefObject.CreateObjRef(Type) Method

定义

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

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
Public Overridable Function CreateObjRef (requestedType As Type) As ObjRef

参数

requestedType
Type Type Type Type

新的 Type 将引用的对象的 ObjRefThe Type of the object that the new ObjRef will reference.

返回

生成代理所需要的信息。Information required to generate a proxy.

异常

此实例不是有效的远程处理对象。This instance is not a valid remoting object.

直接调用方没有基础结构权限。The immediate caller does not have infrastructure permission.

注解

CreateObjRef方法调用由远程对象的创建方法,如AppDomain.CreateInstanceAppDomain.CreateInstanceAndUnwrapThe CreateObjRef method is called by remote object creation methods such as AppDomain.CreateInstance and AppDomain.CreateInstanceAndUnwrap. 在大多数情况下,没有无需重写此方法。In most cases, there is no need to override this method.

安全性

SecurityCriticalAttribute
直接调用方需要完全信任。requires full trust for the immediate caller. 不能由部分受信任的或透明的代码使用此成员。This member cannot be used by partially trusted or transparent code.

适用于