src/Simple.OData.Client.Core/Http/WebRequestException.cs
/// <summary>
/// Creates from the instance of HttpResponseMessage.
/// </summary>
/// <param name="response">The instance of <see cref="HttpResponseMessage"/>.</param>
/// <param name="exceptionMessageSource">The source used to build exception message, see <see cref="WebRequestExceptionMessageSource"/></param>
/// <returns>The instance of <see cref="WebRequestException"/>.</returns>
Creates from the instance of HttpResponseMessage.
Creates from the instance of HttpResponseMessage .
public async static Task<WebRequestException> CreateFromResponseMessageAsync(HttpResponseMessage response, WebRequestExceptionMessageSource exceptionMessageSource)
	{
		var requestUri = response.RequestMessage?.RequestUri;
		return new WebRequestException(response.ReasonPhrase, response.StatusCode, requestUri,
			response.Content != null ? await response.Content.ReadAsStringAsync().ConfigureAwait(false) : null, exceptionMessageSource, null);
	}
public async static Task < WebRequestException > CreateFromResponseMessageAsync ( HttpResponseMessage response , WebRequestExceptionMessageSource exceptionMessageSource ) { var requestUri = response . RequestMessage ? . RequestUri ; return new WebRequestException ( response . ReasonPhrase , response . StatusCode , requestUri , response . Content != null ? await response . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) : null , exceptionMessageSource , null ) ; }
Creates from the instance of HttpResponseMessage.
Creates from the instance of HttpResponseMessage .
The instance of .
The instance of .
response
HttpResponseMessage
The instance of .
The instance of .
exceptionMessageSource
WebRequestExceptionMessageSource
The source used to build exception message, see
The source used to build exception message see