49 references to Lazy
ILLink.RoslynAnalyzer (1)
TrimAnalysis\FlowAnnotations.cs (1)
18private static readonly Lazy<FlowAnnotations> _instance = new(() => new FlowAnnotations(), isThreadSafe: true);
Microsoft.Build (4)
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
31private static readonly Lazy<SdkResolverService> InstanceLazy = new Lazy<SdkResolverService>(() => new SdkResolverService(), isThreadSafe: true);
Globbing\MSBuildGlob.cs (1)
183var lazyState = new Lazy<GlobState>(() =>
Resources\MSBuildAssemblyFileVersion.cs (1)
17private static readonly Lazy<MSBuildAssemblyFileVersion> MSBuildAssemblyFileVersionLazy = new Lazy<MSBuildAssemblyFileVersion>(GetMSBuildAssemblyFileVersion, isThreadSafe: true);
Utilities\EngineFileUtilities.cs (1)
599private readonly Lazy<ConcurrentDictionary<string, bool>> existenceCache = new Lazy<ConcurrentDictionary<string, bool>>(() => new ConcurrentDictionary<string, bool>(), true);
Microsoft.Build.Framework (1)
AssemblyUtilities.cs (1)
30private static Lazy<CultureInfo[]> s_validCultures = new Lazy<CultureInfo[]>(() => GetValidCultures(), true);
Microsoft.Build.Tasks.Core (1)
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
29_executablePath = new Lazy<string>(() =>
Microsoft.CodeAnalysis.Features (3)
CodeFixes\Service\CodeFixService.cs (2)
910var lazyMap = new Lazy<ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>>(() => 971var lazyMap = new Lazy<ImmutableDictionary<CodeFixProvider, int>>(() =>
Completion\SharedSyntaxContextsWithSpeculativeModel.cs (1)
28_lazyRelatedDocumentIds = new(_document.GetLinkedDocumentIds, isThreadSafe: true);
Microsoft.CodeAnalysis.SemanticSearch.Extensions (2)
ProjectModel.cs (2)
30_lazyResxFiles = new(LoadResxFiles, isThreadSafe: true); 36_lazyResxFiles = new(() => resxFiles, isThreadSafe: true);
Microsoft.CodeAnalysis.Workspaces (1)
Diagnostics\HostDiagnosticAnalyzers.cs (1)
62_lazyHostDiagnosticAnalyzersPerReferenceMap = new Lazy<ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>>(() => CreateDiagnosticAnalyzersPerReferenceMap(_hostAnalyzerReferencesMap), isThreadSafe: true);
Microsoft.Interop.LibraryImportGenerator (4)
Analyzers\CustomMarshallerAttributeFixer.cs (4)
214Lazy<SyntaxNode> unmanagedTypeSyntax = new(CreateUnmanagedTypeSyntax, isThreadSafe: false); 215Lazy<ITypeSymbol> managedElementTypeSymbol = new(CreateManagedElementTypeSymbol, isThreadSafe: false); 410Lazy<SyntaxNode> unmanagedTypeSyntax = new(CreateUnmanagedTypeSyntax, isThreadSafe: false); 411Lazy<ITypeSymbol> managedElementTypeSymbol = new(CreateManagedElementTypeSymbol, isThreadSafe: false);
Microsoft.ML.CodeAnalyzer.Tests (1)
Helpers\TestUtils.cs (1)
36return new Lazy<string>(() => LoadSource(resourceName), true);
Microsoft.VisualStudio.LanguageServices (1)
DocumentationComments\VisualStudioDocumentationProvider.cs (1)
29_lazyMemberIndex = new Lazy<IVsXMLMemberIndex>(CreateXmlMemberIndex, isThreadSafe: true);
System.ComponentModel.Composition (4)
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (4)
81_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 109_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 138_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 171_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true);
System.Composition.Hosting (2)
System\Composition\Hosting\Core\ExportDescriptorPromise.cs (2)
46_dependencies = new Lazy<ReadOnlyCollection<CompositionDependency>>(() => new ReadOnlyCollection<CompositionDependency>(dependencies().ToList()), false); 47_descriptor = new Lazy<ExportDescriptor>(() => getDescriptor(_dependencies.Value), false);
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\LazyOfTTMetadata.cs (1)
33base(valueFactory, isThreadSafe)
System.Xaml (23)
System\Xaml\XamlLanguage.cs (23)
97new Lazy<XamlType>(() => GetXamlType(typeof(IXmlSerializable)), true); 100new Lazy<XamlType>(() => GetXamlType(typeof(PositionalParameterDescriptor)), true); 103new Lazy<XamlType>(() => GetXamlType(typeof(char)), true); 105new Lazy<XamlType>(() => GetXamlType(typeof(float)), true); 107new Lazy<XamlType>(() => GetXamlType(typeof(byte)), true); 109new Lazy<XamlType>(() => GetXamlType(typeof(short)), true); 111new Lazy<XamlType>(() => GetXamlType(typeof(long)), true); 113new Lazy<XamlType>(() => GetXamlType(typeof(decimal)), true); 115new Lazy<XamlType>(() => GetXamlType(typeof(Uri)), true); 117new Lazy<XamlType>(() => GetXamlType(typeof(TimeSpan)), true); 123new Lazy<XamlDirective>(() => GetXamlDirective(x_AsyncRecords, 126new Lazy<XamlDirective>(() => GetXamlDirective(x_Arguments, 135new Lazy<XamlDirective>(() => GetXamlDirective(x_ConnectionId, 138new Lazy<XamlDirective>(() => GetXamlDirective(x_FactoryMethod, 143new Lazy<XamlDirective>(() => GetXamlDirective(x_Items, 146new Lazy<XamlDirective>(() => GetXamlDirective(x_Initialization, 149new Lazy<XamlDirective>(() => GetXamlDirective(x_Key, 152new Lazy<XamlDirective>(() => GetXamlDirective(x_Members, 155new Lazy<XamlDirective>(() => GetXamlDirective(x_ClassAttributes, 160new Lazy<XamlDirective>(() => GetXamlDirective(x_PositionalParameters, 163new Lazy<XamlDirective>(() => GetXamlDirective(x_Shared), true); 165new Lazy<XamlDirective>(() => GetXamlDirective(x_Subclass), true); 173new Lazy<XamlDirective>(() => GetXamlDirective(x_UnknownContent, AllowedMemberLocations.MemberElement, MemberReflector.UnknownReflector), true);