/// <summary> /// Handle the command. /// </summary> /// <param name="command">The <see cref="ICommand"/> to process.</param> /// <returns>The result object.</returns> public async Task HandleAsync(CollectWater command) { await Task.Delay(1000); Bucket bucket = command.Well.Collect(); var waterCollected = new WaterCollected(command.Well, bucket); await this.CommandContext.PublishAsync(waterCollected); }
/// <summary> /// Handle the event. /// </summary> /// <param name="event">The <see cref="IEvent"/> to handle.</param> public Task HandleAsync(WaterCollected @event) { throw new NotImplementedException(); }