I have the following class:
public class MyTest
{
public void Test()
{
}
}
and I created the following interceptor:
public class MyInterceptor : IInterceptor
{
public void Intercept(IInvocation invocation)
{
invocation.Proceed();
}
}
and in my code, I do:
ProxyGenerator g = new ProxyGenerator();
g.CreateClassProxy<MyTest>(new MyInterceptor());
MyTest t = new MyTest();
t.Test();
Shouldn't that hit the Intercept method in the debugger? It is not. Am I missing something?
EDIT: this is specific to Castle DynamicProxy.