public InterceptorCollector( IEnumerable <IInterceptorSelector> interceptorSelectors, IEnumerable <IAdditionalInterceptorSelector> additionalInterceptorSelectors, IPropertyInjectorFactory propertyInjectorFactory, IAspectCachingProvider aspectCachingProvider) { if (interceptorSelectors == null) { throw new ArgumentNullException(nameof(interceptorSelectors)); } if (additionalInterceptorSelectors == null) { throw new ArgumentNullException(nameof(additionalInterceptorSelectors)); } if (propertyInjectorFactory == null) { throw new ArgumentNullException(nameof(propertyInjectorFactory)); } if (aspectCachingProvider == null) { throw new ArgumentNullException(nameof(aspectCachingProvider)); } _interceptorSelectors = interceptorSelectors.Distinct(new InterceptorSelectorEqualityComparer <IInterceptorSelector>()).ToList(); _additionalInterceptorSelectors = additionalInterceptorSelectors.Distinct(new InterceptorSelectorEqualityComparer <IAdditionalInterceptorSelector>()).ToList(); _propertyInjectorFactory = propertyInjectorFactory; _aspectCaching = aspectCachingProvider.GetAspectCaching(nameof(InterceptorCollector)); }
public ParameterInterceptorSelector(IPropertyInjectorFactory propertyInjectorFactory, IAspectCachingProvider aspectCachingProvider) { if (aspectCachingProvider == null) { throw new ArgumentNullException(nameof(aspectCachingProvider)); } _propertyInjectorFactory = propertyInjectorFactory ?? throw new ArgumentNullException(nameof(propertyInjectorFactory)); _aspectCaching = aspectCachingProvider.GetAspectCaching(nameof(ParameterInterceptorSelector)); }