views:

965

answers:

0

Why does the following not intercept calls to IBusinessService with the LogAspect?

container.Register(AllTypes.Of<IBusinessService>()
    .FromAssembly(Assembly.GetExecutingAssembly())
    .ConfigureFor<BusinessService>(
        c => c.Named(typeof(BusinessService).Name)
            .Interceptors(InterceptorReference.ForType<LogAspect>()).Anywhere));

If I register each implementation of IBusinessService using the Component.For syntax then it works.