/// <summary>
        /// OnMethodEnd callback
        /// </summary>
        /// <typeparam name="TTarget">Type of the target</typeparam>
        /// <typeparam name="TResponse">Type of the response</typeparam>
        /// <param name="instance">Instance value, aka `this` of the instrumented method.</param>
        /// <param name="responseMessage">HttpResponse message instance</param>
        /// <param name="exception">Exception instance in case the original code threw an exception.</param>
        /// <param name="state">Calltarget state value</param>
        /// <returns>A response value, in an async scenario will be T of Task of T</returns>
        public static CallTargetReturn <TResponse> OnMethodEnd <TTarget, TResponse>(TTarget instance, TResponse responseMessage, Exception exception, CallTargetState state)
            where TResponse : IHttpResponseMessage
        {
            var response = HttpClientHandlerCommon.OnMethodEnd(instance, responseMessage, exception, state);

            return(new CallTargetReturn <TResponse>(response));
        }
 /// <summary>
 /// OnMethodBegin callback
 /// </summary>
 /// <typeparam name="TTarget">Type of the target</typeparam>
 /// <typeparam name="TRequest">Type of the request</typeparam>
 /// <param name="instance">Instance value, aka `this` of the instrumented method.</param>
 /// <param name="requestMessage">HttpRequest message instance</param>
 /// <param name="cancellationToken">CancellationToken value</param>
 /// <returns>Calltarget state value</returns>
 public static CallTargetState OnMethodBegin <TTarget, TRequest>(TTarget instance, TRequest requestMessage, CancellationToken cancellationToken)
     where TRequest : IHttpRequestMessage
 {
     return(HttpClientHandlerCommon.OnMethodBegin(instance, requestMessage, cancellationToken));
 }
 /// <summary>
 /// OnAsyncMethodEnd callback
 /// </summary>
 /// <typeparam name="TTarget">Type of the target</typeparam>
 /// <typeparam name="TResponse">Type of the response, in an async scenario will be T of Task of T</typeparam>
 /// <param name="instance">Instance value, aka `this` of the instrumented method.</param>
 /// <param name="responseMessage">HttpResponse message instance</param>
 /// <param name="exception">Exception instance in case the original code threw an exception.</param>
 /// <param name="state">Calltarget state value</param>
 /// <returns>A response value, in an async scenario will be T of Task of T</returns>
 public static TResponse OnAsyncMethodEnd <TTarget, TResponse>(TTarget instance, TResponse responseMessage, Exception exception, CallTargetState state)
     where TResponse : IHttpResponseMessage
 {
     return(HttpClientHandlerCommon.OnMethodEnd(instance, responseMessage, exception, state));
 }