The Sharp Architecture contrib project has a class AttributeControlledFacilityBase, which I think is similar to what you need. You can find the source at http://github.com/codai/Sharp-Architecture-Contrib/
Hope it helps. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of PB Sent: 09 July 2010 03:31 To: Castle Project Users Subject: Implementing method interception I use Windsor container for DI in my application. I want to implement interception and confused wether I'll have to change the existing implementation to use Dynamic Proxy to create objects so that they can be intercepted or is there a way to integrate with existing Windsor container. Also how can I implement attribute based method interception? I don't want classes to be attributed with [Interceptor(typeof(LogInterceptor))] and then create virtual methods. Ninject allows you to derive your attribute class from InterceptAttribute class and decorate methods for interception. [AttributeUsage(AttributeTargets.Property|AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class LogAttribute : InterceptAttribute { public override IInterceptor CreateInterceptor(IProxyRequest request) { return request.Context.Kernel.Get<LogInterceptor>(); } } Is it achievable with castle? Thanks -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
