using System; using System.Threading.Tasks; namespace Wabbajack.Common; public class AsyncLazy : Lazy> { public AsyncLazy(Func valueFactory) : base(() => Task.Factory.StartNew(valueFactory)) { } public AsyncLazy(Func> taskFactory) : base(() => Task.Factory.StartNew(taskFactory).Unwrap()) { } }