Skip to content

ninject/Ninject.Extensions.Interception

master
Switch branches/tags
Code

Latest commit

* #52 - Added check for faulted task in AsyncInterceptor and associated tests.

* Reverted a C# 8 feature.

* #52 - The AsyncInterceptor now "pipelines" results, allowing for multiple interceptors.  Also full support for HandleExceptions and CompleteInvoke in both async and sync scenarios.

Co-authored-by: Jay Miller <jay.miller@verint.com>
a267001

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

Ninject.Extensions.Interception

Build status codecov NuGet Version NuGet Download

This extension adds support for interception to Ninject.

For example, the WCF client proxy can be intercepted as below.

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

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

kernel.Bind<IFooService>()
    .ToMethod(context => ChannelFactory<IFooService>.CreateChannel("*"))
    .Intercept(typeof(ICommunicationObject))
    .With(interceptor);

About

Interception extension for Ninject

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages