Exemplo n.º 1
0
        private void SaveMetaGroup(System.Xml.XmlDocument xmlDoc, WsusServer server, System.Xml.XmlElement serverElement)
        {
            Logger.EnteringMethod(serverElement.ToString());
            foreach (MetaGroup metaGroup in server.MetaGroups)
            {
                Logger.Write(metaGroup.Name);
                System.Xml.XmlElement metaGroupElement = xmlDoc.CreateElement("MetaGroup");
                metaGroupElement.AppendChild(xmlDoc.CreateElement("Name")).InnerText = metaGroup.Name;
                foreach (MetaGroup innerMetaGroup in metaGroup.InnerMetaGroups)
                {
                    metaGroupElement.AppendChild(xmlDoc.CreateElement("InnerMetaGroup")).InnerText = innerMetaGroup.Name;
                }
                foreach (ComputerGroup innerComputerGroup in metaGroup.InnerComputerGroups)
                {
                    metaGroupElement.AppendChild(xmlDoc.CreateElement("InnerComputerGroup")).InnerText = innerComputerGroup.Name;
                }

                serverElement.AppendChild(metaGroupElement);
            }
        }