public void JustUtil() { var st = new StockTicker(); var gf = new GoogleMonitor(); var mf = new MicrosoftMonitor(); using (st.Subscribe(gf)) using (st.Subscribe(mf)) foreach (var s in SampleData.GetNext()) { st.Stock = s; } }
public static void MainED(string[] args) { // Monitor a stock ticker, when particular events occur, react StockTicker st = new StockTicker(); // Create New observers to listen to the stock ticker GoogleMonitor gf = new GoogleMonitor(st); MicrosoftMonitor mf = new MicrosoftMonitor(st); // Load the Sample Stock Data foreach (var s in SampleData.getNext()) { st.Stock = s; } }
public static void RunDemo() { StockTicker stockTicker = new StockTicker(); //// ReSharper disable UnusedVariable GoogleMonitor googleMonitor = new GoogleMonitor(stockTicker); MicrosoftMonitor microsoftMonitor = new MicrosoftMonitor(stockTicker); //// ReSharper restore UnusedVariable foreach (var stock in SampleData.GetNext()) { stockTicker.Stock = stock; } }
static void Main(string[] args) { StockTicker st = new StockTicker(); GoogleMonitor gf = new GoogleMonitor(); MicrosoftMonitor mf = new MicrosoftMonitor(); using (st.Subscribe(gf)) using (st.Subscribe(mf)) { foreach (var s in SampleData.getNext()) { st.Stock = s; } } }
public static void Main(string[] args) { var st = new StockTicker(); var gf = new GoogleMonitor(); var mf = new MicrosoftMonitor(); using (st.Subscribe(gf)) using (st.Subscribe(mf)) { foreach (var s in SampleData.getNext()) { st.Stock = s; } } }
public static void Run() { // Monitor a stock ticker, when particular events occur, react var st = new StockTicker(); var gf = new GoogleMonitor(); var mf = new MicrosoftMonitor(); using (st.Subscribe(gf)) using (st.Subscribe(mf)) { // Load the Sample Stock Data foreach (var s in SampleData.getNext()) { st.Stock = s; } } }
public static void RunDemo() { StockTicker stockTicker = new StockTicker(); GoogleMonitor googleMonitor = new GoogleMonitor(); MicrosoftMonitor microsoftMonitor = new MicrosoftMonitor(); using (stockTicker.Subscribe(googleMonitor)) { using (stockTicker.Subscribe(microsoftMonitor)) { foreach (var stock in SampleData.GetNext()) { stockTicker.Stock = stock; } } } }
static void Main(string[] args) { //EventKeyWord(); //TraditionalObserver(); // Monitor a stock ticker, when particular events occur, react var st = new IObserver.StockTicker(); GoogleMonitor gf = new GoogleMonitor(); MicrosoftMonitor mf = new MicrosoftMonitor(); using (st.Subscribe(gf)) using (st.Subscribe(mf)) { // Load the Sample Stock Data foreach (var s in SampleData.getNext()) { st.Stock = s; } } }