.ben
03-16-2007, 01:13 PM
Is it possible to add an interface implementation to a proxy?
Something like:
ProxyFactory factory = new ProxyFactory(new MySuperDomainObject());
factory.AddInterface(typeof(IPersistent));
IMySuperDomainObject obj = (IMySuperDomainObject)factory.GetProxy();
I get an object supporting the interface, but I'll need a way to hook it up with some sort of implementation of the interface IPersistent.
Something like:
ProxyFactory factory = new ProxyFactory(new MySuperDomainObject());
factory.AddInterface(typeof(IPersistent));
IMySuperDomainObject obj = (IMySuperDomainObject)factory.GetProxy();
I get an object supporting the interface, but I'll need a way to hook it up with some sort of implementation of the interface IPersistent.