Пример #1
0
        /// <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);
        }
Пример #2
0
 /// <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());
 }