Represents a file containing VSS name records.
Наследование: VssRecordFile
Пример #1
0
 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
        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);
        }