protected override void AttachToComponentRegistration( IComponentRegistry componentRegistry, IComponentRegistration registration) { if (DynamicProxyContext.From(registration) != null) { registration.InterceptedBy <SimpleInterceptor>(); } }
protected override void AttachToComponentRegistration(IComponentRegistry componentRegistry, IComponentRegistration registration) { Type implementationType = registration.Activator.LimitType; if (DynamicProxyContext.From(registration) != null && implementationType.FullName == "Orchard.Car.Services.CarInfoService") { registration.InterceptedBy <SimpleInterceptor>(); } }