Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tasks = new Dictionary<Guid, Lazy<Task>>();
- tasks.Add(Task1Guid, new Lazy<Task>(() => { whatever the 1st task is }));
- tasks.Add(Task2Guid, new Lazy<Task>(() => { whatever the 2nd task is }));
- void async RunTaskAsync(Guid guid)
- {
- await tasks[guid].Value;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement