开发者

How to handle many related wcf-calls in Silverlight 4

i try to become a good friend with the asynchronous nature of WCF calls in Silverlight. Often i read "you have to understand asynchronous programming" and i think i have understand the idee and the benefits. But how can i handle processes which are naturally synchron with WCF calls, which are naturally asynchron. For example, load an entry from an online database, edit the entry, save it, do something, load it again, edit it again开发者_StackOverflow, save it. If it do that with the Microsoft Pattern i get an infinite loop.

public foo()
{
    LoadEntryAsync()
}

LoadEntryCompleted(Entry entry)
{
    entry.counter += 1;
    UpdateEntryAsync(entry);
}


UpdateEntryCompleted(Entry entry)
{
    //do something
    LoadEntryAsync();
}

Can anybody help me?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜