PRISM:创建异步方法的管道
我想知道是否有人可以在这里帮助我: 我正在尝试创建命令的“管道”或“队列”[类似于 Prism 中的 CompositeCommand],但我希望它是顺序的,即使正在执行的命令本质上是异步的。
基本上,我想将一堆异步调用串在一起[不是在编译时而是在运行时],并且我想要类似于 CompositeCommand 功能的东西,我可以在其中轻松注册和取消注册调用。
对此的任何帮助/见解都非常感谢。
谢谢, 拉维
I am wondering if anyone can help me with something here:
I am trying to create a "pipeline" or "queue" of commands [similar to CompositeCommand in Prism] except I want it to be sequential even if the command being executed is Asynchronous in nature.
Basically, I want to string together bunch of Async calls [not at compile time but at run time] and I want something similar to CompositeCommand functionality where I can easily register and unregister calls.
Any help/insight into this is greatly appreciated.
Thanks,
Ravi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 Caliburn Micro 中的协程实现。
http://caliburnmicro.codeplex.com/wikipage?title= IResult%20and%20Coroutines&referringTitle=Documentation
您还可以观看 Rob 在今年的 Mix 视频中描述协程。
http://live.visitmix.com/MIX10/Sessions/EX15
或 ..如果您被允许走在最前沿,今天刚刚宣布的是下一版本框架中的 async 和 wait 关键字。在这里阅读相关内容:
链接
希望有帮助。
check out the coroutine implementation in Caliburn Micro.
http://caliburnmicro.codeplex.com/wikipage?title=IResult%20and%20Coroutines&referringTitle=Documentation
You can also watch Rob describe coroutines in his video from Mix this year.
http://live.visitmix.com/MIX10/Sessions/EX15
Or ... if you're allowed to be on the cutting edge, just announced today are the async and await keywords in the next version of the framework. Read about that here:
Link
Hope that helps.