static Action NewGitInitializeRepositoryAction(ActionContext context) { var gitClient = new CommandLineClient(context.Parameters.LocalWorkspacePath, context.Logger); var gitFacade = new CommandLineClientFacade(gitClient, new FileSystem()); return new GitInitializeLocalRepositoryAction(context, gitFacade).Execute; }
static Action NewGitInitializeRepositoryAction(ActionContext context) { var gitClient = new CommandLineClient(context.Parameters.LocalWorkspacePath, context.Logger); var gitFacade = new CommandLineClientFacade(gitClient, new FileSystem()); return(new GitInitializeLocalRepositoryAction(context, gitFacade).Execute); }
static Action NewVaultExportAction(ActionContext context) { var vaultCredential = new NetworkCredential(context.Parameters.VaultUserName, context.Parameters.VaultPassword); var vaultClient = new VaultExport.Interop.CommandLineClient(context.Parameters.VaultCommandLineClientPath, context.Parameters.VaultHost, vaultCredential, TimeSpan.FromSeconds(context.Parameters.VaultServerTimeOutInSeconds)); var vaultFactory = new VaultFacade(vaultClient); var gitClient = new CommandLineClient(context.Parameters.LocalWorkspacePath, context.Logger); var versionMarker = new FilePersistedLastVersionMarker(context.Parameters.LocalWorkspacePath, new FileSystem()); Action <VersionHistoryItem> versionDownloadedAction = new GitCommitFilesAction(context, gitClient).Execute; return (new VaultExportAction(context, vaultFactory, versionMarker, new DirectoryCleaner(new FileSystem()), versionDownloadedAction).Execute); }
static Action NewVaultExportAction(ActionContext context) { var vaultCredential = new NetworkCredential(context.Parameters.VaultUserName, context.Parameters.VaultPassword); var vaultClient = new VaultExport.Interop.CommandLineClient(context.Parameters.VaultCommandLineClientPath, context.Parameters.VaultHost, vaultCredential, TimeSpan.FromSeconds(context.Parameters.VaultServerTimeOutInSeconds)); var vaultFactory = new VaultFacade(vaultClient); var gitClient = new CommandLineClient(context.Parameters.LocalWorkspacePath, context.Logger); var versionMarker = new FilePersistedLastVersionMarker(context.Parameters.LocalWorkspacePath, new FileSystem()); Action<VersionHistoryItem> versionDownloadedAction = new GitCommitFilesAction(context, gitClient).Execute; return new VaultExportAction(context, vaultFactory, versionMarker, new DirectoryCleaner(new FileSystem()), versionDownloadedAction).Execute; }
public CommandLineClientBasedRepository(CommandLineClient gitClient, IFileSystem fileSystem, string workingDirectoryPath) { this.gitClient = gitClient; this.fileSystem = fileSystem; this.workingDirectoryPath = workingDirectoryPath; }
public CommandLineClientFacade(CommandLineClient gitCommandLineClient, IFileSystem fileSystem) { this.gitCommandLineClient = gitCommandLineClient; this.fileSystem = fileSystem; }