Exemplo n.º 1
0
        protected override async Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            var startDate = HighResolutionDateTime.UtcNow;

            var task = base.SendAsync(request, cancellationToken);

            _requestReporter.InProgressRequests.Add(task);
            var response = await task;

            var endDate = HighResolutionDateTime.UtcNow;

            var requestTime = new RequestTime(startDate, endDate);

            _requestReporter.CompletedRequests.Add(requestTime);

            return(response);
        }
Exemplo n.º 2
0
 protected bool Equals(RequestTime other)
 {
     return(Start.Equals(other.Start) && End.Equals(other.End));
 }
Exemplo n.º 3
0
 public RequestTime(RequestTime other)
 {
     Start = other.Start;
     End   = other.End;
 }