Пример #1
0
        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);
        }
Пример #2
0
        public static string GetDescriptionMessageForCommand(this ITaggerCommand command)
        {
            var type = command.GetType();

            return($"\n\t{type.GetDescriptionMessageForCommand()}\n");
        }