public async Task SendTugboatDispatchedAsync(Ship ship) { Console.WriteLine("Dispatching tugboats to ship: " + ship.Id); #region -- convert to desired output-- DockEventModel dem = new DockEventModel { CustomerId = ship.CustomerId, ShipId = ship.Id, ShipName = ship.Name }; #endregion await _eventPublisher.HandleEventAsync(EventTypes.DispatchTugbboat, dem); }
public async Task SendShipDockedAsync(Ship ship) { #region -- convert to desired output-- DockEventModel dem = new DockEventModel { CustomerId = ship.CustomerId, ShipId = ship.Id, ShipName = ship.Name, Containers = ship.Containers }; #endregion Console.WriteLine("Docking ship: " + ship.Id); await _eventPublisher.HandleEventAsync(EventTypes.ShipDocked, dem); }