Unmarshal Method (ObjRef, Boolean)
Collapse the table of content
Expand the table of content

RemotingServices.Unmarshal Method (ObjRef, Boolean)

 

Takes a ObjRef and creates a proxy object out of it, refining it to the type on the server.

Namespace:   System.Runtime.Remoting
Assembly:  mscorlib (in mscorlib.dll)

[SecurityCriticalAttribute]
public static object Unmarshal(
	ObjRef objectRef,
	bool fRefine
)

Parameters

objectRef
Type: System.Runtime.Remoting.ObjRef

The ObjRef that represents the remote object for which the proxy is being created.

fRefine
Type: System.Boolean

true to refine the proxy to the type on the server; otherwise, false.

Return Value

Type: System.Object

A proxy to the object that the given ObjRef represents.

Exception Condition
ArgumentException

The ObjRef instance specified in the objectRef parameter is not well-formed.

SecurityException

At least one of the callers higher in the callstack does not have permission to configure remoting types and channels.

A ObjRef is a serializable representation of an object used to transfer an object reference across an application domain boundary. Creating a ObjRef for an object is known as marshaling. The ObjRef can be transferred through a channel into another application domain (possibly on another process or computer). Once in the other application domain, the ObjRef must be parsed to create a proxy for the object, generally connected to the real object. This operation is known as unmarshaling. During unmarshaling, the ObjRef is parsed to extract the method information of the remote object and both the transparent proxy and RealProxy objects are created. The content of the parsed ObjRef is added to the transparent proxy before the transparent proxy is registered with the common language runtime.

A ObjRef contains information that describes the Type and class of the object being marshaled, a URI that uniquely identifies the specific object instance, and communication related information about how to reach the remoting subdivision where the object is located.

When first created, the proxy is of type MarshalByRefObject. As you cast it into different types, the remoting infrastructure keeps track of the most used type to avoid loading the type unnecessarily.

SecurityPermission

for configuration of the remoting infrastructure. Demand value: SecurityAction.Demand; Permission value: SecurityPermissionFlag.RemotingConfiguration

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft