Technology - Silverlight 5 + C#
I have some invoke operations that I need to call based on the user selected items that are stored in an ObservableCollection and return a string/int value.
Now when the selection is only one item it is straight forward, I can call and use the Completed event and get my return value.
I have approx <= 8 items in the list I need to iterate and perform the invoke operation on each.
So foreach to iterate and switch statement to decide the right operation.
But from what I see the foreach will not really wait for the Invokeoperation to finish and just continuously iterates till the end of the list making them run in parallel..sort of...
How do I perform only one operation at once and iterate only when the previous operation is completed (irrespective of the result)?
1 by 1 execution of invokeoperations is what I'm looking for..any clues, hints..?
Let me know if I'm unclear..
Cheers.
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog