예제 #1
0
        public ConfigurationSectionGroup Get(string name)
        {
            VerifyIsAttachedToConfigRecord();

            // validate name
            if (string.IsNullOrEmpty(name))
            {
                throw ExceptionUtil.ParameterNullOrEmpty(nameof(name));
            }

            // prevent GetConfig from returning config not in this collection
            if (name.IndexOf('/') >= 0)
            {
                return(null);
            }

            // get the section group
            string configKey = BaseConfigurationRecord.CombineConfigKey(_configSectionGroup.SectionGroupName, name);

            return(_configRecord.GetSectionGroup(configKey));
        }
예제 #2
0
        public ConfigurationSectionGroup GetSectionGroup(string sectionGroupName)
        {
            ConfigurationSectionGroup sectionGroup = _configRecord.GetSectionGroup(sectionGroupName);

            return(sectionGroup);
        }