【发布时间】:2018-09-07 12:56:26
【问题描述】:
我正在使用 ReactiveUI-5.99.6,但我无法通过这个简单的测试
public class ViewModel : ReactiveObject
{
public ReactiveList<int> List { get; private set; }
public IReactiveCommand Command { get; private set; }
public ViewModel()
{
List = new ReactiveList<int>();
Command = ReactiveCommand.Create(List.Changed.Select(_ => List.Any()));
}
}
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var vm = new ViewModel();
vm.List.Add(2);
Assert.IsTrue(vm.Command.CanExecute(null));
}
}
谁能告诉我我做错了什么?
【问题讨论】:
-
从来没有发布过 5.99.6,我们有一个 5.5.1,然后我们跳到了 6.0.0。我们目前在 8.7.2。您是否对版本号感到困惑?
-
我正在尝试从 4.6.5 升级。我下载了这个版本github.com/reactiveui/ReactiveUI/tree/5.99.6
标签: wpf reactiveui