ReactiveUI 具有带有签名的方法,例如
public static ReactiveUI.ObservableAsPropertyHelper<TRet>
ObservableToProperty<TObj, TRet>(
this TObj This,
System.IObservable<TRet> observable,
System.Linq.Expressions.Expression<System.Func<TObj, TRet>> property,
TRet initialValue = null,
System.Reactive.Concurrency.IScheduler scheduler = null
)
在 F# 中,我将如何构造一个像
System.Linq.Expressions.Expression<System.Func<TObj, TRet>> property,
在 C# 中,我会做类似的事情
this.ObservableAsPropertyHelper(
observable,
me => me.MyProperty
)
编辑
我试过了
m.ObservableToProperty(this, value, fun me -> me.Property )
和
m.ObservableToProperty(this,
value,
new Linq.Expression.Expression(fun me -> me.Property )
但两者都不起作用