Exemplo n.º 1
0
        public static List <NotifierHost> GetNotifierHosts(XmlNode notifierHostsNode, MonitorPack parentMonitorPack = null) //, List<ConfigVariable> monitorPackVars = null)
        {
            List <NotifierHost> notifierHosts = new List <NotifierHost>();

            foreach (XmlElement xmlNotifierHost in notifierHostsNode.SelectNodes("notifierHost"))
            {
                NotifierHost newNotifierHost = NotifierHost.FromConfig(null, xmlNotifierHost); //, monitorPackVars);
                newNotifierHost.ParentMonitorPack = parentMonitorPack;
                notifierHosts.Add(newNotifierHost);
            }
            return(notifierHosts);
        }
Exemplo n.º 2
0
        public static List <NotifierHost> GetNotifierHostsFromString(string xmlString, List <ConfigVariable> monitorPackVars = null)
        {
            List <NotifierHost> notifierHosts    = new List <NotifierHost>();
            XmlDocument         notifierHostsXml = new XmlDocument();

            notifierHostsXml.LoadXml(xmlString);
            XmlElement root = notifierHostsXml.DocumentElement;

            foreach (XmlElement xmlNotifierHost in root.SelectNodes("notifierHost"))
            {
                NotifierHost newNotifierHost = NotifierHost.FromConfig(null, xmlNotifierHost, monitorPackVars);
                notifierHosts.Add(newNotifierHost);
            }
            return(notifierHosts);
        }