Exemplo n.º 1
0
        /// <summary>
        /// Retrieves the cache configuration section from the current application configuration.
        /// </summary>
        /// <returns>The cache configuration section from the current application configuration.</returns>
        public static ImageCacheSection GetConfiguration()
        {
            ImageCacheSection imageCacheSection = ConfigurationManager.GetSection("imageProcessor/cache") as ImageCacheSection;

            if (imageCacheSection != null)
            {
                return(imageCacheSection);
            }

            return(new ImageCacheSection());
        }
Exemplo n.º 2
0
        /// <summary>
        /// Retrieves the cache configuration section from the current application configuration. 
        /// </summary>
        /// <returns>The cache configuration section from the current application configuration.</returns>
        public static ImageCacheSection GetConfiguration()
        {
            ImageCacheSection imageCacheSection = ConfigurationManager.GetSection("imageProcessor/cache") as ImageCacheSection;

            if (imageCacheSection != null)
            {
                return imageCacheSection;
            }

            string section = ResourceHelpers.ResourceAsString("ImageProcessor.Web.Config.Resources.cache.config");
            XmlReader reader = new XmlTextReader(new StringReader(section));
            imageCacheSection = new ImageCacheSection();
            imageCacheSection.DeserializeSection(reader);

            return imageCacheSection;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Retrieves the cache configuration section from the current application configuration.
        /// </summary>
        /// <returns>The cache configuration section from the current application configuration.</returns>
        public static ImageCacheSection GetConfiguration()
        {
            ImageCacheSection imageCacheSection = ConfigurationManager.GetSection("imageProcessor/cache") as ImageCacheSection;

            if (imageCacheSection != null)
            {
                return(imageCacheSection);
            }

            string    section = ResourceHelpers.ResourceAsString("ImageProcessor.Web.Config.Resources.cache.config");
            XmlReader reader  = new XmlTextReader(new StringReader(section));

            imageCacheSection = new ImageCacheSection();
            imageCacheSection.DeserializeSection(reader);

            return(imageCacheSection);
        }
 /// <summary>
 /// Retrieves the caching configuration section from the current application configuration. 
 /// </summary>
 /// <returns>The caching configuration section from the current application configuration. </returns>
 private static ImageCacheSection GetImageCacheSection()
 {
     return imageCacheSection ?? (imageCacheSection = ImageCacheSection.GetConfiguration());
 }
 /// <summary>
 /// Retrieves the caching configuration section from the current application configuration.
 /// </summary>
 /// <returns>The caching configuration section from the current application configuration. </returns>
 private static ImageCacheSection GetImageCacheSection()
 {
     return(imageCacheSection ?? (imageCacheSection = ImageCacheSection.GetConfiguration()));
 }