1 type derived from AsyncLazy
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Threading\AsyncLazy`1.cs (1)
43private sealed class AsyncLazyImpl<TData> : AsyncLazy<T>
18 references to AsyncLazy
Microsoft.AspNetCore.Razor.Utilities.Shared (10)
Threading\AsyncLazy.cs (5)
12public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 13=> AsyncLazy<T>.Create(asynchronousComputeFunction, arg); 15public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 20public static AsyncLazy<T> Create<T>(T value) 21=> AsyncLazy<T>.Create<T>(value);
Threading\AsyncLazy`1.cs (5)
24public static AsyncLazy<T> Create<TArg>( 29public static AsyncLazy<T> Create<TArg>(T value) 39/// Creators of an <see cref="AsyncLazy{T}" /> can specify whether the result of the computation is 110public static AsyncLazy<T> CreateImpl(T value) 113public static AsyncLazy<T> CreateImpl(
Microsoft.AspNetCore.Razor.Utilities.Shared.UnitTests (6)
Threading\AsyncLazyTests.cs (6)
25var lazy = AsyncLazy.Create(static c => Task.FromResult(5)); 42var lazy = AsyncLazy.Create<object, ManualResetEvent>( 65Assert.Fail($"{nameof(AsyncLazy<>.GetValueAsync)} did not throw an exception."); 78var lazy = AsyncLazy.Create(static (cancellationTokenSource, c) => Task.Run((Func<object>)(() => 93Assert.Fail($"{nameof(AsyncLazy<>.GetValueAsync)} did not throw an exception."); 107var lazy = AsyncLazy.Create<object>(async c =>
Microsoft.VisualStudio.LanguageServices.Razor (2)
Remote\RemoteServiceInvoker.cs (2)
48private readonly AsyncLazy<RazorRemoteHostClient> _lazyMessagePackClient = AsyncLazy.Create(GetMessagePackClientAsync, workspaceProvider); 49private readonly AsyncLazy<RazorRemoteHostClient> _lazyJsonClient = AsyncLazy.Create(GetJsonClientAsync, workspaceProvider);