Example #1
0
            public CommandCompleterDescriptor(ICommandCompletion command, object result)
            {
                if (command == null)
                {
                    throw new ArgumentNullException(nameof(command));
                }

                this.Command = command;
                this.Result  = result;
            }
Example #2
0
 void ICommandPatternObserver <TSpec> .OnCommandCompletion(ICommandCompletion <TSpec> completion)
 => Completed?.Invoke(completion);
Example #3
0
 void ICommandPatternObserver.OnCommandCompletion(ICommandCompletion completion)
 => Completed?.Invoke((ICommandCompletion <TSpec>)completion);
Example #4
0
 public static IAppMessage CompletedCommand(ICommandCompletion completion)
 => completion.Succeeded ?
 inform($"Finished executing {completion.CommandName} command: {completion.CompleteMessage}")
     : error($"Finished executing {completion.CommandName} command: {completion.CompleteMessage}");