c# - WhenAny for current null values -


is there way use whenany property of value null , set later?
this:

public server selectedserver {get;set;}  public testclass() {     this.whenany(selectedserver.items.changed, x => x).subscribe(/*do something*/); }   

selectedserver null, set through user interaction , therefor nullreferenceexception in constructor.

this typo instead produces runtime crash, should be:

this.whenanyvalue(x => x.selectedserver.items.changed); 

but given name of variable, i'm guessing better thing be:

this.whenanyobservable(x => x.selectedserver.items.changed); 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -