Ejemplo n.º 1
0
        internal static HashSet <int> LoadModules(XmlDocument processXMLDoc)
        {
            ModuleList.AddModuleToList(System);
            HashSet <int> processModuleList = new HashSet <int>();
            var           modules           = processXMLDoc.SelectNodes(ProcMonXMLTagNames.Module_XPathInXML);

            foreach (XmlElement module in modules)
            {
                string path        = module.GetElementsByTagName(ProcMonXMLTagNames.Module_Path)[0].InnerText;
                int    moduleIndex = ModuleList.LocateModuleInList(path);
                if (-1 == moduleIndex)
                {
                    var tempModule = new PMLModule(path, module);
                    moduleIndex = ModuleList.AddModuleToList(tempModule);
                }
                if (-1 != moduleIndex)
                {
                    processModuleList.Add(moduleIndex);
                }
            }
            return(processModuleList);
        }