构造函数入下:
[SecurityCritical]
protected RealProxy(Type classToProxy) : this(classToProxy, IntPtr.Zero, null)
{
}
[SecurityCritical]
protected RealProxy(Type classToProxy, IntPtr stub, object stubData)
{
if (!classToProxy.IsMarshalByRef && !classToProxy.IsInterface) throw new ArgumentException(Environment.GetResourceString("Remoting_Proxy_ProxyTypeIsNotMBR"));
if (IntPtr.Zero == stub)
{
stub = _defaultStub;
stubData = _defaultStubData;
}
this._tp = null;
if (stubData == null) throw new ArgumentNullException("stubdata");
this._tp = RemotingServices.CreateTransparentProxy(this, classToProxy, stub, stubData);
if (this is RemotingProxy) this._flags |= RealProxyFlags.RemotingProxy;
}
继承RealProxy的子类其构造函数中的参数classToProxy (Type类型) 必需是继承之MarshalByRef的类或者是接口
参考
http://www.cnblogs.com/flier/archive/2004/10/16/53145.html
http://www.cnblogs.com/idior/archive/2007/03/06/665479.html
http://www.cnblogs.com/artech/archive/2010/01/04/1639149.html
http://www.cnblogs.com/artech/archive/2008/01/31/1059492.html