Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 533 Bytes

README.markdown

File metadata and controls

16 lines (13 loc) · 533 Bytes

ChannelProxies can be intercepted now:

[ServiceContract]
public interface IFooService
{
    [OperationContract]
    void Foodo();
}

ActionInterceptor interceptor =
    new ActionInterceptor( invocation => Console.WriteLine("Executing {0}.", invocation.Request.Method) );

kernel.Bind<IFooService>()
    .ToMethod(context => ChannelFactory<IFooService>.CreateChannel(new NetTcpBinding(), new EndpointAddress("net.tcp://localhost/FooService")))
    .Intercept()
    .With(interceptor);