Question

Is it true that in order for castle windsor's interceptor to intercept a method, that method needs to be declare public?

Was it helpful?

Solution

No it is not true.

The method must be accessible for generated proxy type, which means it must be virtual (or interface method) and it must not be private.

So protected and protected internal methods are good to go. Also internal methods from assembly visible to generated dynamic proxy assembly are OK.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top