From: <hen...@bv...> - 2004-07-20 19:42:34
|
Hi The AspectSharpEngine wrap the MessageImpl instance into a proxy. The generated proxy is a transient type generated at runtime, that implements all the interfaces implemented by the wrapped instance(MessageImpl in case) and the mixins. So the cast of the generated proxy to MessageImpl will be invalid, because the MessageImpl doesn't bellow to the proxy hierarchy, forcing the cast to an interface that implements the desired behavior(IMessage in case). You can learn more about .NET Dynamic Proxies at http://avalon.apache.org/central/laboratory/castle/dynamicproxy/index.ht ml Regards Henry. -------- Original Message -------- Subject: [Aspectsharp-users] (no subject) Date: Mon, 19 Jul 2004 23:34:33 +0200 (MEST) From: die...@gm... To: asp...@li... I just downloaded aspectsharp and have one question: in the sample project, when I replace IMessage message = AspectSharpEngine.Wrap( new MessageImpl() ) as IMessage; with MessageImpl message = AspectSharpEngine.Wrap( new MessageImpl() ); the proxy does not get generated (message is null). I've been looking through the aspect configuration but could not figure out why this happens. Can you help me out here? Thanks dsh ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Aspectsharp-users mailing list Asp...@li... https://lists.sourceforge.net/lists/listinfo/aspectsharp-users |