private async Task InvokeCommand(ITaggerCommand command, IDocument document) { if (command == null) { throw new ArgumentNullException(nameof(command), $"Command of type {command.GetType().FullName} is invalid."); } string message = command.GetDescriptionMessageForCommand(); await InvokeProcessor( message, () => command.Run(document, this.settings), this.logger); }
public static string GetDescriptionMessageForCommand(this ITaggerCommand command) { var type = command.GetType(); return($"\n\t{type.GetDescriptionMessageForCommand()}\n"); }