reactiveui/ReactiveUI — pull request #403 by marklam (2013-11-15 11:01:36+00:00)
Title: Observable for single property, which doesn't query the value if ...

...skipInitial is true

As described in the SO question http://stackoverflow.com/q/19958446/59371 F# doesn't like re-entrant calls from the constructor, so the ability to observe changes without first reading the property would be very helpful.

This change adds an overload which takes a single string which is the property name, and be made nicer via an F# extension method below, which has the syntax
```this.ObservableForProperty(<@ this.Source @>)```

```
module ReactiveUIExtensions

open System
open System.Linq
open ReactiveUI
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Quotations.Patterns

let toPropName(query : Expr) =
match query with
| PropertyGet(a, b, list) -> b.Name
| _ -> ""

type ReactiveUI.ReactiveObject with
member this.ObservableForProperty (expr : Expr<'t>, ?beforeChange, ?skipInitial) =
let propertyName = toPropName expr
this.ObservableForProperty<_, 't>(propertyName, defaultArg beforeChange false, defaultArg skipInitial true)
```