/// <inheritdoc />
        public Task Handle(ActiveCustomerCommand command)
        {
            var @event = new ActiveCustomerIntegrationEvent
            {
                CustomerId = command.CustomerId
            };

            return(_dispatcher.PublishAsync(@event));
        }
Exemplo n.º 2
0
        public async Task Handle(ConfirmOrderCommand command)
        {
            var @event = new ConfirmOrderIntegrationEvent
            {
                OrderId = command.OrderId
            };

            await _dispatcher.PublishAsync(@event);
        }
        /// <inheritdoc />
        public async Task Handle(DeactiveCustomerCommand command)
        {
            var @event = new DeactiveCustomerIntegrationEvent
            {
                CustomerId = command.CustomerId
            };

            await _dispatcher.PublishAsync(@event);
        }
Exemplo n.º 4
0
        public async Task Handle(PlaceOrderCommand command)
        {
            var @event = new PlaceOrderIntegrationEvent
            {
                CustomerId = command.CustomerId,
                Price      = command.Price
            };

            await _dispatcher.PublishAsync(@event);
        }
Exemplo n.º 5
0
        /// <inheritdoc />
        public async Task Handle(RegisterCustomerCommand command)
        {
            var @event = new RegisterCustomerIntegrationEvent
            {
                FirstName    = command.FirstName,
                LastName     = command.LastName,
                NationalCode = command.NationalCode
            };

            await _dispatcher.PublishAsync(@event);
        }