Пример #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 CruncherCacheSection GetConfiguration()
        {
            CruncherCacheSection clientResourcesCacheSection = ConfigurationManager.GetSection("cruncher/cache") as CruncherCacheSection;

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

            return(new CruncherCacheSection());
        }
Пример #2
0
 /// <summary>
 /// Retrieves the caching configuration section from the current application configuration.
 /// </summary>
 /// <returns>The caching configuration section from the current application configuration. </returns>
 private CruncherCacheSection GetCruncherCacheSection()
 {
     return(this.cacheSection ?? (this.cacheSection = CruncherCacheSection.GetConfiguration()));
 }