I came across this article of your on Selecting which methods to
intercept which shows an implementation of ProxyGenerationOptions with
ProxyGenerationHook. I am using windsor container and register types
as follow

IWindsorContainer container = new WindsorContainer();
 container.Register(
                Component.For<IFoo>().ImplementedBy<Foo>(),
                Component.For<ILogger>().ImplementedBy<Logger>(),
                Component.For<LogInterceptor>().LifeStyle.Transient);

could you please indicate how can i register ProxyGenerationOptions
using windsor container. Thanks


http://kozmic.pl/archive/2009/01/17/castle-dynamic-proxy-tutorial-part-iii-selecting-which-methods-to.aspx

On Jul 10, 11:15 pm, Krzysztof Koźmic <[email protected]>
wrote:
> using either IProxyGenerationHook, or IIntreceptorSelector
>
> Component.For<IFoo>().ImplementedBy<Foo>().Interceptors<SomeInterceptor,
> SomeOtherInterceptor>()
>
> 2010/7/10PB<[email protected]>:
>
>
>
> > thanks. then how can i prevent a method from being intercepted for
> > interfaces?
>
> > regards.
>
> > On Jul 9, 8:05 pm, Krzysztof Koźmic <[email protected]>
> > wrote:
> >> You're mixing stuff up here. Attributes and being virtual are unrelated.
>
> >> Class components need to have methods virtual to be interceptable.
> >> Interfaces are virtual by definition.
>
> >> You don't need attributes at all - just assign interceptor to the
> >> component when registering it.
>
> >> Krzysztof
>
> >> On 9/07/2010 12:30 PM,PBwrote:
>
> >> > 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- Hide quoted text -
>
> >> - Show quoted text -
>
> > --
> > 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 
> > athttp://groups.google.com/group/castle-project-users?hl=en.- Hide quoted 
> > text -
>
> - Show quoted text -

-- 
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.

Reply via email to