public void QueueVehicleForDelivery() { var vehicle = RegisterVehicle(); var vehiclePayload = JsonConvert.SerializeObject(vehicle); var queueMessage = new QueueMessage(vehiclePayload); _deliveryQueue.Add(queueMessage); _logger.LogInfo($"Queued up vehicle of type {vehicle.GetType()} for food delivery."); }
public override Task HandleTableReadyMessage() { Task.FromResult(base.HandleTableReadyMessage()); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine(":: SMS - Queueing up a text message"); Console.ResetColor(); var message = new { customerName = "Sandi", message = "Your table is ready!" }; var jsonMessage = JsonConvert.SerializeObject(message); var queueMessage = new QueueMessage(jsonMessage); _queue.Add(queueMessage); return(Task.CompletedTask); }
public void Execute() { _logger.LogInfo("Adding User Address to Compost AWS Queue", ConsoleColor.Blue); _queue.Add(new QueueMessage(_address)); }