Permalink
Cannot retrieve contributors at this time
PriorityQueues/src/02 - PublishSubscribe/StrategicReceiver/Handlers/SubmitOrderHandler.cs /
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24 lines (21 sloc)
692 Bytes
This file contains 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
using System.Linq; | |
using System.Threading.Tasks; | |
using NServiceBus; | |
using NServiceBus.Logging; | |
using Shared; | |
using Shared.Messages; | |
namespace StrategicReceiver.Handlers | |
{ | |
public class SubmitOrderHandler : IHandleMessages<OrderSubmitted> | |
{ | |
readonly ILog log = LogManager.GetLogger<SubmitOrderHandler>(); | |
public Task Handle(OrderSubmitted message, IMessageHandlerContext context) | |
{ | |
if (Customers.GetPriorityCustomers().Contains(message.CustomerId)) | |
{ | |
log.Info($"Message received with CustomerId [{message.CustomerId}]"); | |
} | |
return Task.CompletedTask; | |
} | |
} | |
} |