public PruneHistoryCommandFactory(IOutput output, IFileSystem fileSystem, ModifyableOptionSet options) { _output = output; _fileSystem = fileSystem; _options = options; }
public CommandLineParser() { _fileSystem = new FileSystem(); _output = new ConsoleOutput(); _options = new ModifyableOptionSet { { Args.Name, "Compare files by name", v => { } }, { Args.Size, "Compare files by file size", v => { } }, { Args.Content, "Compare files by content", v => { } }, { Args.Head, "Compare files by head content (first {N} bytes, requires --content)", v => { } }, { Args.Tail, "Compare files by tail content (last {N} bytes, requires --content)", v => { } }, { Args.Keep, "Keeps the first duplicate encountered under {DIRECTORY}, and deletes duplicates from other" + " directories. If not specified, all but the first duplicate encountered are deleted.", v => { } }, { Args.History, "Keep a list of seen hashes in {FILE}, deletes files with hashes that reappear after not" + " being seen at least once", v => { } }, { Args.PruneHistory, "Remove hashes from the history, does not delete files", v => { } }, { Args.WhatIf, "Do not delete files", v => { } }, { Args.Help, "Show this message and exit", v => { } }, }; _factories = new ICommandFactory[] { new PruneHistoryCommandFactory(_output, _fileSystem, _options), new FindDuplicatesCommandFactory(_output, _fileSystem, _options), new ShowHelpCommandFactory(_output, _options) }; }
public OptionSetWithArguments(ModifyableOptionSet optionSet, string[] args) { _optionSet = optionSet; _args = args; }
public ShowHelpCommandFactory(IOutput output, ModifyableOptionSet options) { _output = output; _options = options; }
public FindDuplicatesCommandFactory(IOutput output, IFileSystem fileSystem, ModifyableOptionSet options) { _output = output; _fileSystem = fileSystem; _options = options; }