public CommandCompleterDescriptor(ICommandCompletion command, object result) { if (command == null) { throw new ArgumentNullException(nameof(command)); } this.Command = command; this.Result = result; }
void ICommandPatternObserver <TSpec> .OnCommandCompletion(ICommandCompletion <TSpec> completion) => Completed?.Invoke(completion);
void ICommandPatternObserver.OnCommandCompletion(ICommandCompletion completion) => Completed?.Invoke((ICommandCompletion <TSpec>)completion);
public static IAppMessage CompletedCommand(ICommandCompletion completion) => completion.Succeeded ? inform($"Finished executing {completion.CommandName} command: {completion.CompleteMessage}") : error($"Finished executing {completion.CommandName} command: {completion.CompleteMessage}");