Ejemplo n.º 1
0
 public SimpleRpcClient(Uri baseUrl, HttpClient httpClient,
                        JsonSerializerSettings jsonSerializerSettings = null)
 {
     if (jsonSerializerSettings == null)
     {
         jsonSerializerSettings = DefaultJsonSerializerSettingsFactory.BuildDefaultJsonSerializerSettings();
     }
     _jsonSerializerSettings = jsonSerializerSettings;
     _httpClient             = httpClient;
     _httpClient.BaseAddress = baseUrl;
 }
Ejemplo n.º 2
0
 public RpcClient(Uri baseUrl, AuthenticationHeaderValue authHeaderValue = null,
                  JsonSerializerSettings jsonSerializerSettings          = null, HttpClientHandler httpClientHandler = null, ILog log = null)
 {
     _baseUrl         = baseUrl;
     _authHeaderValue = authHeaderValue;
     if (jsonSerializerSettings == null)
     {
         jsonSerializerSettings = DefaultJsonSerializerSettingsFactory.BuildDefaultJsonSerializerSettings();
     }
     _jsonSerializerSettings = jsonSerializerSettings;
     _httpClientHandler      = httpClientHandler;
     _log = log;
     CreateNewHttpClient();
 }