public void HandleMessage(Message pMsg)
 {
     if (pMsg.GetType() == typeof(EntityInsertCommand<Media>))
     {
         EntityInsertCommand<Media> lCmd = pMsg as EntityInsertCommand<Media>;
         ReviewSubscriptionServiceClient lClient = new ReviewSubscriptionServiceClient();
         lClient.SubscribeForReviews(cSubscriberServiceAddress, lCmd.Entity.UPC);
     }
 }
Example #2
0
 public void HandleMessage(Message pMsg)
 {
     if (pMsg.GetType() == typeof(SubmitOrderCommand))
     {
         SubmitOrderCommand lCmd = pMsg as SubmitOrderCommand;
         Order lOrder = lCmd.Order;
         TransferServiceClient lClient = new TransferServiceClient();
         lClient.Transfer(lOrder.Total, lOrder.Customer.BankAccountNumber, GetStoreAcctNumber(), "orderPurchase");
     }
 }
Example #3
0
        public void HandleMessage(Message pMsg)
        {
            if (pMsg.GetType() == typeof(SubmitOrderCommand))
            {
                SubmitOrderCommand lCmd = pMsg as SubmitOrderCommand;
                Order lOrder = lCmd.Order;

                // how transfer is invoked, service reference
                TransferServiceClient lClient = new TransferServiceClient();
                lClient.Transfer((decimal)lOrder.Total, lOrder.Customer.BankAccountNumber, GetStoreAcctNumber(), lOrder.ExternalOrderId, getWCFQueueName());
            }
        }
Example #4
0
 public void HandleMessage(Message pMsg)
 {
     Command lCmd = pMsg as Command;
     lCmd.Execute();
 }