Autofac.Extras.DynamicProxy 8.0.1
Autofac.Extras.DynamicProxy
Interceptor and decorator support for Autofac via Castle DynamicProxy.
Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.
Quick Start
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.
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.
Showing the top 20 packages that depend on Autofac.Extras.DynamicProxy.
| Packages | Downloads |
|---|---|
|
Verto.Vcp.Autofac
Package Description
|
6 |
|
Volo.Abp.Autofac
Package Description
|
4 |
|
Verto.Vcp.Autofac
Package Description
|
4 |
|
Volo.Abp.Autofac
Package Description
|
3 |
|
Verto.Vcp.Autofac
Package Description
|
3 |
|
Verto.Vcp.Autofac
Package Description
|
2 |
|
Volo.Abp.Autofac
Package Description
|
2 |
Release notes are at https://github.com/autofac/Autofac.Extras.DynamicProxy/releases
.NET 10.0
- Autofac (>= 9.3.1)
- Castle.Core (>= 5.2.1)
.NET 8.0
- Autofac (>= 9.3.1)
- Castle.Core (>= 5.2.1)
.NET Standard 2.0
- Autofac (>= 9.3.1)
- Castle.Core (>= 5.2.1)
.NET Standard 2.1
- Autofac (>= 9.3.1)
- Castle.Core (>= 5.2.1)
| Version | Downloads | Last updated |
|---|---|---|
| 8.0.1 | 1 | 07/14/2026 |
| 8.0.0 | 1 | 07/01/2026 |
| 7.1.0 | 2 | 02/03/2026 |
| 7.0.0 | 1 | 02/20/2026 |
| 6.0.1 | 1 | 02/20/2026 |
| 6.0.0 | 3 | 02/03/2026 |
| 5.0.0 | 3 | 02/03/2026 |
| 4.5.0 | 1 | 02/20/2026 |
| 4.4.0 | 2 | 02/03/2026 |
| 4.3.0 | 2 | 02/03/2026 |
| 4.2.1 | 3 | 02/03/2026 |
| 4.2.0 | 3 | 02/03/2026 |
| 4.1.0 | 2 | 02/03/2026 |
| 4.0.1 | 3 | 02/03/2026 |
| 4.0.0 | 2 | 02/03/2026 |
| 4.0.0-beta8-231 | 1 | 07/01/2026 |
| 4.0.0-beta8-227 | 0 | 09/14/2015 |