RealProxy Constructor (Type^)
Initializes a new instance of the RealProxy class that represents a remote object of the specified Type.
Assembly: mscorlib (in mscorlib.dll)
| Exception | Condition |
|---|---|
| ArgumentException | classToProxy is not an interface, and is not derived from MarshalByRefObject. |
The current method creates a transparent proxy, which can be accessed through the GetTransparentProxy method.
A client that uses an object across any kind of a remoting boundary is actually using a transparent proxy for the object. The transparent proxy gives the impression that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure.
The transparent proxy is housed by an instance of a managed runtime class RealProxy. The RealProxy implements a part of the functionality that is needed to forward the operations from the transparent proxy. Note that a proxy object inherits the associated semantics of managed objects such as garbage collection and support for fields and methods, and can be extended to form new classes. The proxy has a dual nature: it acts as an object of the same class as the remote object (transparent proxy), and is a managed object itself.
Available since 1.1