/// <summary>Removes the specified handler from the list of unsuccessful response handlers.</summary>
 public void RemoveUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler handler)
 {
     lock (unsuccessfulResponseHandlersLock)
     {
         unsuccessfulResponseHandlers.Remove(handler);
     }
 }
 /// <summary>Adds the specified handler to the list of unsuccessful response handlers.</summary>
 public void AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler handler)
 {
     lock (unsuccessfulResponseHandlersLock)
     {
         unsuccessfulResponseHandlers.Add(handler);
     }
 }
예제 #3
0
 /// <summary>
 /// Add an unsuccessful response handler for this request only.
 /// </summary>
 /// <param name="handler">The unsuccessful response handler. Must not be <c>null</c>.</param>
 public void AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler handler)
 {
     handler.ThrowIfNull(nameof(handler));
     if (_unsuccessfulResponseHandlers == null)
     {
         _unsuccessfulResponseHandlers = new List <IHttpUnsuccessfulResponseHandler>();
     }
     _unsuccessfulResponseHandlers.Add(handler);
 }
 /// <summary>Adds the specified handler to the list of unsuccessful response handlers.</summary>
 public void AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler handler)
 {
     lock (unsuccessfulResponseHandlersLock)
     {
         unsuccessfulResponseHandlers.Add(handler);
     }
 }
 /// <summary>Removes the specified handler from the list of unsuccessful response handlers.</summary>
 public void RemoveUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler handler)
 {
     lock (unsuccessfulResponseHandlersLock)
     {
         unsuccessfulResponseHandlers.Remove(handler);
     }
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AnalyticsProvider" /> class.
 /// </summary>
 /// <param name="exceptionHandler">The exception handler.</param>
 /// <param name="unsuccessfulResponseHandler">The unsuccessful response handler.</param>
 public AnalyticsProvider(IHttpExceptionHandler exceptionHandler, IHttpUnsuccessfulResponseHandler unsuccessfulResponseHandler)
 {
     this.exceptionHandler            = exceptionHandler;
     this.unsuccessfulResponseHandler = unsuccessfulResponseHandler;
 }