258 instantiations of ConditionalWeakTable
GenerateDocumentationAndConfigFiles (13)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
22private readonly ConditionalWeakTable<TKey, TValue> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Metrics (5)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Metrics.Legacy (5)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionListener.cs (1)
53_pendingConnections = new ConditionalWeakTable<QuicConnection, QuicConnectionContext>();
Microsoft.CodeAnalysis (6)
DiagnosticAnalyzer\AnalysisValueProvider.cs (1)
29_valueCache = new ConditionalWeakTable<TKey, WrappedValue>();
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (1)
34private static readonly ConditionalWeakTable<Compilation, PerCompilationProvider> s_providerCache = new ConditionalWeakTable<Compilation, PerCompilationProvider>();
Syntax\GreenNode.cs (2)
44new ConditionalWeakTable<GreenNode, DiagnosticInfo[]>(); 47new ConditionalWeakTable<GreenNode, SyntaxAnnotation[]>();
Syntax\SyntaxNodeExtensions_Tracking.cs (2)
19= new ConditionalWeakTable<SyntaxNode, SyntaxAnnotation>(); 22= new ConditionalWeakTable<SyntaxNode, CurrentNodes>();
Microsoft.CodeAnalysis.Analyzers (13)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\LValueFlowCapturesProvider.cs (1)
24new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.BannedApiAnalyzers (13)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Microsoft.CodeAnalysis.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
87private static readonly ConditionalWeakTable<AnalyzerConfigOptions, StructuredAnalyzerConfigOptions> s_codeStyleStructuredOptions = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
Host\Mef\CodeStyleHostLanguageServices.MefHostExportProvider.cs (2)
14new ConditionalWeakTable<HostLanguageServices, CodeStyleHostLanguageServices>(); 16new ConditionalWeakTable<string, MefHostExportProvider>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Microsoft.CodeAnalysis.CSharp (2)
Declarations\DeclarationTreeBuilder.cs (1)
37= new ConditionalWeakTable<GreenNode, BoxedMemberNames>();
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
254= new ConditionalWeakTable<SyntaxNode, Dictionary<CodeAnalysis.SyntaxTrivia, WeakReference<SyntaxNode>>>();
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
16private static readonly ConditionalWeakTable<SyntaxNode, DirectiveInfo<DirectiveTriviaSyntax>> s_rootToDirectiveInfo = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
17private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new();
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
1011private static readonly ConditionalWeakTable<SyntaxNode, IReadOnlyList<SyntaxNode>> s_declAttributes = new(); 1024private static readonly ConditionalWeakTable<SyntaxNode, IReadOnlyList<SyntaxNode>> s_declReturnAttributes = new();
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
30private static readonly ConditionalWeakTable<SemanticModel, StrongBox<bool>> s_modelToHasUsingAliasesMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
16private static readonly ConditionalWeakTable<SyntaxNode, DirectiveInfo<DirectiveTriviaSyntax>> s_rootToDirectiveInfo = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
17private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new();
Microsoft.CodeAnalysis.EditorFeatures (5)
Editor\TextBufferAssociatedViewService.cs (1)
33private static readonly ConditionalWeakTable<ITextBuffer, HashSet<ITextView>> s_map = new();
InlineRename\UI\InlineRenameAdornmentManager.cs (1)
36new ConditionalWeakTable<InlineRenameSession, object>();
IntelliSense\AsyncCompletion\CompletionSource.cs (1)
54private static readonly ConditionalWeakTable<RoslynCompletionItem, StrongBox<VSCompletionItemData>> s_roslynItemToVsItemData = new();
Shared\Extensions\HostWorkspaceServicesExtensions.cs (1)
47private static readonly ConditionalWeakTable<SolutionServices, Dictionary<string, string>> s_hostServicesToContentTypeMap = new();
Shared\Extensions\ITextViewExtensions.PerSubjectBufferProperty.cs (1)
26private readonly ConditionalWeakTable<ITextBuffer, Dictionary<object, TProperty>> _buffersRemovedFromTextViewBufferGraph = new();
Microsoft.CodeAnalysis.EditorFeatures.Text (3)
Extensions.SnapshotSourceText.cs (2)
62private static readonly ConditionalWeakTable<ITextSnapshot, SnapshotSourceText> s_textSnapshotMap = new(); 68private static readonly ConditionalWeakTable<ITextImage, WeakReference<ITextSnapshot>> s_textImageToEditorSnapshotMap = new();
Extensions.TextBufferContainer.cs (1)
40private static readonly ConditionalWeakTable<ITextBuffer, TextBufferContainer> s_textContainerMap = new();
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
IntelliSense\SignatureHelpControllerTests.vb (1)
115Private Shared ReadOnly s_controllerMocksMap As New ConditionalWeakTable(Of Controller, ControllerMocks)
Microsoft.CodeAnalysis.Extensions.Package (1)
Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.ExternalAccess.Copilot (1)
Internal\Analyzer\AbstractCopilotCodeAnalysisService.cs (1)
38private readonly ConditionalWeakTable<Document, ConcurrentDictionary<string, (ImmutableArray<Diagnostic> Diagnostics, bool IsCompleteResult)>> _diagnosticsCache = new();
Microsoft.CodeAnalysis.Features (13)
AddImport\AbstractAddImportFeatureService.cs (1)
38private static readonly ConditionalWeakTable<PortableExecutableReference, StrongBox<bool>> s_isInPackagesDirectory = new();
CodeFixes\Service\CodeFixService.cs (1)
45private readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>> _projectFixersMap = new();
Common\AbstractProjectExtensionProvider.cs (3)
25private static readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, StrongBox<ImmutableArray<TExtension>>> s_referencesToExtensionsMap = new(); 26private static readonly ConditionalWeakTable<AnalyzerReference, TProvider> s_referenceToProviderMap = new(); 27private static readonly ConditionalWeakTable<TExtension, ExtensionInfo?> s_extensionInfoMap = new();
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (2)
27private static readonly ConditionalWeakTable<ProjectId, TypeImportCompletionCacheEntry> s_projectItemsCache = new(); 28private static readonly ConditionalWeakTable<MetadataId, TypeImportCompletionCacheEntry> s_metadataItemsCache = new();
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
49private static readonly ConditionalWeakTable<MetadataId, AsyncLazy<bool>> s_metadataIdToDesignerAttributeInfo = new();
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.CompilationManager.cs (1)
26private static readonly ConditionalWeakTable<ProjectState, StrongBox<(Checksum checksum, ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzersPair? compilationWithAnalyzersPair)>> s_projectToCompilationWithAnalyzers = new();
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (1)
36private static readonly ConditionalWeakTable<ProjectState, StrongBox<(Checksum checksum, ImmutableArray<DiagnosticAnalyzer> analyzers, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> diagnosticAnalysisResults)>> s_projectToForceAnalysisData = new();
EmbeddedLanguages\AbstractLanguageDetector.cs (1)
190private static readonly ConditionalWeakTable<Compilation, TDetector> s_compilationToDetector = new();
Workspace\CompileTimeSolutionProvider.cs (2)
63private ConditionalWeakTable<Solution, Solution> _designTimeToCompileTimeSolution = new(); 79_designTimeToCompileTimeSolution = new();
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (1)
33private static readonly ConditionalWeakTable<Project, AsyncLazy<ILookup<DocumentId, DiagnosticData>>> s_projectToDiagnostics = new();
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (13)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Microsoft.CodeAnalysis.PublicApiAnalyzers (5)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Services\SourceGeneration\RemoteSourceGenerationService.cs (2)
76{ LanguageNames.CSharp, (new(), static analyzerReference => HasSourceGenerators(analyzerReference, LanguageNames.CSharp)) }, 77{ LanguageNames.VisualBasic, (new(), static analyzerReference => HasSourceGenerators(analyzerReference, LanguageNames.VisualBasic)) },
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\InternalSyntax\SyntaxNode.vb (1)
206Private Shared ReadOnly s_structuresTable As New ConditionalWeakTable(Of SyntaxNode, Dictionary(Of Microsoft.CodeAnalysis.SyntaxTrivia, WeakReference(Of SyntaxNode)))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\DirectiveSyntaxExtensions.vb (1)
13Private ReadOnly s_rootToDirectiveInfo As New ConditionalWeakTable(Of SyntaxNode, DirectiveInfo(Of DirectiveTriviaSyntax))()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\DirectiveSyntaxExtensions.vb (1)
13Private ReadOnly s_rootToDirectiveInfo As New ConditionalWeakTable(Of SyntaxNode, DirectiveInfo(Of DirectiveTriviaSyntax))()
Microsoft.CodeAnalysis.Workspaces (39)
Diagnostics\DiagnosticAnalyzerInfoCache.cs (2)
81_descriptorsInfo = new(); 82_suppressionsInfo = new();
Diagnostics\Extensions.cs (1)
27private static readonly ConditionalWeakTable<Project, AsyncLazy<Checksum>> s_projectToDiagnosticChecksum = new();
Diagnostics\HostDiagnosticAnalyzers.cs (1)
55private readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, StrongBox<ImmutableDictionary<string, SkippedHostAnalyzersInfo>>> _skippedHostAnalyzers = new();
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
37ImmutableArray<(Project project, bool hasInternalsAccess)>>> s_solutionToDependentProjectMap = new();
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
34private static readonly ConditionalWeakTable<ProjectState, StrongBox<(Checksum checksum, AsyncLazy<ProjectIndex> lazyProjectIndex)>> s_projectToIndex = new();
FindSymbols\FindReferences\FindReferenceCache.cs (1)
26private static readonly ConditionalWeakTable<Document, AsyncLazy<FindReferenceCache>> s_cache = new();
FindSymbols\Shared\AbstractSyntaxIndex.cs (2)
21private static readonly ConditionalWeakTable<DocumentState, TIndex?> s_documentToIndex = new(); 22private static readonly ConditionalWeakTable<DocumentId, TIndex?> s_documentIdToIndex = new();
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (1)
33private static readonly ConditionalWeakTable<ParseOptions, StrongBox<Checksum>> s_ppDirectivesToChecksum = new();
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (2)
40private static readonly ConditionalWeakTable<PortableExecutableReference, AsyncLazy<SymbolTreeInfo>> s_peReferenceToInfo = new(); 52private static readonly ConditionalWeakTable<MetadataId, AsyncLazy<SymbolTreeInfo>> s_metadataIdToSymbolTreeInfo = new();
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
69private static readonly ConditionalWeakTable<ProjectState, AsyncLazy<Checksum>> s_projectToSourceChecksum = new();
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (1)
37private static readonly ConditionalWeakTable<ProjectState, StringTable> s_projectStringTable = new();
Shared\Extensions\INamespaceSymbolExtensions.cs (1)
17private static readonly ConditionalWeakTable<INamespaceSymbol, List<string>> s_namespaceToNameMap = new();
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
40private readonly ConditionalWeakTable<ISourceGenerator, GeneratorTelemetryKey> _generatorTelemetryKeys = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (1)
46private readonly ConditionalWeakTable<TReference, string> _previousDisposalLocations = new();
Workspace\Solution\DocumentState.cs (1)
26private static readonly ConditionalWeakTable<SyntaxTree, DocumentId> s_syntaxTreeToIdMap = new();
Workspace\Solution\FileTextLoader.cs (1)
21private static readonly ConditionalWeakTable<Type, StrongBox<bool>> s_isObsoleteCreateTextOverriden = new();
Workspace\Solution\SolutionCompilationState.cs (2)
32private static readonly ConditionalWeakTable<ISymbol, ProjectId> s_assemblyOrModuleSymbolToProjectMap = new(); 55private static readonly Func<ConditionalWeakTable<ISymbol, OriginatingProjectInfo?>> s_createTable = () => new();
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
101private static readonly ConditionalWeakTable<Compilation, AsyncLazy<SkeletonReferenceSet?>> s_compilationToSkeletonSet = new();
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (3)
40private static readonly ConditionalWeakTable<ProjectState, SourceGeneratorMap> s_projectStateToSourceGeneratorsMap = new(); 50{ LanguageNames.CSharp, new() }, 51{ LanguageNames.VisualBasic, new() },
Workspace\Solution\StateChecksums.cs (1)
592private static readonly ConditionalWeakTable<TValue, StrongBox<TResult>> s_objectToChecksumCollectionCache = new();
Workspace\Solution\TextLoader.cs (1)
21private static readonly ConditionalWeakTable<Type, StrongBox<bool>> s_isObsoleteLoadTextAndVersionAsyncOverriden = new();
Workspace\Workspace_Registration.cs (1)
16private static readonly ConditionalWeakTable<SourceTextContainer, WorkspaceRegistration> s_bufferToWorkspaceRegistrationMap = new();
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Modeler\TypeReference.cs (2)
11new ConditionalWeakTable<TypeReference, TypeReference>(); 14new ConditionalWeakTable<TypeModel, TypeReference>();
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (1)
603private static readonly ConditionalWeakTable<JsonSerializerOptions, ConcurrentDictionary<DescriptorKey, ReflectionAIFunctionDescriptor>> _descriptorCache = new();
Utilities\AIJsonSchemaTransformCache.cs (2)
26private readonly ConditionalWeakTable<AIFunction, object> _functionSchemaCache = new(); 27private readonly ConditionalWeakTable<ChatResponseFormatJson, object> _responseFormatCache = new();
Microsoft.Extensions.ObjectPool (1)
LeakTrackingObjectPool.cs (1)
24private readonly ConditionalWeakTable<T, Tracker> _trackers = new ConditionalWeakTable<T, Tracker>();
Microsoft.Maui (1)
VisualDiagnostics\VisualDiagnostics.cs (1)
15 static ConditionalWeakTable<object, SourceInfo> sourceInfos = new ConditionalWeakTable<object, SourceInfo>();
Microsoft.Maui.Controls (6)
BindingBase.cs (1)
12 static readonly ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext> SynchronizedCollections = new ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext>();
PlatformBindingHelpers.cs (1)
189 public static ConditionalWeakTable<TPlatformView, BindableObjectProxy<TPlatformView>> BindableObjectProxies { get; } = new ConditionalWeakTable<TPlatformView, BindableObjectProxy<TPlatformView>>();
ResourceDictionary.cs (2)
22 static ConditionalWeakTable<Type, ResourceDictionary> s_instances = new ConditionalWeakTable<Type, ResourceDictionary>(); 393 internal static void ClearCache() => s_instances = new ConditionalWeakTable<Type, ResourceDictionary>();
Style.cs (2)
19 readonly ConditionalWeakTable<BindableObject, object> _targets = new(); 161 ConditionalWeakTable<BindableObject, object> specificities = new();
Microsoft.VisualStudio.LanguageServices (3)
Extensions\VisualStudioWorkspaceImplExtensions.cs (1)
22private static readonly ConditionalWeakTable<IVsHierarchy, Dictionary<uint, IImageHandle>> s_hierarchyToItemIdToImageHandle = new();
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (2)
40private static readonly ConditionalWeakTable<Metadata, object> s_lifetimeMap = new(); 49private static readonly ConditionalWeakTable<AssemblyMetadata, IReadOnlyList<TemporaryStorageStreamHandle>> s_metadataToStorageHandles = new();
PresentationCore (3)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\PerfService.cs (1)
20private static SRCS.ConditionalWeakTable<object, object> perfElementIds = new SRCS.ConditionalWeakTable<object, object>();
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (1)
62s_sourceInfoTable = new ConditionalWeakTable<object, XamlSourceInfo>();
System\Windows\Input\Command\CanExecuteChangedEventManager.cs (1)
310private ConditionalWeakTable<object, object> _cwt = new ConditionalWeakTable<object, object>();
PresentationFramework (8)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (2)
14public static readonly ConditionalWeakTable<object, InspectableInfo> InspectableInfoTable = new ConditionalWeakTable<object, InspectableInfo>(); 57private static ConditionalWeakTable<object, VtableEntriesCleanupScout> ComInterfaceEntryCleanupTable = new ConditionalWeakTable<object, VtableEntriesCleanupScout>();
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (1)
460new ConditionalWeakTable<global::System.Collections.Generic.IEnumerator<T>, ToAbiHelper>();
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (1)
250new ConditionalWeakTable<global::System.Collections.Generic.IReadOnlyList<T>, ToAbiHelper>();
System\Windows\Controls\DataGridHelper.cs (1)
463private static ConditionalWeakTable<DependencyObject, Dictionary<DependencyProperty, bool>> _propertyTransferEnabledMap = new ConditionalWeakTable<DependencyObject, Dictionary<DependencyProperty, bool>>();
System\Windows\Localization.cs (2)
149private static ConditionalWeakTable<object, string> _commentsOnObjects = new ConditionalWeakTable<object, string>(); 150private static ConditionalWeakTable<object, string> _attributesOnObjects = new ConditionalWeakTable<object, string>();
System\Windows\StyleHelper.cs (1)
4759deferredActions = new ConditionalWeakTable<DependencyObject, List<DeferredAction>>();
Roslyn.Diagnostics.Analyzers (13)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
16private static readonly ConditionalWeakTable<SyntaxNode, DirectiveInfo<DirectiveTriviaSyntax>> s_rootToDirectiveInfo = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
17private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new();
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\DirectiveSyntaxExtensions.vb (1)
13Private ReadOnly s_rootToDirectiveInfo As New ConditionalWeakTable(Of SyntaxNode, DirectiveInfo(Of DirectiveTriviaSyntax))()
System.ComponentModel.Composition (2)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (1)
606gcRoots ??= new ConditionalWeakTable<object, List<ComposablePart>>();
System\ComponentModel\Composition\Hosting\ImportEngine.cs (1)
25private ConditionalWeakTable<ComposablePart, PartManager> _partManagers = new ConditionalWeakTable<ComposablePart, PartManager>();
System.Configuration.ConfigurationManager (2)
System\Diagnostics\FilterElement.cs (1)
10private static readonly ConditionalWeakTable<TraceFilter, string> s_initData = new();
System\Diagnostics\ListenerElementsCollection.cs (1)
90private static readonly ConditionalWeakTable<TraceListener, string> s_initData = new();
System.Diagnostics.StackTrace (1)
System\Diagnostics\StackTraceSymbols.cs (1)
22_metadataCache = new ConditionalWeakTable<Assembly, MetadataReaderProvider?>();
System.Linq.Expressions (1)
System\Linq\Expressions\Expression.cs (1)
68new ConditionalWeakTable<Expression, ExtensionInfo>(),
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
320LazyInitializer.EnsureInitialized(ref s_connectActivityTable, () => new ConditionalWeakTable<SocketAsyncEventArgs, Activity>());
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
31private readonly ConditionalWeakTable<SharedArrayPoolThreadLocalArray[], object?> _allTlsBuckets = new ConditionalWeakTable<SharedArrayPoolThreadLocalArray[], object?>();
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.SerializationInfoTable.cs (1)
22Interlocked.CompareExchange(ref s_serializationInfoTable, new ConditionalWeakTable<object, SerializationInfo>(), null);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (1)
212new ConditionalWeakTable<Assembly, DllImportResolver>(), null);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (1)
282Interlocked.CompareExchange(ref s_activeTaskSchedulers, new ConditionalWeakTable<TaskScheduler, object?>(), null);
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\ContextAware.cs (2)
24_keepAlive = new ConditionalWeakTable<Type, DataContract>(); 55private readonly ConditionalWeakTable<TKey, TValue> _collectibleTable = new();
System.Private.Xml (2)
System\Xml\Serialization\Compilation.cs (1)
692private readonly ConditionalWeakTable<Assembly, Dictionary<TempAssemblyCacheKey, TempAssembly>> _collectibleCaches = new ConditionalWeakTable<Assembly, Dictionary<TempAssemblyCacheKey, TempAssembly>>();
System\Xml\Serialization\ContextAwareTables.cs (1)
20_collectibleTable = new ConditionalWeakTable<Type, T>();
System.Reflection.DispatchProxy (1)
System\Reflection\DispatchProxyGenerator.cs (1)
50private static readonly ConditionalWeakTable<AssemblyLoadContext, ProxyAssembly> s_alcProxyAssemblyMap = new();
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\ComImportInteropInterfaceDetailsStrategy.cs (1)
55private readonly ConditionalWeakTable<Type, Type> _forwarderInterfaceCache = new();
System.Text.Json (1)
System\Text\Json\Serialization\JsonSerializerOptions.cs (1)
203new ConditionalWeakTable<JsonSerializerOptions, object?>();
System.Threading.Tasks.Dataflow (1)
Base\DataflowBlock.cs (1)
2177new ConditionalWeakTable<ISourceBlock<TOutput>, SourceObservable<TOutput>>();
System.Transactions.Local (1)
System\Transactions\Transaction.cs (1)
1065private static readonly ConditionalWeakTable<ContextKey, ContextData> s_contextDataTable = new ConditionalWeakTable<ContextKey, ContextData>();
Test.Utilities (5)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
22private readonly ConditionalWeakTable<TKey, TValue> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Text.Analyzers (13)
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
434 references to ConditionalWeakTable
Aspire.Hosting.Analyzers (1)
Infrastructure\BoundedCacheWithFactory.cs (1)
10/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
GenerateDocumentationAndConfigFiles (20)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
22private readonly ConditionalWeakTable<TKey, TValue> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Metrics (12)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Metrics.Legacy (12)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.AspNetCore.App.Analyzers (1)
src\Shared\RoslynUtils\BoundedCacheWithFactory.cs (1)
13/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
src\Shared\RoslynUtils\BoundedCacheWithFactory.cs (1)
13/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionListener.cs (1)
28internal readonly ConditionalWeakTable<QuicConnection, QuicConnectionContext> _pendingConnections;
Microsoft.CodeAnalysis (15)
DiagnosticAnalyzer\AnalysisValueProvider.cs (3)
20private readonly ConditionalWeakTable<TKey, WrappedValue> _valueCache; 21private readonly ConditionalWeakTable<TKey, WrappedValue>.CreateValueCallback _valueCacheCallback; 30_valueCacheCallback = new ConditionalWeakTable<TKey, WrappedValue>.CreateValueCallback(ComputeValue);
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (3)
31private static readonly ConditionalWeakTable<Compilation, PerCompilationProvider>.CreateValueCallback s_createProviderCallback 32= new ConditionalWeakTable<Compilation, PerCompilationProvider>.CreateValueCallback(compilation => new PerCompilationProvider(compilation)); 34private static readonly ConditionalWeakTable<Compilation, PerCompilationProvider> s_providerCache = new ConditionalWeakTable<Compilation, PerCompilationProvider>();
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
Syntax\GreenNode.cs (2)
43private static readonly ConditionalWeakTable<GreenNode, DiagnosticInfo[]> s_diagnosticsTable = 46private static readonly ConditionalWeakTable<GreenNode, SyntaxAnnotation[]> s_annotationsTable =
Syntax\SyntaxNodeExtensions_Tracking.cs (2)
18private static readonly ConditionalWeakTable<SyntaxNode, SyntaxAnnotation> s_nodeToIdMap 21private static readonly ConditionalWeakTable<SyntaxNode, CurrentNodes> s_rootToCurrentNodesMap
Microsoft.CodeAnalysis.Analyzers (20)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Microsoft.CodeAnalysis.AnalyzerUtilities (13)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\LValueFlowCapturesProvider.cs (1)
23private static readonly ConditionalWeakTable<ControlFlowGraph, ImmutableHashSet<CaptureId>> s_lValueFlowCapturesCache =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.BannedApiAnalyzers (20)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Microsoft.CodeAnalysis.CodeStyle (9)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\StructuredAnalyzerConfigOptions.cs (1)
87private static readonly ConditionalWeakTable<AnalyzerConfigOptions, StructuredAnalyzerConfigOptions> s_codeStyleStructuredOptions = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
Host\Mef\CodeStyleHostLanguageServices.MefHostExportProvider.cs (2)
13private static readonly ConditionalWeakTable<HostLanguageServices, CodeStyleHostLanguageServices> s_mappedLanguageServices = 15private static readonly ConditionalWeakTable<string, MefHostExportProvider> s_exportProvidersByLanguageCache =
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Microsoft.CodeAnalysis.Collections.Package (5)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
Microsoft.CodeAnalysis.CSharp (2)
Declarations\DeclarationTreeBuilder.cs (1)
36private static readonly ConditionalWeakTable<GreenNode, BoxedMemberNames> s_nodeToMemberNames
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
253private static readonly ConditionalWeakTable<SyntaxNode, Dictionary<CodeAnalysis.SyntaxTrivia, WeakReference<SyntaxNode>>> s_structuresTable
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
16private static readonly ConditionalWeakTable<SyntaxNode, DirectiveInfo<DirectiveTriviaSyntax>> s_rootToDirectiveInfo = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
17private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new();
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
1011private static readonly ConditionalWeakTable<SyntaxNode, IReadOnlyList<SyntaxNode>> s_declAttributes = new(); 1024private static readonly ConditionalWeakTable<SyntaxNode, IReadOnlyList<SyntaxNode>> s_declReturnAttributes = new();
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
30private static readonly ConditionalWeakTable<SemanticModel, StrongBox<bool>> s_modelToHasUsingAliasesMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
16private static readonly ConditionalWeakTable<SyntaxNode, DirectiveInfo<DirectiveTriviaSyntax>> s_rootToDirectiveInfo = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
17private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new();
Microsoft.CodeAnalysis.Debugging.Package (5)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
Microsoft.CodeAnalysis.EditorFeatures (5)
Editor\TextBufferAssociatedViewService.cs (1)
33private static readonly ConditionalWeakTable<ITextBuffer, HashSet<ITextView>> s_map = new();
InlineRename\UI\InlineRenameAdornmentManager.cs (1)
35private static readonly ConditionalWeakTable<InlineRenameSession, object> s_createdViewModels =
IntelliSense\AsyncCompletion\CompletionSource.cs (1)
54private static readonly ConditionalWeakTable<RoslynCompletionItem, StrongBox<VSCompletionItemData>> s_roslynItemToVsItemData = new();
Shared\Extensions\HostWorkspaceServicesExtensions.cs (1)
47private static readonly ConditionalWeakTable<SolutionServices, Dictionary<string, string>> s_hostServicesToContentTypeMap = new();
Shared\Extensions\ITextViewExtensions.PerSubjectBufferProperty.cs (1)
26private readonly ConditionalWeakTable<ITextBuffer, Dictionary<object, TProperty>> _buffersRemovedFromTextViewBufferGraph = new();
Microsoft.CodeAnalysis.EditorFeatures.Text (3)
Extensions.SnapshotSourceText.cs (2)
62private static readonly ConditionalWeakTable<ITextSnapshot, SnapshotSourceText> s_textSnapshotMap = new(); 68private static readonly ConditionalWeakTable<ITextImage, WeakReference<ITextSnapshot>> s_textImageToEditorSnapshotMap = new();
Extensions.TextBufferContainer.cs (1)
40private static readonly ConditionalWeakTable<ITextBuffer, TextBufferContainer> s_textContainerMap = new();
Microsoft.CodeAnalysis.Extensions.Package (6)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.ExternalAccess.Copilot (1)
Internal\Analyzer\AbstractCopilotCodeAnalysisService.cs (1)
38private readonly ConditionalWeakTable<Document, ConcurrentDictionary<string, (ImmutableArray<Diagnostic> Diagnostics, bool IsCompleteResult)>> _diagnosticsCache = new();
Microsoft.CodeAnalysis.Features (14)
AddImport\AbstractAddImportFeatureService.cs (1)
38private static readonly ConditionalWeakTable<PortableExecutableReference, StrongBox<bool>> s_isInPackagesDirectory = new();
CodeFixes\Service\CodeFixService.cs (1)
45private readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, ImmutableDictionary<DiagnosticId, ImmutableArray<CodeFixProvider>>> _projectFixersMap = new();
Common\AbstractProjectExtensionProvider.cs (4)
25private static readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, StrongBox<ImmutableArray<TExtension>>> s_referencesToExtensionsMap = new(); 26private static readonly ConditionalWeakTable<AnalyzerReference, TProvider> s_referenceToProviderMap = new(); 27private static readonly ConditionalWeakTable<TExtension, ExtensionInfo?> s_extensionInfoMap = new(); 117new ConditionalWeakTable<TExtension, ExtensionInfo?>.CreateValueCallback(ComputeExtensionInfo));
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (3)
27private static readonly ConditionalWeakTable<ProjectId, TypeImportCompletionCacheEntry> s_projectItemsCache = new(); 28private static readonly ConditionalWeakTable<MetadataId, TypeImportCompletionCacheEntry> s_metadataItemsCache = new(); 226ConditionalWeakTable<TKey, TypeImportCompletionCacheEntry> cache,
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
49private static readonly ConditionalWeakTable<MetadataId, AsyncLazy<bool>> s_metadataIdToDesignerAttributeInfo = new();
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.CompilationManager.cs (1)
26private static readonly ConditionalWeakTable<ProjectState, StrongBox<(Checksum checksum, ImmutableArray<DiagnosticAnalyzer> analyzers, CompilationWithAnalyzersPair? compilationWithAnalyzersPair)>> s_projectToCompilationWithAnalyzers = new();
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (1)
36private static readonly ConditionalWeakTable<ProjectState, StrongBox<(Checksum checksum, ImmutableArray<DiagnosticAnalyzer> analyzers, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> diagnosticAnalysisResults)>> s_projectToForceAnalysisData = new();
EmbeddedLanguages\AbstractLanguageDetector.cs (1)
190private static readonly ConditionalWeakTable<Compilation, TDetector> s_compilationToDetector = new();
Workspace\CompileTimeSolutionProvider.cs (1)
63private ConditionalWeakTable<Solution, Solution> _designTimeToCompileTimeSolution = new();
Microsoft.CodeAnalysis.InteractiveHost (5)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (1)
33private static readonly ConditionalWeakTable<Project, AsyncLazy<ILookup<DocumentId, DiagnosticData>>> s_projectToDiagnostics = new();
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (20)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Microsoft.CodeAnalysis.PooledObjects.Package (5)
PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
Microsoft.CodeAnalysis.PublicApiAnalyzers (12)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Services\SourceGeneration\RemoteSourceGenerationService.cs (3)
21using AnalyzerReferenceMap = ConditionalWeakTable<AnalyzerReference, StrongBox<bool>>; 74private static readonly Dictionary<string, (AnalyzerReferenceMap analyzerReferenceMap, AnalyzerReferenceMap.CreateValueCallback callback)> s_languageToAnalyzerReferenceMap = new()
Microsoft.CodeAnalysis.ResxSourceGenerator (12)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Microsoft.CodeAnalysis.Threading.Package (5)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
Microsoft.CodeAnalysis.Workspaces (48)
Diagnostics\DiagnosticAnalyzerInfoCache.cs (2)
35private readonly ConditionalWeakTable<DiagnosticAnalyzer, DiagnosticDescriptorsInfo> _descriptorsInfo; 47private readonly ConditionalWeakTable<DiagnosticSuppressor, SuppressionDescriptorsInfo> _suppressionsInfo;
Diagnostics\Extensions.cs (1)
27private static readonly ConditionalWeakTable<Project, AsyncLazy<Checksum>> s_projectToDiagnosticChecksum = new();
Diagnostics\HostDiagnosticAnalyzers.cs (1)
55private readonly ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, StrongBox<ImmutableDictionary<string, SkippedHostAnalyzersInfo>>> _skippedHostAnalyzers = new();
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
33private static readonly ConditionalWeakTable<
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
34private static readonly ConditionalWeakTable<ProjectState, StrongBox<(Checksum checksum, AsyncLazy<ProjectIndex> lazyProjectIndex)>> s_projectToIndex = new();
FindSymbols\FindReferences\FindReferenceCache.cs (1)
26private static readonly ConditionalWeakTable<Document, AsyncLazy<FindReferenceCache>> s_cache = new();
FindSymbols\Shared\AbstractSyntaxIndex.cs (2)
21private static readonly ConditionalWeakTable<DocumentState, TIndex?> s_documentToIndex = new(); 22private static readonly ConditionalWeakTable<DocumentId, TIndex?> s_documentIdToIndex = new();
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (1)
33private static readonly ConditionalWeakTable<ParseOptions, StrongBox<Checksum>> s_ppDirectivesToChecksum = new();
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (2)
40private static readonly ConditionalWeakTable<PortableExecutableReference, AsyncLazy<SymbolTreeInfo>> s_peReferenceToInfo = new(); 52private static readonly ConditionalWeakTable<MetadataId, AsyncLazy<SymbolTreeInfo>> s_metadataIdToSymbolTreeInfo = new();
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
69private static readonly ConditionalWeakTable<ProjectState, AsyncLazy<Checksum>> s_projectToSourceChecksum = new();
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (1)
37private static readonly ConditionalWeakTable<ProjectState, StringTable> s_projectStringTable = new();
Shared\Extensions\INamespaceSymbolExtensions.cs (1)
17private static readonly ConditionalWeakTable<INamespaceSymbol, List<string>> s_namespaceToNameMap = new();
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
40private readonly ConditionalWeakTable<ISourceGenerator, GeneratorTelemetryKey> _generatorTelemetryKeys = new();
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (1)
46private readonly ConditionalWeakTable<TReference, string> _previousDisposalLocations = new();
Workspace\Solution\DocumentState.cs (1)
26private static readonly ConditionalWeakTable<SyntaxTree, DocumentId> s_syntaxTreeToIdMap = new();
Workspace\Solution\FileTextLoader.cs (1)
21private static readonly ConditionalWeakTable<Type, StrongBox<bool>> s_isObsoleteCreateTextOverriden = new();
Workspace\Solution\SolutionCompilationState.cs (3)
32private static readonly ConditionalWeakTable<ISymbol, ProjectId> s_assemblyOrModuleSymbolToProjectMap = new(); 54private ConditionalWeakTable<ISymbol, OriginatingProjectInfo?>? _unrootedSymbolToProjectId; 55private static readonly Func<ConditionalWeakTable<ISymbol, OriginatingProjectInfo?>> s_createTable = () => new();
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
101private static readonly ConditionalWeakTable<Compilation, AsyncLazy<SkeletonReferenceSet?>> s_compilationToSkeletonSet = new();
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (1)
132private OriginatingProjectInfo? GetOriginatingProjectInfoDirectly(ISymbol symbol, ConditionalWeakTable<ISymbol, OriginatingProjectInfo?> unrootedSymbolToProjectId)
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (5)
25using AnalyzerReferenceMap = ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, AsyncLazy<bool>>; 40private static readonly ConditionalWeakTable<ProjectState, SourceGeneratorMap> s_projectStateToSourceGeneratorsMap = new(); 48private static readonly Dictionary<string, AnalyzerReferenceMap> s_languageToAnalyzerReferenceMap = new() 114var analyzerReferenceMap = s_languageToAnalyzerReferenceMap[projectState.Language]; 123AsyncLazy<bool> GetLazy(AnalyzerReferenceMap analyzerReferenceMap, ProjectState projectState)
Workspace\Solution\StateChecksums.cs (1)
592private static readonly ConditionalWeakTable<TValue, StrongBox<TResult>> s_objectToChecksumCollectionCache = new();
Workspace\Solution\TextLoader.cs (1)
21private static readonly ConditionalWeakTable<Type, StrongBox<bool>> s_isObsoleteLoadTextAndVersionAsyncOverriden = new();
Workspace\Workspace_Registration.cs (1)
16private static readonly ConditionalWeakTable<SourceTextContainer, WorkspaceRegistration> s_bufferToWorkspaceRegistrationMap = new();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Modeler\TypeReference.cs (2)
10private static readonly ConditionalWeakTable<TypeReference, TypeReference> ArrayTypeReferences = 13private static readonly ConditionalWeakTable<TypeModel, TypeReference> TypeModelReferences =
Microsoft.Extensions.AI.Abstractions (5)
Functions\AIFunctionFactory.cs (1)
603private static readonly ConditionalWeakTable<JsonSerializerOptions, ConcurrentDictionary<DescriptorKey, ReflectionAIFunctionDescriptor>> _descriptorCache = new();
Utilities\AIJsonSchemaTransformCache.cs (4)
26private readonly ConditionalWeakTable<AIFunction, object> _functionSchemaCache = new(); 27private readonly ConditionalWeakTable<ChatResponseFormatJson, object> _responseFormatCache = new(); 29private readonly ConditionalWeakTable<AIFunction, object>.CreateValueCallback _functionSchemaCreateValueCallback; 30private readonly ConditionalWeakTable<ChatResponseFormatJson, object>.CreateValueCallback _responseFormatCreateValueCallback;
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ActivatorUtilities.cs (1)
31private static readonly Lazy<ConditionalWeakTable<Type, ConstructorInfoEx[]>> s_collectibleConstructorInfos = new();
Microsoft.Extensions.ObjectPool (1)
LeakTrackingObjectPool.cs (1)
24private readonly ConditionalWeakTable<T, Tracker> _trackers = new ConditionalWeakTable<T, Tracker>();
Microsoft.Extensions.Validation.ValidationsGenerator (1)
src\Shared\RoslynUtils\BoundedCacheWithFactory.cs (1)
13/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
Microsoft.Maui (1)
VisualDiagnostics\VisualDiagnostics.cs (1)
15 static ConditionalWeakTable<object, SourceInfo> sourceInfos = new ConditionalWeakTable<object, SourceInfo>();
Microsoft.Maui.Controls (5)
BindingBase.cs (1)
12 static readonly ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext> SynchronizedCollections = new ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext>();
PlatformBindingHelpers.cs (1)
189 public static ConditionalWeakTable<TPlatformView, BindableObjectProxy<TPlatformView>> BindableObjectProxies { get; } = new ConditionalWeakTable<TPlatformView, BindableObjectProxy<TPlatformView>>();
ResourceDictionary.cs (1)
22 static ConditionalWeakTable<Type, ResourceDictionary> s_instances = new ConditionalWeakTable<Type, ResourceDictionary>();
Style.cs (2)
19 readonly ConditionalWeakTable<BindableObject, object> _targets = new(); 161 ConditionalWeakTable<BindableObject, object> specificities = new();
Microsoft.VisualStudio.LanguageServices (3)
Extensions\VisualStudioWorkspaceImplExtensions.cs (1)
22private static readonly ConditionalWeakTable<IVsHierarchy, Dictionary<uint, IImageHandle>> s_hierarchyToItemIdToImageHandle = new();
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (2)
40private static readonly ConditionalWeakTable<Metadata, object> s_lifetimeMap = new(); 49private static readonly ConditionalWeakTable<AssemblyMetadata, IReadOnlyList<TemporaryStorageStreamHandle>> s_metadataToStorageHandles = new();
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
534[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConditionalWeakTable<,>))]
netstandard (1)
netstandard.cs (1)
1512[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConditionalWeakTable<,>))]
PresentationCore (5)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\PerfService.cs (1)
20private static SRCS.ConditionalWeakTable<object, object> perfElementIds = new SRCS.ConditionalWeakTable<object, object>();
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (1)
36private static ConditionalWeakTable<object, XamlSourceInfo> s_sourceInfoTable; // no storage by default
System\Windows\Input\Command\CanExecuteChangedEventManager.cs (3)
245private void AddHandlerToCWT(Delegate handler, ConditionalWeakTable<object, object> cwt) 279private void RemoveHandlerFromCWT(Delegate handler, ConditionalWeakTable<object, object> cwt) 310private ConditionalWeakTable<object, object> _cwt = new ConditionalWeakTable<object, object>();
PresentationFramework (9)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (2)
14public static readonly ConditionalWeakTable<object, InspectableInfo> InspectableInfoTable = new ConditionalWeakTable<object, InspectableInfo>(); 57private static ConditionalWeakTable<object, VtableEntriesCleanupScout> ComInterfaceEntryCleanupTable = new ConditionalWeakTable<object, VtableEntriesCleanupScout>();
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (1)
459private static ConditionalWeakTable<global::System.Collections.Generic.IEnumerator<T>, ToAbiHelper> _adapterTable =
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (1)
249private static ConditionalWeakTable<global::System.Collections.Generic.IReadOnlyList<T>, ToAbiHelper> _adapterTable =
System\Windows\Controls\DataGridHelper.cs (1)
463private static ConditionalWeakTable<DependencyObject, Dictionary<DependencyProperty, bool>> _propertyTransferEnabledMap = new ConditionalWeakTable<DependencyObject, Dictionary<DependencyProperty, bool>>();
System\Windows\FrameworkTemplate.cs (1)
1577internal ConditionalWeakTable<DependencyObject,List<DeferredAction>> DeferredActions = null;
System\Windows\Localization.cs (2)
149private static ConditionalWeakTable<object, string> _commentsOnObjects = new ConditionalWeakTable<object, string>(); 150private static ConditionalWeakTable<object, string> _attributesOnObjects = new ConditionalWeakTable<object, string>();
System\Windows\StyleHelper.cs (1)
4748ConditionalWeakTable<DependencyObject, List<DeferredAction>> deferredActions;
Roslyn.Diagnostics.Analyzers (20)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
16private static readonly ConditionalWeakTable<SyntaxNode, DirectiveInfo<DirectiveTriviaSyntax>> s_rootToDirectiveInfo = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
17private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new();
System.ComponentModel.Composition (4)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (2)
41private ConditionalWeakTable<object, List<ComposablePart>>? _gcRoots; 605ConditionalWeakTable<object, List<ComposablePart>>? gcRoots = _gcRoots;
System\ComponentModel\Composition\Hosting\ImportEngine.cs (2)
25private ConditionalWeakTable<ComposablePart, PartManager> _partManagers = new ConditionalWeakTable<ComposablePart, PartManager>(); 632ConditionalWeakTable<ComposablePart, PartManager>? partManagers = null;
System.Configuration.ConfigurationManager (2)
System\Diagnostics\FilterElement.cs (1)
10private static readonly ConditionalWeakTable<TraceFilter, string> s_initData = new();
System\Diagnostics\ListenerElementsCollection.cs (1)
90private static readonly ConditionalWeakTable<TraceListener, string> s_initData = new();
System.Diagnostics.StackTrace (1)
System\Diagnostics\StackTraceSymbols.cs (1)
15private readonly ConditionalWeakTable<Assembly, MetadataReaderProvider?> _metadataCache;
System.Dynamic.Runtime (1)
System.Dynamic.Runtime.cs (1)
31[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConditionalWeakTable<,>))]
System.Linq.Expressions (1)
System\Linq\Expressions\Expression.cs (1)
53private static ConditionalWeakTable<Expression, ExtensionInfo>? s_legacyCtorSupportTable;
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
75private static ConditionalWeakTable<SocketAsyncEventArgs, Activity>? s_connectActivityTable;
System.Private.CoreLib (19)
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
31private readonly ConditionalWeakTable<SharedArrayPoolThreadLocalArray[], object?> _allTlsBuckets = new ConditionalWeakTable<SharedArrayPoolThreadLocalArray[], object?>();
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.SerializationInfoTable.cs (2)
15private static ConditionalWeakTable<object, SerializationInfo>? s_serializationInfoTable; 17public static ConditionalWeakTable<object, SerializationInfo> SerializationInfoTable
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (10)
207/// <returns>The value bound to <typeparamref name="TKey"/> in the current <see cref="ConditionalWeakTable{TKey, TValue}"/> instance, after the method completes.</returns> 226/// <returns>The value bound to <typeparamref name="TKey"/> in the current <see cref="ConditionalWeakTable{TKey, TValue}"/> instance, after the method completes.</returns> 258/// <returns>The value bound to <typeparamref name="TKey"/> in the current <see cref="ConditionalWeakTable{TKey, TValue}"/> instance, after the method completes.</returns> 392private ConditionalWeakTable<TKey, TValue>? _table; // parent table, set to null when disposed 397public Enumerator(ConditionalWeakTable<TKey, TValue> table) 423ConditionalWeakTable<TKey, TValue>? table = Interlocked.Exchange(ref _table, null); 444ConditionalWeakTable<TKey, TValue>? table = _table; 558private readonly ConditionalWeakTable<TKey, TValue> _parent; // the ConditionalWeakTable with which this container is associated 566internal Container(ConditionalWeakTable<TKey, TValue> parent) 586private Container(ConditionalWeakTable<TKey, TValue> parent, int[] buckets, Entry[] entries, int firstFreeEntry)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (3)
61private static readonly ConditionalWeakTable<object, NativeObjectWrapper> s_nativeObjectWrapperTable = []; 66private static readonly ConditionalWeakTable<object, List<ManagedObjectWrapperHolder>> s_allManagedObjectWrapperTable = []; 71private readonly ConditionalWeakTable<object, ManagedObjectWrapperHolder> _managedObjectWrapperTable = [];
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (1)
187private static ConditionalWeakTable<Assembly, DllImportResolver>? s_nativeDllResolveMap;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (2)
241private static ConditionalWeakTable<TaskScheduler, object?>? s_activeTaskSchedulers; 279ConditionalWeakTable<TaskScheduler, object?>? activeTaskSchedulers = s_activeTaskSchedulers;
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\ContextAware.cs (2)
17private ConditionalWeakTable<Type, DataContract> _keepAlive; 55private readonly ConditionalWeakTable<TKey, TValue> _collectibleTable = new();
System.Private.Xml (2)
System\Xml\Serialization\Compilation.cs (1)
692private readonly ConditionalWeakTable<Assembly, Dictionary<TempAssemblyCacheKey, TempAssembly>> _collectibleCaches = new ConditionalWeakTable<Assembly, Dictionary<TempAssemblyCacheKey, TempAssembly>>();
System\Xml\Serialization\ContextAwareTables.cs (1)
15private readonly ConditionalWeakTable<Type, T> _collectibleTable;
System.Reflection.DispatchProxy (1)
System\Reflection\DispatchProxyGenerator.cs (1)
50private static readonly ConditionalWeakTable<AssemblyLoadContext, ProxyAssembly> s_alcProxyAssemblyMap = new();
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
553[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.ConditionalWeakTable<,>))]
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\ComImportInteropInterfaceDetailsStrategy.cs (1)
55private readonly ConditionalWeakTable<Type, Type> _forwarderInterfaceCache = new();
System.Text.Json (1)
System\Text\Json\Serialization\JsonSerializerOptions.cs (1)
200public static ConditionalWeakTable<JsonSerializerOptions, object?> All { get; } =
System.Threading.Tasks.Dataflow (1)
Base\DataflowBlock.cs (1)
2176private static readonly ConditionalWeakTable<ISourceBlock<TOutput>, SourceObservable<TOutput>> _table =
System.Transactions.Local (1)
System\Transactions\Transaction.cs (1)
1065private static readonly ConditionalWeakTable<ContextKey, ContextData> s_contextDataTable = new ConditionalWeakTable<ContextKey, ContextData>();
System.Windows.Forms (4)
System\Windows\Forms\ActiveX\AxHost.cs (1)
65private static ConditionalWeakTable<Font, object>? s_fontTable;
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (1)
33private readonly ConditionalWeakTable<object, Com2Properties> _nativeProperties = [];
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\AttributeTypeSorter.cs (1)
12private static readonly ConditionalWeakTable<Attribute, string> s_typeIds = [];
System\Windows\Forms\ToolTip\KeyboardToolTipStateMachine.ToolToTipDictionary.cs (1)
12private readonly ConditionalWeakTable<IKeyboardToolTip, WeakReference<ToolTip?>> _table = [];
System.Windows.Forms.UI.IntegrationTests (1)
Infra\DataCollectionService.cs (1)
14private static readonly ConditionalWeakTable<Exception, StrongBox<bool>> s_loggedExceptions = [];
System.Xaml (2)
System\Xaml\AttachablePropertyServices.cs (2)
120private Lazy<ConditionalWeakTable<object, Dictionary<AttachableMemberIdentifier, object>>> instanceStorage = 121new Lazy<ConditionalWeakTable<object, Dictionary<AttachableMemberIdentifier, object>>>();
Test.Utilities (12)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
22private readonly ConditionalWeakTable<TKey, TValue> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
Text.Analyzers (20)
src\Dependencies\PooledObjects\PooledDelegates.cs (5)
205/// except typed such that it can be used to create a pooled <see cref="ConditionalWeakTable{TKey, 210out ConditionalWeakTable<TKey, TValue>.CreateValueCallback boundFunction) where TKey : class where TValue : class 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 423ConditionalWeakTable<TKey, TValue>.CreateValueCallback> 427protected override ConditionalWeakTable<TKey, TValue>.CreateValueCallback Bind()
src\RoslynAnalyzers\Utilities\Compiler\BoundedCache.cs (1)
9/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
12/// Acts as a good alternative to <see cref="System.Runtime.CompilerServices.ConditionalWeakTable{TKey, TValue}"/>
src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (1)
27private static readonly ConditionalWeakTable<AnalyzerOptions, ICategorizedAnalyzerConfigOptions> s_cachedOptions = new();
src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
22private static readonly ConditionalWeakTable<ImmutableDictionary<string, string>, SyntaxTreeCategorizedAnalyzerConfigOptions> s_perTreeOptionsCache = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumerableConditionalWeakTable.cs (1)
55private readonly ConditionalWeakTable<TKey, Box> _table = new();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamespaceOrTypeSymbolExtensions.cs (1)
18private static readonly ConditionalWeakTable<INamespaceOrTypeSymbol, List<string>> s_namespaceOrTypeToNameMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorInfo.cs (1)
12private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationConstructorInfo> s_constructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationDestructorInfo> s_destructorToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationEventInfo.cs (1)
13private static readonly ConditionalWeakTable<IEventSymbol, CodeGenerationEventInfo> s_eventToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationFieldInfo.cs (1)
13private static readonly ConditionalWeakTable<IFieldSymbol, CodeGenerationFieldInfo> s_fieldToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationMethodInfo.cs (1)
14private static readonly ConditionalWeakTable<IMethodSymbol, CodeGenerationMethodInfo> s_methodToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationNamespaceInfo.cs (1)
15private static readonly ConditionalWeakTable<INamespaceSymbol, CodeGenerationNamespaceInfo> s_namespaceToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationPropertyInfo.cs (1)
13private static readonly ConditionalWeakTable<IPropertySymbol, CodeGenerationPropertyInfo> s_propertyToInfoMap = new();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
19protected static ConditionalWeakTable<CodeGenerationSymbol, SyntaxAnnotation[]> annotationsTable = new();