protected override UserGroupPermissionDefinitionProviderData GetConfiguration(string name, IConfigurationSource configurationSource) { UserGroupPermissionDefinitionProviderSettings settings = (UserGroupPermissionDefinitionProviderSettings)configurationSource.GetSection(UserGroupPermissionDefinitionProviderSettings.SectionName); if (null == settings) { throw new ConfigurationErrorsException(string.Format("The configuration section '{0}' was not found in the configuration", UserGroupPermissionDefinitionProviderSettings.SectionName)); } return(settings.UserGroupPermissionDefinitionProvidersPlugins.Get(name)); }
public string MapName(string name, IConfigurationSource configSource) { if (null == configSource) { throw new ArgumentNullException("configSource"); } if (null != name) { return(name); } else { UserGroupPermissionDefinitionProviderSettings settings = configSource.GetSection(UserGroupPermissionDefinitionProviderSettings.SectionName) as UserGroupPermissionDefinitionProviderSettings; if (null == settings) { throw new ConfigurationErrorsException(string.Format("Could not load configuration section {0}", UserGroupPermissionDefinitionProviderSettings.SectionName)); } return(settings.DefaultUserGroupPermissionDefinitionProvider); } }