protected override void Main() { //// Note that Rxx for Silverlight does not support DependencyProperty change notifications, //// due to limitations in Silverlight. var foo = new Foo(); var bar = new Bar(); IObservable <string> seeFooChange = Observable2.FromPropertyChangedPattern(foo, o => o.Value); IObservable <string> seeBarChange = Observable2.FromPropertyChangedPattern(bar, o => o.Value); using (seeFooChange.Subscribe(ConsoleOutput)) using (seeBarChange.Subscribe(ConsoleOutput)) { foo.Value = UserInput(Text.PromptFormat, Instructions.EnterAValueForFoo); bar.Value = UserInput(Text.PromptFormat, Instructions.EnterAValueForBar); } }
protected override void Main() { var foo = new Foo(); var bar = new Bar(); var baz = new Baz(); IObservable <string> seeFooChange = Observable2.FromPropertyChangedPattern(() => foo.Value); IObservable <string> seeBarChange = Observable2.FromPropertyChangedPattern(() => bar.Value); IObservable <string> seeBazChange = Observable2.FromPropertyChangedPattern(() => baz.Value); using (seeFooChange.Subscribe(ConsoleOutput)) using (seeBarChange.Subscribe(ConsoleOutput)) using (seeBazChange.Subscribe(ConsoleOutput)) { foo.Value = UserInput(Text.PromptFormat, Instructions.EnterAValueForFoo); bar.Value = UserInput(Text.PromptFormat, Instructions.EnterAValueForBar); baz.Value = UserInput(Text.PromptFormat, Instructions.EnterAValueForBaz); } }