/// <summary> /// Reads credentials from configuration parameters. /// Each section represents an individual CredentialParams /// </summary> /// <param name="config">configuration parameters to be read</param> public void ReadCredentials(ConfigParams config) { lock (_lock) { _items.Clear(); var sections = config.GetSectionNames(); foreach (var section in sections) { var value = config.GetSection(section); var creadentials = CredentialParams.FromConfig(value); _items.Add(section, creadentials); } } }
public static ContainerConfig FromConfig(ConfigParams config) { var result = new ContainerConfig(); if (config == null) { return(result); } foreach (var section in config.GetSectionNames()) { var componentConfig = config.GetSection(section); result.Add(ComponentConfig.FromConfig(componentConfig)); } return(result); }