本文介绍了对于异步操作Silverlight的顺序操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有3个操作需要按顺序过程中,他们
- GetMainInformation
- GetDetails1
- GetDetails2
我被code像下面这样做,但我认为这是不干净。我想知道的另一种方式做顺序异步操作。
GetMainInformation.Completed + = GetDetails1;
GetDetails1.Completed + = GetDetails2;
解决方案
您可以使用卡利科技的IResult和协同程序。 How确保所有属性都在Silverlight视图模型模式装入(并发控制?)
I have 3 operation that need to process sequentially, they are
- GetMainInformation
- GetDetails1
- GetDetails2
I'm doing this by code like below but I think it isn't clean. I want to know an alternative way to do async operation in sequential order.
GetMainInformation.Completed += GetDetails1;
GetDetails1.Completed += GetDetails2;
解决方案
You can use Caliburn Micro's IResult and Coroutines. How to ensure all properties have loaded in Silverlight ViewModel pattern (Concurrency Control?)
这篇关于对于异步操作Silverlight的顺序操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!