Ejemplo n.º 1
0
        /// <summary>
        /// Gets the Cache section settings of the app.config
        /// </summary>
        public static ICacheController CreateCacheController()
        {
            CacheSection section = (CacheSection)ConfigurationManager.GetSection(SECTION_NAME);

            if (!string.IsNullOrEmpty(section.CacheControllerType))
            {
                ICacheController customController = Activator.CreateInstance(Type.GetType(section.CacheControllerType)) as ICacheController;
                if (customController != null)
                {
                    return(customController.CreateCacheControllerInstance());
                }
            }

            return(section);
        }