public void UpdateCart(ServiceParams taskParams)
 {
     Console.WriteLine($"[{DateTime.Now.ToString("hh:mm:ss.fff tt")}] {nameof(AccountService)}: {nameof(UpdateCart)}: Items are being added to Cart...");
     taskParams.Count++;
     serviceCoordinator.Raise <CartUpdatedEvent>(taskParams).Wait();
     Console.WriteLine($"[{DateTime.Now.ToString("hh:mm:ss.fff tt")}] {nameof(AccountService)}: {nameof(UpdateCart)}: Items added to cart...");
 }
Beispiel #2
0
        public async Task DeliverGoods(ServiceParams taskParams)
        {
            Console.WriteLine($"[{DateTime.Now.ToString("hh:mm:ss.fff tt")}] {nameof(InventoryService)}: {nameof(DeliverGoods)}: Delivery in progress...");
            await Task.Delay(10000);

            taskParams.Count++;
            await serviceCoordinator.Raise <GoodsDeliveredEvent>(taskParams);

            Console.WriteLine($"[{DateTime.Now.ToString("hh:mm:ss.fff tt")}] {nameof(InventoryService)}: {nameof(DeliverGoods)}: Delivery completed...");
        }
        public async Task MakePayment(ServiceParams taskParams)
        {
            Console.WriteLine($"[{DateTime.Now.ToString("hh:mm:ss.fff tt")}] {nameof(PaymentService)}: {nameof(MakePayment)} payment in progress...");
            await Task.Delay(10000);

            taskParams.Count++;
            await serviceCoordinator.Raise <PaymentReceivedEvent>(taskParams);

            Console.WriteLine($"[{DateTime.Now.ToString("hh:mm:ss.fff tt")}] {nameof(PaymentService)}: {nameof(MakePayment)} payment processed...");
        }