I'm trying to do some sort of interception by using Autofac. Currently I've some bll objects configured:
updater.RegisterGeneric(typeof(BaseBll<>))
.AsImplementedInterfaces()
.InstancePerRequest()
.PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies)
.InterceptedBy(typeof(ActivityLogger));
updater.Register(c => new ActivityLogger());
I put Interception attribute on one of the classes:
[Intercept(typeof(ActivityLogger))]
public class MyClassBll : BaseBll<TModel>, IMyClassBll
Unfortunately, the Intercept method is not called when calling some methods from MyClassBll. If you have any ideas, how this might be fixed, please let me know.
For now I've found temp workaround:
updater.RegisterType<MyClassBll>().As<IMyClassBll>().EnableInterfaceInterceptors();