コード例 #1
0
 public VaultExportAction(ActionContext context, VaultFacade vaultFacade,
     ILastVersionMarker lastVersionMarker, DirectoryCleaner directoryCleaner,
     Action<VersionHistoryItem> versionDownloadedSubAction)
 {
     this.context = context;
     this.vaultFacade = vaultFacade;
     this.versionDownloadedSubAction = versionDownloadedSubAction;
     this.lastVersionMarker = lastVersionMarker;
     this.directoryCleaner = directoryCleaner;
 }
コード例 #2
0
ファイル: ActionComposer.cs プロジェクト: tomaskovarik/chalk
        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;
        }