コード例 #1
0
 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);
     }
 }
コード例 #2
0
ファイル: BankAdapter.cs プロジェクト: fengyu25/comp5348
 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");
     }
 }
コード例 #3
0
ファイル: BankAdapter.cs プロジェクト: fengyu25/comp5348
        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());
            }
        }
コード例 #4
0
 public void HandleMessage(Message pMsg)
 {
     Command lCmd = pMsg as Command;
     lCmd.Execute();
 }