Is there a way on how to use interception by attribute in C# unity and keep the object registration code in XML file(like app.config)? If yes, can you provide me with code,
This is an old question but was really useful to me so I'll add the C# version of the unity configuration.
container.Configure()
.AddPolicy("LoggingPolicy")
.AddMatchingRule(new CustomAttributeMatchingRule(typeof(MyInterceptionAttribute), false))
.AddCallHandler();
container.RegisterType(new Interceptor(), new InterceptionBehavior());