Esempio n. 1
0
 private void WriteCredentialXML(CredentialCollection 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(CredentialCollection));
         xs.Serialize(fs, c);
     }
 }
Esempio n. 2
0
 private CredentialCollection ReadCredentialXML(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))
     {
         CredentialCollection c  = new CredentialCollection();
         XmlSerializer        xs = new XmlSerializer(typeof(CredentialCollection));
         c = (CredentialCollection)xs.Deserialize(fs);
         return(c);
     }
 }
Esempio n. 3
0
 private CredentialCollection ReadCredentialXML(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))
     {
         CredentialCollection c = new CredentialCollection();
         XmlSerializer xs = new XmlSerializer(typeof(CredentialCollection));
         c = (CredentialCollection)xs.Deserialize(fs);
         return c;
     }
 }
Esempio n. 4
0
 private void WriteCredentialXML(CredentialCollection 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(CredentialCollection));
         xs.Serialize(fs, c);
     }
 }