/// <summary> /// Initializes a new instance of the <see cref="HttpClientProvider"/> class. /// </summary> public HttpClientProvider( IWebConfigReader webConfigReader) { _webCfgRdr = webConfigReader ?? throw new ArgumentNullException(nameof(webConfigReader)); InitializeGitHubApiHttpClient(); }
public WebConfigTransformHandler( IConfigurationRoot config, IWebConfigReader webConfigReader) { _config = config ?? throw new ArgumentNullException(nameof(config), "Application configuration is required"); _webConfigReader = webConfigReader ?? throw new ArgumentNullException(nameof(webConfigReader), "WebConfig reader is required"); }
public AppSettingsInitializerTests() { _webConfigWriter = Substitute.For <IWebConfigWriter>(); _webConfigReader = Substitute.For <IWebConfigReader>(); var existingAppSettings = new List <KeyValuePair <string, string> > { new KeyValuePair <string, string>("app_setting_1", "old_value1"), new KeyValuePair <string, string>("app_setting_2", "old_value2") }; _webConfigReader.GetAppSettings().Returns(existingAppSettings.AsReadOnly()); _config = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary <string, string> { { "app_setting_2", "new_value_2" }, { "app_setting_3", "new_value_3" } }).Build(); }
public AppSettingsInitializer(IConfigurationRoot config, IWebConfigReader webConfigReader) { _config = config ?? throw new ArgumentNullException(nameof(config), "The application config is required"); _webConfigReader = webConfigReader ?? throw new ArgumentNullException(nameof(webConfigReader), "The webConfigReader is required"); }
public SSOServcie(IWebConfigReader webConfigReader) { _webConfigReader = webConfigReader; }
/// <summary> /// Initializes a new instance of the <see cref="GitHubAPICredentialsReader"/> class. /// </summary> /// <param name="webConfigReader">The web configuration reader.</param> /// <exception cref="ArgumentNullException">webConfigReader</exception> public GitHubAPICredentialsReader( IWebConfigReader webConfigReader) { _webCfgRdr = webConfigReader ?? throw new ArgumentNullException(nameof(webConfigReader)); }