Exemplo n.º 1
0
        /// <summary>
        /// Gets the Log section settings of the app.config
        /// </summary>
        public static ILogController CreateLogController()
        {
            LogSection section = (LogSection)ConfigurationManager.GetSection(SECTION_NAME);

            if (!string.IsNullOrEmpty(section.LogSectionProviderType))
            {
                ILogController customController = Activator.CreateInstance(Type.GetType(section.LogSectionProviderType)) as ILogController;
                if (customController != null)
                {
                    return(customController.CreateLogControllerInstance());
                }
            }

            return(section);
        }