예제 #1
0
 public BaseRepository(IHttpClient httpClient, IApplicationConfiguration config, ILogger <BaseRepository> logger)
 {
     _httpClient            = httpClient;
     _config                = config;
     _logger                = logger;
     _authenticationHeaders = new Dictionary <string, string> {
         { "Authorization", _config.GetContentApiAuthenticationKey() }, { "X-ClientId", _config.GetWebAppClientId() }
     };
 }
예제 #2
0
 public Repository(UrlGenerator urlGenerator, IHttpClient httpClient, IApplicationConfiguration config, IUrlGeneratorSimple urlGeneratorSimple)
 {
     _urlGenerator          = urlGenerator;
     _httpClient            = httpClient;
     _config                = config;
     _urlGeneratorSimple    = urlGeneratorSimple;
     _authenticationHeaders = new Dictionary <string, string> {
         { "Authorization", _config.GetContentApiAuthenticationKey() }, { "X-ClientId", _config.GetWebAppClientId() }
     };
 }
예제 #3
0
 public DocumentPageRepository(IStubToUrlConverter urlGenerator, IHttpClient httpClient, DocumentPageFactory documentPageFactory, IApplicationConfiguration config)
 {
     _urlGenerator        = urlGenerator;
     _httpClient          = httpClient;
     _documentPageFactory = documentPageFactory;
     _config = config;
     authenticationHeaders = new Dictionary <string, string> {
         { "Authorization", _config.GetContentApiAuthenticationKey() }, { "X-ClientId", _config.GetWebAppClientId() }
     };
 }
예제 #4
0
 public HealthcheckService(string appVersionPath, string shaPath, IFileWrapper fileWrapper,
                           FeatureToggles featureToggles, IHttpClient httpMaker, IStubToUrlConverter urlGenerator, string environment, IApplicationConfiguration config, BusinessId businessId)
 {
     _fileWrapper      = fileWrapper;
     _featureToggles   = featureToggles;
     _httpMaker        = httpMaker;
     _urlGenerator     = urlGenerator;
     _config           = config;
     _appVersion       = GetFirstFileLineOrDefault(appVersionPath, "dev");
     _sha              = GetFirstFileLineOrDefault(shaPath, string.Empty);
     _environment      = environment;
     authenticationKey = _config.GetContentApiAuthenticationKey();
     webAppClientId    = _config.GetWebAppClientId();
     _businessId       = businessId;
 }