PDA

View Full Version : HotSwappableTargetSource as an interface implementation?



rolandz
10-16-2008, 10:12 AM
Hi,

Would it make sense to introduce an interface for swappable target sources? Let's name it ISwappableTargetSource and let it introduce the Swap() method to the ITargetSource interface.

That would allow to intercept calls to the swappable target source object and still would allow to use casting from object to the interface.

At the moment I want to intercept a Swap() method and switch event handlers in the advice. But the client object that has a property of type HotSwappable... cannot be assigned with the composition proxy from ObjectNameAutoproxy...