/// <summary> /// Configures a <see cref="CommandResult"/> as the result /// </summary> /// <param name="mediator"></param> /// <param name="cmdId"></param> /// <param name="configResult"></param> public static void SetResult(this IReturnCommandResult mediator, Guid cmdId, Action <CommandResult> configResult) { configResult.MustNotBeNull(); var result = new CommandResult(); configResult(result); mediator.AddResult(cmdId, result); }
/// <summary> /// Adds an empty <see cref="CommandResult"/> /// </summary> /// <param name="mediator"></param> /// <param name="cmdId"></param> public static void AddEmptyCommandResult(this IReturnCommandResult mediator, Guid cmdId) { mediator.AddResult(cmdId, new CommandResult()); }