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?
精彩评论