>
> Now I'm trying to shrink this down to the smallest possible
>> functional-looking code possible
>>
>
>
>> new Action(async () => { var r = await GetStuffAsync("Key1"); updateUI(r)
>> }).Invoke();
>> new Action(async () => { var r = await GetStuffAsync("Key2"); updateUI(r)
>> }).Invoke();
>> new Action(async () => { var r = await GetStuffAsync("Key3"); updateUI(r)
>> }).Invoke();
>>
>
I wasn't very clear originally, but I guess what I'm really looking for is
the shortest and most elegant C# code that can fire off an arbitrary number
of independent await-and-UI-updates like above. I do want to avoid
splitting it into multiple methods.

I know the code above is a bit chunky looking and lacks functional beauty,
but besides writing this stuff in F# I'm not sure how to strip it down
further. Suggestions are welcome!

*Greg*

Reply via email to