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)
35var 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)
388(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)
35var providers = new AsyncLazy<IEnumerable<ICredentialProvider>>(async () => await GetCredentialProvidersAsync(DelegatingLogger));
NuGet.Protocol (16)
Model\PackageSearchMetadataBuilder.cs (8)
22private AsyncLazy<IEnumerable<VersionInfo>> _lazyVersionsFactory; 23private AsyncLazy<PackageDeprecationMetadata> _lazyDeprecationFactory; 27private static readonly AsyncLazy<IEnumerable<VersionInfo>> LazyEmptyVersionInfo = 30private static readonly AsyncLazy<PackageDeprecationMetadata> LazyNullDeprecationMetadata = 55internal AsyncLazy<IEnumerable<VersionInfo>> LazyVersionsFactory { get; set; } 58internal AsyncLazy<PackageDeprecationMetadata> LazyDeprecationFactory { get; set; } 88public PackageSearchMetadataBuilder WithVersions(AsyncLazy<IEnumerable<VersionInfo>> lazyVersionsFactory) 94public 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)
30private readonly ConcurrentDictionary<string, AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>> _packageInfoCache = 31new ConcurrentDictionary<string, AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>>(StringComparer.OrdinalIgnoreCase); 385AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>> result = null; 387Func<string, AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>> findPackages =