public void setFileSystemCommandsStrategy(IFileSystemCommandsStrategy fileSystemCommandsStrategy)
        {
            if (fileSystemCommandsStrategy == null)
            {
                throw new ArgumentNullException(nameof(fileSystemCommandsStrategy));
            }

            FileSystemCommandsStrategy = fileSystemCommandsStrategy;
        }
 public FileDeleteCommand(string backupDir, IFileSystemCommandsStrategy fileSystemCommands = null, params string[] sourceFiles)
 {
     BackupFolder = backupDir;
     if (fileSystemCommands != null)
     {
         FileSystemCommands = fileSystemCommands;
     }
     foreach (var file in sourceFiles)
     {
         SourceFiles.Add(file, "");
     }
 }
 public DirectoryDeleteContentsOnlyCommand(string backupDir, IFileSystemCommandsStrategy fileSysCommand, params string[] targetDirectories)
     : this(backupDir, targetDirectories)
 {
     FileSystemCommands = fileSysCommand;
 }
 public BaseDirectoryDeleteCommand(string dirToDelete, string backupDir, IFileSystemCommandsStrategy fileSysCommand)
     : this(dirToDelete, backupDir)
 {
     FileSystemCommands = fileSysCommand;
 }
Beispiel #5
0
 public FileCopyCommand(string backupDir, IFileSystemCommandsStrategy fileSystemCommandsStrategy, params string[] fileCopyPairs)
     : this(backupDir, fileCopyPairs)
 {
     FileSystemCommands = fileSystemCommandsStrategy;
 }
Beispiel #6
0
 public MultiFileRenameWithPatternCommand(string pattern, IFileSystemCommandsStrategy fileSystemCommands,
                                          params string[] sourceFiles)
     : this(pattern, sourceFiles)
 {
     FileSystemCommands = fileSystemCommands;
 }
 public DirectoryDeleteCommand(string dirToDelete, string backupDir, IFileSystemCommandsStrategy fileSysCommand)
     : base(dirToDelete, backupDir, fileSysCommand)
 {
 }
 public DirectoryCopyContentsCommand(string sourceDirectory, string targetDirectory, IFileSystemCommandsStrategy fileSysCommand)
     : this(sourceDirectory, targetDirectory)
 {
     FileSystemCommands = fileSysCommand;
 }