Пример #1
0
        /// <summary>
        /// Retrieves the processing configuration section from the current application configuration.
        /// </summary>
        /// <returns>The processing configuration section from the current application configuration. </returns>
        public static ImageProcessingSection GetConfiguration()
        {
            ImageProcessingSection imageProcessingSection =
                ConfigurationManager.GetSection("imageProcessor/processing") as ImageProcessingSection;

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

            return(new ImageProcessingSection());
        }
        /// <summary>
        /// Retrieves the processing configuration section from the current application configuration. 
        /// </summary>
        /// <returns>The processing configuration section from the current application configuration. </returns>
        public static ImageProcessingSection GetConfiguration()
        {
            ImageProcessingSection imageProcessingSection =
                ConfigurationManager.GetSection("imageProcessor/processing") as ImageProcessingSection;

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

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

            return imageProcessingSection;
        }
Пример #3
0
        /// <summary>
        /// Retrieves the processing configuration section from the current application configuration.
        /// </summary>
        /// <returns>The processing configuration section from the current application configuration. </returns>
        public static ImageProcessingSection GetConfiguration()
        {
            ImageProcessingSection imageProcessingSection =
                ConfigurationManager.GetSection("imageProcessor/processing") as ImageProcessingSection;

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

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

            imageProcessingSection = new ImageProcessingSection();
            imageProcessingSection.DeserializeSection(reader);

            return(imageProcessingSection);
        }
 /// <summary>
 /// Retrieves the processing configuration section from the current application configuration. 
 /// </summary>
 /// <returns>The processing configuration section from the current application configuration. </returns>
 private static ImageProcessingSection GetImageProcessingSection()
 {
     return imageProcessingSection ?? (imageProcessingSection = ImageProcessingSection.GetConfiguration());
 }
 /// <summary>
 /// Retrieves the processing configuration section from the current application configuration.
 /// </summary>
 /// <returns>The processing configuration section from the current application configuration. </returns>
 private static ImageProcessingSection GetImageProcessingSection()
 {
     return(imageProcessingSection ?? (imageProcessingSection = ImageProcessingSection.GetConfiguration()));
 }