سؤال

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