//Update, push model public void OnUpdatePriceChange(Object sender, PriceChangeEventArgs args) { if (sender is Subject) //seul coupling éventuel ; //ok int qty = args.qty; double price = args.price; string str = String.Format("Received qty = {0}, price = {1}", qty, price); }
//notify public void ReceivePriceChangeFromFeed(int qty, double price) { PriceChangeEventArgs args = new PriceChangeEventArgs(qty, price); if (priceChanger != null) priceChanger(this, args); }