public ApiClient(ClientConfiguration configuration) { _valuesServiceClient = new ValuesServiceClient(configuration); ServicesClients.Add(_valuesServiceClient); _accountControllerClient = new AccountControllerClient(configuration); ServicesClients.Add(_accountControllerClient); }
public ApiClient(Func <ClientConfiguration, ClientConfiguration> configurationBuilder) { _valuesServiceClient = new ValuesServiceClient(configurationBuilder); ServicesClients.Add(_valuesServiceClient); _accountControllerClient = new AccountControllerClient(configurationBuilder); ServicesClients.Add(_accountControllerClient); }
public ApiClient(ClientConfiguration configuration, HttpMessageHandler messageHandler) { _valuesServiceClient = new ValuesServiceClient(messageHandler, configuration); ServicesClients.Add(_valuesServiceClient); _accountControllerClient = new AccountControllerClient(messageHandler, configuration); ServicesClients.Add(_accountControllerClient); }
public ApiClient(HttpClient httpClient, IOptions <ApiClientOptions> clientOptions) { if (httpClient == null) { throw new ArgumentNullException(nameof(httpClient)); } if (clientOptions == null) { throw new ArgumentNullException(nameof(clientOptions)); } var optionsValue = clientOptions.Value; _valuesServiceClient = new ValuesServiceClient( httpClient, Options.Create( new ValuesServiceClientOptions { BaseUrl = optionsValue.BaseUrl, Timeout = optionsValue.Timeout, Serializer = optionsValue.Serializer } ) ); ServicesClients.Add(_valuesServiceClient); _accountControllerClient = new AccountControllerClient( httpClient, Options.Create( new AccountControllerClientOptions { BaseUrl = optionsValue.BaseUrl, Timeout = optionsValue.Timeout, Serializer = optionsValue.Serializer } ) ); ServicesClients.Add(_accountControllerClient); }