ProtectMachine() private static method

private static ProtectMachine ( string path ) : bool
path string
return bool
Exemplo n.º 1
0
 public void Save()
 {
     using (FileStream fileStream = File.Open(this.Filename, FileMode.Create))
     {
         StreamWriter streamWriter = new StreamWriter((Stream)fileStream, Encoding.UTF8);
         streamWriter.Write(this.ToXml());
         streamWriter.Close();
     }
     if (this.UseMachineKeyStore)
     {
         KeyPairPersistence.ProtectMachine(this.Filename);
     }
     else
     {
         KeyPairPersistence.ProtectUser(this.Filename);
     }
 }
 public void Save()
 {
     if (Environment.SocketSecurityEnabled)
     {
         return;
     }
     using (FileStream fileStream = File.Open(this.Filename, FileMode.Create))
     {
         StreamWriter streamWriter = new StreamWriter(fileStream, Encoding.UTF8);
         streamWriter.Write(this.ToXml());
         streamWriter.Close();
     }
     if (this.UseMachineKeyStore)
     {
         KeyPairPersistence.ProtectMachine(this.Filename);
     }
     else
     {
         KeyPairPersistence.ProtectUser(this.Filename);
     }
 }