Pergunta

Is it possible to intercept non-public methods with Castle Dynamic Proxy?

Will something like this work to intercept non-public members?

 base.BootStrapContainer.Register(
                    Classes.FromAssemblyNamed(referencedAssembly)
                           .IncludeNonPublicTypes()
                           .Pick()
                           .Configure(component => component.Interceptors<TracingAspect>()));

Foi útil?

Solução

No. Only members that are public to dynamic proxy can be intercepted.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top