Represents a file containing VSS name records.
Inheritance: VssRecordFile
コード例 #1
0
ファイル: Program.cs プロジェクト: abevoelker/vss2git
 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);
     }
 }
コード例 #2
0
ファイル: VssDatabase.cs プロジェクト: abevoelker/vss2git
        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);
        }