protected override LoginSessionStoreData GetConfiguration(string name, IConfigurationSource configurationSource)
        {
            LoginSessionStoreSettings settings = (LoginSessionStoreSettings)configurationSource.GetSection(LoginSessionStoreSettings.SectionName);

            if (null == settings)
            {
                throw new ConfigurationErrorsException(string.Format("The configuration section '{0}' was not found in the configuration", LoginSessionStoreSettings.SectionName));
            }

            return(settings.LoginSessionStores.Get(name));
        }
Ejemplo n.º 2
0
        public string MapName(string name, IConfigurationSource configSource)
        {
            if (null == configSource)
            {
                throw new ArgumentNullException("configSource");
            }

            if (null != name)
            {
                return(name);
            }
            else
            {
                LoginSessionStoreSettings settings = configSource.GetSection(LoginSessionStoreSettings.SectionName) as LoginSessionStoreSettings;

                if (null == settings)
                {
                    throw new ConfigurationErrorsException(string.Format("Could not load configuration section {0}", LoginSessionStoreSettings.SectionName));
                }

                return(settings.DefaultLoginSessionStore);
            }
        }