/// <summary>
        /// Initializes a new instance of the <see cref="PublishService"/> class.
        /// </summary>
        /// <param name="settings"><see cref="WebAppSettings"/> instance.</param>
        /// <param name="markdownHelper"><see cref="IMarkdownHelper"/> instance.</param>
        /// <param name="fileHelper"><see cref="IFileHelper"/> instance.</param>
        /// <param name="httpClientHelper"><see cref="IHttpClientHelper"/> instance.</param>
        public PublishService(WebAppSettings settings, IMarkdownHelper markdownHelper, IFileHelper fileHelper, IHttpClientHelper httpClientHelper)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            this._settings = settings;

            if (markdownHelper == null)
            {
                throw new ArgumentNullException(nameof(markdownHelper));
            }

            this._markdownHelper = markdownHelper;

            if (fileHelper == null)
            {
                throw new ArgumentNullException(nameof(fileHelper));
            }

            this._fileHelper = fileHelper;

            if (httpClientHelper == null)
            {
                throw new ArgumentNullException(nameof(httpClientHelper));
            }

            this._httpClientHelper = httpClientHelper;
        }
 internal AmqpServiceClient(IotHubConnection iotHubConnection, IHttpClientHelper httpClientHelper)
 {
     Connection = iotHubConnection;
     _faultTolerantSendingLink = new FaultTolerantAmqpObject <SendingAmqpLink>(CreateSendingLinkAsync, iotHubConnection.CloseLink);
     _feedbackReceiver         = new AmqpFeedbackReceiver(iotHubConnection);
     _fileNotificationReceiver = new AmqpFileNotificationReceiver(iotHubConnection);
     _httpClientHelper         = httpClientHelper;
 }
 /// <summary>
 /// Dispose resources
 /// </summary>
 /// <param name="disposing">
 /// Governs disposable of managed and native resources
 /// </param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing && this.httpClientHelper != null)
     {
         this.httpClientHelper.Dispose();
         this.httpClientHelper = null;
     }
 }
 public Indexing(
     IServerInfoService serverInfoService,
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper)
 {
     _serverInfoService = serverInfoService;
     _settings          = settings;
     _httpClientHelper  = httpClientHelper;
 }
 public ElasticIndexInspectorController(
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper,
     IInspectorRepository inspectorRepository,
     ILanguageBranchRepository languageBranchRepository)
     : base(settings, httpClientHelper, languageBranchRepository)
 {
     _inspectorRepository = inspectorRepository;
 }
Exemple #6
0
        public CovidApiHelper(IHttpClientHelper httpClientHelper)
        {
            if (httpClientHelper == null)
            {
                throw new ArgumentNullException(nameof(httpClientHelper));
            }

            Users = new UserService(httpClientHelper);
        }
Exemple #7
0
        /// <summary>
        /// Creates the <see cref="HttpClient"/> instance.
        /// </summary>
        /// <param name="helper"><see cref="helper"/> instance.</param>
        /// <returns>Returns the <see cref="HttpClient"/> instance created.</returns>
        public GitHubApiService(IHttpClientHelper helper)
        {
            if (helper == null)
            {
                throw new ArgumentNullException(nameof(helper));
            }

            this._helper = helper;
        }
Exemple #8
0
 public ElasticSynonymsController(
     ILanguageBranchRepository languageBranchRepository,
     ISynonymRepository synonymRepository,
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper)
     : base(settings, httpClientHelper, languageBranchRepository)
 {
     _synonymRepository = synonymRepository;
 }
Exemple #9
0
 public ElasticAutoSuggestController(
     ILanguageBranchRepository languageBranchRepository,
     IAutoSuggestRepository autoSuggestRepository,
     IElasticSearchSettings settings,
     IServerInfoService serverInfoService,
     IHttpClientHelper httpClientHelper) : base(serverInfoService, settings, httpClientHelper, languageBranchRepository)
 {
     _autoSuggestRepository = autoSuggestRepository;
 }
 public ElasticConsoleController(
     ILanguageBranchRepository languageBranchRepository,
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper)
     : base(settings, httpClientHelper, languageBranchRepository)
 {
     _settings         = settings;
     _httpClientHelper = httpClientHelper;
 }
Exemple #11
0
 public ElasticTrackingController(
     ILanguageBranchRepository languageBranchRepository,
     ITrackingRepository trackingRepository,
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper)
     : base(settings, httpClientHelper, languageBranchRepository)
 {
     _trackingRepository = trackingRepository;
 }
Exemple #12
0
 public RestHelper(IHttpClientHelper httpClientHelper, ICompactacaoHelper compactacaoHelper)
 {
     _httpClientHelper            = httpClientHelper;
     _compactacaoHelper           = compactacaoHelper;
     _configuracoesRequisicaoRest = new ConfiguracoesRequisicaoRest
     {
         TimeOut = TimeSpan.FromMinutes(5)
     };
 }
 public QueryBuilder(
     IServerInfoService serverInfoService,
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper)
 {
     _settings = settings;
     _mapping  = new Mapping(serverInfoService, settings, httpClientHelper);
     ServiceLocator.Current?.TryGetExistingInstance(out _boostingRepository);
 }
Exemple #14
0
 internal HttpJobClient(IotHubConnectionString connectionString, HttpTransportSettings transportSettings)
 {
     _httpClientHelper = new HttpClientHelper(
         connectionString.HttpsEndpoint,
         connectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         s_defaultOperationTimeout,
         transportSettings.Proxy);
 }
        /// <summary>
        /// Creates the <see cref="HttpClient"/> instance.
        /// </summary>
        /// <param name="helper"><see cref="helper"/> instance.</param>
        /// <returns>Returns the <see cref="HttpClient"/> instance created.</returns>
        public GitHubApiService(IHttpClientHelper helper)
        {
            if (helper == null)
            {
                throw new ArgumentNullException(nameof(helper));
            }

            this._helper = helper;
        }
Exemple #16
0
        // internal test helper
        internal HttpJobClient(IHttpClientHelper httpClientHelper, string iotHubName)
        {
            if (httpClientHelper == null)
            {
                throw new ArgumentNullException(nameof(httpClientHelper));
            }

            _httpClientHelper = httpClientHelper;
        }
Exemple #17
0
 public AdminController(IGymRepository repo, IConfiguration config, IMapper mapper, IOptions <AppSettings> appSettings, IOptions <PaymentSettings> paymentSettings, IHttpClientHelper httpClientHelper)
 {
     this._repo             = repo;
     this._config           = config;
     this._mapper           = mapper;
     this._appSettings      = appSettings;
     this._httpClientHelper = httpClientHelper;
     this._paymentSettings  = paymentSettings;
 }
Exemple #18
0
 internal SearchEngine(
     IServerInfoService serverInfoService,
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper)
 {
     _settings         = settings;
     _httpClientHelper = httpClientHelper;
     _serverInfo       = serverInfoService.GetInfo();
 }
 internal HttpProvisioningServiceClient(IotHubConnectionString connectionString)
 {
     this.drsName          = connectionString.IotHubName;
     this.httpClientHelper = new HttpClientHelper(
         connectionString.HttpsEndpoint,
         connectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         DefaultOperationTimeout,
         client => { });
 }
 internal HttpJobClient(IotHubConnectionProperties connectionProperties, HttpTransportSettings transportSettings)
 {
     _httpClientHelper = new HttpClientHelper(
         connectionProperties.HttpsEndpoint,
         connectionProperties,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         s_defaultOperationTimeout,
         transportSettings.Proxy,
         transportSettings.ConnectionLeaseTimeoutMilliseconds);
 }
 internal HttpTransportHandler(IotHubConnectionString iotHubConnectionString)
 {
     this.deviceId = iotHubConnectionString.DeviceId;
     this.httpClientHelper = new HttpClientHelper(
         iotHubConnectionString.HttpsEndpoint,
         iotHubConnectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         DefaultOperationTimeout,
         null);
 }
Exemple #22
0
        // internal test helper
        internal HttpRegistryManager(IHttpClientHelper httpClientHelper, string iotHubName)
        {
            if (httpClientHelper == null)
            {
                throw new ArgumentNullException(nameof(httpClientHelper));
            }

            this.iotHubName       = iotHubName;
            this.httpClientHelper = httpClientHelper;
        }
Exemple #23
0
 internal HttpRegistryManager(IotHubConnectionString connectionString)
 {
     this.iotHubName       = connectionString.IotHubName;
     this.httpClientHelper = new HttpClientHelper(
         connectionString.HttpsEndpoint,
         connectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         DefaultOperationTimeout,
         client => { });
 }
 internal HttpRegistryManager(IotHubConnectionString connectionString)
 {
     this.iotHubName = connectionString.IotHubName;
     this.httpClientHelper = new HttpClientHelper(
         connectionString.HttpsEndpoint,
         connectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         DefaultOperationTimeout,
         client => { });
 }
Exemple #25
0
        public override Task CloseAsync()
        {
            if (this.httpClientHelper != null)
            {
                this.httpClientHelper.Dispose();
                this.httpClientHelper = null;
            }

            return(TaskHelpers.CompletedTask);
        }
        // internal test helper
        internal HttpRegistryManager(IHttpClientHelper httpClientHelper, string iotHubName)
        {
            if (httpClientHelper == null)
            {
                throw new ArgumentNullException("httpClientHelper");
            }

            this.iotHubName = iotHubName;
            this.httpClientHelper = httpClientHelper;
        }
        public override Task CloseAsync()
        {
            if (this.httpClientHelper != null)
            {
                this.httpClientHelper.Dispose();
                this.httpClientHelper = null;
            }

            return TaskHelpers.CompletedTask;
        }
 internal HttpTransportHandler(IotHubConnectionString iotHubConnectionString)
 {
     this.deviceId         = iotHubConnectionString.DeviceId;
     this.httpClientHelper = new HttpClientHelper(
         iotHubConnectionString.HttpsEndpoint,
         iotHubConnectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         DefaultOperationTimeout,
         null);
 }
 public ElasticBestBetsController(
     IContentLoader contentLoader,
     IBestBetsRepository bestBetsRepository,
     ILanguageBranchRepository languageBranchRepository,
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper)
     : base(settings, httpClientHelper, languageBranchRepository)
 {
     _contentLoader      = contentLoader;
     _bestBetsRepository = bestBetsRepository;
 }
Exemple #30
0
 /// <summary>
 /// Releases unmanaged and - optionally - managed resources.
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_httpClientHelper != null)
         {
             _httpClientHelper.Dispose();
             _httpClientHelper = null;
         }
     }
 }
 public SynonymRepository(
     IContentRepository contentRepository,
     IBlobFactory blobFactory,
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper)
 {
     _contentRepository = contentRepository;
     _blobFactory       = blobFactory;
     _settings          = settings;
     _httpClientHelper  = httpClientHelper;
 }
Exemple #32
0
 public CoreIndexer(
     IServerInfoService serverInfoService,
     IElasticSearchSettings settings,
     IHttpClientHelper httpClientHelper)
 {
     _serverInfoService = serverInfoService;
     _settings          = settings;
     _httpClientHelper  = httpClientHelper;
     _mapping           = new Mapping(serverInfoService, settings, httpClientHelper);
     _serverInfo        = serverInfoService.GetInfo();
 }
 public BitTorrentDownloader(string peerId, IBencodeParser bencodeParser, IHttpClientHelper httpClientHelper, ITcpSocketHelper tcpSocketHelper,
                             ITorrentFactory torrentFactory, ITrackerResponseFactory trackerResponseFactory, IPeerEventDataFactory peerEventDataFactory)
 {
     _peerId                 = peerId;
     _bencodeParser          = bencodeParser;
     _httpClientHelper       = httpClientHelper;
     _tcpSocketHelper        = tcpSocketHelper;
     _torrentFactory         = torrentFactory;
     _trackerResponseFactory = trackerResponseFactory;
     _peerEventDataFactory   = peerEventDataFactory;
 }
 internal HttpDeviceClient(IotHubConnectionString iotHubConnectionString)
 {
     this.deviceId = iotHubConnectionString.DeviceId;
     this.httpClientHelper = new HttpClientHelper(
         iotHubConnectionString.HttpsEndpoint,
         iotHubConnectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         DefaultOperationTimeout,
         null);
     this.DefaultReceiveTimeout = DefaultReceiveTimeoutInSeconds;
 }
Exemple #35
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_httpClientHelper != null)
         {
             _httpClientHelper.Dispose();
             _httpClientHelper = null;
         }
     }
 }
 internal HttpDeviceClient(IotHubConnectionString iotHubConnectionString)
 {
     this.deviceId         = iotHubConnectionString.DeviceId;
     this.httpClientHelper = new HttpClientHelper(
         iotHubConnectionString.HttpsEndpoint,
         iotHubConnectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         DefaultOperationTimeout,
         null);
     this.DefaultReceiveTimeout = DefaultReceiveTimeoutInSeconds;
 }
Exemple #37
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProcessNotificationQueueItem"/> class.
 /// </summary>
 /// <param name="logger">The log.</param>
 /// <param name="configuration">The configuration.</param>
 /// <param name="repositoryFactory">The repositoryFactory.</param>
 /// <param name="httpClientHelper">The httpClientHelper.</param>
 public ProcessNotificationQueueItem(
     ILogger logger,
     IConfiguration configuration,
     IRepositoryFactory repositoryFactory,
     IHttpClientHelper httpClientHelper)
 {
     this.logger        = logger;
     this.configuration = configuration;
     this.emailNotificationRepository = repositoryFactory.GetRepository(Enum.TryParse <StorageType>(this.configuration?[Constants.StorageType], out this.repo) ? this.repo : throw new Exception());
     this.httpClientHelper            = httpClientHelper;
 }
 internal HttpTransportHandler(IotHubConnectionString iotHubConnectionString, Http1TransportSettings transportSettings)
 {
     this.transportSettings = transportSettings;
     this.deviceId = iotHubConnectionString.DeviceId;
     this.httpClientHelper = new HttpClientHelper(
         iotHubConnectionString.HttpsEndpoint,
         iotHubConnectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         DefaultOperationTimeout,
         null,
         this.transportSettings.ClientCertificate);
 }
 public AmqpServiceClient(IotHubConnectionString iotHubConnectionString, bool useWebSocketOnly)
 {
     var iotHubConnection = new IotHubConnection(iotHubConnectionString, AccessRights.ServiceConnect, useWebSocketOnly);
     this.iotHubConnection = iotHubConnection;
     this.openTimeout = IotHubConnection.DefaultOpenTimeout;
     this.operationTimeout = IotHubConnection.DefaultOperationTimeout;
     this.sendingPath = "/messages/deviceBound";
     this.faultTolerantSendingLink = new FaultTolerantAmqpObject<SendingAmqpLink>(this.CreateSendingLinkAsync, this.iotHubConnection.CloseLink);
     this.feedbackReceiver = new AmqpFeedbackReceiver(this.iotHubConnection);
     this.iotHubName = iotHubConnectionString.IotHubName;
     this.httpClientHelper = new HttpClientHelper(
         iotHubConnectionString.HttpsEndpoint,
         iotHubConnectionString,
         ExceptionHandlingHelper.GetDefaultErrorMapping(),
         DefaultOperationTimeout,
         client => {});
 }
Exemple #40
0
 public CommentsHub(IErrorSignaler errorSignaler, IHttpClientHelper httpClientHelper, IConfigurationHelper configurationHelper)
 {
     _errorSignaler = errorSignaler;
     _httpClientHelper = httpClientHelper;
     _configurationHelper = configurationHelper;
 }
 public void Initialize()
 {
     httpClient = new HttpClientHelper();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AlertRepository" /> class.
 /// </summary>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public AlertRepository(IHttpClientHelper httpClientHelper)
 {
     this.httpClientHelper = httpClientHelper;
 }
 public HomeController(IHttpClientHelper httpClientHelper, IConfigurationHelper configurationHelper)
 {
     _httpClientHelper = httpClientHelper;
     _configurationHelper = configurationHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GangwayHistoryRepository"/> class.
 /// </summary>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public GangwayHistoryRepository(IHttpClientHelper httpClientHelper)
 {
     this.httpClientHelper = httpClientHelper;
 }
 public Spider(ISettings settings, ILogger logger, IHttpClientHelper httpClientHelper)
 {
     this.settings = settings;
     this.logger = logger;
     this.httpClientHelper = httpClientHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CrewmemberClientTest" /> class.
 /// </summary>
 public CrewmemberClientTest()
 {
     this.clientHelper = new HttpClientHelper();
     this.crewmemberClient = new CrewmemberClient(BaseAddress, AccessToken, clientHelper);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PersonRepository"/> class.
 /// </summary>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public PersonRepository(IHttpClientHelper httpClientHelper)
 {
     this.httpClientHelper = httpClientHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DashboardRepository"/> class.
 /// </summary>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public DashboardRepository(IHttpClientHelper httpClientHelper)
 {
     this.httpClientHelper = httpClientHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MasterDataRepository"/> class.
 /// </summary>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public MasterDataRepository(IHttpClientHelper httpClientHelper)
 {
     this.httpClientHelper = httpClientHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EmbarkationStatisticsClientTest"/> class.
 /// </summary>
 public EmbarkationStatisticsClientTest()
 {
     this.clientHelper = new HttpClientHelper();
     this.embarkationStatisticsClient = new EmbarkationStatisticsClient(BaseAddress, AccessToken, clientHelper);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PortManningRepository"/> class.
 /// </summary>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public PortManningRepository(IHttpClientHelper httpClientHelper)
 {
     this.httpClientHelper = httpClientHelper;
 }
 public GoogleRepository(IHttpClientHelper httpClient)
 {
     this.httpClient = httpClient;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticateRepository"/> class.
 /// </summary>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public AuthenticateRepository(IHttpClientHelper httpClientHelper)
 {
     this.httpClientHelper = httpClientHelper;
 }
 /// <summary>
 /// Dispose resources
 /// </summary>
 /// <param name="disposing">
 /// Governs disposable of managed and native resources
 /// </param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.httpClientHelper != null)
         {
             this.httpClientHelper.Dispose();
             this.httpClientHelper = null;
         }
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LocalDateTimeRepository"/> class.
 /// </summary>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public LocalDateTimeRepository(IHttpClientHelper httpClientHelper)
 {
     this.httpClientHelper = httpClientHelper;
 }
 internal AmqpServiceClient(IotHubConnectionString iotHubConnectionString, bool useWebSocketOnly, IHttpClientHelper httpClientHelper) : base()
 {            
     this.httpClientHelper = httpClientHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="VisitorRepository"/> class.
 /// </summary>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public VisitorRepository(IHttpClientHelper httpClientHelper)
 {
     this.httpClientHelper = httpClientHelper;
     this.imagingMediaClient = DIContainer.Instance.Resolve<IImageMediaClient>(new ResolverOverride[] { new ParameterOverride("httpClientHelper", httpClientHelper) });
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WorkstationClientTest" /> class.
 /// </summary>
 public WorkstationClientTest()
 {
     this.clientHelper = new HttpClientHelper();
     this.workstationClient = new WorkstationClient(BaseAddress, AccessToken, clientHelper);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PersonsClient" /> class.
 /// </summary>
 /// <param name="baseAddress">The base address.</param>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public PersonsClient(string baseAddress, IHttpClientHelper httpClientHelper)
 {
     this.baseAddress = baseAddress.RetrieveBaseAddress();
     this.httpClientHelper = httpClientHelper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GangwayHistoryClient" /> class.
 /// </summary>
 /// <param name="baseAddress">The base address.</param>
 /// <param name="httpClientHelper">The HTTP client helper.</param>
 public GangwayHistoryClient(string baseAddress, IHttpClientHelper httpClientHelper)
 {
     this.baseAddress = baseAddress.RetrieveBaseAddress();
     this.httpClientHelper = httpClientHelper;
 }