Quotes F # on Windows Phone

I use Daniel Mohl F # templates for a Windows phone, but there seems to be no quote code in the FSharp.Core bundle. I am trying to port this code from regular .NET:

open System.ComponentModel
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Quotations.Patterns

[<AbstractClass>]
type ViewModelBase() =

    let propertyChanged = new Event<_, _>()

    let toPropName expr =
        match expr with
        | PropertyGet(a, b, list) -> b.Name
        | _ -> failwith "Unsupported: " + expr.ToString()

    interface INotifyPropertyChanged with
        [<CLIEvent>]
        member x.PropertyChanged = propertyChanged.Publish

    member x.NotityPropertyChanged expr =
        propertyChanged.Trigger(x, new PropertyChangedEventArgs(toPropName expr))

But the compiler complains about Microsoft.FSharp.Quotations.Patterns and PropertyGet. He doesn't seem to even know the type of Expr. Any idea on how to solve this?

+3
source share
2 answers

I replaced the FSharp.Core file, which is included in the template with the one included in the F # April 2011 CTP in WindowsPhone7 \ Silverlight \ 4.0 \ bin, and with this version it now compiles fine

+2
source

FSharp.Core.dll , , , , Silverlight F # .Net Reflector, !:) Thouse, , .

, - F # SCL . ... :)

+1

All Articles