Autofac.Extras.DynamicProxy 7.1.0

Autofac.Extras.DynamicProxy

Interceptor and decorator support for Autofac via Castle DynamicProxy.

Build status codecov

Autofac on Stack Overflow

Get Packages

You can get Autofac.Extras.DynamicProxy by grabbing the latest NuGet packages. If you're feeling adventurous, continuous integration builds are on MyGet.

Release notes are available on GitHub.

Get Help

Need help with Autofac? We have a documentation site as well as API documentation. We're ready to answer your questions on Stack Overflow or check out the discussion forum.

If you find a bug with Autofac.Extras.DynamicProxy please file it in that repo.

Get Started

First, create your interceptor:

public class CallLogger : IInterceptor
{
  TextWriter _output;

  public CallLogger(TextWriter output)
  {
    _output = output;
  }

  public void Intercept(IInvocation invocation)
  {
    _output.Write("Calling method {0}.", invocation.Method.Name);
    invocation.Proceed();
    _output.WriteLine("Done: result was {0}.", invocation.ReturnValue);
  }
}

Then register your type to be intercepted:

var builder = new ContainerBuilder();
builder.RegisterType<SomeType>()
       .As<ISomeInterface>()
       .EnableInterfaceInterceptors();
builder.Register(c => new CallLogger(Console.Out));
var container = builder.Build();
var willBeIntercepted = container.Resolve<ISomeInterface>();

You can read more details in the documentation.

Contributing / Pull Requests

Refer to the Contributor Guide for setting up and building Autofac source.

You can also open this repository right now in VS Code.

Showing the top 20 packages that depend on Autofac.Extras.DynamicProxy.

Packages Downloads
Volo.Abp.Autofac
Package Description
60
Volo.Abp.Autofac
Package Description
49
Volo.Abp.Autofac
Package Description
33
Volo.Abp.Autofac
Package Description
30
Volo.Abp.Autofac
Package Description
22
Volo.Abp.Autofac
Package Description
21
Volo.Abp.Autofac
Package Description
20

Release notes are at https://github.com/autofac/Autofac.Extras.DynamicProxy/releases

.NET 6.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
7.1.0 36 07/18/2023
7.0.0 38 05/26/2023
6.0.1 30 05/26/2023
6.0.0 32 07/05/2021
5.0.0 29 05/26/2023
4.5.0 35 05/26/2023
4.4.0 28 05/26/2023
4.3.0 26 05/26/2023
4.2.1 32 05/26/2023
4.2.0 31 05/26/2023
4.1.0 31 05/26/2023
4.0.1 29 05/26/2023
4.0.0 28 05/26/2023
4.0.0-beta8-231 33 05/26/2023
4.0.0-beta8-227 35 05/26/2023