Exemple #1
0
 private void WriteComputerRegExXML(ComputerGroupRegexCollection c, string file)
 {
     // Create XML file (overwriting it if it already exists)
     using (FileStream fs = new FileStream(file, FileMode.Create))
     {
         XmlSerializer xs = new XmlSerializer(typeof(ComputerGroupRegexCollection));
         xs.Serialize(fs, c);
     }
 }
Exemple #2
0
 private ComputerGroupRegexCollection ReadComputerRegExXML(string file)
 {
     // Open the XML file and read the config.  Let the exceptions fly for other procedures to handle
     using (FileStream fs = new FileStream(file, FileMode.Open))
     {
         ComputerGroupRegexCollection c = new ComputerGroupRegexCollection();
         XmlSerializer xs = new XmlSerializer(typeof(ComputerGroupRegexCollection));
         c = (ComputerGroupRegexCollection)xs.Deserialize(fs);
         return(c);
     }
 }
 private ComputerGroupRegexCollection ReadComputerRegExXML(string file)
 {
     // Open the XML file and read the config.  Let the exceptions fly for other procedures to handle
     using (FileStream fs = new FileStream(file, FileMode.Open))
     {
         ComputerGroupRegexCollection c = new ComputerGroupRegexCollection();
         XmlSerializer xs = new XmlSerializer(typeof(ComputerGroupRegexCollection));
         c = (ComputerGroupRegexCollection)xs.Deserialize(fs);
         return c;
     }
 }
 private void WriteComputerRegExXML(ComputerGroupRegexCollection c, string file)
 {
     // Create XML file (overwriting it if it already exists)
     using (FileStream fs = new FileStream(file, FileMode.Create))
     {
         XmlSerializer xs = new XmlSerializer(typeof(ComputerGroupRegexCollection));
         xs.Serialize(fs, c);
     }
 }