public TaggerController( ICommandInfoProvider commandInfoProvider, IDocumentsDataService service, IDocumentFactory documentFactory, IDocumentPostReadNormalizer documentReadNormalizer, IDocumentPreWriteNormalizer documentWriteNormalizer, Func <Type, ITaggerCommand> commandFactory, IFactory <ICommandSettings> commandSettingsFactory) { if (commandInfoProvider == null) { throw new ArgumentNullException(nameof(commandInfoProvider)); } this.service = service ?? throw new ArgumentNullException(nameof(service)); this.documentFactory = documentFactory ?? throw new ArgumentNullException(nameof(documentFactory)); this.documentReadNormalizer = documentReadNormalizer ?? throw new ArgumentNullException(nameof(documentReadNormalizer)); this.documentWriteNormalizer = documentWriteNormalizer ?? throw new ArgumentNullException(nameof(documentWriteNormalizer)); this.commandFactory = commandFactory ?? throw new ArgumentNullException(nameof(commandFactory)); this.commandSettingsFactory = commandSettingsFactory ?? throw new ArgumentNullException(nameof(commandSettingsFactory)); commandInfoProvider.ProcessInformation(); var commandsInformation = commandInfoProvider.CommandsInformation .Where(p => p.Key.GetInterfaces() .Contains(typeof(ISimpleTaggerCommand))); this.commandsInformation = new Dictionary <Type, ICommandInfo>(); foreach (var commandInformation in commandsInformation) { this.commandsInformation.Add(commandInformation.Key, commandInformation.Value); } }
public WriteDocumentHelper( IDocumentSplitter documentSplitter, IDocumentWriter documentWriter, IDocumentPreWriteNormalizer documentNormalizer) { this.documentSplitter = documentSplitter ?? throw new ArgumentNullException(nameof(documentSplitter)); this.documentWriter = documentWriter ?? throw new ArgumentNullException(nameof(documentWriter)); this.documentNormalizer = documentNormalizer ?? throw new ArgumentNullException(nameof(documentNormalizer)); }