public override void AddInterceptor(int index, IChannelInterceptor interceptor) { base.AddInterceptor(index, interceptor); if (interceptor is ITaskSchedulerChannelInterceptor) { TaskSchedulerInterceptorsSize++; } }
public virtual void AddInterceptor(IChannelInterceptor interceptor) { lock (_lock) { var interceptors = new List <IChannelInterceptor>(_interceptors); interceptors.Add(interceptor); _interceptors = interceptors; } }
public virtual void AddInterceptor(int index, IChannelInterceptor interceptor) { lock (_lock) { var interceptors = new List <IChannelInterceptor>(_interceptors); interceptors.Insert(index, interceptor); _interceptors = interceptors; } }
public virtual bool RemoveInterceptor(IChannelInterceptor interceptor) { lock (_lock) { var interceptors = new List <IChannelInterceptor>(_interceptors); var result = interceptors.Remove(interceptor); _interceptors = interceptors; return(result); } }
public void Add(int index, IChannelInterceptor interceptor) { lock (_lock) { var interceptors = new List <IChannelInterceptor>(_interceptors); interceptors.Insert(index, interceptor); _interceptors = interceptors.ToArray(); Count = _interceptors.Length; } }
public override bool RemoveInterceptor(IChannelInterceptor interceptor) { var removed = base.RemoveInterceptor(interceptor); if (removed && interceptor is ITaskSchedulerChannelInterceptor) { TaskSchedulerInterceptorsSize--; } return(removed); }
public bool Remove(IChannelInterceptor interceptor) { lock (_lock) { var interceptors = new List <IChannelInterceptor>(_interceptors); var result = interceptors.Remove(interceptor); _interceptors = interceptors.ToArray(); Count = _interceptors.Length; return(result); } }
public bool Add(IChannelInterceptor interceptor) { lock (_lock) { var interceptors = new List <IChannelInterceptor>(_interceptors); interceptors.Add(interceptor); _interceptors = interceptors.ToArray(); Count = _interceptors.Length; return(true); } }
private void UpdateInterceptorsFor(IChannelInterceptor interceptor) { if (interceptor is ITaskSchedulerChannelInterceptor) { lock (_lock) { var schedulerInterceptors = new List <ITaskSchedulerChannelInterceptor>(_schedulerInterceptors); schedulerInterceptors.Add((ITaskSchedulerChannelInterceptor)interceptor); _schedulerInterceptors = schedulerInterceptors; } } }
public virtual bool RemoveInterceptor(IChannelInterceptor interceptor) { return(Interceptors.Remove(interceptor)); }
public int Add(IChannelInterceptor interceptor) { return(_interceptors.Add(interceptor)); }
/// <summary> /// The constructor that takes three parameters; the channel manager, the inner channel and /// the interceptor. The channel manager and the inner channel is given to the base /// constructor of the ChannelBase. The interceptor is used intercept the replies. /// </summary> /// <param name="manager"></param> /// <param name="innerChannel"></param> /// <param name="channelInterceptor"></param> public InterceptorReplyChannel(ChannelManagerBase manager, IReplyChannel innerChannel, IChannelInterceptor channelInterceptor) : base(manager, innerChannel) { this._channelInterceptor = channelInterceptor; this.logger = LoggerFactory.Create(this.GetType()); }
public InterceptorRequestSessionChannel(ChannelManagerBase manager, IRequestSessionChannel innerChannel, IChannelInterceptor channelInterceptor) : base(manager, innerChannel, channelInterceptor) { _innerChannel = innerChannel; }
public int Add(IChannelInterceptor interceptor) { return _interceptors.Add(interceptor); }
public void AddInterceptor(int index, IChannelInterceptor interceptor) { _interceptors.Insert(index, interceptor); }
public void AddInterceptor(IChannelInterceptor interceptor) { _interceptors.Add(interceptor); }
public override void AddInterceptor(int index, IChannelInterceptor interceptor) { base.AddInterceptor(index, interceptor); UpdateInterceptorsFor(interceptor); }
/// <summary> /// Add a channel interceptor to the end of the list. /// </summary> public void AddInterceptor(IChannelInterceptor interceptor) { _interceptors.Add(interceptor); }
/// <summary> /// Constructor /// </summary> /// <param name="context">binding context</param> /// <param name="channelInterceptor">channel interceptor</param> public ChannelListenerChannelListener(BindingContext context, IChannelInterceptor channelInterceptor) { this.context = context; this.innerChannelListener = context.BuildInnerChannelListener <TChannel>(); this.channelInterceptor = channelInterceptor; }
/// <summary> /// Constructor /// </summary> /// <param name="context">binding context</param> /// <param name="channelInterceptor">channel interceptor</param> public InterceptorChannelFactory(BindingContext context, IChannelInterceptor channelInterceptor) { _innerChannelFactory = context.BuildInnerChannelFactory <TChannel>(); _channelInterceptor = channelInterceptor; }
public virtual void AddInterceptor(int index, IChannelInterceptor interceptor) { Interceptors.Add(index, interceptor); }
/// <summary> /// Constructor /// </summary> /// <param name="innerContext">inner context</param> /// <param name="message">The incoming System.ServiceModel.Channels.Message that contains the request</param> /// <param name="channelInterceptor">channel interceptor</param> public InterceptorRequestContext(RequestContext innerContext, Message message, IChannelInterceptor channelInterceptor) { _innerContext = innerContext; _message = message; _channelInterceptor = channelInterceptor; }