7 instantiations of AsyncLazy
NuGet.Common (4)
AsyncLazy.cs (4)
40public static AsyncLazy<T> New<T>(Func<Task<T>> asyncValueFactory) => new AsyncLazy<T>(asyncValueFactory); 42public static AsyncLazy<T> New<T>(Func<T> valueFactory) => new AsyncLazy<T>(() => Task.Run(valueFactory)); 44public static AsyncLazy<T> New<T>(Lazy<Task<T>> inner) => new AsyncLazy<T>(inner); 46public static AsyncLazy<T> New<T>(T innerData) => new AsyncLazy<T>(() => Task.FromResult(innerData));
NuGet.Credentials (1)
DefaultCredentialServiceUtility.cs (1)
51var providers = new AsyncLazy<IEnumerable<ICredentialProvider>>(async () => await GetCredentialProvidersAsync(DelegatingLogger));
NuGet.Protocol (2)
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (1)
465(keyId) => new AsyncLazy<HashSet<NuGetVersion>?>(
RemoteRepositories\PluginFindPackageByIdResource.cs (1)
386(keyId) => new AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>(
24 references to AsyncLazy
NuGet.Common (5)
AsyncLazy.cs (5)
32public static implicit operator Lazy<Task<T>>(AsyncLazy<T> outer) => outer._inner; // implicit conversion 40public static AsyncLazy<T> New<T>(Func<Task<T>> asyncValueFactory) => new AsyncLazy<T>(asyncValueFactory); 42public static AsyncLazy<T> New<T>(Func<T> valueFactory) => new AsyncLazy<T>(() => Task.Run(valueFactory)); 44public static AsyncLazy<T> New<T>(Lazy<Task<T>> inner) => new AsyncLazy<T>(inner); 46public static AsyncLazy<T> New<T>(T innerData) => new AsyncLazy<T>(() => Task.FromResult(innerData));
NuGet.Credentials (3)
CredentialService.cs (2)
48public CredentialService(AsyncLazy<IEnumerable<ICredentialProvider>> providers, bool nonInteractive, bool handlesDefaultCredentials) 192private AsyncLazy<IEnumerable<ICredentialProvider>> _providers { get; }
DefaultCredentialServiceUtility.cs (1)
51var providers = new AsyncLazy<IEnumerable<ICredentialProvider>>(async () => await GetCredentialProvidersAsync(DelegatingLogger));
NuGet.Protocol (16)
Model\PackageSearchMetadataBuilder.cs (8)
20private AsyncLazy<IEnumerable<VersionInfo>>? _lazyVersionsFactory; 21private AsyncLazy<PackageDeprecationMetadata?>? _lazyDeprecationFactory; 25private static readonly AsyncLazy<IEnumerable<VersionInfo>> LazyEmptyVersionInfo = 28private static readonly AsyncLazy<PackageDeprecationMetadata?> LazyNullDeprecationMetadata = 53internal AsyncLazy<IEnumerable<VersionInfo>>? LazyVersionsFactory { get; set; } 56internal AsyncLazy<PackageDeprecationMetadata?>? LazyDeprecationFactory { get; set; } 86public PackageSearchMetadataBuilder WithVersions(AsyncLazy<IEnumerable<VersionInfo>> lazyVersionsFactory) 92public PackageSearchMetadataBuilder WithDeprecation(AsyncLazy<PackageDeprecationMetadata?> lazyDeprecationFactory)
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (4)
41private readonly ConcurrentDictionary<string, AsyncLazy<HashSet<NuGetVersion>?>> _packageVersionsCache = 42new ConcurrentDictionary<string, AsyncLazy<HashSet<NuGetVersion>?>>(StringComparer.OrdinalIgnoreCase); 462AsyncLazy<HashSet<NuGetVersion>?> result; 464Func<string, AsyncLazy<HashSet<NuGetVersion>?>> findPackages =
RemoteRepositories\PluginFindPackageByIdResource.cs (4)
28private readonly ConcurrentDictionary<string, AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>> _packageInfoCache = 29new ConcurrentDictionary<string, AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>>(StringComparer.OrdinalIgnoreCase); 383AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>> result; 385Func<string, AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>> findPackages =