using System; using System.Collections.Generic; using System.Threading.Tasks; namespace ZeroLevel.Services.Async { internal static class TaskShim { public static Task Run(Action func) { return Task.Run(func); } public static Task Run(Func func) { return Task.Run(func); } public static Task Run(Func func) { return Task.Run(func); } public static Task Run(Func> func) { return Task.Run(func); } public static Task FromResult(T value) { return Task.FromResult(value); } public static Task WhenAll(IEnumerable> tasks) { return Task.WhenAll(tasks); } public static Task WhenAll(params Task[] tasks) { return Task.WhenAll(tasks); } public static Task WhenAll(params Task[] tasks) { return Task.WhenAll(tasks); } public static Task WhenAll(IEnumerable tasks) { return Task.WhenAll(tasks); } } }