ReactiveUI 5 instant search

陌路散爱 提交于 2019-12-13 03:03:31

问题


Following my earlier question about Reactive Extensions Instant Search for WPF/MVVM, wherein...

I would like to implement a TextBox where, as you type, results appear instantly in another ListBox

...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.

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.

Unfortunately the ReactiveUI documentation is very much out of date. How can I get this sample working with the new API?


回答1:


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



来源:https://stackoverflow.com/questions/23170139/reactiveui-5-instant-search

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!