A very simple .INI file reader that does not require or support sections.
Exemplo n.º 1
0
        internal VssDatabase(string path, Encoding encoding)
        {
            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);
        }
Exemplo n.º 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);
        }