public void Test() { var provider = new EventDataProvider(); var observer = new EventDataObserver(provider); provider.Next(2); provider.Next(10); }
public EventDataObserver(EventDataProvider provider) { _provider = provider; _provider.NewData += (object sender, int e) => { Trace.WriteLine($"Received new data: {e}"); }; //_provider.NewData += (int e) => Trace.WriteLine($"Received new data: {e}"); }