Castle DynamicProxy IInterceptorSelector implementation

I just got this test pass:

[Test]
public void BasicCase()
{
    ProxyGenerationOptions options = new ProxyGenerationOptions();
    options.Selector = new AllInterceptorSelector();
    var target = this.generator.CreateInterfaceProxyWithTarget(
        typeof(ISimpleInterface), 
        new SimpleClass(),
        options,
        new NoopInterceptor() ) as ISimpleInterface;
    Assert.IsNotNull( target );
    target.Do();            
}

And here’s how Do proxy method looks like in Reflector:

interceptorSelectorMethodInReflector 

2 Thoughts.

Comments are closed.