-
-
Save dcomartin/6b82bd81d60ccd695287639f4472986a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class OrderPlacedHandler(ILogger<OrderPlacedHandler> logger) : | |
| IHandleMessages<OrderPlaced> | |
| { | |
| public Task Handle(OrderPlaced message, IMessageHandlerContext context) | |
| { | |
| logger.LogInformation("Received OrderPlaced, OrderId = {OrderId} - Charging credit card...", message.OrderId); | |
| var orderBilled = new OrderBilled | |
| { | |
| OrderId = message.OrderId | |
| }; | |
| return context.Publish(orderBilled); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment