<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.1.2" />

Nito.AsyncEx.TaskHelper

public static class TaskHelper
Helper methods for working with tasks.
namespace Nito.AsyncEx { public static class TaskHelper { public static Task ExecuteAsTask(Action func); public static Task<T> ExecuteAsTask<[System.Runtime.CompilerServices.Nullable(2)] T>(Func<T> func); } }