/// <summary>
 ///     Method invoked before sending the <see cref="HttpRequestMessage" /> to the server.
 ///     Useful to log the request or change properties like HTTP headers.
 /// </summary>
 /// <param name="client">The client sending the request</param>
 /// <param name="arguments">The method arguments</param>
 /// <param name="ct">The cancellation token</param>
 /// <returns>Task to be awaited</returns>
 public async Task OnHttpRequestAsync(ISoapClient client, OnHttpRequestArguments arguments, CancellationToken ct)
 {
     if (OnHttpRequestAsyncAction != null)
     {
         await OnHttpRequestAsyncAction(client, arguments, ct);
     }
 }
示例#2
0
 /// <summary>
 ///     Method invoked before sending the <see cref="HttpRequestMessage" /> to the server.
 ///     Useful to log the request or change properties like HTTP headers.
 /// </summary>
 /// <param name="client">The client sending the request</param>
 /// <param name="arguments">The method arguments</param>
 /// <param name="ct">The cancellation token</param>
 /// <returns>Task to be awaited</returns>
 public virtual Task OnHttpRequestAsync(ISoapClient client, OnHttpRequestArguments arguments, CancellationToken ct)
 {
     return(Task.FromResult(true));
 }
示例#3
0
 /// <summary>
 ///     Method invoked before sending the <see cref="HttpRequestMessage" /> to the server.
 ///     Useful to log the request or change properties like HTTP headers.
 /// </summary>
 /// <param name="client">The client sending the request</param>
 /// <param name="arguments">The method arguments</param>
 public virtual void OnHttpRequest(ISoapClient client, OnHttpRequestArguments arguments)
 {
 }
 /// <summary>
 ///     Method invoked before sending the <see cref="HttpRequestMessage" /> to the server.
 ///     Useful to log the request or change properties like HTTP headers.
 /// </summary>
 /// <param name="client">The client sending the request</param>
 /// <param name="arguments">The method arguments</param>
 public void OnHttpRequest(ISoapClient client, OnHttpRequestArguments arguments)
 {
     OnHttpRequestAction?.Invoke(client, arguments);
 }