public DrinksViewModel Subscribe(DrinksViewModel subscriber)
 {
     DisposeRequest += subscriber.Dispose;
     subscriber.Publish(this);
     subscriber.Initialize();
     return(subscriber);
 }
 public ICommand Subscribe(DrinksViewModel subscriber)
 {
     GetDrinksQtyRequest        += subscriber.GetDrinksQty;
     ShippingRequest            += subscriber.Shipping;
     GetDrinksPriceRequest      += subscriber.GetDrinksPrice;
     PurchaseRequest            += subscriber.Purchase;
     ThanksMessageRequest       += subscriber.ThanksMessage;
     DrinksButtonHideRequest    += subscriber.DrinksButtonHide;
     InsufficientMessageRequest += subscriber.InsufficientMessage;
     subscriber.Publish(this);
     return(this);
 }
Example #3
0
 public static ICommand BindCommandToModel(this BaseCommand command, DrinksViewModel model)
 {
     return(command.Subscribe(model));
 }
Example #4
0
 public static DrinksViewModel BindToMainModel(this DrinksViewModel model)
 {
     return(VendingMachineViewModel.Current.Subscribe(model));
 }