コード例 #1
0
ファイル: RestClient.cs プロジェクト: clickviewapp/Extensions
        /// <summary>
        /// Initializes a new instance of the <see cref="RestClient" /> class
        /// </summary>
        /// <param name="baseAddress"></param>
        /// <param name="options"></param>
        public RestClient(Uri baseAddress, RestClientOptions options = null)
        {
            _baseAddress = baseAddress ?? throw new ArgumentNullException(nameof(baseAddress));

            var o = options ?? RestClientOptions.Default;

            _options = o;

            _httpClient = CreateClient(o);
        }
コード例 #2
0
ファイル: RestClient.cs プロジェクト: clickviewapp/Extensions
 /// <summary>
 ///     Initializes a new instance of the <see cref="RestClient" /> class with a specified
 ///     <param name="httpClient">
 ///         <see cref="HttpClient" />
 ///     </param>
 /// </summary>
 /// <param name="baseAddress"></param>
 /// <param name="httpClient"></param>
 /// <param name="options"></param>
 public RestClient(Uri baseAddress, HttpClient httpClient, CoreRestClientOptions options = null)
     : this(httpClient, options)
 {
     _baseAddress = baseAddress ?? throw new ArgumentNullException(nameof(baseAddress));
 }
コード例 #3
0
ファイル: RestClient.cs プロジェクト: clickviewapp/Extensions
 /// <summary>
 ///     Initializes a new instance of the <see cref="RestClient" /> class with a specified
 ///     <param name="httpClient">
 ///         <see cref="HttpClient" />
 ///     </param>
 /// </summary>
 /// <param name="httpClient"></param>
 /// <param name="options"></param>
 public RestClient(HttpClient httpClient, CoreRestClientOptions options = null)
 {
     _httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
     _options    = options ?? RestClientOptions.Default;
 }