Example #1
0
        private Log4GridSection GetConfigSection(string sectionName)
        {
            Log4GridSection result = null;

            System.Configuration.ExeConfigurationFileMap fm = new System.Configuration.ExeConfigurationFileMap();
            fm.ExeConfigFilename = AppDomain.CurrentDomain.BaseDirectory + "Log4Grid.config";
            System.Configuration.Configuration mDomainConfig = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(fm, System.Configuration.ConfigurationUserLevel.None);
            result = (Log4GridSection)mDomainConfig.GetSection(sectionName);
            return(result);
        }
Example #2
0
        private void LoadConfig(Log4GridSection section)
        {
            mManagement = (Interfaces.IAppManagement)Activator.CreateInstance(Type.GetType(section.Management.Type));
            LoadProperties(mManagement, section.Management.Properties);

            mStore = (Interfaces.ILogStoreHandler)Activator.CreateInstance(Type.GetType(section.LogStore.Type));
            LoadProperties(mStore, section.LogStore.Properties);

            mSearch = (Interfaces.ILogSearchHandler)Activator.CreateInstance(Type.GetType(section.LogSearch.Type));
            LoadProperties(mSearch, section.LogSearch.Properties);

            mUser = (Interfaces.IUserManagement)Activator.CreateInstance(Type.GetType(section.User.Type));
            LoadProperties(mUser, section.User.Properties);
        }
Example #3
0
        private void LoadConfig(Log4GridSection section)
        {
            mManagement = (Interfaces.IAppManagement)Activator.CreateInstance(Type.GetType(section.Management.Type));
            LoadProperties(mManagement, section.Management.Properties);

            mStore = (Interfaces.ILogStoreHandler)Activator.CreateInstance(Type.GetType(section.LogStore.Type));
            LoadProperties(mStore, section.LogStore.Properties);

            mSearch = (Interfaces.ILogSearchHandler)Activator.CreateInstance(Type.GetType(section.LogSearch.Type));
            LoadProperties(mSearch, section.LogSearch.Properties);

            mUser = (Interfaces.IUserManagement)Activator.CreateInstance(Type.GetType(section.User.Type));
            LoadProperties(mUser, section.User.Properties);
        }