Tag: context bound

透明代理到原始类型

我有一个类型为{System.Runtime.Remoting.Proxies .__ TransparentProxy}的运行时对象,它是从inheritance自ContextBoundObject的类实例创建的。 这个类将事件引发到其他一些对象,我需要将此代理对象转换为原始对象。 所有对象都在单个系统上的默认AppDomain中。 public abstract class ObjectBase : ContextBoundObject, IObjectBase { } public IMessageSink GetObjectSink(MarshalByRefObject o, IMessageSink next) { _context = (ObjectBase)o;// as ObjectBase; does not give any error but type remains /// transparent proxy in VS watch window. // no property to get the underlying type of the proxy return _aspect; } […]