对于异步操作Silverlight的顺序操作 [英] Silverlight sequential operation for Asynchronous operation

查看:109
本文介绍了对于异步操作Silverlight的顺序操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有3个操作需要按顺序过程中,他们


  1. GetMainInformation

  2. GetDetails1

  3. GetDetails2

我被code像下面这样做,但我认为这是不干净。我想知道的另一种方式做顺序异步操作。

  GetMainInformation.Completed + = GetDetails1;
GetDetails1.Completed + = GetDetails2;


解决方案

您可以使用卡利科技的IResult和协同程序。 <一href=\"http://stackoverflow.com/questions/6105228/how-to-ensure-all-properties-have-loaded-in-silverlight-viewmodel-pattern-concur/6105970#6105970\">How确保所有属性都在Silverlight视图模型模式装入(并发控制?)

I have 3 operation that need to process sequentially, they are

  1. GetMainInformation
  2. GetDetails1
  3. 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的顺序操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆