public Repository GetRepository() { Repository repository = new Repository() { Name = GetNameFromPath(DirectoryPath), Type = RepositoryType.Svn }; List <Branch> branches = GetBranches(DirectoryPath); branches.ForEach(branch => repository.AddBranch(branch)); return(repository); }
public Repository GetRepository() { Repository repository = new Repository(); using (GitRepository gitRepositoryInfo = new GitRepository(DirectoryPath)) { List <Branch> branches = GetBranches(DirectoryPath); repository.Type = RepositoryType.Git; repository.Name = GetNameFromPath(gitRepositoryInfo.Info.Path); repository.Url = DirectoryPath; branches.ForEach(branch => repository.AddBranch(branch)); } return(repository); }
public void AddRepositoryToDataBase(ISessionFactory sessionFactory) { Repository repository = GetRepository(); FillDataBase(sessionFactory, repository); }