private static void DumpNameFile(string filename) { try { var nameFile = new NameFile(filename, Encoding.Default); nameFile.Header.Header.Dump(Console.Out); nameFile.Header.Dump(Console.Out); var name = nameFile.GetNextName(); while (name != null) { name.Header.Dump(Console.Out); name.Dump(Console.Out); name = nameFile.GetNextName(); } } catch (Exception e) { Console.WriteLine("ERROR: {0}", e.Message); } }
internal VssDatabase(string path, Encoding encoding) { if (Type.GetType("Mono.Runtime") != null) { RootProjectFile = RootProjectFile.ToLower(); } this.basePath = path; this.encoding = encoding; iniPath = Path.Combine(path, "srcsafe.ini"); var iniReader = new SimpleIniReader(iniPath); iniReader.Parse(); dataPath = Path.Combine(path, iniReader.GetValue("Data_Path", "data")); var namesPath = Path.Combine(dataPath, "names.dat"); nameFile = new NameFile(namesPath, encoding); rootProject = OpenProject(null, RootProjectFile, RootProjectName); }