public void AppendPropertiesFromConfiguration(string groupName) { ExceptionHelper.CheckStringIsNullOrEmpty(groupName, "groupName"); PropertyGroupConfigurationElement group = PropertyGroupSettings.GetConfig().Groups[groupName]; ExceptionHelper.FalseThrow <KeyNotFoundException>(group != null, "不能根据'{0}'找到对应的属性组定义", groupName); AppendPropertiesFromConfiguration(group); }
public static PropertyGroupSettings GetConfig() { PropertyGroupSettings settings = (PropertyGroupSettings)ConfigurationBroker.GetSection("propertyGroupSettings"); if (settings == null) { settings = new PropertyGroupSettings(); } return(settings); }