Ejemplo n.º 1
0
 /// <summary>Reads a INI file from a stream.</summary>
 public static IniFile FromStream(IniFileReader reader)
 {
     return FromElements(reader.ReadElementsToEnd());
 }
Ejemplo n.º 2
0
 /// <summary>Reads a INI file from a file or creates one.</summary>
 public static IniFile FromFile(string path)
 {
     if (!System.IO.File.Exists(path))
     {
         System.IO.File.Create(path).Close();
         return new IniFile();
     }
     IniFileReader reader = new IniFileReader(path);
     IniFile ret = FromStream(reader);
     reader.Close();
     return ret;
 }