问题描述
按照我之前关于 Reactive Extensions Instant Search for WPF/MVVM 的问题,其中...
Following my earlier question about Reactive Extensions Instant Search for WPF/MVVM, wherein...
我想实现一个文本框,当您输入时,结果会立即出现在另一个列表框中
...我发现这个问题最初是由 ReactiveUI 解决的,并且有一个 相对简单的解决方案发布在 ReactiveUI 博客和文档中.
...I found that this problem had originally been addressed by ReactiveUI and there was a relatively straightforward solution posted in the ReactiveUI blog and documentation.
快进到 ReactiveUI 5,API 已更改,旧示例不再有效.ReactiveAsyncCommand 已与 ReactiveCommand 合并;但是 ReactiveCommand 似乎没有让事情正常工作所需的 RegisterAsyncFunction()
方法.
Fast forward to ReactiveUI 5, and the API has been changed, and the old examples don't work any more. ReactiveAsyncCommand has been merged with ReactiveCommand; however ReactiveCommand doesn't seem to have a RegisterAsyncFunction()
method necessary to get things working.
不幸的是,ReactiveUI 文档已经过时了.如何让此示例与新 API 配合使用?
Unfortunately the ReactiveUI documentation is very much out of date. How can I get this sample working with the new API?
推荐答案
你确定你在使用 ReactiveUI 5.x 吗?RegisterAsyncFunction
肯定还存在,这里是:
Are you sure you're using ReactiveUI 5.x? RegisterAsyncFunction
definitely still exists, here's where it is:
https://github.com/reactiveui/ReactiveUI/blob/master/ReactiveUI/ReactiveCommand.cs#L273
这篇关于ReactiveUI 5 即时搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!