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

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

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

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