コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }