Esempio n. 1
0
        static void Main(string[] args)
        {
            IMessageClient messageClient = new MessageRabbitMQClient();

            IBus bus = new Bus(messageClient);

            IOrderProcessor orderProcessor = new OrderProcessor(bus);

            var newOrderCommand = new NewProductOrderCommand("Café com Leite", "João Travolta", 100.50M);

            orderProcessor.Process(newOrderCommand);
        }
Esempio n. 2
0
 public void Process(NewProductOrderCommand order)
 {
     this.bus.Publish <NewProductOrderCommand>(order);
 }