public UZDataGateway(UZAPIConfig config) : this(config, new UZSerializer()) { var token = new UZToken(config.TokenPattern); _requestExecutor = new UZHttpRequestExecutor(_apiConfig.Host, token); }
public BuildExecutor( IConfiguration configuration, IHttpRequestExecutor httpRequestExecutor) { this.configuration = configuration; this.httpRequestExecutor = httpRequestExecutor; }
public HttpTrafficHandler(IHttpRequestBuilder httpRequestBuilder, IHttpRequestExecutor httpRequestExecutor, IHttpResponseBuilder httpResponseBuilder) { _httpRequestBuilder = httpRequestBuilder; _httpRequestExecutor = httpRequestExecutor; _httpResponseBuilder = httpResponseBuilder; }
private async Task DiposeInternalAsync() { await UnregisterModuleAsync().HandleExceptionsAsync(_logger); using (await _lock.LockAsync()) { _requestExecutor = null; } }
public PersonApiClient ( IHttpRequestExecutor httpRequestExecutor, IUriCreator uriCreator, IResponseParser responseParser ) : base(httpRequestExecutor, uriCreator, responseParser) { }
/// <summary> /// Initializes a new instance of the <see cref="ReliableHttpRequestExecutor"/> class. /// </summary> /// <param name="httpRequestExecutor">The HTTP request executor.</param> /// <param name="tryCount">The try count.</param> /// <param name="retryInterval">The retry interval.</param> public ReliableHttpRequestExecutor( IHttpRequestExecutor httpRequestExecutor, int tryCount, TimeSpan retryInterval) { _httpRequestExecutor = httpRequestExecutor; _tryCount = tryCount; _retryInterval = retryInterval; }
public Client() { Uri wirelessTagEndpointUrl = new Uri("http://www.mytaglist.com"); configuration = new Configuration(wirelessTagEndpointUrl); IHttpClientFactory httpClientFactory = new HttpClientFactory(); httpRequestExecutor = new HttpRequestExecutor(httpClientFactory); LogShared = new LogShared(configuration, httpRequestExecutor); }
/// <summary> /// Initializes a new instance of the <see cref="GitHubRepositoryBasedDriverSetupStrategy"/> class. /// </summary> /// <param name="httpRequestExecutor">The HTTP request executor.</param> /// <param name="organizationName">Name of the GitHub organization.</param> /// <param name="repositoryName">Name of the GitHub repository.</param> /// <param name="versionTagPrefix">The version tag prefix.</param> protected GitHubRepositoryBasedDriverSetupStrategy( IHttpRequestExecutor httpRequestExecutor, string organizationName, string repositoryName, string versionTagPrefix = "v") { _httpRequestExecutor = httpRequestExecutor; _versionTagPrefix = versionTagPrefix; _baseUrl = $"https://github.com/{organizationName}/{repositoryName}"; }
protected BaseApiClient ( IHttpRequestExecutor httpRequestExecutor, IUriCreator uriCreator, IResponseParser responseParser ) { this.httpRequestExecutor = httpRequestExecutor; this.responseParser = responseParser; this.uriCreator = uriCreator; }
internal DriverSetupExecutor( string browserName, DriverSetupConfiguration configuration, IDriverSetupStrategy setupStrategy, IHttpRequestExecutor httpRequestExecutor) { _browserName = browserName; _configuration = configuration; _setupStrategy = setupStrategy; _httpRequestExecutor = httpRequestExecutor; }
protected void Dispose(bool disposing) { if (!_disposed && disposing) { if (_requestExecutor != null) { var re = (IDisposable)_requestExecutor; _requestExecutor = null; re.Dispose(); } _disposed = true; } }
private DriverSetupResult ExecuteSetUp() { IHttpRequestExecutor httpRequestExecutor = CreateHttpRequestExecutor(); IDriverSetupStrategy setupStrategy = _driverSetupStrategyFactory.Invoke(httpRequestExecutor); string driverVersion = ResolveDriverVersion(setupStrategy, BuildingContext.Version); DriverSetupExecutor setupExecutor = new DriverSetupExecutor( BrowserName, BuildingContext, setupStrategy, httpRequestExecutor); DriverSetupResult result = setupExecutor.SetUp(driverVersion); DriverSetup.RemovePendingConfiguration(this); return(result); }
public async Task StartAsync <TContext>(IHttpApplication <TContext> application, CancellationToken cancellationToken) { if (application == null) { throw new ArgumentNullException(nameof(application)); } using (var guard = await _disposeHelper.GuardDisposalAsync(cancellationToken)) { cancellationToken = guard.Cancellation; using (await _lock.LockAsync(cancellationToken)) { if (_isStarted) { return; } _isStarted = true; _requestExecutor = CreateRequestExecutor(application); try { await RegisterModuleAsync(cancellationToken); } catch { await UnregisterModuleAsync().HandleExceptionsAsync(_logger); _isStarted = false; throw; } } } }
public CopernicusService(ILogger <CopernicusService> logger, IHttpRequestExecutor webExecutor) { this._webExecutor = webExecutor; this._log = logger; }
public Executor(IHttpRequestExecutor httpRequestExecutor) { _config = _appConfiguration.Config; _headers = _appConfiguration.Headers; _httpRequestExecutor = httpRequestExecutor; }
public static IExecutor GetExecutor(IHttpRequestExecutor httpRequestExecutor) => new Executor(httpRequestExecutor);
/// <summary> /// Initializes a new instance of the <see cref="OperaDriverSetupStrategy"/> class. /// </summary> /// <param name="httpRequestExecutor">The HTTP request executor.</param> public OperaDriverSetupStrategy(IHttpRequestExecutor httpRequestExecutor) : base(httpRequestExecutor, "operasoftware", "operachromiumdriver", "v.") { }
internal LogShared(IConfiguration configuration, IHttpRequestExecutor http) { this.configuration = configuration; this.http = http; }
/// <summary> /// Initializes a new instance of the <see cref="ChromeDriverSetupStrategy"/> class. /// </summary> /// <param name="httpRequestExecutor">The HTTP request executor.</param> public ChromeDriverSetupStrategy(IHttpRequestExecutor httpRequestExecutor) { _httpRequestExecutor = httpRequestExecutor; }
/// <summary> /// Initializes a new instance of the <see cref="FirefoxDriverSetupStrategy"/> class. /// </summary> /// <param name="httpRequestExecutor">The HTTP request executor.</param> public FirefoxDriverSetupStrategy(IHttpRequestExecutor httpRequestExecutor) : base(httpRequestExecutor, "mozilla", "geckodriver") { }