public void AddRepository(DirectoryInfo physicalDirectory, DirectoryInfo mountpoint, string name, string commandline, bool performFullCheckout, bool createNew) { //Repository already exists if (Repositories.Any(repository => Compare(repository.Name, name, StringComparison.InvariantCultureIgnoreCase) == 0)) { return; } var repo = new GinRepository( physicalDirectory, mountpoint, name, commandline, createNew); repo.FileOperationStarted += Repo_FileOperationStarted; repo.FileOperationCompleted += Repo_FileOperationCompleted; repo.FileOperationProgress += Repo_FileOperationProgress; repo.FileOperationError += RepoOnFileOperationError; if (!repo.CreateDirectories(performFullCheckout)) { return; } MountRepository(repo); repo.Initialize(); Repositories.Add(repo); }
public void AddRepository(DirectoryInfo physicalDirectory, DirectoryInfo mountpoint, string name, string commandline, bool performFullCheckout, bool createNew) { var repo = new GinRepository( physicalDirectory, mountpoint, name, commandline, createNew); repo.FileOperationStarted += Repo_FileOperationStarted; repo.FileOperationCompleted += Repo_FileOperationCompleted; repo.FileOperationProgress += Repo_FileOperationProgress; repo.FileOperationError += RepoOnFileOperationError; repo.CreateDirectories(performFullCheckout); MountRepository(repo); repo.Initialize(); Repositories.Add(repo); }