RealProxy.CreateObjRef(Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an ObjRef for the specified object type, and registers it with the remoting infrastructure as a client-activated object.
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
Parameters
Returns
A new instance of ObjRef that is created for the specified type.
- Attributes
Examples
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
Applies to
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.