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));
 }
Пример #2
0
 public ClientProxyAspectBuilderFactory(IInterceptorCollector interceptorCollector,
                                        IAspectCachingProvider aspectCachingProvider, RpcClientInvokerFactory clientFactory)
 {
     this.interceptorCollector = interceptorCollector;
     this.clientFactory        = clientFactory;
     aspectCaching             = aspectCachingProvider.GetAspectCaching(nameof(ClientProxyAspectBuilderFactory));
 }
Пример #3
0
 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));
 }
 public AspectBuilderFactory(IInterceptorCollector interceptorCollector,
                             IAspectCachingProvider aspectCachingProvider)
 {
     if (aspectCachingProvider == null)
     {
         throw new ArgumentNullException(nameof(aspectCachingProvider));
     }
     _interceptorCollector =
         interceptorCollector ?? throw new ArgumentNullException(nameof(interceptorCollector));
     _aspectCaching = aspectCachingProvider.GetAspectCaching(nameof(AspectBuilderFactory));
 }