public GitignoreGetCommandHandler(IGitignoreService gitignoreService,
                                   IConcatedNamesProcessor concatedNamesProcessor,
                                   IMergeStrategy mergeStrategy,
                                   IGitignoreFileWriter gitignoreFileWriter)
 {
     _gitignoreService       = gitignoreService ?? throw new ArgumentNullException(nameof(gitignoreService));
     _concatedNamesProcessor = concatedNamesProcessor ?? throw new ArgumentNullException(nameof(concatedNamesProcessor));
     _mergeStrategy          = mergeStrategy ?? throw new ArgumentNullException(nameof(mergeStrategy));
     _gitignoreFileWriter    = gitignoreFileWriter ?? throw new ArgumentNullException(nameof(gitignoreFileWriter));
 }
Exemplo n.º 2
0
        private static (GitignoreGetCommand command, GitignoreGetCommandHandler handler) CreateCommandAndHandler(
            IGitignoreService service,
            IGitignoreFileWriter gitignoreFileWriter)
        {
            var fileNameSpliterStub = new ConcatedNamesProcessorStub();
            var mergeStrategyStub   = new MergeStrategyStub();

            var handler = new GitignoreGetCommandHandler(
                service,
                fileNameSpliterStub,
                mergeStrategyStub,
                gitignoreFileWriter);

            var command = new GitignoreGetCommand(handler, fileNameSpliterStub);

            return(command, handler);
        }
 public GitignoreListCommandHandler(IGitignoreService gitignoreService, IConsole console)
 {
     _gitignoreService = gitignoreService ?? throw new ArgumentNullException(nameof(gitignoreService));
     _console          = console ?? throw new ArgumentNullException(nameof(console));
 }