/// <summary> /// Retrieves the security configuration section from the current application configuration. /// </summary> /// <returns>The cache configuration section from the current application configuration.</returns> public static ImageSecuritySection GetConfiguration() { ImageSecuritySection imageSecuritySection = ConfigurationManager.GetSection("imageProcessor/security") as ImageSecuritySection; if (imageSecuritySection != null) { return(imageSecuritySection); } return(new ImageSecuritySection()); }
/// <summary> /// Retrieves the security configuration section from the current application configuration. /// </summary> /// <returns>The cache configuration section from the current application configuration.</returns> public static ImageSecuritySection GetConfiguration() { ImageSecuritySection imageSecuritySection = ConfigurationManager.GetSection("imageProcessor/security") as ImageSecuritySection; if (imageSecuritySection != null) { return(imageSecuritySection); } string section = ResourceHelpers.ResourceAsString("ImageProcessor.Web.Config.Resources.security.config"); XmlReader reader = new XmlTextReader(new StringReader(section)); imageSecuritySection = new ImageSecuritySection(); imageSecuritySection.DeserializeSection(reader); return(imageSecuritySection); }
/// <summary> /// Retrieves the security configuration section from the current application configuration. /// </summary> /// <returns>The security configuration section from the current application configuration. </returns> private static ImageSecuritySection GetImageSecuritySection() { return imageSecuritySection ?? (imageSecuritySection = ImageSecuritySection.GetConfiguration()); }
/// <summary> /// Retrieves the security configuration section from the current application configuration. /// </summary> /// <returns>The cache configuration section from the current application configuration.</returns> public static ImageSecuritySection GetConfiguration() { ImageSecuritySection imageSecuritySection = ConfigurationManager.GetSection("imageProcessor/security") as ImageSecuritySection; if (imageSecuritySection != null) { return imageSecuritySection; } string section = ResourceHelpers.ResourceAsString("ImageProcessor.Web.Config.Resources.security.config"); XmlReader reader = new XmlTextReader(new StringReader(section)); imageSecuritySection = new ImageSecuritySection(); imageSecuritySection.DeserializeSection(reader); return imageSecuritySection; }
/// <summary> /// Retrieves the security configuration section from the current application configuration. /// </summary> /// <returns>The security configuration section from the current application configuration. </returns> private static ImageSecuritySection GetImageSecuritySection() { return(imageSecuritySection ?? (imageSecuritySection = ImageSecuritySection.GetConfiguration())); }