문제

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>()));

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top