public void Clear(InterceptorLifetime lifetime)
 {
     lock (syncRoot)
     {
         if ((lifetime & InterceptorLifetime.Call) == InterceptorLifetime.Call) callInterceptors.Clear();
         if ((lifetime & InterceptorLifetime.Global) == InterceptorLifetime.Global) globalInterceptors.Clear();
     }
 }
        public SendInterceptorSkeleton(string name, InterceptorPlace preventPlace, InterceptorLifetime lifetime, Func<NotifyRequest, InterceptorPlace, bool> sendInterceptor)
        {
            if (String.IsNullOrEmpty("name")) throw new ArgumentNullException("name");
            if (String.IsNullOrEmpty("sendInterceptor")) throw new ArgumentNullException("sendInterceptor");

            method = sendInterceptor;
            Name = name;
            PreventPlace = preventPlace;
            Lifetime = lifetime;
        }
Beispiel #3
0
 public void Clear(InterceptorLifetime lifetime)
 {
     lock (syncRoot)
     {
         if ((lifetime & InterceptorLifetime.Call) == InterceptorLifetime.Call)
         {
             callInterceptors.Clear();
         }
         if ((lifetime & InterceptorLifetime.Global) == InterceptorLifetime.Global)
         {
             globalInterceptors.Clear();
         }
     }
 }
Beispiel #4
0
        public SendInterceptorSkeleton(string name, InterceptorPlace preventPlace, InterceptorLifetime lifetime, Func <NotifyRequest, InterceptorPlace, IServiceScope, bool> sendInterceptor)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentException("Empty name.", "name");
            }
            if (sendInterceptor == null)
            {
                throw new ArgumentNullException("sendInterceptor");
            }

            method       = sendInterceptor;
            Name         = name;
            PreventPlace = preventPlace;
            Lifetime     = lifetime;
        }