public TypeInterceptorCreator(Type interceptorType,
                               InterceptPredicate whitelists, InterceptPredicate blacklists) : base(interceptorType, whitelists, blacklists)
 {
     if (!typeof(IInterceptor).IsAssignableFrom(interceptorType))
     {
         throw new ArgumentException("Not IInterceptor type.", interceptorType.FullName);
     }
 }
 public ObjectInterceptorCreator(IInterceptor interceptor,
                                 InterceptPredicate whitelists, InterceptPredicate blacklists) : base(interceptor.GetType(), whitelists, blacklists)
 {
     this.interceptor = interceptor;
 }
Exemple #3
0
 protected InterceptorCreator(Type interceptorType, InterceptPredicate whitelists, InterceptPredicate blacklists)
 {
     InterceptorType = interceptorType;
     Whitelists      = whitelists;
     Blacklists      = blacklists;
 }
Exemple #4
0
 public InterceptBox(IInterceptor interceptor, InterceptPredicate verifier)
 {
     Interceptor = interceptor;
     Verifier    = verifier;
 }
Exemple #5
0
 public static IList <IInterceptorCreator> AddType <T>
     (this IList <IInterceptorCreator> interceptors, InterceptPredicate whitelists = null, InterceptPredicate blacklists = null) where T : IInterceptor
 {
     return(interceptors.AddType(typeof(T), whitelists, blacklists));
 }
Exemple #6
0
 public static IList <IInterceptorCreator> Add
     (this IList <IInterceptorCreator> interceptors, IInterceptor interceptor, InterceptPredicate whitelists = null, InterceptPredicate blacklists = null)
 {
     interceptors.Add(new ObjectInterceptorCreator(interceptor, whitelists, blacklists));
     return(interceptors);
 }
Exemple #7
0
 public static IList <IInterceptorCreator> Add <T>
     (this IList <IInterceptorCreator> interceptors, Func <IServiceProvider, T> func, InterceptPredicate whitelists = null, InterceptPredicate blacklists = null) where T : IInterceptor
 {
     interceptors.Add(new FuncInterceptorCreator <T>(func, whitelists, blacklists));
     return(interceptors);
 }
Exemple #8
0
 public static IList <IInterceptorCreator> AddType
     (this IList <IInterceptorCreator> interceptors, Type interceptorType, InterceptPredicate whitelists = null, InterceptPredicate blacklists = null)
 {
     interceptors.Add(new TypeInterceptorCreator(interceptorType, whitelists, blacklists));
     return(interceptors);
 }
 public FuncInterceptorCreator(Func <IServiceProvider, T> createFunc,
                               InterceptPredicate whitelists, InterceptPredicate blacklists) : base(typeof(T), whitelists, blacklists)
 {
     this.createFunc = createFunc;
 }