Ejemplo n.º 1
0
        /// <summary>
        /// Adds the specified items.
        /// </summary>
        /// <param name="Items">The items.</param>
        /// <returns></returns>
        public int[] Add(SVNUserCollection Items)
        {
            ArrayList indexes = new ArrayList();

            foreach (object Item in Items)
            {
                indexes.Add(List.Add(Item));
            }

            return((int[])(indexes.ToArray(typeof(int))));
        }
Ejemplo n.º 2
0
        private void GetUsers(string RepositoryPath)
        {
            var repo = new FileInfo(RepositoryPath);

            if (_repositoryConfiguration.UserDatabaseFileName.Length > 0)
            {
                string root;
                root = repo.DirectoryName;

                Common.GetCorrectedPath(root, false);

                string userDbFullPath = _repositoryConfiguration.UserDatabaseFileName;

                if (userDbFullPath != "")
                {
                    _users = new SVNUserCollection();
                    StreamReader userRead;
                    userRead = File.OpenText(userDbFullPath);

                    while (userRead.Peek() != -1)
                    {
                        string currLine;
                        currLine = userRead.ReadLine();

                        switch (currLine.ToUpper().Trim())
                        {
                        case "[USERS]":
                        case "":
                            break;

                        default:
                            string start = currLine.Substring(0, 1);

                            // Ignore comment lines
                            switch (start)
                            {
                            case "#":
                            case ";":
                                break;

                            default:
                                SVNUser newUser;
                                newUser = GetUserData(currLine);
                                _users.Add(newUser);
                                break;
                            }
                            break;
                        }
                    }

                    userRead.Close();
                }
            }
        }