Exemplo n.º 1
0
        private List <SystemLogStatus> GetSystemlogStatus()
        {
            List <SystemLogStatus> _ret = new List <SystemLogStatus>();

            Dictionary <string, string> _connList = new Dictionary <string, string>();

            foreach (ConnectionStringSettings _cstr in ConfigurationManager.ConnectionStrings)
            {
                if (_cstr.ProviderName == "System.Data.OracleClient")
                {
                    _connList.Add(_cstr.Name, _cstr.ConnectionString);
                }
            }

            CheckSystemLogConfigSection SystemList = (CheckSystemLogConfigSection)ConfigurationManager.GetSection("CheckSystemLogList");

            foreach (CheckSystemLogConfigurationElement _el in SystemList.PluginCollection)
            {
                SystemLogStatus _wss = new SystemLogStatus();
                _wss.Name        = _el.Name;
                _wss.Description = _el.Description;
                CheckSystemLogConfigSection(_wss, _el.ConnectName, _connList);

                _ret.Add(_wss);
            }
            return(_ret);
        }
Exemplo n.º 2
0
        Dictionary <string, string> GetLogConnectionList()
        {
            Dictionary <string, string> _ret      = new Dictionary <string, string>();
            Dictionary <string, string> _connList = new Dictionary <string, string>();

            foreach (ConnectionStringSettings _cstr in ConfigurationManager.ConnectionStrings)
            {
                if (_cstr.ProviderName == "System.Data.OracleClient")
                {
                    _connList.Add(_cstr.Name, _cstr.ConnectionString);
                }
            }

            CheckSystemLogConfigSection SystemList = (CheckSystemLogConfigSection)ConfigurationManager.GetSection("CheckSystemLogList");

            foreach (CheckSystemLogConfigurationElement _el in SystemList.PluginCollection)
            {
                if (_connList.ContainsKey(_el.ConnectName))
                {
                    _ret.Add(_el.ConnectName, _connList[_el.ConnectName]);
                }
            }
            return(_ret);
        }