예제 #1
0
 public SingleFileZipArchiveReader(
     IFileService fileService,
     IFileNameGenerationService fileNameGenerationService,
     IPathService pathService,
     IStreamFactory streamFactory)
 {
     _fileService = fileService;
     _fileNameGenerationService = fileNameGenerationService;
     _pathService   = pathService;
     _streamFactory = streamFactory;
 }
예제 #2
0
 public ArchiveProcessorFactory(
     IFileService fileService,
     IDirectoryService directoryService,
     IFileNameGenerationService fileNameGenerationService,
     IPathService pathService)
 {
     _fileService               = fileService;
     _directoryService          = directoryService;
     _fileNameGenerationService = fileNameGenerationService;
     _pathService               = pathService;
 }
예제 #3
0
 public ArchiveService(
     IArchiveTypeMapper archiveTypeMapper,
     IPathService pathService,
     IOperationsService operationsService,
     IFileNameGenerationService fileNameGenerationService)
 {
     _archiveTypeMapper         = archiveTypeMapper;
     _pathService               = pathService;
     _operationsService         = operationsService;
     _fileNameGenerationService = fileNameGenerationService;
 }
예제 #4
0
 public OperationsFactory(
     ITaskPool taskPool,
     IDirectoryService directoryService,
     IFileService fileService,
     IPathService pathService,
     IFileNameGenerationService fileNameGenerationService)
 {
     _taskPool                  = taskPool;
     _directoryService          = directoryService;
     _fileService               = fileService;
     _pathService               = pathService;
     _fileNameGenerationService = fileNameGenerationService;
 }
예제 #5
0
 public OperationsFactory(
     IDirectoryService directoryService,
     IFileService fileService,
     IPathService pathService,
     IFileNameGenerationService fileNameGenerationService,
     ILogger logger,
     IArchiveProcessorFactory archiveProcessorFactory)
 {
     _directoryService          = directoryService;
     _fileService               = fileService;
     _pathService               = pathService;
     _fileNameGenerationService = fileNameGenerationService;
     _logger = logger;
     _archiveProcessorFactory = archiveProcessorFactory;
 }
예제 #6
0
        public OverwriteOptionsDialogViewModel(
            IFileService fileService,
            IFileSystemNodeViewModelFactory fileSystemNodeViewModelFactory,
            IFileNameGenerationService fileNameGenerationService,
            IPathService pathService)
        {
            _fileService = fileService;
            _fileSystemNodeViewModelFactory = fileSystemNodeViewModelFactory;
            _fileNameGenerationService      = fileNameGenerationService;
            _pathService = pathService;

            CancelCommand         = ReactiveCommand.Create(Close);
            SkipCommand           = ReactiveCommand.Create(Skip);
            ReplaceCommand        = ReactiveCommand.Create(Replace);
            ReplaceIfOlderCommand = ReactiveCommand.Create(ReplaceIfOlder);
            RenameCommand         = ReactiveCommand.Create(Rename);
        }
예제 #7
0
        public OperationsTests()
        {
            var taskPoolMock = new Mock <ITaskPool>();

            taskPoolMock
            .Setup(m => m.ExecuteAsync(It.IsAny <Func <Task> >()))
            .Returns <Func <Task> >(x => x());
            _taskPool = taskPoolMock.Object;

            var pathServiceMock = new Mock <IPathService>();

            _pathService = pathServiceMock.Object;

            var fileNameGenerationServiceMock = new Mock <IFileNameGenerationService>();

            _fileNameGenerationService = fileNameGenerationServiceMock.Object;
        }
    public OverwriteOptionsDialogViewModel(
        IFileService fileService,
        IFileSystemNodeViewModelFactory fileSystemNodeViewModelFactory,
        IFileNameGenerationService fileNameGenerationService,
        IPathService pathService)
    {
        _fileService = fileService;
        _fileSystemNodeViewModelFactory = fileSystemNodeViewModelFactory;
        _fileNameGenerationService      = fileNameGenerationService;
        _pathService = pathService;

        SkipCommand           = ReactiveCommand.Create(Skip);
        ReplaceCommand        = ReactiveCommand.Create(Replace);
        ReplaceIfOlderCommand = ReactiveCommand.Create(ReplaceIfOlder);

        var canRename = this.WhenAnyValue(x => x.NewFileName,
                                          (Func <string, bool>)(_ => CheckIfDestinationNotExists()));

        RenameCommand = ReactiveCommand.Create(Rename, canRename);
    }