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); }
public async Task <ServiceRequest> SendServiceCompletedAsync(ServiceRequest serviceRequest) { // do not change the serviceRequest object, if it enters this function it already has the right ship and service Id's await _eventPublisher.HandleEventAsync(EventTypes.ServiceCompleted, serviceRequest); return(serviceRequest); }