public Task Handle(SendCustomerSuccesResponse message, CancellationToken cancellationToken) { var sender = this.configuration["Name"]; // Response to the customer for the order request. var customerResponse = new Retailer.Messages.OrderResponse( Guid.NewGuid().ToString(), sender, message.CustomerOrderRequest.Product, message.WarehouseOrderResponse.Delivery, message.WarehouseOrderResponse.ShippingCharge, message.WarehouseOrderResponse.Stock, message.WarehouseOrderResponse.ShippingFrom); this.bus.Publish(customerResponse, $"Customer.{message.CustomerOrderRequest.Sender}"); this.logger.LogInformation("Sent order response success to customer."); return(Task.FromResult(true)); }
public Task Handle(SendCustomerFailureResponse message, CancellationToken cancellationToken) { var sender = this.configuration["Name"]; // Response to the customer for the order request. var customerResponse = new Retailer.Messages.OrderResponse( Guid.NewGuid().ToString(), sender, message.CustomerOrderRequest.Product, null, 0.0, 0, ""); this.bus.Publish(customerResponse, $"Customer.{message.CustomerOrderRequest.Sender}"); this.logger.LogInformation("Sent failure order response to customer."); return(Task.FromResult(true)); }