private static AuthCookieProperties LoadAuthCookieProperties(string configSectionFullName) { AuthCookieProperties result = null; var configurationSection = ConfigurationManager.GetSection(configSectionFullName); if (configurationSection != null) { var authCookieConfigElementProvider = configurationSection as IAuthCookieConfigElementProvider; if (authCookieConfigElementProvider != null) { var authCookieConfigElement = authCookieConfigElementProvider.GetAuthCookieConfigElement(); if (authCookieConfigElement != null && authCookieConfigElement.Initialized) { result = new AuthCookieProperties(authCookieConfigElement.Name); } } } return(result); }
/// <summary> /// Creates new instance of <see cref="ConfigFileAuthCookiePropertiesProvider"/> /// </summary> /// <param name="configSectionFullName">config section full name</param> public ConfigFileAuthCookiePropertiesProvider(string configSectionFullName) { this.cookieProperties = LoadAuthCookieProperties(configSectionFullName); }