Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 650 Bytes

File metadata and controls

9 lines (5 loc) · 650 Bytes

DynamicProxyExample

Method interception with Castle DynamicProxy, wired up two ways: named on the registration, and declared with an [Intercept] attribute on the contract. The interceptor is a normal registration, so it can take dependencies of its own.

Packages: Autofac, Autofac.Extras.DynamicProxy

Run dotnet run --project src/DynamicProxyExample. It prints the intercepted calls around each method.

See Type Interceptors for the documentation this example follows.