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); } }
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"); } }
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()); } }
public void HandleMessage(Message pMsg) { Command lCmd = pMsg as Command; lCmd.Execute(); }