-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Problem Statement
Based on autofac/Autofac#1211 - it may be interesting to have the ability to conditionally enable interception based on a lambda expression. This does somewhat overlap with #29.
Desired Solution
I imagine the usage would be like:
builder
.RegisterAssemblyTypes(typeof(Program).Assembly)
.AsClosedTypesOf(typeof(ICommandHandler<,>))
.EnableInterfaceInterceptors(t => t.HasSpecificAttributeICareAbout())
.InterceptedBy(typeof(LoggingInterceptor));That is, you could act on the registration based on the type being registered. (Honestly, this part needs some work. I haven't thought it all the way through. It may be there's a better way to go here.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels