Example #1
0
        public static RecordingHandler Record(this HttpMessageHandler @this, Action <RecordingHandler> setup = null)
        {
            var _ = new RecordingHandler(@this);

            setup?.Invoke(_);
            return(_);
        }
Example #2
0
        public static RecordingHandler OnResponse(this RecordingHandler @this, EventHandler <HttpResponseMessage> handler)
        {
            @this.Response += handler;

            return(@this);
        }
Example #3
0
        public static RecordingHandler OnRequest(this RecordingHandler @this, EventHandler <HttpRequestMessage> handler)
        {
            @this.Request += handler;

            return(@this);
        }
Example #4
0
 public static RecordingHandler Record(this RecordingHandler @this, Action <RecordingHandler> setup = null)
 {
     setup?.Invoke(@this);
     return(@this);
 }
Example #5
0
 public static RecordingHandler Record(this RecordingHandler @this) => Record(@this, null);