public ClientProxy <TService> CreateProxy <TService>(string optionsName) { var options = _httpClientOptions.Get(optionsName); if (options.IsPropertiesDefault()) { return(null); } var f = new HttpOnceCallFactory(new SimpleOptions <HttpClientOptions>(options), _loggerFactory); var clientProxy = new ClientProxy <TService>(f, new SimpleOptions <NetRpcClientOption>(_netRpcClientOption.CurrentValue), _serviceProvider, _loggerFactory, optionsName); return(clientProxy); }
public ClientProxy <TService>?CreateProxy <TService>(string optionsName) where TService : class { var options = _httpClientOptions.Get(optionsName); if (options.IsPropertiesDefault()) { return(null); } var f = new HttpOnceCallFactory(new SimpleOptions <HttpClientOptions>(options), _loggerFactory); var clientProxy = new ClientProxy <TService>( f, new SimpleOptions <NClientOptions>(_nClientOption.CurrentValue), _clientMiddlewareOptions, _actionExecutingContextAccessor, _serviceProvider, _loggerFactory, optionsName); return(clientProxy); }