9 types derived from ConcurrentDictionary
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
19internal sealed class PooledConcurrentDictionary<K, V> : ConcurrentDictionary<K, V>, IDisposable
Microsoft.AspNetCore.SignalR.Core (1)
Internal\HubGroupList.cs (1)
75internal sealed class GroupConnectionList : ConcurrentDictionary<string, HubConnectionContext>
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
19internal sealed class PooledConcurrentDictionary<K, V> : ConcurrentDictionary<K, V>, IDisposable
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
19internal sealed class PooledConcurrentDictionary<K, V> : ConcurrentDictionary<K, V>, IDisposable
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
17internal sealed class PooledConcurrentDictionary<K, V> : ConcurrentDictionary<K, V>, IDisposable
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
19internal sealed class PooledConcurrentDictionary<K, V> : ConcurrentDictionary<K, V>, IDisposable
NuGet.Build.Tasks.Console (1)
ProjectWithInnerNodes.cs (1)
16internal sealed class ProjectWithInnerNodes : ConcurrentDictionary<string, IMSBuildProject>
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
19internal sealed class PooledConcurrentDictionary<K, V> : ConcurrentDictionary<K, V>, IDisposable
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\AggregatorStore.cs (1)
481ConcurrentDictionary<TStringSequence, ConcurrentDictionary<TObjectSequence, TAggregator>>
1078 instantiations of ConcurrentDictionary
aspire (5)
Backchannel\AuxiliaryBackchannelMonitor.cs (2)
29private readonly ConcurrentDictionary<string, ConcurrentDictionary<string, AppHostAuxiliaryBackchannel>> _connectionsByHash = new(); 432var connectionsDict = _connectionsByHash.GetOrAdd(hash, _ => new ConcurrentDictionary<string, AppHostAuxiliaryBackchannel>());
src\Shared\ColorGenerator.cs (1)
65_colorIndexByKey = new ConcurrentDictionary<string, Lazy<int>>(StringComparer.OrdinalIgnoreCase);
src\Shared\DateFormatStringsHelpers.cs (1)
20private static readonly ConcurrentDictionary<CultureDetailsKey, MillisecondFormatStrings> s_formatStrings = new();
Utils\EmojiWidth.cs (1)
17private static readonly ConcurrentDictionary<string, int> s_cellLengthCache = new();
Aspire.Cli.Tests (2)
TestServices\TestAuxiliaryBackchannelMonitor.cs (2)
12private readonly ConcurrentDictionary<string, ConcurrentDictionary<string, IAppHostAuxiliaryBackchannel>> _connectionsByHash = new(); 101var connectionsDict = _connectionsByHash.GetOrAdd(hash, _ => new ConcurrentDictionary<string, IAppHostAuxiliaryBackchannel>());
Aspire.Dashboard (18)
Components\Dialogs\ManageDataDialog.razor.cs (1)
59private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName);
Components\Pages\ConsoleLogs.razor.cs (2)
145private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName); 155private readonly ConcurrentDictionary<string, ConsoleLogsSubscription> _consoleLogsSubscriptions = new(StringComparers.ResourceName);
Components\Pages\Resources.razor.cs (4)
117private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName); 925public ConcurrentDictionary<string, bool> ResourceTypesToVisibility { get; } = new(StringComparers.ResourceName); 926public ConcurrentDictionary<string, bool> ResourceStatesToVisibility { get; } = new(StringComparers.ResourceState); 927public ConcurrentDictionary<string, bool> ResourceHealthStatusesToVisibility { get; } = new(StringComparer.Ordinal);
Model\Assistant\AssistantChatDataContext.cs (2)
27private readonly ConcurrentDictionary<string, OtlpTrace> _referencedTraces = new(); 28private readonly ConcurrentDictionary<long, OtlpLogEntry> _referencedLogs = new();
Model\Assistant\AssistantChatViewModel.cs (1)
119private readonly ConcurrentDictionary<string, int> _toolCallCounts = new();
Model\IconResolver.cs (1)
14private readonly ConcurrentDictionary<IconKey, Icon?> _iconCache = new();
Model\ResourceOutgoingPeerResolver.cs (1)
21private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName);
Model\StructuredLogsViewModel.cs (1)
17private readonly ConcurrentDictionary<SpanKey, bool> _spanGenAICache = new();
Otlp\Model\OtlpResource.cs (1)
50private readonly ConcurrentDictionary<KeyValuePair<string, string>[], OtlpResourceView> _resourceViews = new(ResourceViewKeyComparer.Instance);
Otlp\Storage\TelemetryRepository.cs (1)
46private readonly ConcurrentDictionary<ResourceKey, OtlpResource> _resources = new();
src\Shared\ColorGenerator.cs (1)
65_colorIndexByKey = new ConcurrentDictionary<string, Lazy<int>>(StringComparer.OrdinalIgnoreCase);
src\Shared\DateFormatStringsHelpers.cs (1)
20private static readonly ConcurrentDictionary<CultureDetailsKey, MillisecondFormatStrings> s_formatStrings = new();
Utils\DashboardUIHelpers.cs (1)
62private static readonly ConcurrentDictionary<int, TextMask> s_cachedMasking = new();
Aspire.Dashboard.Components.Tests (7)
Controls\ResourceDetailsTests.cs (7)
40builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)])); 130builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)])); 220builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)])); 304builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)])); 391builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel>(resource.Name, resource)])); 427builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel>(resource.Name, resource)])); 463builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel>(resource.Name, resource)]));
Aspire.Dashboard.Tests (4)
ConsoleLogsTests\CreateResourceSelectModelsTests.cs (4)
23var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>(resources.ToDictionary(app => app.Name)); 66var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>(resources.ToDictionary(app => app.Name)); 147var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>(resources.ToDictionary(app => app.Name)); 180var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>();
Aspire.Hosting (11)
ApplicationModel\RequiredCommandValidator.cs (1)
25private readonly ConcurrentDictionary<string, CommandValidationState> _commandStates = new(StringComparer.OrdinalIgnoreCase);
ApplicationModel\ResourceLoggerService.cs (1)
22private readonly ConcurrentDictionary<string, ResourceLoggerState> _loggers = new();
ApplicationModel\ResourceNotificationService.cs (1)
25private readonly ConcurrentDictionary<string, ResourceNotificationState> _resourceNotificationStates = new();
Dashboard\DashboardEventHandlers.cs (1)
790var loggerCache = new ConcurrentDictionary<string, ILogger>(StringComparer.Ordinal);
Dcp\DcpExecutor.cs (1)
91private readonly ConcurrentDictionary<string, (CancellationTokenSource Cancellation, Task Task)> _logStreams = new();
Dcp\DcpExecutorEvents.cs (1)
18private readonly ConcurrentDictionary<Type, Func<object, Task>> _eventSubscriptionListLookup = new();
Eventing\DistributedApplicationEventing.cs (2)
12private readonly ConcurrentDictionary<Type, List<DistributedApplicationEventSubscription>> _eventSubscriptionListLookup = new(); 13private readonly ConcurrentDictionary<DistributedApplicationEventSubscription, Type> _subscriptionEventTypeLookup = new();
Pipelines\PipelineActivityReporter.cs (1)
19private readonly ConcurrentDictionary<string, ReportingStep> _steps = new();
Pipelines\ReportingStep.cs (1)
18private readonly ConcurrentDictionary<string, ReportingTask> _tasks = new();
Utils\FileSystemService.cs (1)
22private readonly ConcurrentDictionary<string, IDisposable> _allocatedItems = new();
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.cs (1)
40modelNameOperations = new ConcurrentDictionary<ModelNameOperation, byte>();
Aspire.Hosting.Integration.Analyzers (2)
AspireExportAnalyzer.cs (2)
75var exportsByKey = new ConcurrentDictionary<(string ExportId, string TargetType), ConcurrentBag<(IMethodSymbol Method, Location Location)>>(); 110var reportedParameters = new ConcurrentDictionary<string, byte>(StringComparer.Ordinal);
Aspire.Hosting.Maui (1)
Utilities\ProjectFileReader.cs (1)
16private static readonly ConcurrentDictionary<string, Dictionary<string, string?>> s_projectCache = new(StringComparer.OrdinalIgnoreCase);
Aspire.Hosting.RemoteHost (6)
Ats\AtsCallbackProxyFactory.cs (1)
22private readonly ConcurrentDictionary<(string CallbackId, Type DelegateType), Delegate> _cache = new();
Ats\CapabilityDispatcher.cs (1)
29private readonly ConcurrentDictionary<string, CapabilityRegistration> _capabilities = new();
Ats\HandleRegistry.cs (1)
16private readonly ConcurrentDictionary<string, HandleEntry> _handles = new();
AtsCapabilityScanner.cs (2)
2654private static readonly ConcurrentDictionary<string, XDocument?> s_xmlDocCache = new(StringComparer.Ordinal); 2655private static readonly ConcurrentDictionary<Type, byte> s_assemblyExportedTypeCache = new();
CancellationTokenRegistry.cs (1)
16private readonly ConcurrentDictionary<string, CancellationTokenSource> _sources = new();
Aspire.Hosting.Tests (2)
Dashboard\DashboardLifecycleHookTests.cs (1)
149var dashboardEnvironmentVariables = new ConcurrentDictionary<string, string?>();
Dashboard\DashboardResourceTests.cs (1)
790private readonly ConcurrentDictionary<string, TestLogger> _loggers = new();
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (1)
31= new();
dotnet (6)
Commands\Test\MTP\CtrlCCancellationManager.cs (1)
34private readonly ConcurrentDictionary<Process, byte> _processes = new();
Commands\Test\MTP\Terminal\TerminalTestReporter.cs (1)
38private readonly ConcurrentDictionary<string, TestProgressState> _assemblies = new();
Commands\Test\MTP\Terminal\TestNodeResultsState.cs (2)
14private readonly ConcurrentDictionary<string, TestDetailState> _testNodeProgressStates = new(); 15private readonly ConcurrentDictionary<string, byte> _completed = new();
Commands\Test\VSTest\VSTestFeatureFlag.cs (1)
13private readonly ConcurrentDictionary<string, bool> _cache = new();
NugetPackageDownloader\NuGetPackageDownloader.cs (1)
86_sourceRepositories = new();
dotnet-aot (1)
src\sdk\src\Cli\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (1)
86_sourceRepositories = new();
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\InternalBufferManager.cs (1)
54private ConcurrentDictionary<int, string> _buffersPooled = new ConcurrentDictionary<int, string>();
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (1)
248new ConcurrentDictionary<long, Task<CancellationToken>>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
283private static ConcurrentDictionary<Type, TaskCompletionSourceInfo> s_cache = new ConcurrentDictionary<Type, TaskCompletionSourceInfo>();
GenerateDocumentationAndConfigFiles (20)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (2)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity); 51_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity, equalityComparer);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
25_computedOptionValuesMap = new ConcurrentDictionary<OptionKey, (bool found, object? value)>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
43= new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (2)
29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 56=> new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
32_fullNameToTypeMap = new ConcurrentDictionary<string, INamedTypeSymbol?>(StringComparer.Ordinal); 82new(StringComparer.Ordinal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (2)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>();
ILCompiler.Compiler (5)
Compiler\DependencyAnalysis\NodeFactory.cs (2)
167_cache = new ConcurrentDictionary<TKey, TValue>(comparer); 173_cache = new ConcurrentDictionary<TKey, TValue>();
Compiler\ReachabilityInstrumentationProvider.cs (1)
34private readonly ConcurrentDictionary<EcmaModule, ExternSymbolMappedField[]> _isTokenUsedStates = new();
src\runtime\src\coreclr\tools\Common\Compiler\CachingVirtualMethodAlgorithm.cs (1)
16= new ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]>();
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (1)
110private readonly ConcurrentDictionary<EntityPair, ModuleCycleInfo> _actualProblems = new ConcurrentDictionary<EntityPair, ModuleCycleInfo>();
ILCompiler.ReadyToRun (17)
Compiler\DependencyAnalysis\ReadyToRun\ModuleTokenResolver.cs (1)
30private readonly ConcurrentDictionary<EcmaType, ModuleToken> _typeToRefTokens = new ConcurrentDictionary<EcmaType, ModuleToken>();
Compiler\DependencyAnalysis\ReadyToRun\TypeValidationChecker.cs (2)
21private ConcurrentDictionary<TypeDesc, Task<bool>> _firstStageValidationChecks = new ConcurrentDictionary<TypeDesc, Task<bool>>(); 22private ConcurrentDictionary<TypeDesc, (TypeDesc dependendOnType, string reason)[]> _crossTypeValidationDependencies = new ConcurrentDictionary<TypeDesc, (TypeDesc dependendOnType, string reason)[]>();
Compiler\DependencyAnalysis\ReadyToRunCodegenNodeFactory.cs (2)
37_cache = new ConcurrentDictionary<TKey, TValue>(comparer); 43_cache = new ConcurrentDictionary<TKey, TValue>();
Compiler\ReadyToRunCodegenCompilation.cs (1)
316private ConcurrentDictionary<TypeDesc, bool> _computedFixedLayoutTypes = new ConcurrentDictionary<TypeDesc, bool>();
Compiler\ReadyToRunCompilationModuleGroupBase.cs (8)
48private readonly ConcurrentDictionary<TypeDesc, CompilationUnitSet> _layoutCompilationUnits = new ConcurrentDictionary<TypeDesc, CompilationUnitSet>(); 50private readonly ConcurrentDictionary<TypeDesc, bool> _versionsWithTypeCache = new ConcurrentDictionary<TypeDesc, bool>(); 52private readonly ConcurrentDictionary<TypeDesc, bool> _versionsWithTypeReferenceCache = new ConcurrentDictionary<TypeDesc, bool>(); 54private readonly ConcurrentDictionary<MethodDesc, bool> _versionsWithMethodCache = new ConcurrentDictionary<MethodDesc, bool>(); 56private readonly ConcurrentDictionary<MethodDesc, bool> _crossModuleInlineableCache = new ConcurrentDictionary<MethodDesc, bool>(); 58private readonly ConcurrentDictionary<TypeDesc, bool> _crossModuleInlineableTypeCache = new ConcurrentDictionary<TypeDesc, bool>(); 60private readonly ConcurrentDictionary<MethodDesc, bool> _crossModuleCompilableCache = new ConcurrentDictionary<MethodDesc, bool>(); 66private ConcurrentDictionary<EcmaMethod, bool> _tokenTranslationFreeNonVersionable = new ConcurrentDictionary<EcmaMethod, bool>();
Compiler\ReadyToRunMetadataFieldLayoutAlgorithm.cs (1)
593_typeToFieldMap = new ConcurrentDictionary<DefType, FieldAndOffset[]>();
src\runtime\src\coreclr\tools\Common\Compiler\CachingVirtualMethodAlgorithm.cs (1)
16= new ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]>();
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (1)
110private readonly ConcurrentDictionary<EntityPair, ModuleCycleInfo> _actualProblems = new ConcurrentDictionary<EntityPair, ModuleCycleInfo>();
Microsoft.AspNetCore.App.Analyzers (2)
Infrastructure\RouteUsageCache.cs (1)
26_lazyRoutePatterns = new();
RouteHandlers\RouteHandlerAnalyzer.cs (1)
53mapOperations = new ConcurrentDictionary<MapOperation, byte>();
Microsoft.AspNetCore.Authorization.Policy (1)
AuthorizationPolicyCache.cs (1)
22return new ConcurrentDictionary<Endpoint, AuthorizationPolicy>();
Microsoft.AspNetCore.Components (20)
BindConverter.cs (2)
1719private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>(); 1916private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>();
CascadingParameterState.cs (1)
18private static readonly ConcurrentDictionary<Type, CascadingParameterInfo[]> _cachedInfos = new();
CascadingValueSource.cs (1)
77_subscribers = new();
ChangeDetection.cs (1)
11private static readonly ConcurrentDictionary<Type, bool> _immutableObjectTypesCache = new();
ComponentFactory.cs (1)
20private static readonly ConcurrentDictionary<Type, IComponentRenderMode?> _cachedComponentTypeRenderModes = new();
DefaultComponentActivator.cs (1)
13private static readonly ConcurrentDictionary<Type, ObjectFactory> _cachedComponentTypeInfo = new();
DefaultComponentPropertyActivator.cs (1)
19private static readonly ConcurrentDictionary<Type, Action<IServiceProvider, IComponent>> _cachedPropertyActivators = new();
PersistentState\PersistentServicesRegistry.cs (1)
28private static readonly ConcurrentDictionary<Type, PropertiesAccessor> _cachedAccessorsByType = new();
PersistentState\PersistentStateValueProviderKeyResolver.cs (1)
17private static readonly ConcurrentDictionary<(string, string, string), byte[]> _keyCache = new();
PersistentState\PersistentValueProviderComponentSubscription.cs (2)
18private static readonly ConcurrentDictionary<(Type, string), PropertyGetter> _propertyGetterCache = new(); 19private static readonly ConcurrentDictionary<Type, IPersistentComponentStateSerializer?> _serializerCache = new();
Reflection\ComponentProperties.cs (2)
29= new ConcurrentDictionary<Type, WritersForType>(); 295_referenceEqualityWritersCache = new ConcurrentDictionary<string, PropertySetter?>(ReferenceEqualityComparer.Instance);
RenderTree\EventArgsTypeCache.cs (1)
12private static readonly ConcurrentDictionary<MethodInfo, Type> Cache = new ConcurrentDictionary<MethodInfo, Type>();
RouteView.cs (1)
21private static readonly ConcurrentDictionary<Type, Type?> _layoutAttributeCache = new();
Routing\RouteTable.cs (1)
15private static readonly ConcurrentDictionary<(Type, string), InboundRouteEntry> _routeEntryCache = new();
Routing\RouteTableFactory.cs (1)
32private readonly ConcurrentDictionary<RouteKey, RouteTable> _cache = new();
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (1)
18private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\aspnetcore\src\Components\Shared\src\UrlValueConstraint.cs (1)
17private static readonly ConcurrentDictionary<Type, UrlValueConstraint> _cachedInstances = new();
Microsoft.AspNetCore.Components.Analyzers (2)
StateHasChangedAnalyzer.cs (2)
52var eventHandlerMethods = new ConcurrentDictionary<IMethodSymbol, byte>(SymbolEqualityComparer.Default); 53var redundantCallLocationsByMethod = new ConcurrentDictionary<IMethodSymbol, ImmutableArray<Location>>(SymbolEqualityComparer.Default);
Microsoft.AspNetCore.Components.Authorization (1)
AttributeAuthorizeDataCache.cs (1)
20private static readonly ConcurrentDictionary<Type, (IAuthorizeData[]? AuthorizeData, object[]? Metadata)> _cache = new();
Microsoft.AspNetCore.Components.Endpoints (17)
Builder\RazorComponentsEndpointHttpContextExtensions.cs (1)
20private static readonly ConcurrentDictionary<Type, bool> AcceptsInteractiveRoutingCache = new();
CacheView\CacheViewKeyResolver.cs (1)
18private static readonly ConcurrentDictionary<string, string[]> _sortedNamesByRawValue = new(StringComparer.Ordinal);
CacheView\CacheViewService.cs (1)
19private static readonly ConcurrentDictionary<Type, (CacheBehavior? Behavior, CacheVaryBy? Condition)> _liveComponentAttributeByType = new();
CacheView\MemoryCacheViewStore.cs (1)
15private readonly ConcurrentDictionary<string, Task<SerializedRenderFragment>> _pending = new(StringComparer.Ordinal);
FormMapping\FormDataMapperOptions.cs (2)
14private readonly ConcurrentDictionary<Type, FormDataConverter> _converters = new(); 27_converters = new(WellKnownConverters.Converters);
FormMapping\HttpContextFormValueMapper.cs (1)
21private static readonly ConcurrentDictionary<Type, FormValueSupplier> _cache = new();
Forms\ClientValidationCache.cs (3)
21private readonly ConcurrentDictionary<FieldKey, ClientValidationFieldMetadata?> _metadataCache = new(); 22private readonly ConcurrentDictionary<Type, bool> _typeHasValidatableInfo = new(); 23private readonly ConcurrentDictionary<(Type FormType, string RenderedName), bool> _fieldReachabilityCache = new();
Rendering\EndpointComponentState.cs (1)
19private static readonly ConcurrentDictionary<Type, StreamRenderingAttribute?> _streamRenderingAttributeByComponentType = new();
Rendering\SSRRenderModeBoundary.cs (1)
26private static readonly ConcurrentDictionary<Type, string> _componentTypeNameHashCache = new();
SessionCascadingValueSupplier.cs (1)
18private static readonly ConcurrentDictionary<(Type, string), PropertyGetter> _propertyGetterCache = new();
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new();
TempData\TempDataCascadingValueSupplier.cs (1)
16private static readonly ConcurrentDictionary<(Type, string), PropertyGetter> _propertyGetterCache = new();
Microsoft.AspNetCore.Components.Forms (4)
EditContextDataAnnotationsExtensions.cs (1)
46private static readonly ConcurrentDictionary<(Type ModelType, string FieldName), PropertyInfo?> _propertyInfoCache = new();
FieldIdentifier.cs (1)
19private static readonly ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func<object, object>> _fieldAccessors = new();
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
28private static readonly ConcurrentDictionary<MemberInfo, CapturedValueFormatter> s_capturedValueFormatterCache = new(); 29private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new();
Microsoft.AspNetCore.Components.QuickGrid (2)
Infrastructure\AsyncQueryExecutorSupplier.cs (1)
24private static readonly ConcurrentDictionary<Type, bool> IsEntityFrameworkProviderTypeCache = new();
src\aspnetcore\src\Components\Shared\src\UrlValueConstraint.cs (1)
17private static readonly ConcurrentDictionary<Type, UrlValueConstraint> _cachedInstances = new();
Microsoft.AspNetCore.Components.Server (5)
Circuits\CircuitRegistry.cs (1)
57ConnectedCircuits = new ConcurrentDictionary<CircuitId, CircuitHost>();
Circuits\RemoteJSRuntime.cs (1)
21private readonly ConcurrentDictionary<long, CancelableDotNetStreamReference> _pendingDotNetToJSStreams = new();
ProtectedBrowserStorage\ProtectedBrowserStorage.cs (1)
21= new ConcurrentDictionary<string, IDataProtector>(StringComparer.Ordinal);
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (1)
18private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
Microsoft.AspNetCore.Components.Testing (3)
Infrastructure\ServerFactory.cs (2)
93private readonly ConcurrentDictionary<string, ServerInstance> _instances = new(); 94private readonly ConcurrentDictionary<string, TaskCompletionSource> _readinessSignals = new();
Infrastructure\TestLockProvider.cs (1)
28private readonly ConcurrentDictionary<string, TaskCompletionSource> _locks = new();
Microsoft.AspNetCore.Components.Web (5)
Forms\ExpressionMemberAccessor.cs (2)
17private static readonly ConcurrentDictionary<Expression, MemberInfo> _memberInfoCache = new(); 18private static readonly ConcurrentDictionary<(MemberInfo Member, string CultureName), string> _displayNameCache = new();
JSComponents\JSComponentInterop.cs (1)
26private static readonly ConcurrentDictionary<Type, ParameterTypeCache> ParameterTypeCaches = new();
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
28private static readonly ConcurrentDictionary<MemberInfo, CapturedValueFormatter> s_capturedValueFormatterCache = new(); 29private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new();
Microsoft.AspNetCore.Components.WebAssembly (3)
Services\WebAssemblyConsoleLoggerProvider.cs (1)
23_loggers = new ConcurrentDictionary<string, WebAssemblyConsoleLogger<object>>();
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (1)
18private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\XmlKeyManager.cs (1)
61private readonly ConcurrentDictionary<Guid, Key> _knownKeyMap = new(); // Grows unboundedly, like the key ring
Microsoft.AspNetCore.Diagnostics.Middleware (2)
Buffering\IncomingRequestLogBufferHolder.cs (1)
11private readonly ConcurrentDictionary<string, IncomingRequestLogBuffer> _buffers = new();
Logging\IncomingHttpRouteUtility.cs (1)
22private readonly ConcurrentDictionary<string, FrozenDictionary<string, DataClassification>> _parametersToRedactCache = new();
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Internal\CallHandlers\CallHandlerDescriptorInfo.cs (1)
27PathDescriptorsCache = new ConcurrentDictionary<string, List<FieldDescriptor>>();
Internal\Json\EnumNameHelpers.cs (1)
13private static readonly ConcurrentDictionary<Type, EnumMapping> _enumMappings = new ConcurrentDictionary<Type, EnumMapping>();
src\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\DescriptorRegistry.cs (1)
14private readonly ConcurrentDictionary<Type, DescriptorBase> _typeDescriptorMap = new ConcurrentDictionary<Type, DescriptorBase>();
src\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\Server\InterceptorActivators.cs (1)
28private readonly ConcurrentDictionary<Type, IGrpcInterceptorActivator> _cachedActivators = new();
Microsoft.AspNetCore.HeaderParsing (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Factory.g.cs (2)
11_parsingErrorCounterInstruments = new(); 15_cacheAccessCounterInstruments = new();
HeaderRegistry.cs (1)
18private readonly ConcurrentDictionary<HeaderKeyIdentity, object> _headerKeys = new();
Microsoft.AspNetCore.Http.Abstractions (4)
Routing\EndpointMetadataCollection.cs (1)
41_cache = new ConcurrentDictionary<Type, object[]>();
Routing\RouteValueDictionary.cs (1)
44private static readonly ConcurrentDictionary<Type, PropertyHelper[]> _propertyCache = new ConcurrentDictionary<Type, PropertyHelper[]>();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new();
Microsoft.AspNetCore.Http.Connections (2)
Internal\HttpConnectionContext.cs (1)
194_items = new ConnectionItems(new ConcurrentDictionary<object, object?>());
Internal\HttpConnectionManager.cs (1)
23new ConcurrentDictionary<string, HttpConnectionContext>(StringComparer.Ordinal);
Microsoft.AspNetCore.Http.Extensions (5)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\FormDataMapperOptions.cs (2)
14private readonly ConcurrentDictionary<Type, FormDataConverter> _converters = new(); 27_converters = new(WellKnownConverters.Converters);
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
46private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 47private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 48private readonly ConcurrentDictionary<Type, (ConstructorInfo?, ConstructorParameter[])> _constructorCache = new();
Microsoft.AspNetCore.Mvc.Abstractions (3)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
46private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 47private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 48private readonly ConcurrentDictionary<Type, (ConstructorInfo?, ConstructorParameter[])> _constructorCache = new();
Microsoft.AspNetCore.Mvc.Core (15)
ActionConstraints\ActionConstraintCache.cs (1)
176new ConcurrentDictionary<ActionDescriptor, CacheEntry>();
Controllers\DefaultControllerPropertyActivator.cs (1)
15private readonly ConcurrentDictionary<Type, PropertyActivator<ControllerContext>[]> _activateActions = new();
Filters\MiddlewareFilterBuilder.cs (1)
21= new ConcurrentDictionary<Type, Lazy<RequestDelegate>>();
Infrastructure\AsyncEnumerableReader.cs (1)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new();
Infrastructure\OrderedEndpointsSequenceProviderCache.cs (1)
11private readonly ConcurrentDictionary<IEndpointRouteBuilder, OrderedEndpointsSequenceProvider> _sequenceProviderCache = new();
Infrastructure\TypeActivatorCache.cs (1)
18new ConcurrentDictionary<Type, ObjectFactory>();
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (1)
20private readonly ConcurrentDictionary<ModelMetadataIdentity, ModelMetadataCacheEntry> _modelMetadataCache = new();
ModelBinding\ModelBinderFactory.cs (1)
43_cache = new ConcurrentDictionary<Key, IModelBinder>();
ModelBinding\Validation\ClientValidatorCache.cs (1)
17private readonly ConcurrentDictionary<ModelMetadata, CacheEntry> _cacheEntries = new ConcurrentDictionary<ModelMetadata, CacheEntry>();
ModelBinding\Validation\DefaultCollectionValidationStrategy.cs (1)
49private readonly ConcurrentDictionary<Type, Func<object, IEnumerator>> _genericGetEnumeratorCache = new ConcurrentDictionary<Type, Func<object, IEnumerator>>();
ModelBinding\Validation\ValidatorCache.cs (1)
16private readonly ConcurrentDictionary<ModelMetadata, CacheEntry> _cacheEntries = new();
Routing\DynamicControllerEndpointSelectorCache.cs (2)
14private readonly ConcurrentDictionary<int, EndpointDataSource> _dataSourceCache = new(); 15private readonly ConcurrentDictionary<int, DynamicControllerEndpointSelector> _endpointSelectorCache = new();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new();
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
XmlDataContractSerializerInputFormatter.cs (1)
21private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
XmlDataContractSerializerOutputFormatter.cs (1)
25private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
XmlSerializerInputFormatter.cs (1)
21private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
XmlSerializerOutputFormatter.cs (1)
25private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
BsonTempDataSerializer.cs (2)
27new ConcurrentDictionary<Type, Func<JArray, object>>(); 29new ConcurrentDictionary<Type, Func<JObject, object>>();
src\aspnetcore\src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (1)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new();
Microsoft.AspNetCore.Mvc.Razor (4)
Compilation\DefaultViewCompiler.cs (1)
32_normalizedPathCache = new ConcurrentDictionary<string, string>(StringComparer.Ordinal);
DefaultTagHelperFactory.cs (1)
35_injectActions = new ConcurrentDictionary<Type, PropertyActivator<ViewContext>[]>();
RazorPageActivator.cs (1)
37_activationInfo = new ConcurrentDictionary<CacheKey, RazorPagePropertyActivator>();
TagHelpers\TagHelperComponentPropertyActivator.cs (1)
18private readonly ConcurrentDictionary<Type, PropertyActivator<ViewContext>[]> _propertiesToActivate = new();
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
53_normalizedPathCache = new ConcurrentDictionary<string, string>(StringComparer.Ordinal);
Microsoft.AspNetCore.Mvc.RazorPages (2)
Infrastructure\DynamicPageEndpointSelectorCache.cs (2)
15private readonly ConcurrentDictionary<int, EndpointDataSource> _dataSourceCache = new(); 16private readonly ConcurrentDictionary<int, DynamicPageEndpointSelector> _endpointSelectorCache = new();
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Cache\DistributedCacheTagHelperService.cs (1)
61_workers = new ConcurrentDictionary<CacheTagKey, Task<IHtmlContent>>();
JavaScriptResources.cs (1)
18new ConcurrentDictionary<string, string>(StringComparer.Ordinal);
Microsoft.AspNetCore.Mvc.ViewFeatures (7)
CachedExpressionCompiler.cs (3)
35new ConcurrentDictionary<MemberInfo, Func<TModel, object>>(); 38new ConcurrentDictionary<MemberExpressionCacheKey, Func<TModel, object>>(MemberExpressionCacheKeyComparer.Instance); 41new ConcurrentDictionary<MemberInfo, Func<object, TResult>>();
HtmlAttributePropertyHelper.cs (1)
16new ConcurrentDictionary<Type, HtmlAttributePropertyHelper[]>();
ModelExpressionProvider.cs (1)
27_expressionTextCache = new ConcurrentDictionary<LambdaExpression, string>(LambdaExpressionComparer.Instance);
ViewComponents\DefaultViewComponentFactory.cs (1)
36_injectActions = new ConcurrentDictionary<Type, PropertyActivator<ViewComponentContext>[]>();
ViewComponents\ViewComponentInvokerCache.cs (1)
77new ConcurrentDictionary<ViewComponentDescriptor, ObjectMethodExecutor>();
Microsoft.AspNetCore.OpenApi (5)
Services\OpenApiDocumentService.cs (1)
52private readonly ConcurrentDictionary<string, OpenApiOperationTransformerContext> _operationTransformerContextCache = new();
Services\Schemas\OpenApiSchemaService.cs (1)
35private readonly ConcurrentDictionary<Type, string?> _schemaIdCache = new();
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
46private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 47private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 48private readonly ConcurrentDictionary<Type, (ConstructorInfo?, ConstructorParameter[])> _constructorCache = new();
Microsoft.AspNetCore.OutputCaching (1)
DispatcherExtensions.cs (1)
10private readonly ConcurrentDictionary<TKey, Task<TValue?>> _workers = new();
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
Microsoft.AspNetCore.Routing (4)
DefaultLinkGenerator.cs (1)
55return new ConcurrentDictionary<RouteEndpoint, TemplateBinder>();
DefaultLinkParser.cs (1)
41return new ConcurrentDictionary<RouteEndpoint, MatcherState>();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new();
Microsoft.AspNetCore.Routing.Abstractions (2)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new();
Microsoft.AspNetCore.Server.HttpSys (2)
NativeInterop\DisconnectListener.cs (1)
12private readonly ConcurrentDictionary<ulong, ConnectionCancellation> _connectionCancellationTokens = new();
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new();
Microsoft.AspNetCore.Server.IIS (1)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new();
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Internal\Infrastructure\ConnectionManager.cs (1)
14private readonly ConcurrentDictionary<long, ConnectionReference> _connectionReferences = new ConcurrentDictionary<long, ConnectionReference>();
Internal\Infrastructure\TransportConnectionManager.cs (1)
14private readonly ConcurrentDictionary<long, ConnectionReference> _connectionReferences = new ConcurrentDictionary<long, ConnectionReference>();
Internal\PinnedBlockMemoryPoolFactory.cs (1)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, nuint> _pools = new();
Internal\WebTransport\WebTransportSession.cs (1)
24private readonly ConcurrentDictionary<long, WebTransportStream> _openStreams = new();
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new();
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (2)
DirectTlsTransportFactory.cs (1)
107var contextCache = new ConcurrentDictionary<X509Certificate2, TlsContext>();
TlsEventPump.cs (1)
50private readonly ConcurrentDictionary<int, ConnectionIoState> _connections = new();
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (1)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new();
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
86private readonly ConcurrentDictionary<string, InvocationHandlerList> _handlers = new ConcurrentDictionary<string, InvocationHandlerList>(StringComparer.Ordinal);
Microsoft.AspNetCore.SignalR.Core (5)
HubConnectionContext.cs (1)
249internal ConcurrentDictionary<string, CancellationTokenSource> ActiveRequestCancellationSources { get; } = new ConcurrentDictionary<string, CancellationTokenSource>(StringComparer.Ordinal);
HubConnectionStore.cs (1)
18new ConcurrentDictionary<string, HubConnectionContext>(StringComparer.Ordinal);
Internal\HubGroupList.cs (1)
12new ConcurrentDictionary<string, GroupConnectionList>(StringComparer.Ordinal);
src\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (1)
16private readonly ConcurrentDictionary<string, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete)> _pendingInvocations = new();
StreamTracker.cs (1)
19private readonly ConcurrentDictionary<string, (long Owner, IStreamConverter Converter)> _lookup = new();
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Internal\AckHandler.cs (1)
11private readonly ConcurrentDictionary<int, AckInfo> _acks = new ConcurrentDictionary<int, AckInfo>();
Internal\RedisSubscriptionManager.cs (1)
10private readonly ConcurrentDictionary<string, HubConnectionStore> _subscriptions = new ConcurrentDictionary<string, HubConnectionStore>(StringComparer.Ordinal);
src\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (1)
16private readonly ConcurrentDictionary<string, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete)> _pendingInvocations = new();
Microsoft.Build (61)
BackEnd\BuildManager\BuildManager.cs (1)
57internal static ConcurrentDictionary<ProjectCacheDescriptor, ProjectCacheDescriptor> ProjectCacheDescriptors { get; } = new(ProjectCacheDescriptorEqualityComparer.Instance);
BackEnd\Components\Caching\ConfigCache.cs (4)
351_byId = new ConcurrentDictionary<int, BuildRequestConfiguration>(); 352_byMetadata = new ConcurrentDictionary<ConfigurationMetadata, BuildRequestConfiguration>(); 383capacity => new ConcurrentDictionary<int, BuildRequestConfiguration>(Environment.ProcessorCount, capacity)); 388_byMetadata = new ConcurrentDictionary<ConfigurationMetadata, BuildRequestConfiguration>(Environment.ProcessorCount, configurationsById.Count);
BackEnd\Components\Caching\ResultsCache.cs (2)
38_resultsByConfiguration = new ConcurrentDictionary<int, BuildResult>(); 244capacity => new ConcurrentDictionary<int, BuildResult>(NativeMethodsShared.GetLogicalCoreCount(), capacity));
BackEnd\Components\Communications\NodeProviderInProc.cs (2)
129_nodeContexts = new ConcurrentDictionary<int, NodeContext>( 135_nodeContexts = new ConcurrentDictionary<int, NodeContext>();
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
183_nodeContexts = new ConcurrentDictionary<int, NodeContext>();
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
69private readonly ConcurrentDictionary<string, byte /*void*/> _processesToIgnore = new();
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (3)
246_nodeContexts = new ConcurrentDictionary<TaskHostNodeKey, NodeContext>(); 247_nodeIdToNodeKey = new ConcurrentDictionary<int, TaskHostNodeKey>(); 248_nodeIdToPacketHandlerStack = new ConcurrentDictionary<int, Stack<INodePacketHandler>>();
BackEnd\Components\Communications\TranslatorExtensions.cs (1)
22private static readonly Lazy<ConcurrentDictionary<Type, ConstructorInfo>> parameterlessConstructorCache = new Lazy<ConcurrentDictionary<Type, ConstructorInfo>>(() => new ConcurrentDictionary<Type, ConstructorInfo>());
BackEnd\Components\Logging\LoggingService.cs (2)
317_projectFileMap = new ConcurrentDictionary<int, string>(); 787warningsByProject ??= new ConcurrentDictionary<WarningsConfigKey, ISet<string>>();
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
51private readonly ConcurrentDictionary<ProjectCacheDescriptor, Lazy<Task<ProjectCachePlugin>>> _projectCachePlugins = new(ProjectCacheDescriptorEqualityComparer.Instance); 54private readonly ConcurrentDictionary<BuildRequestConfiguration, IReadOnlyDictionary<string, string>> _globalPropertiesPerConfiguration = new();
BackEnd\Components\RequestBuilder\TaskRouter.cs (1)
25private static readonly ConcurrentDictionary<Type, bool> s_multiThreadableTaskCache = new();
BackEnd\Components\Scheduler\SchedulingData.cs (1)
69private readonly ConcurrentDictionary<int, SchedulableRequest> _executingRequestByNode = new(concurrencyLevel: 1, capacity: 32);
BackEnd\Components\SdkResolution\CachingSdkResolverLoader.cs (1)
26private readonly ConcurrentDictionary<SdkResolverManifest, IReadOnlyList<SdkResolver>> _resolversByManifest = new();
BackEnd\Components\SdkResolution\CachingSdkResolverService.cs (2)
22private readonly ConcurrentDictionary<int, ConcurrentDictionary<string, Lazy<SdkResult>>> _cache = new ConcurrentDictionary<int, ConcurrentDictionary<string, Lazy<SdkResult>>>(); 55_ => new ConcurrentDictionary<string, Lazy<SdkResult>>(MSBuildNameIgnoreCaseComparer.Default));
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (1)
32private readonly ConcurrentDictionary<string, Lazy<SdkResult>> _responseCache = new ConcurrentDictionary<string, Lazy<SdkResult>>(MSBuildNameIgnoreCaseComparer.Default);
BackEnd\Components\SdkResolution\SdkResolverService.cs (2)
40private readonly ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>> _resolverStateBySubmission = new ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>>(); 555_ => new ConcurrentDictionary<SdkResolver, object>(
BackEnd\Shared\BuildResult.cs (2)
765_resultsByTarget = new ConcurrentDictionary<string, TargetResult>(_resultsByTarget, StringComparer.OrdinalIgnoreCase), 787return new ConcurrentDictionary<string, TargetResult>(1, capacity, StringComparer.OrdinalIgnoreCase);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
920private static readonly ConcurrentDictionary<Type, Func<ITaskItem, ITaskItem>> s_taskItemOfTFactories = new();
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
544private readonly ConcurrentDictionary<int, string> _projectsByInstanceId = new(); 545private readonly ConcurrentDictionary<int, string> _projectsByEvaluationId = new();
BuildCheck\Infrastructure\ConfigurationProvider.cs (3)
23private readonly ConcurrentDictionary<string, CheckConfiguration> _checkConfiguration = new ConcurrentDictionary<string, CheckConfiguration>(StringComparer.InvariantCultureIgnoreCase); 28private readonly ConcurrentDictionary<string, Dictionary<string, string>> _editorConfigData = new ConcurrentDictionary<string, Dictionary<string, string>>(StringComparer.InvariantCultureIgnoreCase); 33private readonly ConcurrentDictionary<string, CustomConfigurationData> _customConfigurationData = new ConcurrentDictionary<string, CustomConfigurationData>(StringComparer.InvariantCultureIgnoreCase);
BuildCheck\Infrastructure\EditorConfig\EditorConfigParser.cs (1)
25private readonly ConcurrentDictionary<string, EditorConfigFile> _editorConfigFileCache = new ConcurrentDictionary<string, EditorConfigFile>(StringComparer.InvariantCultureIgnoreCase);
Definition\ProjectCollection.cs (1)
129private readonly ConcurrentDictionary<string, LockType> _loadProjectLocks = new(StringComparer.OrdinalIgnoreCase);
Evaluation\ConditionEvaluator.cs (4)
167private static readonly ConcurrentDictionary<int, ExpressionTreeForCurrentOptionsWithSize> s_cachedExpressionTrees = new ConcurrentDictionary<int, ExpressionTreeForCurrentOptionsWithSize>(); 243_ => new ExpressionTreeForCurrentOptionsWithSize(new ConcurrentDictionary<string, Stack<GenericExpressionNode>>(StringComparer.Ordinal))); 327new ConcurrentDictionary<string, Stack<GenericExpressionNode>>(StringComparer.Ordinal)), 334new ConcurrentDictionary<string, Stack<GenericExpressionNode>>(StringComparer.Ordinal));
Evaluation\Context\EvaluationContext.cs (1)
69FileEntryExpansionCache = fileEntryExpansionCache ?? new ConcurrentDictionary<string, IReadOnlyList<string>>();
Evaluation\ParserIgnoreConfiguration.cs (1)
54private readonly ConcurrentDictionary<string, int> _skippedItems = new(StringComparer.OrdinalIgnoreCase);
Evaluation\ProjectRootElementCache.cs (1)
156_fileLoadLocks = new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase);
Evaluation\SimpleProjectRootElementCache.cs (1)
32_cache = new ConcurrentDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
Graph\GraphBuilder.cs (3)
55private ConcurrentDictionary<ConfigurationMetadata, Lazy<ProjectInstance>> _platformNegotiationInstancesCache = new(); 63private readonly ConcurrentDictionary<ConfigurationMetadata, ConcurrentBag<string>> _projectReferrers = new(); 696new ConcurrentDictionary<(ProjectGraphNode, ProjectGraphNode), ProjectItemInstance>();
Graph\ParallelWorkSet.cs (1)
88_inProgressOrCompletedWork = new ConcurrentDictionary<TKey, WorkItem>(comparer);
Graph\ProjectGraph.cs (1)
532var nodeIds = new ConcurrentDictionary<ProjectGraphNode, string>();
Instance\TaskRegistry.cs (3)
130new(RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact); 138private readonly ConcurrentDictionary<string, ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord>> _cachedTaskRecordsWithFuzzyMatch = new(StringComparer.OrdinalIgnoreCase); 629_ => new(RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact));
Resources\Constants.cs (1)
313var availableStaticMethods = new ConcurrentDictionary<string, Tuple<string, Type>>(StringComparer.OrdinalIgnoreCase);
src\msbuild\src\Shared\TypeLoader.cs (5)
57private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 62private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 359cache.GetOrAdd(_desiredInterface, (_) => new ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>()); 450_typeNameToType = new(StringComparer.OrdinalIgnoreCase); 452_publicTypeNameToLoadedType = new(StringComparer.OrdinalIgnoreCase);
Utilities\EngineFileUtilities.cs (2)
593private static readonly Lazy<ConcurrentDictionary<string, bool>> _regexMatchCache = new Lazy<ConcurrentDictionary<string, bool>>(() => new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase)); 604private readonly Lazy<ConcurrentDictionary<string, bool>> existenceCache = new Lazy<ConcurrentDictionary<string, bool>>(() => new ConcurrentDictionary<string, bool>(), true);
Microsoft.Build.Framework (15)
FileClassifier.cs (1)
91private readonly ConcurrentDictionary<string, string> _knownImmutableDirectories = new();
FileSystem\CachingFileSystemWrapper.cs (4)
15private readonly ConcurrentDictionary<string, bool> _directoryExistenceCache = new(); 16private readonly ConcurrentDictionary<string, bool> _fileExistenceCache = new(); 17private readonly ConcurrentDictionary<string, bool> _fileOrDirectoryExistenceCache = new(); 18private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new();
FileUtilities.cs (1)
141private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
ImmutableFilesTimestampCache.cs (1)
17private readonly ConcurrentDictionary<string, DateTime> _cache = new(StringComparer.OrdinalIgnoreCase);
ItemSpecModifiers.cs (1)
98new(StringComparer.OrdinalIgnoreCase);
TaskClassRegistry.cs (1)
45private static readonly ConcurrentDictionary<string, TaskClassRegistration> s_tasksByName = new(StringComparer.OrdinalIgnoreCase);
TaskParameterTypeRegistry.cs (1)
49private static readonly ConcurrentDictionary<string, Type> s_typesByName = new(StringComparer.OrdinalIgnoreCase);
Utilities\FileMatcher.cs (3)
147private static readonly Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>> s_cachedGlobExpansions = new(() => new ConcurrentDictionary<string, IReadOnlyList<string>>(StringComparer.Ordinal)); 148private static readonly Lazy<ConcurrentDictionary<string, object>> s_cachedGlobExpansionsLock = new(() => new ConcurrentDictionary<string, object>(StringComparer.Ordinal)); 154private readonly Lazy<ConcurrentDictionary<string, object>> _cachedGlobExpansionsLock = new(() => new ConcurrentDictionary<string, object>(StringComparer.Ordinal));
Utilities\FrameworkLocationHelper.cs (2)
1377this._pathsToDotNetFramework = new ConcurrentDictionary<DotNetFrameworkArchitecture, string>(); 1378this._pathsToDotNetFrameworkSdkTools = new ConcurrentDictionary<Version, string>();
Microsoft.Build.NuGetSdkResolver (1)
GlobalJsonReader.cs (1)
36private static readonly ConcurrentDictionary<FileInfo, (DateTime LastWriteTime, Lazy<Dictionary<string, string>> Lazy)> FileCache = new ConcurrentDictionary<FileInfo, (DateTime, Lazy<Dictionary<string, string>>)>(FileSystemInfoFullNameEqualityComparer.Instance);
Microsoft.Build.Tasks.Core (13)
AssemblyDependency\ResolveAssemblyReference.cs (1)
2570? new ConcurrentDictionary<string, AssemblyMetadata>()
BootstrapperUtil\Util.cs (1)
33private static readonly ConcurrentDictionary<string, string> s_defaultPathByVersion = new ConcurrentDictionary<string, string>(StringComparer.Ordinal);
Copy.cs (1)
110private readonly ConcurrentDictionary<string, bool> _directoriesKnownToExist = new ConcurrentDictionary<string, bool>(DefaultCopyParallelism, DefaultCopyParallelism, FileUtilities.PathComparer);
GetSDKReferenceFiles.cs (3)
54private readonly ConcurrentDictionary<string, SDKInfo> _cacheFileForSDKs = new ConcurrentDictionary<string, SDKInfo>(StringComparer.OrdinalIgnoreCase); 995var references = new ConcurrentDictionary<string, SdkReferenceInfo>(StringComparer.OrdinalIgnoreCase); 996var directoryToFileList = new ConcurrentDictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
RedistList.cs (5)
52private readonly ConcurrentDictionary<AssemblyNameExtension, bool> _assemblyNameInRedist = new ConcurrentDictionary<AssemblyNameExtension, bool>(AssemblyNameComparer.GenericComparer); 57private readonly ConcurrentDictionary<string, AssemblyEntry> _assemblyNameToUnifiedAssemblyName = new ConcurrentDictionary<string, AssemblyEntry>(StringComparer.OrdinalIgnoreCase); 62private readonly ConcurrentDictionary<string, AssemblyNameExtension> _assemblyNameToAssemblyNameExtension = new ConcurrentDictionary<string, AssemblyNameExtension>(StringComparer.OrdinalIgnoreCase); 68private readonly ConcurrentDictionary<AssemblyNameExtension, AssemblyNameExtension> _remappingCache = new ConcurrentDictionary<AssemblyNameExtension, AssemblyNameExtension>(AssemblyNameComparer.GenericComparerConsiderRetargetable); 71private readonly ConcurrentDictionary<string, Dictionary<string, string>> _cachedDenyList = new ConcurrentDictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
88private static readonly ConcurrentDictionary<RoslynCodeTaskFactoryTaskInfo, TaskFactoryUtilities.CachedAssemblyEntry> CompiledAssemblyCache = new ConcurrentDictionary<RoslynCodeTaskFactoryTaskInfo, TaskFactoryUtilities.CachedAssemblyEntry>();
SystemState.cs (1)
73private static readonly ConcurrentDictionary<string, FileState> s_processWideFileStateCache = new ConcurrentDictionary<string, FileState>(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis (42)
CodeGen\ArrayMembers.cs (1)
101new ConcurrentDictionary<(byte, IReferenceOrISignature), ArrayMethod>();
CodeGen\CompilationTestData.cs (1)
35public readonly ConcurrentDictionary<IMethodSymbolInternal, MethodData> Methods = new ConcurrentDictionary<IMethodSymbolInternal, MethodData>();
CodeGen\ItemTokenMap.cs (1)
21private readonly ConcurrentDictionary<T, uint> _itemToToken = new ConcurrentDictionary<T, uint>(ReferenceEqualityComparer.Instance);
CodeGen\PrivateImplementationDetails.cs (8)
72new ConcurrentDictionary<(ImmutableArray<byte> Data, ushort Alignment), MappedField>(DataAndUShortEqualityComparer.Instance); 76new ConcurrentDictionary<(ImmutableArray<byte> Data, ushort ElementType), CachedArrayField>(DataAndUShortEqualityComparer.Instance); 80new ConcurrentDictionary<(ImmutableArray<ConstantValue> Constants, ushort ElementType), CachedArrayField>(ConstantValueAndUShortEqualityComparer.Instance); 86private readonly ConcurrentDictionary<int, InstrumentationPayloadRootField> _instrumentationPayloadRootFields = new ConcurrentDictionary<int, InstrumentationPayloadRootField>(); 91new ConcurrentDictionary<string, Cci.IMethodDefinition>(); 94private readonly ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference> _dataFieldTypes = new ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference>(); 97private readonly ConcurrentDictionary<string, DataSectionStringType> _dataSectionStringLiteralTypes = new ConcurrentDictionary<string, DataSectionStringType>(); 100private readonly ConcurrentDictionary<string, string> _dataSectionStringLiteralNames = new ConcurrentDictionary<string, string>();
CodeGen\StringTokenMap.cs (1)
20private readonly ConcurrentDictionary<string, uint> _valueToToken = new ConcurrentDictionary<string, uint>(StringComparer.Ordinal);
CodeGen\TokenMap.cs (1)
25private readonly ConcurrentDictionary<IReferenceOrISignature, uint> _itemIdentityToToken = new();
Collections\CachingDictionary.cs (1)
130return new ConcurrentDictionary<TKey, ImmutableArray<TElement>>(concurrencyLevel: 2, capacity: 0, comparer: _comparer);
CommandLine\AnalyzerConfigSet.cs (1)
48new ConcurrentDictionary<ReadOnlyMemory<char>, string>(CharMemoryEqualityComparer.Instance);
Diagnostic\CommonMessageProvider.cs (1)
21private static readonly ConcurrentDictionary<(string prefix, int code), string> s_errorIdCache = new ConcurrentDictionary<(string prefix, int code), string>();
DiagnosticAnalyzer\AnalyzerDriver.cs (5)
421_lazyGeneratedCodeFilesMap = new ConcurrentDictionary<SyntaxTree, bool>(); 423_lazyIsGeneratedCodeSymbolMap = new ConcurrentDictionary<ISymbol, bool>(); 424_lazyTreesWithHiddenRegionsMap = new ConcurrentDictionary<SyntaxTree, bool>(); 425_lazySuppressedAnalyzersForTreeMap = new ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>>(); 438_lazyPerSymbolAnalyzerActionsCache = new ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions>();
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
139var analyzerExecutionTimeMap = logExecutionTime ? new ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>() : null; 1705Interlocked.CompareExchange(ref _lazyControlFlowGraphMap, new ConcurrentDictionary<IOperation, ControlFlowGraph>(), null);
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (1)
68_semanticModelsMap = new ConcurrentDictionary<SyntaxTree, SemanticModel>();
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
32private static readonly ConcurrentDictionary<string, DirectoryCleanupState> s_directoryCleanupStates = new(AnalyzerAssemblyLoader.OriginalPathComparer); 77private ConcurrentDictionary<string, int> OriginalDirectoryMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 84private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer);
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (2)
49private readonly ConcurrentDictionary<string, FrozenDictionary<ISymbol, SuppressMessageInfo>> _lazyResolvedSuppressionsById = new ConcurrentDictionary<string, FrozenDictionary<ISymbol, SuppressMessageInfo>>(StringComparer.Ordinal); 131_localSuppressionsBySymbol = new ConcurrentDictionary<ISymbol, ImmutableDictionary<string, SuppressMessageInfo>>();
Emit\CommonPEModuleBuilder.cs (3)
72_methodBodyMap = new ConcurrentDictionary<IMethodSymbolInternal, Cci.IMethodBody>(ReferenceEqualityComparer.Instance); 950new ConcurrentDictionary<TNamedTypeSymbol, SynthesizedDefinitions>(ReferenceEqualityComparer.Instance); 1040Interlocked.CompareExchange(ref _lazySynthesizedNamespaceMembers, new ConcurrentDictionary<INamespaceSymbolInternal, ConcurrentQueue<INamespaceOrTypeSymbolInternal>>(), null);
Emit\DebugDocumentsBuilder.cs (1)
28_debugDocuments = new ConcurrentDictionary<string, Cci.DebugSourceDocument>(
Emit\NoPia\EmbeddedTypesManager.cs (5)
69public readonly ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType> EmbeddedTypesMap = new ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType>(ReferenceEqualityComparer.Instance); 70public readonly ConcurrentDictionary<TFieldSymbol, TEmbeddedField> EmbeddedFieldsMap = new ConcurrentDictionary<TFieldSymbol, TEmbeddedField>(ReferenceEqualityComparer.Instance); 71public readonly ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod> EmbeddedMethodsMap = new ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod>(ReferenceEqualityComparer.Instance); 72public readonly ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty> EmbeddedPropertiesMap = new ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty>(ReferenceEqualityComparer.Instance); 73public readonly ConcurrentDictionary<TEventSymbol, TEmbeddedEvent> EmbeddedEventsMap = new ConcurrentDictionary<TEventSymbol, TEmbeddedEvent>(ReferenceEqualityComparer.Instance);
InternalUtilities\ConcurrentSet.cs (2)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity); 51_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity, equalityComparer);
MetadataReader\PEModule.cs (1)
2687new ConcurrentDictionary<TypeDefinitionHandle, AttributeInfo>(),
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
Microsoft.CodeAnalysis.Analyzers (25)
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (1)
94var namedTypesToAccessedTypesMap = new ConcurrentDictionary<INamedTypeSymbol, ImmutableHashSet<INamedTypeSymbol>>();
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (2)
250var idToAnalyzerMap = new ConcurrentDictionary<string, ConcurrentDictionary<string, ConcurrentBag<Location>>>(); 1228var dict = new ConcurrentDictionary<string, ConcurrentBag<Location>>();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (2)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity); 51_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity, equalityComparer);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
58var shouldAnalyzeMap = new ConcurrentDictionary<SyntaxTree, bool>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
23_semanticModelMap = new ConcurrentDictionary<SyntaxTree, SemanticModel>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
25_computedOptionValuesMap = new ConcurrentDictionary<OptionKey, (bool found, object? value)>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
43= new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (2)
29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 56=> new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
32_fullNameToTypeMap = new ConcurrentDictionary<string, INamedTypeSymbol?>(StringComparer.Ordinal); 82new(StringComparer.Ordinal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (2)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>();
Microsoft.CodeAnalysis.AnalyzerUtilities (22)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (2)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity); 51_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity, equalityComparer);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
23_semanticModelMap = new ConcurrentDictionary<SyntaxTree, SemanticModel>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
25_computedOptionValuesMap = new ConcurrentDictionary<OptionKey, (bool found, object? value)>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
43= new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (2)
29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 56=> new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
32_fullNameToTypeMap = new ConcurrentDictionary<string, INamedTypeSymbol?>(StringComparer.Ordinal); 82new(StringComparer.Ordinal);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisHelper.cs (1)
92Interlocked.CompareExchange(ref _lazyDisposableFieldsMap, new ConcurrentDictionary<INamedTypeSymbol, ImmutableHashSet<IFieldSymbol>>(), null);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\WebInputSources.cs (1)
92var classCache = s_classIsControllerByCompilation.GetOrCreateValue(wellKnownTypeProvider.Compilation, (compilation) => new ConcurrentDictionary<INamedTypeSymbol, bool>());
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\SingleThreadedConcurrentDictionary.cs (1)
32private readonly ConcurrentDictionary<TKey, Entry> BackingDictionary = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
Microsoft.CodeAnalysis.CodeStyle (13)
src\roslyn\src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (3)
22private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new(); 23private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new(); 66var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>());
src\roslyn\src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
42var fieldStateMap = new ConcurrentDictionary<IFieldSymbol, (bool isCandidate, bool written)>();
src\roslyn\src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (2)
47var idToCachedResult = new ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>>( 107_ => new ConcurrentDictionary<string, string?>(concurrencyLevel: 2, capacity: 0);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (2)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity); 51_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity, equalityComparer);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (2)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>();
Microsoft.CodeAnalysis.CSharp (31)
Compilation\CSharpCompilation.cs (2)
1578Interlocked.CompareExchange(ref _externAliasTargets, new ConcurrentDictionary<string, NamespaceSymbol>(), null); 2561() => new ConcurrentDictionary<(ImmutableArray<byte> ContentHash, int Position), OneOrMany<(Location AttributeLocation, MethodSymbol Interceptor)>>(comparer: InterceptorKeyComparer.Instance));
Compiler\ClsComplianceChecker.cs (1)
52_declaredOrInheritedCompliance = new ConcurrentDictionary<Symbol, Compliance>(Symbols.SymbolEqualityComparer.ConsiderEverything);
Compiler\MethodCompiler.cs (1)
2152identifierMap = new ConcurrentDictionary<IdentifierNameSyntax, int>(ReferenceEqualityComparer.Instance);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
121private readonly ConcurrentDictionary<Symbol, Symbol?> _matches = new(ReferenceEqualityComparer.Instance); 129private readonly ConcurrentDictionary<ISymbolInternal, IReadOnlyDictionary<string, ImmutableArray<ISymbolInternal>>> _otherMembers = new(ReferenceEqualityComparer.Instance); 858_matches = new ConcurrentDictionary<Symbol, Symbol>(ReferenceEqualityComparer.Instance);
Emitter\Model\PEModuleBuilder.cs (4)
31protected readonly ConcurrentDictionary<Symbol, Cci.IModuleReference> AssemblyOrModuleSymbolToModuleRefMap = new ConcurrentDictionary<Symbol, Cci.IModuleReference>(); 32private readonly ConcurrentDictionary<Symbol, object> _genericInstanceMap = new ConcurrentDictionary<Symbol, object>(Symbols.SymbolEqualityComparer.ConsiderEverything); 34new ConcurrentDictionary<ImportChain, ImmutableArray<Cci.UsedNamespaceOrType>>(ReferenceEqualityComparer.Instance); 53private readonly ConcurrentDictionary<int, NamedTypeSymbol> _inlineArrayTypes = new ConcurrentDictionary<int, NamedTypeSymbol>();
Emitter\NoPia\EmbeddedTypesManager.cs (2)
38private readonly ConcurrentDictionary<AssemblySymbol, string> _assemblyGuidMap = new ConcurrentDictionary<AssemblySymbol, string>(ReferenceEqualityComparer.Instance); 39private readonly ConcurrentDictionary<Symbol, bool> _reportedSymbolsMap = new ConcurrentDictionary<Symbol, bool>(ReferenceEqualityComparer.Instance);
FlowAnalysis\NullableWalker.cs (1)
42Data = new ConcurrentDictionary<object, NullableWalker.Data>();
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (5)
90private readonly ConcurrentDictionary<Location, bool> _sourceLocationsSeen = new ConcurrentDictionary<Location, bool>(); 124? new ConcurrentDictionary<string, AnonymousTypeTemplateSymbol>() 125: new ConcurrentDictionary<string, AnonymousTypeTemplateSymbol>(previousCache), 144? new ConcurrentDictionary<SynthesizedDelegateKey, AnonymousDelegateTemplateSymbol>() 145: new ConcurrentDictionary<SynthesizedDelegateKey, AnonymousDelegateTemplateSymbol>(previousCache),
Symbols\Metadata\PE\PEModuleSymbol.cs (2)
68new ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol>(concurrencyLevel: 2, capacity: DefaultTypeMapCapacity); 77new ConcurrentDictionary<TypeReferenceHandle, TypeSymbol>(concurrencyLevel: 2, capacity: DefaultTypeMapCapacity);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
494Interlocked.CompareExchange(ref uncommon.LazyImplementationMap, new ConcurrentDictionary<MethodSymbol, MethodSymbol?>(ReferenceEqualityComparer.Instance), null);
Symbols\MetadataOrSourceOrRetargetingAssemblySymbol.cs (1)
150Interlocked.CompareExchange(ref _assembliesToWhichInternalAccessHasBeenAnalyzed, new ConcurrentDictionary<AssemblySymbol, IVTConclusion>(), null);
Symbols\NonMissingAssemblySymbol.cs (1)
33new ConcurrentDictionary<MetadataTypeName.Key, NamedTypeSymbol>();
Symbols\Retargeting\RetargetingAssemblySymbol.cs (1)
81LazyInitializer.EnsureInitialized(ref _noPiaUnificationMap, () => new ConcurrentDictionary<NamedTypeSymbol, NamedTypeSymbol>(concurrencyLevel: 2, capacity: 0));
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
32new ConcurrentDictionary<Symbol, Symbol>(concurrencyLevel: 2, capacity: 4);
Symbols\Source\SourceAssemblySymbol.cs (4)
97private readonly ConcurrentDictionary<FieldSymbol, bool> _unassignedFieldsMap = new ConcurrentDictionary<FieldSymbol, bool>(); 2166Interlocked.CompareExchange(ref _optimisticallyGrantedInternalsAccess, new ConcurrentDictionary<AssemblySymbol, bool>(), null); 2309new ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, String>>>(StringComparer.OrdinalIgnoreCase), null); 2336keys = new ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, String>>();
Symbols\TypeSymbol.cs (1)
75map = new ConcurrentDictionary<Symbol, SymbolAndDiagnostics>(concurrencyLevel: 1, capacity: 1, comparer: SymbolEqualityComparer.ConsiderEverything);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
35private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
31private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
79var namedTypeToAnalyzer = new ConcurrentDictionary<INamedTypeSymbol, Analyzer>();
Microsoft.CodeAnalysis.CSharp.Features (3)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
35private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
31private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
79var namedTypeToAnalyzer = new ConcurrentDictionary<INamedTypeSymbol, Analyzer>();
Microsoft.CodeAnalysis.Extensions.Package (1)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
Microsoft.CodeAnalysis.Features (16)
AddImport\AbstractAddImportFeatureService.cs (2)
147var projectToAssembly = new ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>>(concurrencyLevel: 2, capacity: project.Solution.ProjectIds.Count); 148var referenceToCompilation = new ConcurrentDictionary<PortableExecutableReference, Compilation>(concurrencyLevel: 2, capacity: project.Solution.Projects.Sum(p => p.MetadataReferences.Count));
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (2)
254var documentIdToChangedDocuments = new ConcurrentDictionary<DocumentId, ConcurrentBag<(CodeAction, Document)>>(); 283var documentIdToFinalText = new ConcurrentDictionary<DocumentId, SourceText>();
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.cs (1)
32private static readonly ConcurrentDictionary<ProjectId, ExtensionMemberImportCompletionCacheEntry> s_projectItemsCache = new();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (1)
54_higherPriorityDocumentsNotProcessed = new ConcurrentDictionary<DocumentId, object?>(concurrencyLevel: 2, capacity: 20);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
49private readonly ConcurrentDictionary<string, (MetadataAsSourceGeneratedFileInfo Metadata, DocumentId DocumentId)> _generatedFilenameToInformation = new(StringComparer.OrdinalIgnoreCase);
Organizing\AbstractOrganizingService.cs (1)
33var map = new ConcurrentDictionary<Type, IEnumerable<ISyntaxOrganizer>>();
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
67private readonly ConcurrentDictionary<string, SourceDocumentInfo> _fileToDocumentInfoMap = new(StringComparer.OrdinalIgnoreCase);
Shared\Extensions\ISymbolExtensions_Sorting.cs (1)
36var symbolToParameterTypeNames = new ConcurrentDictionary<TSymbol, string[]>();
src\roslyn\src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (3)
22private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new(); 23private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new(); 66var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>());
src\roslyn\src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
42var fieldStateMap = new ConcurrentDictionary<IFieldSymbol, (bool isCandidate, bool written)>();
src\roslyn\src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (2)
47var idToCachedResult = new ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>>( 107_ => new ConcurrentDictionary<string, string?>(concurrencyLevel: 2, capacity: 0);
Microsoft.CodeAnalysis.NetAnalyzers (61)
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUninstantiatedInternalClasses.cs (2)
50ConcurrentDictionary<INamedTypeSymbol, object?> instantiatedTypes = new ConcurrentDictionary<INamedTypeSymbol, object?>(); 51var internalTypes = new ConcurrentDictionary<INamedTypeSymbol, object?>();
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUnusedPrivateFields.cs (2)
47ConcurrentDictionary<IFieldSymbol, UnusedValue> maybeUnreferencedPrivateFields = new ConcurrentDictionary<IFieldSymbol, UnusedValue>(); 48ConcurrentDictionary<IFieldSymbol, UnusedValue> referencedPrivateFields = new ConcurrentDictionary<IFieldSymbol, UnusedValue>();
Microsoft.NetCore.Analyzers\InteropServices\DisableRuntimeMarshallingAnalyzer.AutoLayoutTypeCache.cs (1)
19private readonly ConcurrentDictionary<ITypeSymbol, bool> _cache = new();
Microsoft.NetCore.Analyzers\InteropServices\PlatformCompatibilityAnalyzer.cs (1)
191var platformSpecificMembers = new ConcurrentDictionary<ISymbol, PlatformAttributes>();
Microsoft.NetCore.Analyzers\Performance\PreferReadOnlySpanOverSpan.cs (2)
74ConcurrentDictionary<IParameterSymbol, int> parameterReferenceCounts = new(SymbolEqualityComparer.Default); 79candidateParameters ??= new ConcurrentDictionary<IParameterSymbol, INamedTypeSymbol>(SymbolEqualityComparer.Default);
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.Collector.cs (10)
22public ConcurrentDictionary<IFieldSymbol, PooledConcurrentSet<IMethodSymbol>> VirtualDispatchFields { get; } = new(SymbolEqualityComparer.Default); 23public ConcurrentDictionary<IPropertySymbol, PooledConcurrentSet<IMethodSymbol>> VirtualDispatchProperties { get; } = new(SymbolEqualityComparer.Default); 24public ConcurrentDictionary<ILocalSymbol, PooledConcurrentSet<IMethodSymbol>> VirtualDispatchLocals { get; } = new(SymbolEqualityComparer.Default); 25public ConcurrentDictionary<IParameterSymbol, PooledConcurrentSet<IMethodSymbol>> VirtualDispatchParameters { get; } = new(SymbolEqualityComparer.Default); 27public ConcurrentDictionary<IFieldSymbol, PooledConcurrentSet<ITypeSymbol>> FieldAssignments { get; } = new(SymbolEqualityComparer.Default); 28public ConcurrentDictionary<IPropertySymbol, PooledConcurrentSet<ITypeSymbol>> PropertyAssignments { get; } = new(SymbolEqualityComparer.Default); 29public ConcurrentDictionary<ILocalSymbol, PooledConcurrentSet<ITypeSymbol>> LocalAssignments { get; } = new(SymbolEqualityComparer.Default); 30public ConcurrentDictionary<IParameterSymbol, PooledConcurrentSet<ITypeSymbol>> ParameterAssignments { get; } = new(SymbolEqualityComparer.Default); 32public ConcurrentDictionary<IMethodSymbol, PooledConcurrentSet<ITypeSymbol>> MethodReturns { get; } = new(SymbolEqualityComparer.Default); 34public ConcurrentDictionary<IMethodSymbol, bool> MethodsAssignedToDelegate { get; } = new(SymbolEqualityComparer.Default);
Microsoft.NetCore.Analyzers\Runtime\DetectPreviewFeatureAnalyzer.cs (1)
244ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols = new();
Microsoft.NetCore.Analyzers\Runtime\DisposeObjectsBeforeLosingScope.cs (1)
87var reportedLocations = new ConcurrentDictionary<Location, bool>();
Microsoft.NetCore.Analyzers\Runtime\ProvideCorrectArgumentsToFormattingMethods.cs (1)
348_map = new ConcurrentDictionary<IMethodSymbol, Info?>();
Microsoft.NetCore.Analyzers\Runtime\UseAsyncMethodInAsyncContext.cs (1)
62ConcurrentDictionary<string, INamedTypeSymbol> syncBlockingTypes = new();
Microsoft.NetCore.Analyzers\Security\DataSetDataTableInSerializableTypeAnalyzer.cs (1)
128new ConcurrentDictionary<INamedTypeSymbol, bool>();
Microsoft.NetCore.Analyzers\Security\DoNotCallDangerousMethodsInDeserialization.cs (3)
124var callGraph = new ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>>(); 137calledMethods = callGraph.GetOrAdd(owningSymbol, new ConcurrentDictionary<ISymbol, bool>()); 187callGraph.TryAdd(calledSymbol, new ConcurrentDictionary<ISymbol, bool>());
Microsoft.NetCore.Analyzers\Security\DoNotSerializeTypeWithPointerFields.cs (2)
56ConcurrentDictionary<ITypeSymbol, bool> visitedType = new ConcurrentDictionary<ITypeSymbol, bool>(); 57ConcurrentDictionary<IFieldSymbol, bool> pointerFields = new ConcurrentDictionary<IFieldSymbol, bool>();
Microsoft.NetCore.Analyzers\Security\Helpers\InsecureDeserializationTypeDecider.cs (2)
120new(); 167new();
Microsoft.NetCore.Analyzers\Security\PotentialReferenceCycleInDeserializedObjectGraph.cs (6)
63ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>> forwardGraph = new ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>>(); 64ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>> invertedGraph = new ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>>(); 67ConcurrentDictionary<ISymbol, int> inDegree = new ConcurrentDictionary<ISymbol, int>(); 70ConcurrentDictionary<ISymbol, int> outDegree = new ConcurrentDictionary<ISymbol, int>(); 185graph.AddOrUpdate(from, new ConcurrentDictionary<ISymbol, bool> { [to] = true }, (k, v) => 201return graph.TryAdd(point, new ConcurrentDictionary<ISymbol, bool>());
Microsoft.NetCore.Analyzers\Security\UseAutoValidateAntiforgeryToken.cs (6)
105var inverseGraph = new ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>>(); 113ConcurrentDictionary<IMethodSymbol, bool> onAuthorizationMethodSymbols = new ConcurrentDictionary<IMethodSymbol, bool>(); 114var actionMethodSymbols = new ConcurrentDictionary<(IMethodSymbol, string), bool>(); 115var actionMethodNeedAddingHttpVerbAttributeSymbols = new ConcurrentDictionary<IMethodSymbol, bool>(); 132inverseGraph.GetOrAdd(owningSymbol, (_) => new ConcurrentDictionary<ISymbol, bool>()); 164callers = inverseGraph.GetOrAdd(calledSymbol, (_) => new ConcurrentDictionary<ISymbol, bool>());
Microsoft.NetFramework.Analyzers\DoNotUseInsecureDtdProcessingInApiDesign.cs (2)
84private readonly ConcurrentDictionary<INamedTypeSymbol, bool> _xmlDocumentDerivedTypes = new(); 85private readonly ConcurrentDictionary<INamedTypeSymbol, bool> _xmlTextReaderDerivedTypes = new();
Microsoft.NetFramework.Analyzers\DoNotUseInsecureXSLTScriptExecution.cs (1)
105private readonly ConcurrentDictionary<ISymbol, XsltSettingsEnvironment> _xsltSettingsEnvironments = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
24_semanticModelMap = new ConcurrentDictionary<SyntaxTree, SemanticModel>();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
24_computedOptionValuesMap = new ConcurrentDictionary<OptionKey, (bool found, object? value)>();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\OptionKey.cs (1)
12private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
57private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 59private readonly ConcurrentDictionary<ISymbol, string?> _symbolToDeclarationId = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
50private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
82= new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledHashSet.cs (1)
63private static readonly ConcurrentDictionary<IEqualityComparer<T>, ObjectPool<PooledHashSet<T>>> s_poolInstancesByComparer = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
45private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\SymbolDisplayStringCache.cs (2)
28private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 55=> new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\WellKnownTypeProvider.cs (2)
30_fullNameToTypeMap = new ConcurrentDictionary<string, INamedTypeSymbol?>(StringComparer.Ordinal); 82new(StringComparer.Ordinal);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisHelper.cs (1)
91Interlocked.CompareExchange(ref _lazyDisposableFieldsMap, new ConcurrentDictionary<INamedTypeSymbol, ImmutableHashSet<IFieldSymbol>>(), null);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\WebInputSources.cs (1)
90var classCache = s_classIsControllerByCompilation.GetOrCreateValue(wellKnownTypeProvider.Compilation, (compilation) => new ConcurrentDictionary<INamedTypeSymbol, bool>());
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\SingleThreadedConcurrentDictionary.cs (1)
31private readonly ConcurrentDictionary<TKey, Entry> BackingDictionary = new();
Microsoft.CodeAnalysis.ResxSourceGenerator (19)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (2)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity); 51_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity, equalityComparer);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
23_semanticModelMap = new ConcurrentDictionary<SyntaxTree, SemanticModel>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
25_computedOptionValuesMap = new ConcurrentDictionary<OptionKey, (bool found, object? value)>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
43= new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (2)
29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 56=> new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
32_fullNameToTypeMap = new ConcurrentDictionary<string, INamedTypeSymbol?>(StringComparer.Ordinal); 82new(StringComparer.Ordinal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
Microsoft.CodeAnalysis.VisualBasic (24)
Binding\BinderFactory.vb (1)
43Me._cache = New ConcurrentDictionary(Of ValueTuple(Of VisualBasicSyntaxNode, Byte), Binder)
BoundTree\BoundAddressOfOperator.vb (1)
14Private ReadOnly _delegateResolutionResultCache As New ConcurrentDictionary(Of TypeSymbol, Binder.DelegateResolutionResult)()
BoundTree\UnboundLambda.vb (2)
220Public ReadOnly InferredReturnType As New ConcurrentDictionary(Of TargetSignature, KeyValuePair(Of TypeSymbol, ReadOnlyBindingDiagnostic(Of AssemblySymbol)))() 221Public ReadOnly BoundLambdas As New ConcurrentDictionary(Of TargetSignature, BoundLambda)()
Compilation\ClsComplianceChecker.vb (1)
48Me._declaredOrInheritedCompliance = New ConcurrentDictionary(Of Symbol, Compliance)()
Compilation\SyntaxTreeSemanticModel.vb (1)
34Private ReadOnly _semanticModelCache As New ConcurrentDictionary(Of Binder, MemberSemanticModel)()
Emit\SymbolTranslator.vb (2)
17Protected ReadOnly m_AssemblyOrModuleSymbolToModuleRefMap As New ConcurrentDictionary(Of Symbol, Microsoft.Cci.IModuleReference)() 18Private ReadOnly _genericInstanceMap As New ConcurrentDictionary(Of Symbol, Object)()
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (3)
27Private ReadOnly _sourceLocationsSeen As New ConcurrentDictionary(Of Location, Boolean) 55New ConcurrentDictionary(Of String, AnonymousTypeTemplateSymbol), 73New ConcurrentDictionary(Of String, AnonymousDelegateTemplateSymbol),
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (1)
45_symbols = New ConcurrentDictionary(Of Symbol, Boolean)(ReferenceEqualityComparer.Instance)
Symbols\Metadata\PE\PEModuleSymbol.vb (2)
60Friend ReadOnly TypeHandleToTypeMap As New ConcurrentDictionary(Of TypeDefinitionHandle, TypeSymbol)(concurrencyLevel:=2, capacity:=s_defaultTypeMapCapacity) 68Friend ReadOnly TypeRefHandleToTypeMap As New ConcurrentDictionary(Of TypeReferenceHandle, TypeSymbol)(concurrencyLevel:=2, capacity:=s_defaultTypeMapCapacity)
Symbols\MetadataOrSourceOrRetargetingAssemblySymbol.vb (1)
117Interlocked.CompareExchange(_assembliesToWhichInternalAccessHasBeenAnalyzed, New ConcurrentDictionary(Of AssemblySymbol, IVTConclusion), Nothing)
Symbols\NonMissingAssemblySymbol.vb (1)
33Private ReadOnly _emittedNameToTypeMap As New ConcurrentDictionary(Of MetadataTypeName.Key, NamedTypeSymbol)()
Symbols\Retargeting\RetargetingAssemblySymbol.vb (1)
71Friend ReadOnly m_NoPiaUnificationMap As New ConcurrentDictionary(Of NamedTypeSymbol, NamedTypeSymbol)()
Symbols\Retargeting\RetargetingModuleSymbol.vb (1)
209Dim symbolMap = New ConcurrentDictionary(Of NamedTypeSymbol, NamedTypeSymbol)()
Symbols\Retargeting\RetargetingSymbolTranslator.vb (1)
24Private ReadOnly _symbolMap As New ConcurrentDictionary(Of Symbol, Symbol)()
Symbols\Source\SourceAssemblySymbol.vb (2)
1002keys = New ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)) 1649Interlocked.CompareExchange(_optimisticallyGrantedInternalsAccess, New ConcurrentDictionary(Of AssemblySymbol, Boolean), Nothing)
Symbols\Source\SourceModuleSymbol.vb (1)
68Private ReadOnly _sourceFileMap As New ConcurrentDictionary(Of SyntaxTree, SourceFile)
Symbols\Source\SourceNamedTypeSymbol.vb (1)
2692New ConcurrentDictionary(Of PropertySymbol, SynthesizedOverridingWithEventsProperty),
Symbols\TypeSymbol.vb (1)
700map = New ConcurrentDictionary(Of Symbol, Symbol)(concurrencyLevel:=1, capacity:=1)
Microsoft.CodeAnalysis.Workspaces (21)
CaseCorrection\AbstractCaseCorrectionService.cs (1)
49var replacements = new ConcurrentDictionary<SyntaxToken, SyntaxToken>();
Diagnostics\HostDiagnosticAnalyzers.cs (1)
61_hostDiagnosticAnalyzersPerLanguageMap = new ConcurrentDictionary<string, ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>>(concurrencyLevel: 2, capacity: 2);
FindSymbols\FindReferences\FindReferenceCache.cs (1)
85_identifierCache = new(comparer: semanticModel.Language switch
Log\AbstractLogAggregator.cs (1)
27private readonly ConcurrentDictionary<object, TValue> _map = new(concurrencyLevel: 2, capacity: 2);
Remote\RemoteServiceCallbackDispatcher.cs (1)
30private readonly ConcurrentDictionary<RemoteServiceCallbackId, object> _callbackInstances = new(concurrencyLevel: 2, capacity: 10);
Serialization\SerializerService.cs (1)
48private readonly ConcurrentDictionary<string, IOptionsSerializationService> _lazyLanguageSerializationService = new(concurrencyLevel: 2, capacity: workspaceServices.SupportedLanguages.Count());
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
76_singletonListeners = new ConcurrentDictionary<string, AsynchronousOperationListener>(concurrencyLevel: 2, capacity: 20);
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
32private static readonly ConcurrentDictionary<string, DirectoryCleanupState> s_directoryCleanupStates = new(AnalyzerAssemblyLoader.OriginalPathComparer); 77private ConcurrentDictionary<string, int> OriginalDirectoryMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 84private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (2)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity); 51_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity, equalityComparer);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (2)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>();
Storage\StorageDatabaseLogger.cs (1)
23private readonly ConcurrentDictionary<Type, Exception> _set = new(concurrencyLevel: 2, capacity: 10);
Workspace\Solution\SolutionState.cs (1)
73private readonly ConcurrentDictionary<string, ImmutableArray<DocumentId>> _lazyFilePathToRelatedDocumentIds = new(FilePathComparer);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
MSBuild\Logging\MSBuildDiagnosticLogger.cs (1)
21private readonly ConcurrentDictionary<int, DiagnosticLog> _logsBySubmissionId = new();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (2)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity); 51_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity, equalityComparer);
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\BinderEquivalence.cs (1)
33new ConcurrentDictionary<ICSharpBinder, ICSharpBinder>(concurrencyLevel: 2, capacity: 32, new BinderEqualityComparer());
Microsoft.Diagnostics.DataContractReader.Legacy (1)
MetaDataImportImpl.cs (1)
33private readonly ConcurrentDictionary<nint, byte> _cdacEnumHandles = new();
Microsoft.Diagnostics.NETCore.Client (1)
ReversedServer\ReversedDiagnosticsServer.cs (1)
28private readonly ConcurrentDictionary<Guid, HandleableCollection<Stream>> _streamCollections = new();
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
22static ConcurrentDictionary<string, PackageIndex> s_indexCache = new ConcurrentDictionary<string, PackageIndex>();
Microsoft.DotNet.HotReload.WebAssembly.Browser (2)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (2)
31private readonly ConcurrentDictionary<Guid, List<RuntimeManagedCodeUpdate>> _moduleUpdates = new(); 32private readonly ConcurrentDictionary<Assembly, Assembly> _appliedAssemblies = new();
Microsoft.DotNet.ProjectTools (1)
BuildService.cs (1)
78private readonly ConcurrentDictionary<string, Microsoft.Build.Construction.ProjectRootElement> _projectRootElements = new(StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.SdkResolver (2)
NETCoreSdkResolver.cs (2)
19= new(); 22= new();
Microsoft.Extensions.AI (1)
ChatRouting\OrderedFailoverChatClient.cs (1)
36private readonly ConcurrentDictionary<RoutingContext, int> _requestStates = new();
Microsoft.Extensions.AI.Evaluation.Reporting (1)
ResponseCachingChatClient.cs (1)
30_stopWatches = new ConcurrentDictionary<string, Stopwatch>();
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyService.cs (1)
29new ConcurrentDictionary<UrlCacheKey, string>();
Microsoft.Extensions.AI.Tests (1)
TestInMemoryCacheStorage.cs (1)
14private readonly ConcurrentDictionary<string, byte[]> _storage = new();
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.Serialization.cs (1)
17private readonly ConcurrentDictionary<Type, object> _serializers = new();
Internal\DefaultHybridCache.Stampede.cs (1)
14private readonly ConcurrentDictionary<StampedeKey, StampedeState> _currentOperations = new();
Microsoft.Extensions.DependencyInjection (6)
ServiceLookup\CallSiteFactory.cs (2)
18private readonly ConcurrentDictionary<ServiceCacheKey, ServiceCallSite> _callSiteCache = new ConcurrentDictionary<ServiceCacheKey, ServiceCallSite>(); 20private readonly ConcurrentDictionary<ServiceIdentifier, object> _callSiteLocks = new ConcurrentDictionary<ServiceIdentifier, object>();
ServiceLookup\CallSiteValidator.cs (1)
13private readonly ConcurrentDictionary<ServiceCacheKey, Type?> _scopedServices = new ConcurrentDictionary<ServiceCacheKey, Type?>();
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (1)
52_scopeResolverCache = new ConcurrentDictionary<ServiceCacheKey, Func<ServiceProviderEngineScope, object>>();
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (1)
62_scopeResolverCache = new ConcurrentDictionary<ServiceCacheKey, GeneratedMethod>();
ServiceProvider.cs (1)
58_serviceAccessors = new ConcurrentDictionary<ServiceIdentifier, ServiceAccessor>();
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ActivatorUtilities.cs (1)
28private static readonly ConcurrentDictionary<Type, ConstructorInfoEx[]> s_constructorInfos = new();
Microsoft.Extensions.Diagnostics.HealthChecks.Common (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Factory.g.cs (2)
11_healthCheckReportCounterInstruments = new(); 15_unhealthyHealthCheckCounterInstruments = new();
ManualHealthCheckTracker.cs (1)
15private readonly ConcurrentDictionary<IManualHealthCheck, bool> _checks = new();
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\Disk\WindowsDiskIoRatePerfCounter.cs (1)
40internal IDictionary<string, long> TotalCountDict { get; } = new ConcurrentDictionary<string, long>();
Windows\Disk\WindowsDiskIoTimePerfCounter.cs (1)
38internal IDictionary<string, double> TotalSeconds { get; } = new ConcurrentDictionary<string, double>();
Microsoft.Extensions.Diagnostics.Testing (2)
Logging\FakeLogger.cs (1)
33private readonly ConcurrentDictionary<LogLevel, bool> _disabledLevels = new(); // used as a set, the value is ignored
Logging\FakeLoggerProvider.cs (1)
21private readonly ConcurrentDictionary<string, FakeLogger> _loggers = new();
Microsoft.Extensions.DotNetDeltaApplier (2)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (2)
31private readonly ConcurrentDictionary<Guid, List<RuntimeManagedCodeUpdate>> _moduleUpdates = new(); 32private readonly ConcurrentDictionary<Assembly, Assembly> _appliedAssemblies = new();
Microsoft.Extensions.FileProviders.Physical (3)
PhysicalFilesWatcher.cs (3)
31private readonly ConcurrentDictionary<string, ChangeTokenInfo> _filePathTokenLookup = new(StringComparer.OrdinalIgnoreCase); 32private readonly ConcurrentDictionary<string, ChangeTokenInfo> _wildcardTokenLookup = new(StringComparer.OrdinalIgnoreCase); 149PollingChangeTokens = new ConcurrentDictionary<IPollingChangeToken, IPollingChangeToken>();
Microsoft.Extensions.Http (1)
DefaultHttpClientFactory.cs (1)
79_activeHandlers = new ConcurrentDictionary<string, Lazy<ActiveHandlerTrackingEntry>>(StringComparer.Ordinal);
Microsoft.Extensions.Http.Diagnostics (3)
Latency\Internal\HttpRequestLatencyListener.cs (1)
20private readonly ConcurrentDictionary<string, EventSource?> _eventSources = new()
Logging\Internal\LoggerMessageStateExtensions.cs (2)
14private static readonly ConcurrentDictionary<string, string> _requestPrefixedNamesCache = new(); 15private static readonly ConcurrentDictionary<string, string> _responsePrefixedNamesCache = new();
Microsoft.Extensions.Http.Resilience (1)
Resilience\Internal\ByAuthorityPipelineKeyProvider.cs (1)
12private readonly ConcurrentDictionary<(string scheme, string host, int port), string> _cache = new();
Microsoft.Extensions.Localization (3)
ResourceManagerStringLocalizer.cs (1)
23private readonly ConcurrentDictionary<string, object?> _missingManifestCache = new ConcurrentDictionary<string, object?>();
ResourceManagerStringLocalizerFactory.cs (1)
27new ConcurrentDictionary<string, ResourceManagerStringLocalizer>();
ResourceNamesCache.cs (1)
15private readonly ConcurrentDictionary<string, IList<string>?> _cache = new ConcurrentDictionary<string, IList<string>?>();
Microsoft.Extensions.Logging (1)
LoggerFactory.cs (1)
23private readonly ConcurrentDictionary<string, Logger> _loggers = new ConcurrentDictionary<string, Logger>(StringComparer.Ordinal);
Microsoft.Extensions.Logging.Abstractions (1)
FormattedLogValues.cs (1)
23private static readonly ConcurrentDictionary<string, LogValuesFormatter> s_formatters = new ConcurrentDictionary<string, LogValuesFormatter>();
Microsoft.Extensions.Logging.Console (2)
ConsoleLoggerProvider.cs (2)
44_loggers = new ConcurrentDictionary<string, ConsoleLogger>(); 100var cd = new ConcurrentDictionary<string, ConsoleFormatter>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Logging.TraceSource (1)
TraceSourceLoggerProvider.cs (1)
20private readonly ConcurrentDictionary<string, DiagnosticsTraceSource> _sources = new ConcurrentDictionary<string, DiagnosticsTraceSource>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.ML (1)
PredictionEnginePool.cs (1)
44_namedPools = new ConcurrentDictionary<string, PoolLoader<TData, TPrediction>>();
Microsoft.Extensions.Options (1)
OptionsCache.cs (1)
18private readonly ConcurrentDictionary<string, Lazy<TOptions>> _cache = new ConcurrentDictionary<string, Lazy<TOptions>>(concurrencyLevel: 1, capacity: 31, StringComparer.Ordinal); // 31 == default capacity
Microsoft.Extensions.ServiceDiscovery (2)
Http\HttpServiceEndpointResolver.cs (1)
21private readonly ConcurrentDictionary<string, ResolverEntry> _resolvers = new();
ServiceEndpointResolver.cs (1)
20private readonly ConcurrentDictionary<string, ResolverEntry> _resolvers = new();
Microsoft.Extensions.Telemetry (4)
Http\HttpRouteParser.cs (1)
24private readonly ConcurrentDictionary<string, ParsedRouteSegments> _routeTemplateSegmentsCache = new();
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Memoization\MemoizedFunction.cs (2)
69_values = new(Concurrency, Capacity); 142_values = new(Concurrency, Capacity);
Sampling\LogSamplingRuleSelector.cs (1)
17private readonly ConcurrentDictionary<(string, LogLevel, EventId), T?> _ruleCache = new();
Microsoft.Extensions.Validation.ValidationsGenerator (3)
Analyzers\ValidationsDiagnosticAnalyzer.cs (3)
178var topLevelValidatableTypes = new ConcurrentDictionary<ITypeSymbol, byte>(SymbolEqualityComparer.Default); 179var endpointParameters = new ConcurrentDictionary<IParameterSymbol, byte>(SymbolEqualityComparer.Default); 181var validatableTypeAttributeLocations = new ConcurrentDictionary<Location, byte>();
Microsoft.Gen.Metrics.Generated.Tests (95)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Factory.g.cs (95)
9_noNamespaceCounterInstrumentInstruments = new(); 13_noNamespaceHistogramInstrumentInstruments = new(); 43_nestedClassCounterInstruments = new(); 47_nestedClassHistogramInstruments = new(); 71_multiLevelNestedClassCounterInstruments = new(); 75_multiLevelNestedClassHistogramInstruments = new(); 106_nestedRecordClassCounterInstruments = new(); 110_nestedRecordClassHistogramInstruments = new(); 141_nestedRecordStructCounterInstruments = new(); 145_nestedRecordStructHistogramInstruments = new(); 176_nestedStructCounterInstruments = new(); 180_nestedStructHistogramInstruments = new(); 211_publicCounterInstruments = new(); 215_publicHistogramInstruments = new(); 246_genericIntCounter0DInstruments = new(); 250_genericIntCounterExt0DInstruments = new(); 254_counter0DInstruments = new(); 258_myNamedCounterInstruments = new(); 262_counterExt0DInstruments = new(); 266_genericIntCounter1DInstruments = new(); 270_genericIntCounterExt1DInstruments = new(); 274_genericFloatCounter1DInstruments = new(); 278_genericFloatCounterExt1DInstruments = new(); 282_counter2DInstruments = new(); 286_counterExt2DInstruments = new(); 290_counter3DInstruments = new(); 294_counterExt3DInstruments = new(); 298_counter4DInstruments = new(); 302_counterExt4DInstruments = new(); 306_counterS0D2Instruments = new(); 310_counterExtS0D2Instruments = new(); 314_counterS1D1Instruments = new(); 318_counterExtS1D1Instruments = new(); 322_counterS3D2Instruments = new(); 326_counterExtS3D2Instruments = new(); 330_counterS5D5Instruments = new(); 334_counterExtS5D5Instruments = new(); 338_testCounterInstruments = new(); 342_testCounterExtInstruments = new(); 346_counterWithVariableParamsInstruments = new(); 350_counterExtWithVariableParamsInstruments = new(); 354_counterXInstruments = new(); 358_counterExtXInstruments = new(); 362_counterYInstruments = new(); 366_counterExtYInstruments = new(); 370_strongTypeDecimalCounterInstruments = new(); 374_strongTypeDecimalCounterExtInstruments = new(); 378_structTypeCounterInstruments = new(); 382_structTypeCounterExtInstruments = new(); 386_recordClassTypeCounterInstruments = new(); 750_fileScopedNamespaceCounterInstruments = new(); 754_fileScopedNamespaceGenericDoubleCounterInstruments = new(); 778_histogram0DInstruments = new(); 782_genericIntHistogram0DInstruments = new(); 786_histogramExt0DInstruments = new(); 790_genericIntHistogramExt0DInstruments = new(); 794_histogram1DInstruments = new(); 798_histogramExt1DInstruments = new(); 802_histogram2DInstruments = new(); 806_genericIntHistogram2DInstruments = new(); 810_genericIntHistogramExt2DInstruments = new(); 814_histogramExt2DInstruments = new(); 818_histogram3DInstruments = new(); 822_histogramExt3DInstruments = new(); 826_histogram4DInstruments = new(); 830_histogramExt4DInstruments = new(); 834_histogramS0D2Instruments = new(); 838_histogramExtS0D2Instruments = new(); 842_histogramS1D1Instruments = new(); 846_histogramExtS1D1Instruments = new(); 850_histogramS3D2Instruments = new(); 854_histogramExtS3D2Instruments = new(); 858_histogramS5D5Instruments = new(); 862_histogramExtS5D5Instruments = new(); 866_testHistogramInstruments = new(); 870_testHistogramExtInstruments = new(); 874_histogramWithVariableParamsInstruments = new(); 878_histogramExtWithVariableParamsInstruments = new(); 882_strongTypeHistogramInstruments = new(); 886_strongTypeHistogramExtInstruments = new(); 890_structTypeHistogramInstruments = new(); 894_structTypeHistogramExtInstruments = new(); 1198_counterFromRecordClassInstruments = new(); 1212_counterFromRecordStructInstruments = new(); 1226_counterFromStructInstruments = new(); 1240_counterWithUnitInstruments = new(); 1244_counterWithUnitAndDimsInstruments = new(); 1248_counterStrongTypeWithUnitInstruments = new(); 1252_genericDoubleCounterWithUnitInstruments = new(); 1256_histogramWithUnitInstruments = new(); 1260_histogramStrongTypeWithUnitInstruments = new(); 1264_histogramWithUnitAndDimsInstruments = new(); 1268_genericIntHistogramWithUnitInstruments = new(); 1359_overlappingNamesCounterInstruments = new(); 1363_overlappingNamesHistogramInstruments = new();
Microsoft.Interop.ComInterfaceGenerator (1)
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (1)
85var interfaceInfoCache = new ConcurrentDictionary<INamedTypeSymbol, DiagnosticOr<(ComInterfaceInfo, INamedTypeSymbol)>>(SymbolEqualityComparer.Default);
Microsoft.JSInterop (8)
Infrastructure\DotNetDispatcher.cs (3)
29private static readonly ConcurrentDictionary<AssemblyKey, IReadOnlyDictionary<string, (MethodInfo, Type[])>> _cachedMethodsByAssembly = new(); 31private static readonly ConcurrentDictionary<Type, IReadOnlyDictionary<string, (MethodInfo, Type[])>> _cachedMethodsByType = new(); 33private static readonly ConcurrentDictionary<Type, Func<object, Task>> _cachedConvertToTaskByType = new();
Infrastructure\TaskGenericsUtil.cs (2)
12= new ConcurrentDictionary<Type, ITaskResultGetter>(); 15= new ConcurrentDictionary<Type, ITcsResultSetter>();
JSRuntime.cs (3)
23private readonly ConcurrentDictionary<long, IPendingAsyncCall> _pendingTasks = new(); 24private readonly ConcurrentDictionary<long, IDotNetObjectReference> _trackedRefsById = new(); 25private readonly ConcurrentDictionary<long, CancellationTokenRegistration> _cancellationRegistrations = new();
Microsoft.Maui (8)
Handlers\HybridWebView\HybridWebViewTaskManager.cs (1)
12 private readonly ConcurrentDictionary<string, TaskCompletionSource<string?>> _asyncTaskCallbacks = new();
Hosting\ImageSources\ImageSourceServiceProvider.cs (2)
15 readonly ConcurrentDictionary<Type, Type> _imageSourceCache = new ConcurrentDictionary<Type, Type>(); 16 readonly ConcurrentDictionary<Type, Type> _serviceCache = new ConcurrentDictionary<Type, Type>();
Hosting\ImageSources\ImageSourceToImageSourceServiceTypeMapping.cs (1)
10 private static readonly ConcurrentDictionary<IImageSourceServiceCollection, ImageSourceToImageSourceServiceTypeMapping> s_instances = new();
Hosting\Internal\MauiFactory.cs (1)
22 _singletons = new ConcurrentDictionary<ServiceDescriptor, object?>();
Hosting\Internal\MauiHandlersFactory.cs (1)
12 readonly ConcurrentDictionary<Type, Type> _serviceCache = new ConcurrentDictionary<Type, Type>();
Hosting\Internal\RegisteredHandlerServiceTypeSet.cs (1)
10 private static readonly ConcurrentDictionary<IMauiHandlersCollection, RegisteredHandlerServiceTypeSet> s_instances = new();
MauiContext.cs (1)
55 readonly ConcurrentDictionary<Type, (object, Func<object, object?>)> _scopeStatic = new();
Microsoft.Maui.Controls (2)
AnimationExtensions.cs (1)
62 s_tweeners = new ConcurrentDictionary<int, Animation>();
Xaml\TypeConversionExtensions.cs (1)
43 static readonly ConcurrentDictionary<MemberInfo, TypeConverter> s_converterCache = new();
Microsoft.ML.Core (3)
Data\ProgressReporter.cs (1)
59_subChannels = new ConcurrentDictionary<int, SubChannel>();
Data\Repository.cs (1)
113PathMap = new ConcurrentDictionary<string, string>();
Environment\HostEnvironmentBase.cs (1)
377ListenerDict = new ConcurrentDictionary<Type, Dispatcher>();
Microsoft.ML.Core.Tests (2)
UnitTests\TestHosts.cs (2)
31var children = new ConcurrentDictionary<IHost, List<IHost>>(); 94var children = new ConcurrentDictionary<IHost, List<IHost>>();
Microsoft.ML.Data (1)
DataLoadSave\Text\TextLoaderParser.cs (1)
46= new ConcurrentDictionary<DoubleParser.OptionFlags, ValueCreatorCache>();
Microsoft.ML.Ensemble (1)
Selector\SubModelSelector\BaseDiverseSelector.cs (1)
29_predictions = new ConcurrentDictionary<FeatureSubsetModel<TOutput>, TOutput[]>();
Microsoft.ML.FastTree (1)
Utils\BufferPoolManager.cs (1)
30private static readonly ConcurrentDictionary<Type, SortedList<int, List<Array>>> _bufferPools = new ConcurrentDictionary<Type, SortedList<int, List<Array>>>();
Microsoft.ML.IntegrationTests (1)
Debugging.cs (1)
201Lines = new ConcurrentDictionary<string, int>();
Microsoft.ML.InternalCodeAnalyzer (2)
BaseTestClassAnalyzer.cs (1)
55private readonly ConcurrentDictionary<INamedTypeSymbol, bool> _knownTestAttributes = new ConcurrentDictionary<INamedTypeSymbol, bool>(SymbolEqualityComparer.Default);
RelaxTestNamingSuppressor.cs (1)
31var knownTestAttributes = new ConcurrentDictionary<INamedTypeSymbol, bool>(SymbolEqualityComparer.Default);
Microsoft.ML.Tokenizers (1)
Model\TiktokenTokenizer.cs (1)
1291private static readonly ConcurrentDictionary<string, (Dictionary<ReadOnlyMemory<byte>, int> encoder, Dictionary<StringSpanOrdinalKey, (int Id, string Token)> vocab, Dictionary<int, ReadOnlyMemory<byte>> decoder)> _tiktokenCache = new(StringComparer.OrdinalIgnoreCase);
Microsoft.NET.Build.Containers (2)
AuthHandshakeMessageHandler.cs (1)
44private static ConcurrentDictionary<string, AuthenticationHeaderValue?> _authenticationHeaders = new();
LocalDaemons\ContainerRuntimeOperations.cs (1)
20private readonly ConcurrentDictionary<string, string> _commandPaths = new(StringComparer.Ordinal);
Microsoft.NET.Build.Extensions.Tasks (2)
src\sdk\src\Tasks\Common\FileUtilities.cs (1)
13= new(StringComparer.OrdinalIgnoreCase);
src\sdk\src\Tasks\Common\FileUtilities.MetadataReader.cs (1)
23private static readonly ConcurrentDictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_versionCache = new(StringComparer.OrdinalIgnoreCase /* Not strictly correct on *nix. Fix? */);
Microsoft.NET.Build.Tasks (3)
RuntimeGraphCache.cs (1)
14private static readonly ConcurrentDictionary<string, object> s_keyLocks = new();
src\sdk\src\Tasks\Common\FileUtilities.cs (1)
13= new(StringComparer.OrdinalIgnoreCase);
src\sdk\src\Tasks\Common\FileUtilities.MetadataReader.cs (1)
23private static readonly ConcurrentDictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_versionCache = new(StringComparer.OrdinalIgnoreCase /* Not strictly correct on *nix. Fix? */);
Microsoft.NET.StringTools (2)
WeakStringCache.Concurrent.cs (2)
23_stringsByHashCode = new ConcurrentDictionary<int, string>(Environment.ProcessorCount, _initialCapacity); 24_weakHandlesByHashCode = new ConcurrentDictionary<int, StringWeakHandle>(Environment.ProcessorCount, _initialCapacity);
Microsoft.TemplateEngine.Cli (1)
HostSpecificDataLoader.cs (1)
26new();
Microsoft.TemplateEngine.Core (6)
Expressions\Cpp2\Cpp2StyleEvaluatorDefinition.cs (1)
14private static readonly ConcurrentDictionary<Encoding, ITokenTrie> TokenCache = new();
Expressions\MSBuild\MSBuildStyleEvaluatorDefinition.cs (1)
14private static readonly ConcurrentDictionary<Encoding, ITokenTrie> TokenCache = new();
Expressions\VisualBasic\VisualBasicStyleEvaluatorDefintion.cs (1)
14private static readonly ConcurrentDictionary<Encoding, ITokenTrie> TokenCache = new();
Util\ProcessorState.cs (3)
13private static readonly ConcurrentDictionary<IReadOnlyList<IOperationProvider>, ConcurrentDictionary<Encoding, Trie<OperationTerminal>>> TrieLookup = new(); 14private static readonly ConcurrentDictionary<IReadOnlyList<IOperationProvider>, List<string>> OperationsToExplicitlySetOnByDefault = new(); 74ConcurrentDictionary<Encoding, Trie<OperationTerminal>> byEncoding = TrieLookup.GetOrAdd(operationProviders, x => new());
Microsoft.TemplateEngine.Edge (2)
Installers\NuGet\NugetApiPackageManager.cs (1)
18private static readonly ConcurrentDictionary<PackageSource, SourceRepository> SourcesCache = new();
ReflectionLoadProbingPath.cs (1)
15private static readonly ConcurrentDictionary<string, Assembly?> LoadedAssemblies = new ConcurrentDictionary<string, Assembly?>(StringComparer.OrdinalIgnoreCase);
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
Macros\GeneratePortNumberConfig.cs (1)
108private static ConcurrentDictionary<int, int> UnavailablePorts { get; } = new(UnsafePorts.ToDictionary(p => p));
Microsoft.TestPlatform.CoreUtilities (2)
FeatureFlag\FeatureFlag.cs (1)
32private readonly ConcurrentDictionary<string, bool> _cache = new();
Helpers\MicrosoftTestingPlatformDetector.cs (1)
31private static readonly ConcurrentDictionary<string, bool> Cache = new(StringComparer.OrdinalIgnoreCase);
Microsoft.TestPlatform.CrossPlatEngine (6)
AttachmentsProcessing\DataCollectorAttachmentsProcessorsFactory.cs (1)
25private static readonly ConcurrentDictionary<string, DataCollectorExtensionManager> DataCollectorExtensionManagerCache = new();
Client\Parallel\DiscoveryDataAggregator.cs (3)
25private readonly ConcurrentDictionary<string, object> _metricsAggregator = new(); 26private readonly ConcurrentDictionary<string, DiscoveryStatus> _sourcesWithDiscoveryStatus = new(); 56return new ConcurrentDictionary<string, object>();
Client\Parallel\ParallelRunDataAggregator.cs (2)
44_metricsAggregator = new ConcurrentDictionary<string, object>(); 108return new ConcurrentDictionary<string, object>();
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
BlameCollector.cs (1)
141_testObjectDictionary = new ConcurrentDictionary<Guid, BlameTestObject>();
Microsoft.VisualStudio.TestPlatform.Common (5)
DataCollection\DataCollectionAttachmentManager.cs (3)
82_attachmentTasks = new ConcurrentDictionary<DataCollectionContext, ConcurrentBag<Task>>(); 83AttachmentSets = new ConcurrentDictionary<DataCollectionContext, ConcurrentDictionary<Uri, AttachmentSet>>(); 173AttachmentSets.GetOrAdd(fileTransferInfo.Context, _ => new ConcurrentDictionary<Uri, AttachmentSet>());
Telemetry\MetricsCollection.cs (1)
24_metricDictionary = new ConcurrentDictionary<string, object>();
Utilities\MetadataReaderHelper.cs (1)
44private static readonly ConcurrentDictionary<string, Type[]> AssemblyCache = new();
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (2)
HtmlLogger.cs (2)
131Results = new ConcurrentDictionary<Guid, ObjectModel.TestResult>(); 132ResultCollectionDictionary = new ConcurrentDictionary<string, TestResultCollection>();
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (5)
TrxLogger.cs (5)
122_results = new ConcurrentDictionary<Guid, ITestResult>(); 123_innerResults = new ConcurrentDictionary<Guid, ITestResult>(); 124_testElements = new ConcurrentDictionary<Guid, ITestElement>(); 125_entries = new ConcurrentDictionary<Guid, TestEntry>(); 126_innerTestEntries = new ConcurrentDictionary<Guid, TestEntry>();
Microsoft.VisualStudio.TestPlatform.ObjectModel (3)
Nuget.Frameworks\CompatibilityProvider.cs (1)
22_cache = new ConcurrentDictionary<CompatibilityCacheKey, bool>();
TestObject.cs (1)
29private readonly ConcurrentDictionary<TestProperty, object?> _store = new();
TestProperty\TestProperty.cs (1)
20private static readonly ConcurrentDictionary<string, Type> TypeCache = new();
MSBuild (8)
OutOfProcTaskHostNode.cs (2)
206private readonly ConcurrentDictionary<int, TaskCompletionSource<INodePacket>> _pendingCallbackRequests = new(); 213= new ConcurrentDictionary<int, TaskExecutionContext>();
src\msbuild\src\Shared\TypeLoader.cs (5)
57private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 62private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 359cache.GetOrAdd(_desiredInterface, (_) => new ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>()); 450_typeNameToType = new(StringComparer.OrdinalIgnoreCase); 452_publicTypeNameToLoadedType = new(StringComparer.OrdinalIgnoreCase);
TaskExecutionContext.cs (1)
94public ConcurrentDictionary<int, TaskCompletionSource<INodePacket>> PendingCallbackRequests { get; } = new();
NuGet.Build.Tasks.Console (3)
MSBuildStaticGraphRestore.cs (2)
986var projectPathLookup = new ConcurrentDictionary<string, string>(uniqueNameComparer); 1286var projects = new ConcurrentDictionary<string, TProject>(PathUtility.GetStringComparerBasedOnOS());
RestoreProjectAdapter.cs (1)
22_targetFrameworks = new(StringComparer.OrdinalIgnoreCase);
NuGet.Commands (19)
RestoreCommand\DependencyGraphResolver.DependencyGraphItemIndexer.cs (2)
60private readonly ConcurrentDictionary<string, LibraryDependencyIndex> _libraryDependencyTable = new ConcurrentDictionary<string, LibraryDependencyIndex>(StringComparer.OrdinalIgnoreCase); 65private readonly ConcurrentDictionary<LibraryRange, LibraryRangeIndex> _libraryRangeTable = new(LibraryRangeComparer.Instance);
RestoreCommand\LockFileBuilderCache.cs (3)
28= new(); 32new(); 35new();
RestoreCommand\Logging\WarningPropertiesCollection.cs (1)
24private readonly ConcurrentDictionary<string, string> _getTargetGraphAliasCache = new ConcurrentDictionary<string, string>();
RestoreCommand\RequestFactory\RestoreArgs.cs (2)
75= new ConcurrentDictionary<string, ISettings>(StringComparer.Ordinal); 79= new ConcurrentDictionary<string, List<SourceRepository>>(StringComparer.Ordinal);
RestoreCommand\RestoreCommand.cs (1)
35private static readonly ConcurrentDictionary<NuGetFramework, string> _frameworkShortNameCache = new(NuGetFrameworkFullComparer.Instance);
RestoreCommand\RestoreCommandProvidersCache.cs (4)
21= new ConcurrentDictionary<SourceRepository, IRemoteDependencyProvider>(); 24= new ConcurrentDictionary<string, IRemoteDependencyProvider>(PathUtility.GetStringComparerBasedOnOS()); 27= new ConcurrentDictionary<string, NuGetv3LocalRepository>(PathUtility.GetStringComparerBasedOnOS()); 30= new ConcurrentDictionary<SourceRepository, IVulnerabilityInformationProvider>();
src\nuget-client\build\Shared\TaskResultCache.cs (6)
36_cache = new(comparer); 37_perTaskLock = new(comparer); 46_cache = new(concurrencyLevel: Environment.ProcessorCount, capacity); 47_perTaskLock = new(concurrencyLevel: Environment.ProcessorCount, capacity); 55_cache = new(); 56_perTaskLock = new();
NuGet.Common (1)
PathUtil\NuGetEnvironment.cs (1)
31private static readonly ConcurrentDictionary<NuGetFolderPath, string> Cache = new ConcurrentDictionary<NuGetFolderPath, string>();
NuGet.Configuration (2)
Proxy\ProxyCache.cs (1)
23private readonly ConcurrentDictionary<Uri, ICredentials> _cachedCredentials = new ConcurrentDictionary<Uri, ICredentials>();
Settings\SettingsLoadingContext.cs (1)
17private readonly ConcurrentDictionary<string, Lazy<SettingsFile>> _cache = new ConcurrentDictionary<string, Lazy<SettingsFile>>(PathUtility.GetStringComparerBasedOnOS());
NuGet.Credentials (2)
CredentialService.cs (2)
23= new ConcurrentDictionary<string, bool>(); 25= new ConcurrentDictionary<string, CredentialResponse>();
NuGet.DependencyResolver.Core (6)
src\nuget-client\build\Shared\TaskResultCache.cs (6)
36_cache = new(comparer); 37_perTaskLock = new(comparer); 46_cache = new(concurrencyLevel: Environment.ProcessorCount, capacity); 47_perTaskLock = new(concurrencyLevel: Environment.ProcessorCount, capacity); 55_cache = new(); 56_perTaskLock = new();
NuGet.Frameworks (1)
CompatibilityProvider.cs (1)
22_cache = new ConcurrentDictionary<CompatibilityCacheKey, bool>();
NuGet.LibraryModel (3)
LibraryDependencyTargetUtils.cs (1)
139private static readonly ConcurrentDictionary<LibraryDependencyTarget, string> LibraryDependencyTargetCache = new();
LibraryIncludeFlagUtils.cs (1)
123private static readonly ConcurrentDictionary<LibraryIncludeFlags, string> LibraryIncludeFlagsCache = new();
LibraryType.cs (1)
11private static ConcurrentDictionary<string, LibraryType> _knownLibraryTypes = new ConcurrentDictionary<string, LibraryType>(StringComparer.OrdinalIgnoreCase);
NuGet.PackageManagement (3)
Resolution\GatherCache.cs (2)
25= new ConcurrentDictionary<GatherSingleCacheKey, SourcePackageDependencyInfo>(); 29= new ConcurrentDictionary<GatherAllCacheKey, List<SourcePackageDependencyInfo>>();
Resolution\ResolverGather.cs (1)
35private readonly ConcurrentDictionary<string, TimeSpan> _timeTaken = new ConcurrentDictionary<string, TimeSpan>(StringComparer.OrdinalIgnoreCase);
NuGet.Packaging (5)
ContentModel\ContentItemCollection.cs (1)
36_assemblyRelatedExtensions = new();
RuntimeModel\RuntimeGraph.cs (3)
71_areCompatible = new(); 72_expandCache = new(StringComparer.Ordinal); 73_dependencyCache = new();
Signing\RepositorySignatureInfoProvider.cs (1)
15private ConcurrentDictionary<string, RepositorySignatureInfo> _dict = new ConcurrentDictionary<string, RepositorySignatureInfo>();
NuGet.ProjectModel (1)
LockFile\BuildAction.cs (1)
13private static ConcurrentDictionary<string, BuildAction> _knownBuildActions = new ConcurrentDictionary<string, BuildAction>(StringComparer.OrdinalIgnoreCase);
NuGet.Protocol (39)
CachingSourceProvider.cs (1)
25= new ConcurrentDictionary<string, SourceRepository>(StringComparer.Ordinal);
HttpSource\HttpSourceResourceProvider.cs (1)
26= new ConcurrentDictionary<PackageSource, HttpSourceResource>();
HttpSource\TokenStore.cs (1)
11private readonly ConcurrentDictionary<Uri, string> _tokenCache = new ConcurrentDictionary<Uri, string>();
LegacyFeed\LegacyFeedCapabilityResourceV2Feed.cs (1)
23= new ConcurrentDictionary<string, Task<Capabilities>>();
LegacyFeed\ODataServiceDocumentResourceV2Provider.cs (1)
30_cache = new ConcurrentDictionary<string, ODataServiceDocumentCacheInfo>(StringComparer.OrdinalIgnoreCase);
LocalRepositories\FindLocalPackagesResourceUnzippedProvider.cs (1)
17new ConcurrentDictionary<PackageSource, FindLocalPackagesResourceUnzipped>();
LocalRepositories\LocalV2FindPackageByIdResource.cs (1)
31= new ConcurrentDictionary<string, IReadOnlyList<LocalPackageInfo>>(StringComparer.OrdinalIgnoreCase);
LocalRepositories\LocalV3FindPackageByIdResource.cs (1)
31= new ConcurrentDictionary<string, List<NuGetVersion>>(StringComparer.OrdinalIgnoreCase);
PackagesFolder\LocalPackageFileCache.cs (6)
25= new ConcurrentDictionary<string, Lazy<NuspecReader>>(PathUtility.GetStringComparerBasedOnOS()); 29= new ConcurrentDictionary<string, Lazy<IReadOnlyList<string>>>(PathUtility.GetStringComparerBasedOnOS()); 33= new ConcurrentDictionary<string, Lazy<string>>(PathUtility.GetStringComparerBasedOnOS()); 37= new ConcurrentDictionary<string, bool>(PathUtility.GetStringComparerBasedOnOS()); 41= new ConcurrentDictionary<string, Lazy<RuntimeGraph?>>(PathUtility.GetStringComparerBasedOnOS()); 45= new ConcurrentDictionary<string, bool>(PathUtility.GetStringComparerBasedOnOS());
PackagesFolder\NuGetv3LocalRepository.cs (3)
24= new ConcurrentDictionary<string, LocalPackageInfo>(PathUtility.GetStringComparerBasedOnOS()); 28= new ConcurrentDictionary<string, List<LocalPackageInfo>>(StringComparer.OrdinalIgnoreCase); 32= new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase);
Plugins\MessageDispatcher.cs (2)
87_inboundRequestContexts = new ConcurrentDictionary<string, InboundRequestContext>(); 88_outboundRequestContexts = new ConcurrentDictionary<string, OutboundRequestContext>();
Plugins\PluginFactory.cs (1)
63_plugins = new ConcurrentDictionary<string, Lazy<Task<IPlugin>>>();
Plugins\PluginManager.cs (2)
349_pluginOperationClaims = new ConcurrentDictionary<PluginRequestKey, Lazy<Task<IReadOnlyList<OperationClaim>>>>(); 350_pluginUtilities = new ConcurrentDictionary<string, Lazy<IPluginMulticlientUtilities>>(
Plugins\PluginMulticlientUtilities.cs (1)
23_actions = new ConcurrentDictionary<string, Lazy<Task>>();
Plugins\PluginPackageReader.cs (1)
71_fileStreams = new ConcurrentDictionary<string, Lazy<Task<FileStreamCreator?>>>(StringComparer.OrdinalIgnoreCase);
Plugins\RequestHandlers.cs (1)
22_handlers = new ConcurrentDictionary<MessageMethod, IRequestHandler>();
Plugins\RequestHandlers\GetCredentialsRequestHandler.cs (1)
58_repositories = new ConcurrentDictionary<string, SourceRepository>();
Plugins\RequestHandlers\GetServiceIndexRequestHandler.cs (1)
42_repositories = new ConcurrentDictionary<string, SourceRepository>();
Plugins\RequestHandlers\MonitorNuGetProcessExitRequestHandler.cs (1)
39_processes = new ConcurrentDictionary<int, Process>();
Providers\FeedTypeResourceProvider.cs (1)
19= new ConcurrentDictionary<PackageSource, FeedTypeResource>();
Providers\ServiceIndexResourceV3Provider.cs (1)
46_cache = new ConcurrentDictionary<string, ServiceIndexCacheInfo>(StringComparer.OrdinalIgnoreCase);
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (1)
42new ConcurrentDictionary<string, AsyncLazy<HashSet<NuGetVersion>?>>(StringComparer.OrdinalIgnoreCase);
RemoteRepositories\PluginFindPackageByIdResource.cs (1)
29new ConcurrentDictionary<string, AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>>(StringComparer.OrdinalIgnoreCase);
src\nuget-client\build\Shared\TaskResultCache.cs (6)
36_cache = new(comparer); 37_perTaskLock = new(comparer); 46_cache = new(concurrencyLevel: Environment.ProcessorCount, capacity); 47_perTaskLock = new(concurrencyLevel: Environment.ProcessorCount, capacity); 55_cache = new(); 56_perTaskLock = new();
Utility\FindPackagesByIdNupkgDownloader.cs (1)
25new ConcurrentDictionary<string, NuspecReader>();
PresentationCore (1)
MS\Internal\AppModel\DefaultCredentialsZonePolicy.cs (1)
148new(StringComparer.OrdinalIgnoreCase);
PresentationFramework (3)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (1)
19private static readonly ConcurrentDictionary<string, Func<IInspectable, object>> TypedObjectFactoryCache = new ConcurrentDictionary<string, Func<IInspectable, object>>();
System\Windows\Markup\Baml2006\WpfXamlType.cs (2)
56_members = new ConcurrentDictionary<string, XamlMember>(ConcurrencyLevel, Capacity); 68_attachableMembers = new ConcurrentDictionary<string, XamlMember>(ConcurrencyLevel, Capacity);
Roslyn.Diagnostics.Analyzers (27)
AbstractDoNotCopyValue.cs (1)
1666= new();
AbstractRunIterations`1.cs (1)
41var knownTestAttributes = new ConcurrentDictionary<INamedTypeSymbol, bool>();
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (1)
50var knownNonDefaultableTypes = new ConcurrentDictionary<ITypeSymbol, bool>();
RelaxTestNamingSuppressor.cs (1)
39var knownTestAttributes = new ConcurrentDictionary<INamedTypeSymbol, bool>();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (2)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity); 51_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity, equalityComparer);
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
23_semanticModelMap = new ConcurrentDictionary<SyntaxTree, SemanticModel>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
25_computedOptionValuesMap = new ConcurrentDictionary<OptionKey, (bool found, object? value)>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (2)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
43= new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (2)
29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 56=> new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
32_fullNameToTypeMap = new ConcurrentDictionary<string, INamedTypeSymbol?>(StringComparer.Ordinal); 82new(StringComparer.Ordinal);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (1)
32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (2)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>();
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (2)
75private readonly ConcurrentDictionary<INamedTypeSymbol, UnusedValue> _sourceSymbolsToCheck = new(); 76private readonly ConcurrentDictionary<INamedTypeSymbol, UnusedValue> _typesWithSymbolDeclaredEventInvoked = new();
Shared (2)
Memoization\MemoizedFunction.cs (2)
69_values = new(Concurrency, Capacity); 142_values = new(Concurrency, Capacity);
System.ComponentModel.Annotations (4)
System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (3)
96private static readonly ConcurrentDictionary<Type, Type?> s_metadataTypeCache = new ConcurrentDictionary<Type, Type?>(); 99private static readonly ConcurrentDictionary<(Type, string), Attribute[]> s_typeMemberCache = new ConcurrentDictionary<(Type, string), Attribute[]>(); 102private static readonly ConcurrentDictionary<(Type, Type), bool> s_validatedMetadataTypeCache = new ConcurrentDictionary<(Type, Type), bool>();
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
23private readonly ConcurrentDictionary<Type, TypeStoreItem> _typeStoreItems = new();
System.ComponentModel.TypeConverter (2)
System\ComponentModel\CollectibleKeyConcurrentHashtable.cs (1)
22private readonly ConcurrentDictionary<TKey, TValue> _defaultTable = new ConcurrentDictionary<TKey, TValue>();
System\ComponentModel\PropertyDescriptor.cs (1)
175_valueChangedHandlers ??= new ConcurrentDictionary<object, EventHandler?>(concurrencyLevel: 1, capacity: 0);
System.Data.Common (3)
System\Data\Common\DataStorage.cs (1)
128private static readonly ConcurrentDictionary<Type, Tuple<bool, bool, bool, bool>> s_typeImplementsInterface = new ConcurrentDictionary<Type, Tuple<bool, bool, bool, bool>>();
System\Data\Common\DbProviderFactories.cs (1)
36private static readonly ConcurrentDictionary<string, ProviderRegistration> _registeredFactories = new ConcurrentDictionary<string, ProviderRegistration>();
System\Data\Common\SqlUDTStorage.cs (1)
23private static readonly ConcurrentDictionary<Type, object> s_typeToNull = new ConcurrentDictionary<Type, object>();
System.Data.Odbc (3)
src\runtime\src\libraries\Common\src\System\Data\ProviderBase\DbConnectionPoolGroup.cs (3)
58_poolCollection = new ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>(); 111_poolCollection = new ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>(); 237var newPoolCollection = new ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>();
System.Data.OleDb (3)
System\Data\ProviderBase\DbConnectionPoolGroup.cs (3)
58_poolCollection = new ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>(); 135_poolCollection = new ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>(); 271var newPoolCollection = new ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>();
System.Diagnostics.DiagnosticSource (3)
System\Diagnostics\DsesFilterAndTransform.cs (1)
460new ConcurrentDictionary<Type, TransformSpec?>(1, 8), null);
System\Diagnostics\Metrics\AggregationManager.cs (1)
28private readonly ConcurrentDictionary<Instrument, InstrumentState> _instrumentStates = new();
System\Diagnostics\Metrics\AggregatorStore.cs (1)
514GetOrAdd(names, _ => new ConcurrentDictionary<TObjectSequence, TAggregator>());
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
134private readonly ConcurrentDictionary<int, Watch> _wdToWatch = new ConcurrentDictionary<int, Watch>();
System.Net.Http (4)
System\Net\Http\Metrics\MetricsHandler.cs (1)
66private readonly ConcurrentDictionary<ActiveRequestsTagKey, long> _counts = new();
System\Net\Http\SocketsHttpHandler\FailedProxyCache.cs (1)
31private readonly ConcurrentDictionary<Uri, long> _failedProxies = new ConcurrentDictionary<Uri, long>();
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (1)
63_pools = new ConcurrentDictionary<HttpConnectionKey, HttpConnectionPool>();
System\Net\Http\SocketsHttpHandler\Metrics\SocketsHttpHandlerMetrics.cs (1)
71private readonly ConcurrentDictionary<OpenConnectionsTagKey, long> _counts = new();
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpHandler.cs (1)
100private readonly ConcurrentDictionary<CachedCertificateKey, CachedCertificateValue> _cachedCertificates = new();
System.Net.Quic (1)
src\runtime\src\libraries\Common\src\System\Net\SafeHandleCache.cs (1)
38private readonly ConcurrentDictionary<TKey, THandle> _cache = new();
System.Net.Requests (1)
System\Net\ServicePoint\ServicePointManager.cs (1)
18private static readonly ConcurrentDictionary<string, WeakReference<ServicePoint>> s_servicePointTable = new ConcurrentDictionary<string, WeakReference<ServicePoint>>();
System.Net.Security (2)
src\runtime\src\libraries\Common\src\System\Net\SafeHandleCache.cs (1)
38private readonly ConcurrentDictionary<TKey, THandle> _cache = new();
System\Net\Security\SslSessionsCache.cs (1)
18new ConcurrentDictionary<SslCredKey, SafeCredentialReference>();
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
37Interlocked.CompareExchange(ref s_nameToCodePage, new(StringComparer.OrdinalIgnoreCase), null);
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Cache.cs (1)
1396private readonly ConcurrentDictionary<int, int> _transitionCache = new ConcurrentDictionary<int, int>();
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\ContextAware.cs (1)
54private readonly ConcurrentDictionary<TKey, TValue> _fastDictionary = new();
System\Runtime\Serialization\DataContract.cs (1)
319private static readonly ConcurrentDictionary<nint, int> s_typeToIDCache = new();
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
155private static readonly ConcurrentDictionary<nint, int> s_typeToIDCache = new();
System.Private.Windows.Core.TestUtilities (1)
NoAssertContext.cs (1)
31private static readonly ConcurrentDictionary<int, int> s_suppressedThreads = new();
System.Reflection.MetadataLoadContext (8)
System\CoreRtBridge.cs (1)
52private readonly ConcurrentDictionary<K, V> _dict = new ConcurrentDictionary<K, V>();
System\Reflection\MetadataLoadContext.Loading.cs (1)
18private readonly ConcurrentDictionary<RoAssemblyName, RoAssembly> _loadedAssemblies = new ConcurrentDictionary<RoAssemblyName, RoAssembly>();
System\Reflection\MetadataLoadContext.Resolving.cs (1)
23private readonly ConcurrentDictionary<RoAssemblyName, RoAssembly> _binds = new ConcurrentDictionary<RoAssemblyName, RoAssembly>();
System\Reflection\TypeLoading\Modules\RoModule.Unifier.cs (5)
21private readonly ConcurrentDictionary<RoType, RoArrayType> _szArrayDict = new ConcurrentDictionary<RoType, RoArrayType>(); 35private readonly ConcurrentDictionary<RoArrayType.Key, RoArrayType> _mdArrayDict = new ConcurrentDictionary<RoArrayType.Key, RoArrayType>(); 48private readonly ConcurrentDictionary<RoType, RoByRefType> _byRefDict = new ConcurrentDictionary<RoType, RoByRefType>(); 59private readonly ConcurrentDictionary<RoType, RoPointerType> _pointerDict = new ConcurrentDictionary<RoType, RoPointerType>(); 70private readonly ConcurrentDictionary<RoConstructedGenericType.Key, RoConstructedGenericType> _constructedGenericTypeDict = new ConcurrentDictionary<RoConstructedGenericType.Key, RoConstructedGenericType>();
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\SerializationEvents.cs (1)
14private static readonly ConcurrentDictionary<Type, SerializationEvents> s_cache = new();
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\DefaultCaching.cs (1)
15private readonly ConcurrentDictionary<RuntimeTypeHandle, IIUnknownCacheStrategy.TableInfo> _cache = new(concurrencyLevel: 1, capacity: 16);
System.Runtime.Serialization.Formatters (2)
System\Runtime\Serialization\FormatterServices.cs (1)
18private static readonly ConcurrentDictionary<MemberHolder, MemberInfo[]> s_memberInfoTable = new ConcurrentDictionary<MemberHolder, MemberInfo[]>();
System\Runtime\Serialization\SerializationEventsCache.cs (1)
98private static readonly ConcurrentDictionary<Type, SerializationEvents> s_cache = new ConcurrentDictionary<Type, SerializationEvents>();
System.Security.Cryptography (7)
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\BCryptAlgorithmCache.cs (2)
14private static readonly ConcurrentDictionary<(string HashAlgorithmId, BCryptOpenAlgorithmProviderFlags Flags), (SafeBCryptAlgorithmHandle Handle, int HashSizeInBytes)> s_handles = new(); 15private static readonly ConcurrentDictionary<(string HashAlgorithmId, BCryptOpenAlgorithmProviderFlags Flags), bool> s_supported = new();
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.SignVerify.cs (1)
18new ConcurrentDictionary<HashAlgorithmName, int>(
System\Security\Cryptography\CryptoConfig.cs (2)
42private static readonly ConcurrentDictionary<string, Type> appNameHT = new ConcurrentDictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 43private static readonly ConcurrentDictionary<string, string> appOidHT = new ConcurrentDictionary<string, string>(StringComparer.OrdinalIgnoreCase);
System\Security\Cryptography\OidLookup.cs (2)
13new ConcurrentDictionary<string, string>(); 16new ConcurrentDictionary<string, string>(StringComparer.OrdinalIgnoreCase);
System.ServiceModel.Primitives (4)
Internals\System\Runtime\InternalBufferManager.cs (1)
52private ConcurrentDictionary<int, string> _buffersPooled = new ConcurrentDictionary<int, string>();
Internals\System\Runtime\TimeoutHelper.cs (1)
259new ConcurrentDictionary<long, Task<CancellationToken>>();
System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
283private static ConcurrentDictionary<Type, TaskCompletionSourceInfo> s_cache = new ConcurrentDictionary<Type, TaskCompletionSourceInfo>();
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
1291private static ConcurrentDictionary<XmlMapping, string> s_dictionary = new ConcurrentDictionary<XmlMapping, string>();
System.Text.Encoding.CodePages (4)
System\Text\EncodingTable.cs (4)
11private static readonly ConcurrentDictionary<string, int> s_nameToCodePageCache = new(StringComparer.OrdinalIgnoreCase); 12private static readonly ConcurrentDictionary<int, string> s_codePageToWebNameCache = new(); 13private static readonly ConcurrentDictionary<int, string> s_codePageToEnglishNameCache = new(); 14private static readonly ConcurrentDictionary<int, (ushort FamilyCodePage, byte CodePageFlags)> s_codePageToItemCache = new();
System.Text.Json (6)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (2)
65_nameCacheForWriting = new(); 66_nameCacheForReading = new(StringComparer.Ordinal);
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (1)
239private readonly ConcurrentDictionary<Type, CacheEntry> _cache = new();
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (1)
201var caseIndex = new ConcurrentDictionary<Type, UnionCaseEntry?>();
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
18private readonly ConcurrentDictionary<Type, DerivedJsonTypeInfo?> _typeToDiscriminatorId = new();
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.Cache.cs (1)
20private readonly ConcurrentDictionary<TKey, CacheEntry> _cache = new();
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\Regex.Cache.cs (1)
73private static readonly ConcurrentDictionary<Key, Node> s_cacheDictionary = new ConcurrentDictionary<Key, Node>(concurrencyLevel: 1, capacity: 31);
System.Windows.Forms (4)
System\Resources\AssemblyNamesTypeResolutionService.cs (2)
27_cachedAssemblies ??= new(); 80_cachedTypes ??= new(StringComparer.Ordinal);
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (1)
18new(StringComparer.OrdinalIgnoreCase);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
24private static readonly ConcurrentDictionary<int, Font> s_defaultFontCache = new();
System.Xaml (2)
System\Xaml\XamlSchemaContext.cs (2)
1207return new ConcurrentDictionary<K, V>(ConcurrencyLevel, DictionaryCapacity); 1212return new ConcurrentDictionary<K, V>(ConcurrencyLevel, DictionaryCapacity, comparer);
vstest.console (1)
Internal\ConsoleLogger.cs (1)
201LeafTestResults = new ConcurrentDictionary<Guid, MinimalTestResult>();
vstest.console.arm64 (1)
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (1)
201LeafTestResults = new ConcurrentDictionary<Guid, MinimalTestResult>();
1764 references to ConcurrentDictionary
aspire (10)
Backchannel\AuxiliaryBackchannelMonitor.cs (7)
29private readonly ConcurrentDictionary<string, ConcurrentDictionary<string, AppHostAuxiliaryBackchannel>> _connectionsByHash = new(); 49_connectionsByHash.TryGetValue(hash, out var connections) ? connections.Values : []; 233_connectionsByHash.TryGetValue(hash, out var connectionsForHash) && 291if (_connectionsByHash.TryGetValue(hash, out var existingConnections) && 418if (_connectionsByHash.TryGetValue(hash, out var connectionsForHash) && 432var connectionsDict = _connectionsByHash.GetOrAdd(hash, _ => new ConcurrentDictionary<string, AppHostAuxiliaryBackchannel>());
src\Shared\ColorGenerator.cs (1)
59private readonly ConcurrentDictionary<string, Lazy<int>> _colorIndexByKey;
src\Shared\DateFormatStringsHelpers.cs (1)
20private static readonly ConcurrentDictionary<CultureDetailsKey, MillisecondFormatStrings> s_formatStrings = new();
Utils\EmojiWidth.cs (1)
17private static readonly ConcurrentDictionary<string, int> s_cellLengthCache = new();
Aspire.Cli.Tests (5)
TestServices\TestAuxiliaryBackchannelMonitor.cs (5)
12private readonly ConcurrentDictionary<string, ConcurrentDictionary<string, IAppHostAuxiliaryBackchannel>> _connectionsByHash = new(); 18_connectionsByHash.TryGetValue(hash, out var connections) ? connections.Values : []; 101var connectionsDict = _connectionsByHash.GetOrAdd(hash, _ => new ConcurrentDictionary<string, IAppHostAuxiliaryBackchannel>()); 107if (_connectionsByHash.TryGetValue(hash, out var connectionsDict))
Aspire.Dashboard (25)
Components\Controls\ResourceActions.razor.cs (1)
51public required ConcurrentDictionary<string, ResourceViewModel> ResourceByName { get; set; }
Components\Controls\ResourceDetails.razor.cs (1)
29public required ConcurrentDictionary<string, ResourceViewModel> ResourceByName { get; set; }
Components\Controls\SelectResourceOptions.razor.cs (3)
12public required ConcurrentDictionary<TValue, bool> Values { get; set; } 35private static void SetCheckState(bool? newAreAllVisible, ConcurrentDictionary<TValue, bool> values) 48private static bool? GetCheckState(ConcurrentDictionary<TValue, bool> values)
Components\Dialogs\ManageDataDialog.razor.cs (1)
59private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName);
Components\Pages\ConsoleLogs.razor.cs (3)
145private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName); 155private readonly ConcurrentDictionary<string, ConsoleLogsSubscription> _consoleLogsSubscriptions = new(StringComparers.ResourceName); 650ConcurrentDictionary<string, ResourceViewModel> resourcesByName,
Components\Pages\Resources.razor.cs (4)
117private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName); 925public ConcurrentDictionary<string, bool> ResourceTypesToVisibility { get; } = new(StringComparers.ResourceName); 926public ConcurrentDictionary<string, bool> ResourceStatesToVisibility { get; } = new(StringComparers.ResourceState); 927public ConcurrentDictionary<string, bool> ResourceHealthStatusesToVisibility { get; } = new(StringComparer.Ordinal);
Model\Assistant\AssistantChatDataContext.cs (2)
27private readonly ConcurrentDictionary<string, OtlpTrace> _referencedTraces = new(); 28private readonly ConcurrentDictionary<long, OtlpLogEntry> _referencedLogs = new();
Model\Assistant\AssistantChatViewModel.cs (1)
119private readonly ConcurrentDictionary<string, int> _toolCallCounts = new();
Model\IconResolver.cs (1)
14private readonly ConcurrentDictionary<IconKey, Icon?> _iconCache = new();
Model\ResourceOutgoingPeerResolver.cs (1)
21private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName);
Model\StructuredLogsViewModel.cs (1)
17private readonly ConcurrentDictionary<SpanKey, bool> _spanGenAICache = new();
Otlp\Model\OtlpResource.cs (1)
50private readonly ConcurrentDictionary<KeyValuePair<string, string>[], OtlpResourceView> _resourceViews = new(ResourceViewKeyComparer.Instance);
Otlp\Storage\TelemetryRepository.cs (1)
46private readonly ConcurrentDictionary<ResourceKey, OtlpResource> _resources = new();
ShortcutManager.cs (1)
12private readonly ConcurrentDictionary<IGlobalKeydownListener, IGlobalKeydownListener> _keydownListenerComponents = [];
src\Shared\ColorGenerator.cs (1)
59private readonly ConcurrentDictionary<string, Lazy<int>> _colorIndexByKey;
src\Shared\DateFormatStringsHelpers.cs (1)
20private static readonly ConcurrentDictionary<CultureDetailsKey, MillisecondFormatStrings> s_formatStrings = new();
Utils\DashboardUIHelpers.cs (1)
62private static readonly ConcurrentDictionary<int, TextMask> s_cachedMasking = new();
Aspire.Dashboard.Tests (4)
ConsoleLogsTests\CreateResourceSelectModelsTests.cs (4)
23var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>(resources.ToDictionary(app => app.Name)); 66var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>(resources.ToDictionary(app => app.Name)); 147var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>(resources.ToDictionary(app => app.Name)); 180var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>();
Aspire.Hosting (21)
ApplicationModel\RequiredCommandValidator.cs (1)
25private readonly ConcurrentDictionary<string, CommandValidationState> _commandStates = new(StringComparer.OrdinalIgnoreCase);
ApplicationModel\ResourceLoggerService.cs (1)
22private readonly ConcurrentDictionary<string, ResourceLoggerState> _loggers = new();
ApplicationModel\ResourceNotificationService.cs (1)
25private readonly ConcurrentDictionary<string, ResourceNotificationState> _resourceNotificationStates = new();
Dashboard\DashboardEventHandlers.cs (3)
790var loggerCache = new ConcurrentDictionary<string, ILogger>(StringComparer.Ordinal); 821ConcurrentDictionary<string, ILogger> loggerCache, 882private static void LogMessage(ILoggerFactory loggerFactory, ConcurrentDictionary<string, ILogger> loggerCache, DashboardLogMessage logMessage)
Dcp\DcpExecutor.cs (3)
91private readonly ConcurrentDictionary<string, (CancellationTokenSource Cancellation, Task Task)> _logStreams = new(); 486private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T, CustomResourceSnapshot, CustomResourceSnapshot> snapshotFactory) where T : CustomResource 823private static bool ProcessResourceChange<T>(ConcurrentDictionary<string, T> map, WatchEventType watchEventType, T resource)
Dcp\DcpExecutorEvents.cs (1)
18private readonly ConcurrentDictionary<Type, Func<object, Task>> _eventSubscriptionListLookup = new();
Dcp\DcpResourceState.cs (6)
12public readonly ConcurrentDictionary<string, Container> ContainersMap = []; 13public readonly ConcurrentDictionary<string, Executable> ExecutablesMap = []; 14public readonly ConcurrentDictionary<string, ContainerExec> ContainerExecsMap = []; 15public readonly ConcurrentDictionary<string, Service> ServicesMap = []; 16public readonly ConcurrentDictionary<string, Endpoint> EndpointsMap = []; 17public readonly ConcurrentDictionary<(string, string), List<string>> ResourceAssociatedServicesMap = [];
Eventing\DistributedApplicationEventing.cs (2)
12private readonly ConcurrentDictionary<Type, List<DistributedApplicationEventSubscription>> _eventSubscriptionListLookup = new(); 13private readonly ConcurrentDictionary<DistributedApplicationEventSubscription, Type> _subscriptionEventTypeLookup = new();
Pipelines\PipelineActivityReporter.cs (1)
19private readonly ConcurrentDictionary<string, ReportingStep> _steps = new();
Pipelines\ReportingStep.cs (1)
18private readonly ConcurrentDictionary<string, ReportingTask> _tasks = new();
Utils\FileSystemService.cs (1)
22private readonly ConcurrentDictionary<string, IDisposable> _allocatedItems = new();
Aspire.Hosting.Analyzers (4)
AppHostAnalyzer.cs (3)
34var concurrentQueue = new ConcurrentQueue<ConcurrentDictionary<ModelNameOperation, byte>>(); 38if (!concurrentQueue.TryDequeue(out var modelNameOperations)) 55void DoOperationAnalysis(OperationAnalysisContext context, ConcurrentDictionary<ModelNameOperation, byte> modelNameOperations)
AppHostAnalyzer.DetectInvalidModelNames.cs (1)
13private void DetectInvalidModelNames(OperationBlockAnalysisContext context, ConcurrentDictionary<ModelNameOperation, byte> modelNameOperations)
Aspire.Hosting.Integration.Analyzers (5)
AspireExportAnalyzer.cs (5)
75var exportsByKey = new ConcurrentDictionary<(string ExportId, string TargetType), ConcurrentBag<(IMethodSymbol Method, Location Location)>>(); 110var reportedParameters = new ConcurrentDictionary<string, byte>(StringComparer.Ordinal); 123ConcurrentDictionary<(string ExportId, string TargetType), ConcurrentBag<(IMethodSymbol Method, Location Location)>> exportsByKey) 335ConcurrentDictionary<string, byte> reportedParameters) 762ConcurrentDictionary<(string ExportId, string TargetType), ConcurrentBag<(IMethodSymbol Method, Location Location)>> exportsByKey)
Aspire.Hosting.Maui (1)
Utilities\ProjectFileReader.cs (1)
16private static readonly ConcurrentDictionary<string, Dictionary<string, string?>> s_projectCache = new(StringComparer.OrdinalIgnoreCase);
Aspire.Hosting.RemoteHost (6)
Ats\AtsCallbackProxyFactory.cs (1)
22private readonly ConcurrentDictionary<(string CallbackId, Type DelegateType), Delegate> _cache = new();
Ats\CapabilityDispatcher.cs (1)
29private readonly ConcurrentDictionary<string, CapabilityRegistration> _capabilities = new();
Ats\HandleRegistry.cs (1)
16private readonly ConcurrentDictionary<string, HandleEntry> _handles = new();
AtsCapabilityScanner.cs (2)
2654private static readonly ConcurrentDictionary<string, XDocument?> s_xmlDocCache = new(StringComparer.Ordinal); 2655private static readonly ConcurrentDictionary<Type, byte> s_assemblyExportedTypeCache = new();
CancellationTokenRegistry.cs (1)
16private readonly ConcurrentDictionary<string, CancellationTokenSource> _sources = new();
Aspire.Hosting.Tests (2)
Dashboard\DashboardLifecycleHookTests.cs (1)
149var dashboardEnvironmentVariables = new ConcurrentDictionary<string, string?>();
Dashboard\DashboardResourceTests.cs (1)
790private readonly ConcurrentDictionary<string, TestLogger> _loggers = new();
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (1)
30internal readonly ConcurrentDictionary<(ActivityTraceId TraceId, ActivitySpanId SpanId), (Activity Activity, ProfilingSession Session)> Cache
dotnet (9)
Commands\Test\MTP\CtrlCCancellationManager.cs (1)
34private readonly ConcurrentDictionary<Process, byte> _processes = new();
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.Help.cs (3)
14private readonly ConcurrentDictionary<string, CommandLineOptionMessage> _commandLineOptionNameToModuleNames = []; 15private readonly ConcurrentDictionary<bool, List<(string, string[])>> _moduleNamesToCommandLineOptions = []; 160ConcurrentDictionary<bool, List<(string, string[])>> moduleNamesToCommandLineOptions,
Commands\Test\MTP\Terminal\TerminalTestReporter.cs (1)
38private readonly ConcurrentDictionary<string, TestProgressState> _assemblies = new();
Commands\Test\MTP\Terminal\TestNodeResultsState.cs (2)
14private readonly ConcurrentDictionary<string, TestDetailState> _testNodeProgressStates = new(); 15private readonly ConcurrentDictionary<string, byte> _completed = new();
Commands\Test\VSTest\VSTestFeatureFlag.cs (1)
13private readonly ConcurrentDictionary<string, bool> _cache = new();
NugetPackageDownloader\NuGetPackageDownloader.cs (1)
41private readonly ConcurrentDictionary<PackageSource, SourceRepository> _sourceRepositories;
dotnet-aot (1)
src\sdk\src\Cli\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (1)
41private readonly ConcurrentDictionary<PackageSource, SourceRepository> _sourceRepositories;
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\InternalBufferManager.cs (1)
54private ConcurrentDictionary<int, string> _buffersPooled = new ConcurrentDictionary<int, string>();
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (1)
247private static readonly ConcurrentDictionary<long, Task<CancellationToken>> s_tokenCache =
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
283private static ConcurrentDictionary<Type, TaskCompletionSourceInfo> s_cache = new ConcurrentDictionary<Type, TaskCompletionSourceInfo>();
GenerateDocumentationAndConfigFiles (45)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
19public static void Add<K, V>(this ConcurrentDictionary<K, V> dict, K key, V value) 28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 45this ConcurrentDictionary<TKey, TValue> dictionary,
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (3)
420private static readonly BoundedCache<Compilation, ConcurrentDictionary<IMethodSymbol, IBlockOperation?>> s_methodToTopmostOperationBlockCache 428var methodToBlockMap = s_methodToTopmostOperationBlockCache.GetOrCreateValue(compilation); 536public static bool IsBenchmarkOrXUnitTestMethod(this IMethodSymbol method, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
72public static bool IsBenchmarkOrXUnitTestAttribute(this INamedTypeSymbol attributeClass, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
273private static readonly BoundedCache<Compilation, ConcurrentDictionary<IOperation, ControlFlowGraph?>> s_operationToCfgCache 280var operationToCfgMap = s_operationToCfgCache.GetOrCreateValue(operation.SemanticModel.Compilation);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
21private readonly ConcurrentDictionary<OptionKey, (bool found, object? value)> _computedOptionValuesMap;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new(); 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult; 381internal ref readonly ConcurrentDictionary<ISymbol, string> SymbolToDeclarationId => ref _symbolNamesWithValueOption._symbolToDeclarationId;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
17/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool. 52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
16/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
42private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledDictionary<K, V>>> s_poolInstancesByComparer
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (4)
19private static readonly BoundedCacheWithFactory<Compilation, ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache>> s_byCompilationCache = new(); 29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 50ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> dict = 55static ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> CreateConcurrentDictionary(Compilation compilation)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\UnusedValue.cs (1)
10/// A placeholder value type for <see cref="ConcurrentDictionary{TKey, TValue}"/> used as a set.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
67private readonly ConcurrentDictionary<string, INamedTypeSymbol?> _fullNameToTypeMap; 81private static readonly ConcurrentDictionary<string, ImmutableArray<string>> _fullTypeNameToNamespaceNames =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
19private static readonly ConcurrentDictionary<(Type type, string name), Type?> s_typeImplementingMethod = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (2)
22private ConcurrentDictionary<int, TriviaData> _map; 32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
302public static void ClearAndFree<TKey, TValue>(this ObjectPool<ConcurrentDictionary<TKey, TValue>> pool, ConcurrentDictionary<TKey, TValue> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
26private readonly ConcurrentDictionary<string, Optional<T>> _cachedValues = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (4)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new(); 34if (!s_treeAliasMap.TryGetValue(semanticModel.Compilation, out var treeMap) || 50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>(); 156ConcurrentDictionary<SyntaxNode, SyntaxNode> reducedNodesMap, 157ConcurrentDictionary<SyntaxToken, SyntaxToken> reducedTokensMap,
ILCompiler.Compiler (4)
Compiler\DependencyAnalysis\NodeFactory.cs (1)
162private ConcurrentDictionary<TKey, TValue> _cache;
Compiler\ReachabilityInstrumentationProvider.cs (1)
34private readonly ConcurrentDictionary<EcmaModule, ExternSymbolMappedField[]> _isTokenUsedStates = new();
src\runtime\src\coreclr\tools\Common\Compiler\CachingVirtualMethodAlgorithm.cs (1)
15private readonly ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCache
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (1)
110private readonly ConcurrentDictionary<EntityPair, ModuleCycleInfo> _actualProblems = new ConcurrentDictionary<EntityPair, ModuleCycleInfo>();
ILCompiler.ReadyToRun (19)
Compiler\DependencyAnalysis\ReadyToRun\ModuleTokenResolver.cs (2)
30private readonly ConcurrentDictionary<EcmaType, ModuleToken> _typeToRefTokens = new ConcurrentDictionary<EcmaType, ModuleToken>(); 283void SetModuleTokenForTypeSystemEntity<T>(ConcurrentDictionary<T, ModuleToken> dictionary, T tse, ModuleToken token)
Compiler\DependencyAnalysis\ReadyToRun\TypeValidationChecker.cs (2)
21private ConcurrentDictionary<TypeDesc, Task<bool>> _firstStageValidationChecks = new ConcurrentDictionary<TypeDesc, Task<bool>>(); 22private ConcurrentDictionary<TypeDesc, (TypeDesc dependendOnType, string reason)[]> _crossTypeValidationDependencies = new ConcurrentDictionary<TypeDesc, (TypeDesc dependendOnType, string reason)[]>();
Compiler\DependencyAnalysis\ReadyToRunCodegenNodeFactory.cs (1)
32private ConcurrentDictionary<TKey, TValue> _cache;
Compiler\ReadyToRunCodegenCompilation.cs (1)
316private ConcurrentDictionary<TypeDesc, bool> _computedFixedLayoutTypes = new ConcurrentDictionary<TypeDesc, bool>();
Compiler\ReadyToRunCompilationModuleGroupBase.cs (8)
48private readonly ConcurrentDictionary<TypeDesc, CompilationUnitSet> _layoutCompilationUnits = new ConcurrentDictionary<TypeDesc, CompilationUnitSet>(); 50private readonly ConcurrentDictionary<TypeDesc, bool> _versionsWithTypeCache = new ConcurrentDictionary<TypeDesc, bool>(); 52private readonly ConcurrentDictionary<TypeDesc, bool> _versionsWithTypeReferenceCache = new ConcurrentDictionary<TypeDesc, bool>(); 54private readonly ConcurrentDictionary<MethodDesc, bool> _versionsWithMethodCache = new ConcurrentDictionary<MethodDesc, bool>(); 56private readonly ConcurrentDictionary<MethodDesc, bool> _crossModuleInlineableCache = new ConcurrentDictionary<MethodDesc, bool>(); 58private readonly ConcurrentDictionary<TypeDesc, bool> _crossModuleInlineableTypeCache = new ConcurrentDictionary<TypeDesc, bool>(); 60private readonly ConcurrentDictionary<MethodDesc, bool> _crossModuleCompilableCache = new ConcurrentDictionary<MethodDesc, bool>(); 66private ConcurrentDictionary<EcmaMethod, bool> _tokenTranslationFreeNonVersionable = new ConcurrentDictionary<EcmaMethod, bool>();
Compiler\ReadyToRunMetadataFieldLayoutAlgorithm.cs (1)
586private ConcurrentDictionary<DefType, FieldAndOffset[]> _typeToFieldMap;
IL\Stubs\PInvokeILEmitter.cs (2)
27private static readonly ConditionalWeakTable<TypeSystemContext, ConcurrentDictionary<MethodDesc, PInvokeTargetNativeMethod>> s_contexts = new(); 61var contextMethods = s_contexts.GetOrCreateValue(targetMethod.Context);
src\runtime\src\coreclr\tools\Common\Compiler\CachingVirtualMethodAlgorithm.cs (1)
15private readonly ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCache
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (1)
110private readonly ConcurrentDictionary<EntityPair, ModuleCycleInfo> _actualProblems = new ConcurrentDictionary<EntityPair, ModuleCycleInfo>();
Microsoft.AspNetCore.App.Analyzers (5)
Infrastructure\RouteUsageCache.cs (1)
21private readonly ConcurrentDictionary<SyntaxToken, RouteUsageModel?> _lazyRoutePatterns;
RouteHandlers\DetectAmbiguousRoutes.cs (1)
22private static void DetectAmbiguousRoutes(in OperationBlockAnalysisContext context, WellKnownTypes wellKnownTypes, ConcurrentDictionary<MapOperation, byte> mapOperations)
RouteHandlers\RouteHandlerAnalyzer.cs (3)
47var concurrentQueue = new ConcurrentQueue<ConcurrentDictionary<MapOperation, byte>>(); 51if (!concurrentQueue.TryDequeue(out var mapOperations)) 68void DoOperationAnalysis(OperationAnalysisContext context, ConcurrentDictionary<MapOperation, byte> mapOperations)
Microsoft.AspNetCore.Authorization.Policy (2)
AuthorizationPolicyCache.cs (2)
13private readonly DataSourceDependentCache<ConcurrentDictionary<Endpoint, AuthorizationPolicy>> _policyCache; 19_policyCache = new DataSourceDependentCache<ConcurrentDictionary<Endpoint, AuthorizationPolicy>>(dataSource, (_) =>
Microsoft.AspNetCore.Components (20)
BindConverter.cs (2)
1719private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>(); 1916private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>();
CascadingParameterState.cs (1)
18private static readonly ConcurrentDictionary<Type, CascadingParameterInfo[]> _cachedInfos = new();
CascadingValueSource.cs (1)
19private readonly ConcurrentDictionary<Dispatcher, List<ComponentState>>? _subscribers;
ChangeDetection.cs (1)
11private static readonly ConcurrentDictionary<Type, bool> _immutableObjectTypesCache = new();
ComponentFactory.cs (1)
20private static readonly ConcurrentDictionary<Type, IComponentRenderMode?> _cachedComponentTypeRenderModes = new();
DefaultComponentActivator.cs (1)
13private static readonly ConcurrentDictionary<Type, ObjectFactory> _cachedComponentTypeInfo = new();
DefaultComponentPropertyActivator.cs (1)
19private static readonly ConcurrentDictionary<Type, Action<IServiceProvider, IComponent>> _cachedPropertyActivators = new();
PersistentState\PersistentServicesRegistry.cs (1)
28private static readonly ConcurrentDictionary<Type, PropertiesAccessor> _cachedAccessorsByType = new();
PersistentState\PersistentStateValueProviderKeyResolver.cs (1)
17private static readonly ConcurrentDictionary<(string, string, string), byte[]> _keyCache = new();
PersistentState\PersistentValueProviderComponentSubscription.cs (2)
18private static readonly ConcurrentDictionary<(Type, string), PropertyGetter> _propertyGetterCache = new(); 19private static readonly ConcurrentDictionary<Type, IPersistentComponentStateSerializer?> _serializerCache = new();
Reflection\ComponentProperties.cs (2)
28private static readonly ConcurrentDictionary<Type, WritersForType> _cachedWritersByType 290private readonly ConcurrentDictionary<string, PropertySetter?> _referenceEqualityWritersCache;
RenderTree\EventArgsTypeCache.cs (1)
12private static readonly ConcurrentDictionary<MethodInfo, Type> Cache = new ConcurrentDictionary<MethodInfo, Type>();
RouteView.cs (1)
21private static readonly ConcurrentDictionary<Type, Type?> _layoutAttributeCache = new();
Routing\RouteTable.cs (1)
15private static readonly ConcurrentDictionary<(Type, string), InboundRouteEntry> _routeEntryCache = new();
Routing\RouteTableFactory.cs (1)
32private readonly ConcurrentDictionary<RouteKey, RouteTable> _cache = new();
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (1)
18private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\aspnetcore\src\Components\Shared\src\UrlValueConstraint.cs (1)
17private static readonly ConcurrentDictionary<Type, UrlValueConstraint> _cachedInstances = new();
Microsoft.AspNetCore.Components.Analyzers (3)
StateHasChangedAnalyzer.cs (3)
52var eventHandlerMethods = new ConcurrentDictionary<IMethodSymbol, byte>(SymbolEqualityComparer.Default); 53var redundantCallLocationsByMethod = new ConcurrentDictionary<IMethodSymbol, ImmutableArray<Location>>(SymbolEqualityComparer.Default); 173private static bool IsTargetMethod(IMethodSymbol method, ConcurrentDictionary<IMethodSymbol, byte> eventHandlerMethods)
Microsoft.AspNetCore.Components.Authorization (1)
AttributeAuthorizeDataCache.cs (1)
20private static readonly ConcurrentDictionary<Type, (IAuthorizeData[]? AuthorizeData, object[]? Metadata)> _cache = new();
Microsoft.AspNetCore.Components.Endpoints (22)
Builder\RazorComponentsEndpointHttpContextExtensions.cs (1)
20private static readonly ConcurrentDictionary<Type, bool> AcceptsInteractiveRoutingCache = new();
CacheView\CacheViewKeyResolver.cs (1)
18private static readonly ConcurrentDictionary<string, string[]> _sortedNamesByRawValue = new(StringComparer.Ordinal);
CacheView\CacheViewService.cs (1)
19private static readonly ConcurrentDictionary<Type, (CacheBehavior? Behavior, CacheVaryBy? Condition)> _liveComponentAttributeByType = new();
CacheView\MemoryCacheViewStore.cs (1)
15private readonly ConcurrentDictionary<string, Task<SerializedRenderFragment>> _pending = new(StringComparer.Ordinal);
FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (3)
50var _ when type == (typeof(ConcurrentDictionary<TKey, TValue>)) => true, 130var _ when type == (typeof(ConcurrentDictionary<TKey, TValue>)) => 131ConcreteTypeDictionaryConverterFactory<ConcurrentDictionary<TKey, TValue>, TKey, TValue>.Instance.CreateConverter(type, options),
FormMapping\FormDataMapperOptions.cs (1)
14private readonly ConcurrentDictionary<Type, FormDataConverter> _converters = new();
FormMapping\HttpContextFormValueMapper.cs (1)
21private static readonly ConcurrentDictionary<Type, FormValueSupplier> _cache = new();
Forms\ClientValidationCache.cs (3)
21private readonly ConcurrentDictionary<FieldKey, ClientValidationFieldMetadata?> _metadataCache = new(); 22private readonly ConcurrentDictionary<Type, bool> _typeHasValidatableInfo = new(); 23private readonly ConcurrentDictionary<(Type FormType, string RenderedName), bool> _fieldReachabilityCache = new();
Rendering\EndpointComponentState.cs (1)
19private static readonly ConcurrentDictionary<Type, StreamRenderingAttribute?> _streamRenderingAttributeByComponentType = new();
Rendering\SSRRenderModeBoundary.cs (1)
26private static readonly ConcurrentDictionary<Type, string> _componentTypeNameHashCache = new();
SessionCascadingValueSupplier.cs (1)
18private static readonly ConcurrentDictionary<(Type, string), PropertyGetter> _propertyGetterCache = new();
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (5)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 494ConcurrentDictionary<Type, PropertyHelper[]>? cache)
TempData\TempDataCascadingValueSupplier.cs (1)
16private static readonly ConcurrentDictionary<(Type, string), PropertyGetter> _propertyGetterCache = new();
Microsoft.AspNetCore.Components.Forms (5)
EditContextDataAnnotationsExtensions.cs (1)
46private static readonly ConcurrentDictionary<(Type ModelType, string FieldName), PropertyInfo?> _propertyInfoCache = new();
FieldIdentifier.cs (2)
19private static readonly ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func<object, object>> _fieldAccessors = new(); 172ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func<object, object>>? cache = null)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
28private static readonly ConcurrentDictionary<MemberInfo, CapturedValueFormatter> s_capturedValueFormatterCache = new(); 29private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new();
Microsoft.AspNetCore.Components.QuickGrid (2)
Infrastructure\AsyncQueryExecutorSupplier.cs (1)
24private static readonly ConcurrentDictionary<Type, bool> IsEntityFrameworkProviderTypeCache = new();
src\aspnetcore\src\Components\Shared\src\UrlValueConstraint.cs (1)
17private static readonly ConcurrentDictionary<Type, UrlValueConstraint> _cachedInstances = new();
Microsoft.AspNetCore.Components.Server (5)
Circuits\CircuitRegistry.cs (1)
70internal ConcurrentDictionary<CircuitId, CircuitHost> ConnectedCircuits { get; }
Circuits\RemoteJSRuntime.cs (1)
21private readonly ConcurrentDictionary<long, CancelableDotNetStreamReference> _pendingDotNetToJSStreams = new();
ProtectedBrowserStorage\ProtectedBrowserStorage.cs (1)
20private readonly ConcurrentDictionary<string, IDataProtector> _cachedDataProtectorsByPurpose
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (1)
18private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
Microsoft.AspNetCore.Components.Testing (3)
Infrastructure\ServerFactory.cs (2)
93private readonly ConcurrentDictionary<string, ServerInstance> _instances = new(); 94private readonly ConcurrentDictionary<string, TaskCompletionSource> _readinessSignals = new();
Infrastructure\TestLockProvider.cs (1)
28private readonly ConcurrentDictionary<string, TaskCompletionSource> _locks = new();
Microsoft.AspNetCore.Components.Web (5)
Forms\ExpressionMemberAccessor.cs (2)
17private static readonly ConcurrentDictionary<Expression, MemberInfo> _memberInfoCache = new(); 18private static readonly ConcurrentDictionary<(MemberInfo Member, string CultureName), string> _displayNameCache = new();
JSComponents\JSComponentInterop.cs (1)
26private static readonly ConcurrentDictionary<Type, ParameterTypeCache> ParameterTypeCaches = new();
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
28private static readonly ConcurrentDictionary<MemberInfo, CapturedValueFormatter> s_capturedValueFormatterCache = new(); 29private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new();
Microsoft.AspNetCore.Components.WebAssembly (3)
Services\WebAssemblyConsoleLoggerProvider.cs (1)
15private readonly ConcurrentDictionary<string, WebAssemblyConsoleLogger<object>> _loggers;
src\aspnetcore\src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\aspnetcore\src\Components\Shared\src\RootTypeCache.cs (1)
18private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\XmlKeyManager.cs (1)
61private readonly ConcurrentDictionary<Guid, Key> _knownKeyMap = new(); // Grows unboundedly, like the key ring
Microsoft.AspNetCore.Diagnostics.Middleware (2)
Buffering\IncomingRequestLogBufferHolder.cs (1)
11private readonly ConcurrentDictionary<string, IncomingRequestLogBuffer> _buffers = new();
Logging\IncomingHttpRouteUtility.cs (1)
22private readonly ConcurrentDictionary<string, FrozenDictionary<string, DataClassification>> _parametersToRedactCache = new();
Microsoft.AspNetCore.Grpc.JsonTranscoding (5)
Internal\CallHandlers\CallHandlerDescriptorInfo.cs (1)
45public ConcurrentDictionary<string, List<FieldDescriptor>> PathDescriptorsCache { get; }
Internal\Json\EnumNameHelpers.cs (1)
13private static readonly ConcurrentDictionary<Type, EnumMapping> _enumMappings = new ConcurrentDictionary<Type, EnumMapping>();
Internal\JsonRequestHelpers.cs (1)
365var cache = serverCallContext.DescriptorInfo.PathDescriptorsCache;
src\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\DescriptorRegistry.cs (1)
14private readonly ConcurrentDictionary<Type, DescriptorBase> _typeDescriptorMap = new ConcurrentDictionary<Type, DescriptorBase>();
src\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\Server\InterceptorActivators.cs (1)
28private readonly ConcurrentDictionary<Type, IGrpcInterceptorActivator> _cachedActivators = new();
Microsoft.AspNetCore.HeaderParsing (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Factory.g.cs (2)
10private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::Microsoft.AspNetCore.HeaderParsing.ParsingErrorCounter> 14private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::Microsoft.AspNetCore.HeaderParsing.CacheAccessCounter>
HeaderRegistry.cs (1)
18private readonly ConcurrentDictionary<HeaderKeyIdentity, object> _headerKeys = new();
Microsoft.AspNetCore.Http.Abstractions (7)
Routing\EndpointMetadataCollection.cs (1)
30private readonly ConcurrentDictionary<Type, object[]> _cache;
Routing\RouteValueDictionary.cs (1)
44private static readonly ConcurrentDictionary<Type, PropertyHelper[]> _propertyCache = new ConcurrentDictionary<Type, PropertyHelper[]>();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (5)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 494ConcurrentDictionary<Type, PropertyHelper[]>? cache)
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionManager.cs (1)
22private readonly ConcurrentDictionary<string, HttpConnectionContext> _connections =
Microsoft.AspNetCore.Http.Extensions (7)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (3)
50var _ when type == (typeof(ConcurrentDictionary<TKey, TValue>)) => true, 130var _ when type == (typeof(ConcurrentDictionary<TKey, TValue>)) => 131ConcreteTypeDictionaryConverterFactory<ConcurrentDictionary<TKey, TValue>, TKey, TValue>.Instance.CreateConverter(type, options),
src\aspnetcore\src\Components\Endpoints\src\FormMapping\FormDataMapperOptions.cs (1)
14private readonly ConcurrentDictionary<Type, FormDataConverter> _converters = new();
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
46private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 47private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 48private readonly ConcurrentDictionary<Type, (ConstructorInfo?, ConstructorParameter[])> _constructorCache = new();
Microsoft.AspNetCore.Mvc.Abstractions (3)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
46private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 47private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 48private readonly ConcurrentDictionary<Type, (ConstructorInfo?, ConstructorParameter[])> _constructorCache = new();
Microsoft.AspNetCore.Mvc.Core (18)
ActionConstraints\ActionConstraintCache.cs (1)
175public ConcurrentDictionary<ActionDescriptor, CacheEntry> Entries { get; } =
Controllers\DefaultControllerPropertyActivator.cs (1)
15private readonly ConcurrentDictionary<Type, PropertyActivator<ControllerContext>[]> _activateActions = new();
Filters\MiddlewareFilterBuilder.cs (1)
20private readonly ConcurrentDictionary<Type, Lazy<RequestDelegate>> _pipelinesCache
Infrastructure\AsyncEnumerableReader.cs (1)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new();
Infrastructure\OrderedEndpointsSequenceProviderCache.cs (1)
11private readonly ConcurrentDictionary<IEndpointRouteBuilder, OrderedEndpointsSequenceProvider> _sequenceProviderCache = new();
Infrastructure\TypeActivatorCache.cs (1)
17private readonly ConcurrentDictionary<Type, ObjectFactory> _typeActivatorCache =
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (1)
20private readonly ConcurrentDictionary<ModelMetadataIdentity, ModelMetadataCacheEntry> _modelMetadataCache = new();
ModelBinding\ModelBinderFactory.cs (1)
26private readonly ConcurrentDictionary<Key, IModelBinder> _cache;
ModelBinding\Validation\ClientValidatorCache.cs (1)
17private readonly ConcurrentDictionary<ModelMetadata, CacheEntry> _cacheEntries = new ConcurrentDictionary<ModelMetadata, CacheEntry>();
ModelBinding\Validation\DefaultCollectionValidationStrategy.cs (1)
49private readonly ConcurrentDictionary<Type, Func<object, IEnumerator>> _genericGetEnumeratorCache = new ConcurrentDictionary<Type, Func<object, IEnumerator>>();
ModelBinding\Validation\ValidatorCache.cs (1)
16private readonly ConcurrentDictionary<ModelMetadata, CacheEntry> _cacheEntries = new();
Routing\DynamicControllerEndpointSelectorCache.cs (2)
14private readonly ConcurrentDictionary<int, EndpointDataSource> _dataSourceCache = new(); 15private readonly ConcurrentDictionary<int, DynamicControllerEndpointSelector> _endpointSelectorCache = new();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (5)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 494ConcurrentDictionary<Type, PropertyHelper[]>? cache)
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
XmlDataContractSerializerInputFormatter.cs (1)
21private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
XmlDataContractSerializerOutputFormatter.cs (1)
25private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
XmlSerializerInputFormatter.cs (1)
21private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
XmlSerializerOutputFormatter.cs (1)
25private readonly ConcurrentDictionary<Type, object> _serializerCache = new ConcurrentDictionary<Type, object>();
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
BsonTempDataSerializer.cs (2)
26private static readonly ConcurrentDictionary<Type, Func<JArray, object>> _arrayConverters = 28private static readonly ConcurrentDictionary<Type, Func<JObject, object>> _dictionaryConverters =
src\aspnetcore\src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (1)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new();
Microsoft.AspNetCore.Mvc.Razor (5)
Compilation\DefaultViewCompiler.cs (1)
22private readonly ConcurrentDictionary<string, string> _normalizedPathCache;
DefaultTagHelperFactory.cs (1)
20private readonly ConcurrentDictionary<Type, PropertyActivator<ViewContext>[]> _injectActions;
RazorPageActivator.cs (2)
20private readonly ConcurrentDictionary<CacheKey, RazorPagePropertyActivator> _activationInfo; 55internal ConcurrentDictionary<CacheKey, RazorPagePropertyActivator> ActivationInfo => _activationInfo;
TagHelpers\TagHelperComponentPropertyActivator.cs (1)
18private readonly ConcurrentDictionary<Type, PropertyActivator<ViewContext>[]> _propertiesToActivate = new();
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
28private readonly ConcurrentDictionary<string, string> _normalizedPathCache;
Microsoft.AspNetCore.Mvc.RazorPages (2)
Infrastructure\DynamicPageEndpointSelectorCache.cs (2)
15private readonly ConcurrentDictionary<int, EndpointDataSource> _dataSourceCache = new(); 16private readonly ConcurrentDictionary<int, DynamicPageEndpointSelector> _endpointSelectorCache = new();
Microsoft.AspNetCore.Mvc.TagHelpers (3)
Cache\DistributedCacheTagHelperService.cs (1)
37private readonly ConcurrentDictionary<CacheTagKey, Task<IHtmlContent>> _workers;
JavaScriptResources.cs (2)
17private static readonly ConcurrentDictionary<string, string> Cache = 32ConcurrentDictionary<string, string> cache)
Microsoft.AspNetCore.Mvc.ViewFeatures (9)
CachedExpressionCompiler.cs (3)
34private static readonly ConcurrentDictionary<MemberInfo, Func<TModel, object>> _simpleMemberAccessCache = 37private static readonly ConcurrentDictionary<MemberExpressionCacheKey, Func<TModel, object>> _chainedMemberAccessCache = 40private static readonly ConcurrentDictionary<MemberInfo, Func<object, TResult>> _constMemberAccessCache =
ExpressionHelper.cs (1)
19public static string GetExpressionText(LambdaExpression expression, ConcurrentDictionary<LambdaExpression, string> expressionTextCache)
HtmlAttributePropertyHelper.cs (1)
15private static readonly ConcurrentDictionary<Type, HtmlAttributePropertyHelper[]> ReflectionCache =
ModelExpressionProvider.cs (1)
16private readonly ConcurrentDictionary<LambdaExpression, string> _expressionTextCache;
ViewComponents\DefaultViewComponentFactory.cs (1)
17private readonly ConcurrentDictionary<Type, PropertyActivator<ViewComponentContext>[]> _injectActions;
ViewComponents\ViewComponentInvokerCache.cs (1)
76public ConcurrentDictionary<ViewComponentDescriptor, ObjectMethodExecutor> Entries { get; } =
ViewDataDictionaryControllerPropertyActivator.cs (1)
18private ConcurrentDictionary<Type, PropertyActivator<ControllerContext>[]> _activateActions;
Microsoft.AspNetCore.OpenApi (5)
Services\OpenApiDocumentService.cs (1)
52private readonly ConcurrentDictionary<string, OpenApiOperationTransformerContext> _operationTransformerContextCache = new();
Services\Schemas\OpenApiSchemaService.cs (1)
35private readonly ConcurrentDictionary<Type, string?> _schemaIdCache = new();
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
46private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 47private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 48private readonly ConcurrentDictionary<Type, (ConstructorInfo?, ConstructorParameter[])> _constructorCache = new();
Microsoft.AspNetCore.OutputCaching (1)
DispatcherExtensions.cs (1)
10private readonly ConcurrentDictionary<TKey, Task<TValue?>> _workers = new();
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
Microsoft.AspNetCore.Routing (9)
DefaultLinkGenerator.cs (2)
33private readonly DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint, TemplateBinder>> _cache; 51_cache = new DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint, TemplateBinder>>(dataSource, (_) =>
DefaultLinkParser.cs (2)
20private readonly DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint, MatcherState>> _matcherCache; 37_matcherCache = new DataSourceDependentCache<ConcurrentDictionary<RouteEndpoint, MatcherState>>(dataSource, (_) =>
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (5)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 494ConcurrentDictionary<Type, PropertyHelper[]>? cache)
Microsoft.AspNetCore.Routing.Abstractions (5)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (5)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new(); 413ConcurrentDictionary<Type, PropertyHelper[]>? allPropertiesCache, 414ConcurrentDictionary<Type, PropertyHelper[]>? visiblePropertiesCache) 494ConcurrentDictionary<Type, PropertyHelper[]>? cache)
Microsoft.AspNetCore.Server.HttpSys (3)
NativeInterop\DisconnectListener.cs (1)
12private readonly ConcurrentDictionary<ulong, ConnectionCancellation> _connectionCancellationTokens = new();
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (2)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new(); 55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.Server.IIS (2)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (2)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new(); 55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Internal\Infrastructure\ConnectionManager.cs (1)
14private readonly ConcurrentDictionary<long, ConnectionReference> _connectionReferences = new ConcurrentDictionary<long, ConnectionReference>();
Internal\Infrastructure\TransportConnectionManager.cs (1)
14private readonly ConcurrentDictionary<long, ConnectionReference> _connectionReferences = new ConcurrentDictionary<long, ConnectionReference>();
Internal\PinnedBlockMemoryPoolFactory.cs (2)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, nuint> _pools = new(); 35((ConcurrentDictionary<PinnedBlockMemoryPool, nuint>)state!).TryRemove(self, out _);
Internal\WebTransport\WebTransportSession.cs (1)
24private readonly ConcurrentDictionary<long, WebTransportStream> _openStreams = new();
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (2)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new(); 55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (4)
DirectTlsTransportFactory.cs (1)
107var contextCache = new ConcurrentDictionary<X509Certificate2, TlsContext>();
ServerTlsContexts.cs (2)
25private readonly ConcurrentDictionary<X509Certificate2, TlsContext> _perCertificateContexts; 30ConcurrentDictionary<X509Certificate2, TlsContext> perCertificateContexts)
TlsEventPump.cs (1)
50private readonly ConcurrentDictionary<int, ConnectionIoState> _connections = new();
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (2)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new(); 55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
src\aspnetcore\src\Shared\Buffers.MemoryPool\DefaultMemoryPoolFactory.cs (2)
18private readonly ConcurrentDictionary<PinnedBlockMemoryPool, bool> _pools = new(); 55((ConcurrentDictionary<PinnedBlockMemoryPool, bool>)state!).TryRemove(self, out _);
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
86private readonly ConcurrentDictionary<string, InvocationHandlerList> _handlers = new ConcurrentDictionary<string, InvocationHandlerList>(StringComparer.Ordinal);
Microsoft.AspNetCore.SignalR.Core (13)
DefaultHubLifetimeManager.cs (4)
147private static void SendToGroupConnections(string methodName, object?[] args, ConcurrentDictionary<string, HubConnectionContext> connections, Func<HubConnectionContext, object?, bool>? include, object? state, ref List<Task>? tasks, ref SerializedHubMessage? message, CancellationToken cancellationToken) 206var group = _groups[groupName]; 238var group = _groups[groupName]; 258var group = _groups[groupName];
HubConnectionContext.cs (1)
249internal ConcurrentDictionary<string, CancellationTokenSource> ActiveRequestCancellationSources { get; } = new ConcurrentDictionary<string, CancellationTokenSource>(StringComparer.Ordinal);
HubConnectionStore.cs (1)
17private readonly ConcurrentDictionary<string, HubConnectionContext> _connections =
Internal\HubGroupList.cs (5)
9internal sealed class HubGroupList : IReadOnlyCollection<ConcurrentDictionary<string, HubConnectionContext>> 11private readonly ConcurrentDictionary<string, GroupConnectionList> _groups = 16public ConcurrentDictionary<string, HubConnectionContext>? this[string groupName] 47public IEnumerator<ConcurrentDictionary<string, HubConnectionContext>> GetEnumerator() 79if (obj is ConcurrentDictionary<string, HubConnectionContext> list)
src\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (1)
16private readonly ConcurrentDictionary<string, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete)> _pendingInvocations = new();
StreamTracker.cs (1)
19private readonly ConcurrentDictionary<string, (long Owner, IStreamConverter Converter)> _lookup = new();
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Internal\AckHandler.cs (1)
11private readonly ConcurrentDictionary<int, AckInfo> _acks = new ConcurrentDictionary<int, AckInfo>();
Internal\RedisSubscriptionManager.cs (1)
10private readonly ConcurrentDictionary<string, HubConnectionStore> _subscriptions = new ConcurrentDictionary<string, HubConnectionStore>(StringComparer.Ordinal);
src\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (1)
16private readonly ConcurrentDictionary<string, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete)> _pendingInvocations = new();
Microsoft.Build (94)
BackEnd\BuildManager\BuildManager.cs (1)
57internal static ConcurrentDictionary<ProjectCacheDescriptor, ProjectCacheDescriptor> ProjectCacheDescriptors { get; } = new(ProjectCacheDescriptorEqualityComparer.Instance);
BackEnd\Components\Caching\ConfigCache.cs (5)
346private ConcurrentDictionary<int, BuildRequestConfiguration> _byId; 347private ConcurrentDictionary<ConfigurationMetadata, BuildRequestConfiguration> _byMetadata; 360internal ConcurrentDictionary<int, BuildRequestConfiguration> ById => _byId; 362internal ConcurrentDictionary<ConfigurationMetadata, BuildRequestConfiguration> ByMetadata => _byMetadata; 387_byId = (ConcurrentDictionary<int, BuildRequestConfiguration>)configurationsById;
BackEnd\Components\Caching\ResultsCache.cs (2)
31private ConcurrentDictionary<int, BuildResult> _resultsByConfiguration; 248_resultsByConfiguration = (ConcurrentDictionary<int, BuildResult>)localReference;
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
63private ConcurrentDictionary<int, NodeContext> _nodeContexts;
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
27private ConcurrentDictionary<int, NodeContext> _nodeContexts;
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
69private readonly ConcurrentDictionary<string, byte /*void*/> _processesToIgnore = new();
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (3)
100private ConcurrentDictionary<TaskHostNodeKey, NodeContext> _nodeContexts; 106private ConcurrentDictionary<int, TaskHostNodeKey> _nodeIdToNodeKey; 117private ConcurrentDictionary<int, Stack<INodePacketHandler>> _nodeIdToPacketHandlerStack;
BackEnd\Components\Communications\TranslatorExtensions.cs (2)
22private static readonly Lazy<ConcurrentDictionary<Type, ConstructorInfo>> parameterlessConstructorCache = new Lazy<ConcurrentDictionary<Type, ConstructorInfo>>(() => new ConcurrentDictionary<Type, ConstructorInfo>());
BackEnd\Components\Logging\LoggingService.cs (1)
115private ConcurrentDictionary<int, string> _projectFileMap;
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
51private readonly ConcurrentDictionary<ProjectCacheDescriptor, Lazy<Task<ProjectCachePlugin>>> _projectCachePlugins = new(ProjectCacheDescriptorEqualityComparer.Instance); 54private readonly ConcurrentDictionary<BuildRequestConfiguration, IReadOnlyDictionary<string, string>> _globalPropertiesPerConfiguration = new();
BackEnd\Components\RequestBuilder\TaskRouter.cs (1)
25private static readonly ConcurrentDictionary<Type, bool> s_multiThreadableTaskCache = new();
BackEnd\Components\Scheduler\SchedulingData.cs (1)
69private readonly ConcurrentDictionary<int, SchedulableRequest> _executingRequestByNode = new(concurrencyLevel: 1, capacity: 32);
BackEnd\Components\SdkResolution\CachingSdkResolverLoader.cs (1)
26private readonly ConcurrentDictionary<SdkResolverManifest, IReadOnlyList<SdkResolver>> _resolversByManifest = new();
BackEnd\Components\SdkResolution\CachingSdkResolverService.cs (4)
22private readonly ConcurrentDictionary<int, ConcurrentDictionary<string, Lazy<SdkResult>>> _cache = new ConcurrentDictionary<int, ConcurrentDictionary<string, Lazy<SdkResult>>>(); 53ConcurrentDictionary<string, Lazy<SdkResult>> cached = _cache.GetOrAdd(
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (1)
32private readonly ConcurrentDictionary<string, Lazy<SdkResult>> _responseCache = new ConcurrentDictionary<string, Lazy<SdkResult>>(MSBuildNameIgnoreCaseComparer.Default);
BackEnd\Components\SdkResolution\SdkResolverService.cs (5)
40private readonly ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>> _resolverStateBySubmission = new ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>>(); 475ConcurrentDictionary<SdkResolver, object> resolverState; 553ConcurrentDictionary<SdkResolver, object> resolverState = _resolverStateBySubmission.GetOrAdd(
BackEnd\Shared\BuildResult.cs (4)
80private ConcurrentDictionary<string, TargetResult> _resultsByTarget; 785private static ConcurrentDictionary<string, TargetResult> CreateTargetResultDictionary(int capacity) 794private static ConcurrentDictionary<string, TargetResult> CreateTargetResultDictionaryWithContents(BuildResult existingResults, string[] targetNames) 796ConcurrentDictionary<string, TargetResult> resultsByTarget = CreateTargetResultDictionary(targetNames.Length);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
920private static readonly ConcurrentDictionary<Type, Func<ITaskItem, ITaskItem>> s_taskItemOfTFactories = new();
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
544private readonly ConcurrentDictionary<int, string> _projectsByInstanceId = new(); 545private readonly ConcurrentDictionary<int, string> _projectsByEvaluationId = new();
BuildCheck\Infrastructure\ConfigurationProvider.cs (3)
23private readonly ConcurrentDictionary<string, CheckConfiguration> _checkConfiguration = new ConcurrentDictionary<string, CheckConfiguration>(StringComparer.InvariantCultureIgnoreCase); 28private readonly ConcurrentDictionary<string, Dictionary<string, string>> _editorConfigData = new ConcurrentDictionary<string, Dictionary<string, string>>(StringComparer.InvariantCultureIgnoreCase); 33private readonly ConcurrentDictionary<string, CustomConfigurationData> _customConfigurationData = new ConcurrentDictionary<string, CustomConfigurationData>(StringComparer.InvariantCultureIgnoreCase);
BuildCheck\Infrastructure\EditorConfig\EditorConfigParser.cs (1)
25private readonly ConcurrentDictionary<string, EditorConfigFile> _editorConfigFileCache = new ConcurrentDictionary<string, EditorConfigFile>(StringComparer.InvariantCultureIgnoreCase);
Definition\ProjectCollection.cs (1)
129private readonly ConcurrentDictionary<string, LockType> _loadProjectLocks = new(StringComparer.OrdinalIgnoreCase);
Evaluation\ConditionEvaluator.cs (3)
141private readonly ConcurrentDictionary<string, Stack<GenericExpressionNode>> _conditionPools; 146public ExpressionTreeForCurrentOptionsWithSize(ConcurrentDictionary<string, Stack<GenericExpressionNode>> conditionPools) 167private static readonly ConcurrentDictionary<int, ExpressionTreeForCurrentOptionsWithSize> s_cachedExpressionTrees = new ConcurrentDictionary<int, ExpressionTreeForCurrentOptionsWithSize>();
Evaluation\Context\EvaluationContext.cs (2)
61private ConcurrentDictionary<string, IReadOnlyList<string>> FileEntryExpansionCache { get; } 64ConcurrentDictionary<string, IReadOnlyList<string>> fileEntryExpansionCache = null)
Evaluation\ParserIgnoreConfiguration.cs (3)
54private readonly ConcurrentDictionary<string, int> _skippedItems = new(StringComparer.OrdinalIgnoreCase); 256private static void MergeSkippedItems(ConcurrentDictionary<string, int> destination, ConcurrentDictionary<string, int> source)
Evaluation\ProjectRootElementCache.cs (1)
128private ConcurrentDictionary<string, object> _fileLoadLocks;
Evaluation\SimpleProjectRootElementCache.cs (1)
28private readonly ConcurrentDictionary<string, ProjectRootElement> _cache;
Graph\GraphBuilder.cs (3)
55private ConcurrentDictionary<ConfigurationMetadata, Lazy<ProjectInstance>> _platformNegotiationInstancesCache = new(); 63private readonly ConcurrentDictionary<ConfigurationMetadata, ConcurrentBag<string>> _projectReferrers = new(); 695private ConcurrentDictionary<(ProjectGraphNode, ProjectGraphNode), ProjectItemInstance> ReferenceItems =
Graph\ParallelWorkSet.cs (1)
27private readonly ConcurrentDictionary<TKey, WorkItem> _inProgressOrCompletedWork;
Graph\ProjectGraph.cs (1)
532var nodeIds = new ConcurrentDictionary<ProjectGraphNode, string>();
Instance\TaskRegistry.cs (5)
129private readonly ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord> _cachedTaskRecordsWithExactMatch = 138private readonly ConcurrentDictionary<string, ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord>> _cachedTaskRecordsWithFuzzyMatch = new(StringComparer.OrdinalIgnoreCase); 560if (_cachedTaskRecordsWithFuzzyMatch.TryGetValue(taskIdentity.Name, out ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord> taskRecords)) 627ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord> taskRecords
Resources\Constants.cs (2)
123private static ConcurrentDictionary<string, Tuple<string, Type>> s_availableStaticMethods; 313var availableStaticMethods = new ConcurrentDictionary<string, Tuple<string, Type>>(StringComparer.OrdinalIgnoreCase);
src\msbuild\src\Shared\RegisteredTaskObjectCacheBase.cs (13)
24private static readonly Lazy<ConcurrentDictionary<object, object>> s_appDomainLifetimeObjects = new Lazy<ConcurrentDictionary<object, object>>(); 29private Lazy<ConcurrentDictionary<object, object>> _buildLifetimeObjects = new Lazy<ConcurrentDictionary<object, object>>(); 60ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: false); 70ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: true); 82ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: true); 96var collection = GetCollectionForLifetime(lifetime, dontCreate: true); 103protected ConcurrentDictionary<object, object> GetCollectionForLifetime(RegisteredTaskObjectLifetime lifetime, bool dontCreate) 105Lazy<ConcurrentDictionary<object, object>> dict = GetLazyCollectionForLifetime(lifetime); 119protected Lazy<ConcurrentDictionary<object, object>> GetLazyCollectionForLifetime(RegisteredTaskObjectLifetime lifetime) 121Lazy<ConcurrentDictionary<object, object>> dict = null; 139private static void DisposeObjects(Lazy<ConcurrentDictionary<object, object>> lifetimeObjects)
src\msbuild\src\Shared\TypeLoader.cs (11)
57private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 62private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 349ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> cache, 358ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes> loadInfoToType = 401private ConcurrentDictionary<string, Type> _typeNameToType; 408private ConcurrentDictionary<string, LoadedType> _publicTypeNameToLoadedType;
Utilities\EngineFileUtilities.cs (4)
593private static readonly Lazy<ConcurrentDictionary<string, bool>> _regexMatchCache = new Lazy<ConcurrentDictionary<string, bool>>(() => new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase)); 604private readonly Lazy<ConcurrentDictionary<string, bool>> existenceCache = new Lazy<ConcurrentDictionary<string, bool>>(() => new ConcurrentDictionary<string, bool>(), true);
Microsoft.Build.Framework (20)
FileClassifier.cs (2)
88/// Although <see cref="ConcurrentDictionary{TKey,TValue}"></see> is not optimal memory-wise, in this particular case it does not matter 91private readonly ConcurrentDictionary<string, string> _knownImmutableDirectories = new();
FileSystem\CachingFileSystemWrapper.cs (4)
15private readonly ConcurrentDictionary<string, bool> _directoryExistenceCache = new(); 16private readonly ConcurrentDictionary<string, bool> _fileExistenceCache = new(); 17private readonly ConcurrentDictionary<string, bool> _fileOrDirectoryExistenceCache = new(); 18private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new();
FileUtilities.cs (1)
141private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
ImmutableFilesTimestampCache.cs (1)
17private readonly ConcurrentDictionary<string, DateTime> _cache = new(StringComparer.OrdinalIgnoreCase);
ItemSpecModifiers.cs (1)
97private static readonly ConcurrentDictionary<string, DefiningProjectModifierCache> s_definingProjectCache =
TaskClassRegistry.cs (1)
45private static readonly ConcurrentDictionary<string, TaskClassRegistration> s_tasksByName = new(StringComparer.OrdinalIgnoreCase);
TaskParameterTypeRegistry.cs (1)
49private static readonly ConcurrentDictionary<string, Type> s_typesByName = new(StringComparer.OrdinalIgnoreCase);
Utilities\FileMatcher.cs (7)
147private static readonly Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>> s_cachedGlobExpansions = new(() => new ConcurrentDictionary<string, IReadOnlyList<string>>(StringComparer.Ordinal)); 148private static readonly Lazy<ConcurrentDictionary<string, object>> s_cachedGlobExpansionsLock = new(() => new ConcurrentDictionary<string, object>(StringComparer.Ordinal)); 149private static readonly Lazy<ConcurrentDictionary< 153private readonly ConcurrentDictionary<string, IReadOnlyList<string>> _cachedGlobExpansions; 154private readonly Lazy<ConcurrentDictionary<string, object>> _cachedGlobExpansionsLock = new(() => new ConcurrentDictionary<string, object>(StringComparer.Ordinal)); 191ConcurrentDictionary<string, IReadOnlyList<string>> fileEntryExpansionCache = null, 212ConcurrentDictionary<string, IReadOnlyList<string>> getFileSystemDirectoryEntriesCache = null,
Utilities\FrameworkLocationHelper.cs (2)
1328private readonly ConcurrentDictionary<DotNetFrameworkArchitecture, string> _pathsToDotNetFramework; 1333private readonly ConcurrentDictionary<Version, string> _pathsToDotNetFrameworkSdkTools;
Microsoft.Build.NuGetSdkResolver (1)
GlobalJsonReader.cs (1)
36private static readonly ConcurrentDictionary<FileInfo, (DateTime LastWriteTime, Lazy<Dictionary<string, string>> Lazy)> FileCache = new ConcurrentDictionary<FileInfo, (DateTime, Lazy<Dictionary<string, string>>)>(FileSystemInfoFullNameEqualityComparer.Instance);
Microsoft.Build.Tasks.Core (25)
AssemblyDependency\AssemblyInformation.cs (1)
270ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache,
AssemblyDependency\ReferenceTable.cs (2)
174private readonly ConcurrentDictionary<string, AssemblyMetadata> _assemblyMetadataCache; 316ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache,
AssemblyDependency\ResolveAssemblyReference.cs (3)
2568ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache = 2878private AssemblyNameExtension[] GetDependencies(Reference resolvedReference, FileExists fileExists, GetAssemblyMetadata getAssemblyMetadata, ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache) 3457(string path, ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache, out AssemblyNameExtension[] dependencies, out string[] scatterFiles, out FrameworkNameVersioning frameworkName)
BootstrapperUtil\Util.cs (1)
33private static readonly ConcurrentDictionary<string, string> s_defaultPathByVersion = new ConcurrentDictionary<string, string>(StringComparer.Ordinal);
Copy.cs (1)
110private readonly ConcurrentDictionary<string, bool> _directoriesKnownToExist = new ConcurrentDictionary<string, bool>(DefaultCopyParallelism, DefaultCopyParallelism, FileUtilities.PathComparer);
Delegate.cs (1)
94ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache,
GetSDKReferenceFiles.cs (8)
54private readonly ConcurrentDictionary<string, SDKInfo> _cacheFileForSDKs = new ConcurrentDictionary<string, SDKInfo>(StringComparer.OrdinalIgnoreCase); 995var references = new ConcurrentDictionary<string, SdkReferenceInfo>(StringComparer.OrdinalIgnoreCase); 996var directoryToFileList = new ConcurrentDictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase); 1025private void PopulateReferencesDictionaryFromManifestPaths(ConcurrentDictionary<string, List<string>> referencesByDirectory, ConcurrentDictionary<string, SdkReferenceInfo> references, string[] sdkManifestReferences) 1043private void PopulateReferencesDictionaryFromPaths(ConcurrentDictionary<string, List<string>> referencesByDirectory, ConcurrentDictionary<string, SdkReferenceInfo> references, IEnumerable<string> referenceDirectories) 1060private static void PopulateRedistDictionaryFromPaths(ConcurrentDictionary<string, List<string>> redistFilesByDirectory, IEnumerable<string> redistDirectories)
RedistList.cs (5)
52private readonly ConcurrentDictionary<AssemblyNameExtension, bool> _assemblyNameInRedist = new ConcurrentDictionary<AssemblyNameExtension, bool>(AssemblyNameComparer.GenericComparer); 57private readonly ConcurrentDictionary<string, AssemblyEntry> _assemblyNameToUnifiedAssemblyName = new ConcurrentDictionary<string, AssemblyEntry>(StringComparer.OrdinalIgnoreCase); 62private readonly ConcurrentDictionary<string, AssemblyNameExtension> _assemblyNameToAssemblyNameExtension = new ConcurrentDictionary<string, AssemblyNameExtension>(StringComparer.OrdinalIgnoreCase); 68private readonly ConcurrentDictionary<AssemblyNameExtension, AssemblyNameExtension> _remappingCache = new ConcurrentDictionary<AssemblyNameExtension, AssemblyNameExtension>(AssemblyNameComparer.GenericComparerConsiderRetargetable); 71private readonly ConcurrentDictionary<string, Dictionary<string, string>> _cachedDenyList = new ConcurrentDictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
88private static readonly ConcurrentDictionary<RoslynCodeTaskFactoryTaskInfo, TaskFactoryUtilities.CachedAssemblyEntry> CompiledAssemblyCache = new ConcurrentDictionary<RoslynCodeTaskFactoryTaskInfo, TaskFactoryUtilities.CachedAssemblyEntry>();
SystemState.cs (2)
73private static readonly ConcurrentDictionary<string, FileState> s_processWideFileStateCache = new ConcurrentDictionary<string, FileState>(StringComparer.OrdinalIgnoreCase); 545ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache,
Microsoft.CodeAnalysis (66)
CodeGen\ArrayMembers.cs (2)
100private readonly ConcurrentDictionary<(byte methodKind, IReferenceOrISignature arrayType), ArrayMethod> _dict = 111var dict = _dict;
CodeGen\CompilationTestData.cs (1)
35public readonly ConcurrentDictionary<IMethodSymbolInternal, MethodData> Methods = new ConcurrentDictionary<IMethodSymbolInternal, MethodData>();
CodeGen\ItemTokenMap.cs (1)
21private readonly ConcurrentDictionary<T, uint> _itemToToken = new ConcurrentDictionary<T, uint>(ReferenceEqualityComparer.Instance);
CodeGen\PrivateImplementationDetails.cs (8)
71private readonly ConcurrentDictionary<(ImmutableArray<byte> Data, ushort Alignment), MappedField> _mappedFields = 75private readonly ConcurrentDictionary<(ImmutableArray<byte> Data, ushort ElementType), CachedArrayField> _cachedArrayFields = 79private readonly ConcurrentDictionary<(ImmutableArray<ConstantValue> Constants, ushort ElementType), CachedArrayField> _cachedArrayFieldsForConstants = 86private readonly ConcurrentDictionary<int, InstrumentationPayloadRootField> _instrumentationPayloadRootFields = new ConcurrentDictionary<int, InstrumentationPayloadRootField>(); 90private readonly ConcurrentDictionary<string, Cci.IMethodDefinition> _synthesizedMethods = 94private readonly ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference> _dataFieldTypes = new ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference>(); 97private readonly ConcurrentDictionary<string, DataSectionStringType> _dataSectionStringLiteralTypes = new ConcurrentDictionary<string, DataSectionStringType>(); 100private readonly ConcurrentDictionary<string, string> _dataSectionStringLiteralNames = new ConcurrentDictionary<string, string>();
CodeGen\StringTokenMap.cs (1)
20private readonly ConcurrentDictionary<string, uint> _valueToToken = new ConcurrentDictionary<string, uint>(StringComparer.Ordinal);
CodeGen\TokenMap.cs (1)
25private readonly ConcurrentDictionary<IReferenceOrISignature, uint> _itemIdentityToToken = new();
Collections\CachingDictionary.cs (7)
128private ConcurrentDictionary<TKey, ImmutableArray<TElement>> CreateConcurrentDictionary() 149ConcurrentDictionary<TKey, ImmutableArray<TElement>>? concurrentMap; 173concurrentMap = localMap as ConcurrentDictionary<TKey, ImmutableArray<TElement>>; 185private ImmutableArray<TElement> AddToConcurrentMap(ConcurrentDictionary<TKey, ImmutableArray<TElement>> map, TKey key) 206return existingMap == null || existingMap is ConcurrentDictionary<TKey, ImmutableArray<TElement>>; 214private IDictionary<TKey, ImmutableArray<TElement>> CreateFullyPopulatedMap(ConcurrentDictionary<TKey, ImmutableArray<TElement>>? existingMap) 254IDictionary<TKey, ImmutableArray<TElement>> fullyPopulatedMap = CreateFullyPopulatedMap((ConcurrentDictionary<TKey, ImmutableArray<TElement>>?)currentMap);
CommandLine\AnalyzerConfig.SectionNameMatching.cs (1)
20private static readonly ConcurrentDictionary<string, Regex> s_regexMap = [];
CommandLine\AnalyzerConfigSet.cs (2)
47private readonly ConcurrentDictionary<ReadOnlyMemory<char>, string> _diagnosticIdCache = 395private static void ParseSectionOptions(Section section, TreeOptions.Builder treeBuilder, AnalyzerOptions.Builder analyzerBuilder, ArrayBuilder<Diagnostic> diagnosticBuilder, string analyzerConfigPath, ConcurrentDictionary<ReadOnlyMemory<char>, string> diagIdCache)
Compilation\Compilation.cs (2)
3666private ConcurrentDictionary<SyntaxTree, SmallConcurrentSetOfInts>? _lazyTreeToUsedImportDirectivesMap; 3669private ConcurrentDictionary<SyntaxTree, SmallConcurrentSetOfInts> TreeToUsedImportDirectivesMap
Diagnostic\CommonMessageProvider.cs (1)
21private static readonly ConcurrentDictionary<(string prefix, int code), string> s_errorIdCache = new ConcurrentDictionary<(string prefix, int code), string>();
DiagnosticAnalyzer\AnalyzerDriver.cs (9)
111private ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions>? _lazyPerSymbolAnalyzerActionsCache; 119private ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions> PerSymbolAnalyzerActionsCache 236private ConcurrentDictionary<SyntaxTree, bool>? _lazyGeneratedCodeFilesMap; 241private ConcurrentDictionary<SyntaxTree, bool> GeneratedCodeFilesMap 264private ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>>? _lazySuppressedAnalyzersForTreeMap; 269private ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>> SuppressedAnalyzersForTreeMap 294private ConcurrentDictionary<ISymbol, bool>? _lazyIsGeneratedCodeSymbolMap; 299private ConcurrentDictionary<ISymbol, bool> IsGeneratedCodeSymbolMap 311private ConcurrentDictionary<SyntaxTree, bool>? _lazyTreesWithHiddenRegionsMap;
DiagnosticAnalyzer\AnalyzerExecutor.cs (4)
51private readonly ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>? _analyzerExecutionTimeMap; 67private ConcurrentDictionary<IOperation, ControlFlowGraph>? _lazyControlFlowGraphMap; 139var analyzerExecutionTimeMap = logExecutionTime ? new ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>() : null; 164ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>? analyzerExecutionTimeMap,
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (1)
59private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _semanticModelsMap;
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
32private static readonly ConcurrentDictionary<string, DirectoryCleanupState> s_directoryCleanupStates = new(AnalyzerAssemblyLoader.OriginalPathComparer); 77private ConcurrentDictionary<string, int> OriginalDirectoryMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 84private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer);
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (2)
34private readonly ConcurrentDictionary<ISymbol, ImmutableDictionary<string, SuppressMessageInfo>> _localSuppressionsBySymbol; 49private readonly ConcurrentDictionary<string, FrozenDictionary<ISymbol, SuppressMessageInfo>> _lazyResolvedSuppressionsById = new ConcurrentDictionary<string, FrozenDictionary<ISymbol, SuppressMessageInfo>>(StringComparer.Ordinal);
Emit\CommonPEModuleBuilder.cs (4)
39private readonly ConcurrentDictionary<IMethodSymbolInternal, Cci.IMethodBody> _methodBodyMap; 949private readonly ConcurrentDictionary<TNamedTypeSymbol, SynthesizedDefinitions> _synthesizedTypeMembers = 952private ConcurrentDictionary<INamespaceSymbolInternal, ConcurrentQueue<INamespaceOrTypeSymbolInternal>> _lazySynthesizedNamespaceMembers; 1073var namespaceMembers = _lazySynthesizedNamespaceMembers;
Emit\DebugDocumentsBuilder.cs (1)
20private readonly ConcurrentDictionary<string, Cci.DebugSourceDocument> _debugDocuments;
Emit\NoPia\EmbeddedTypesManager.cs (5)
69public readonly ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType> EmbeddedTypesMap = new ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType>(ReferenceEqualityComparer.Instance); 70public readonly ConcurrentDictionary<TFieldSymbol, TEmbeddedField> EmbeddedFieldsMap = new ConcurrentDictionary<TFieldSymbol, TEmbeddedField>(ReferenceEqualityComparer.Instance); 71public readonly ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod> EmbeddedMethodsMap = new ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod>(ReferenceEqualityComparer.Instance); 72public readonly ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty> EmbeddedPropertiesMap = new ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty>(ReferenceEqualityComparer.Instance); 73public readonly ConcurrentDictionary<TEventSymbol, TEmbeddedEvent> EmbeddedEventsMap = new ConcurrentDictionary<TEventSymbol, TEmbeddedEvent>(ReferenceEqualityComparer.Instance);
InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
19public static void Add<K, V>(this ConcurrentDictionary<K, V> dict, K key, V value) 28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 45this ConcurrentDictionary<TKey, TValue> dictionary,
InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
MetadataReader\MetadataDecoder.cs (4)
500ConcurrentDictionary<TypeReferenceHandle, TypeSymbol> cache = GetTypeRefHandleToTypeMap(); 617ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> cache = GetTypeHandleToTypeMap(); 2132protected abstract ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> GetTypeHandleToTypeMap(); 2133protected abstract ConcurrentDictionary<TypeReferenceHandle, TypeSymbol> GetTypeRefHandleToTypeMap();
MetadataReader\PEModule.cs (1)
91private ConcurrentDictionary<TypeDefinitionHandle, AttributeInfo> _lazyTypeDefToTypeIdentifierMap;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
Microsoft.CodeAnalysis.Analyzers (57)
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (1)
94var namedTypesToAccessedTypesMap = new ConcurrentDictionary<INamedTypeSymbol, ImmutableHashSet<INamedTypeSymbol>>();
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (9)
250var idToAnalyzerMap = new ConcurrentDictionary<string, ConcurrentDictionary<string, ConcurrentBag<Location>>>(); 465var analyzerToDescriptorLocationsMap = kvp.Value; 1196ConcurrentDictionary<string, ConcurrentDictionary<string, ConcurrentBag<Location>>> idToAnalyzerMap) 1226ConcurrentDictionary<string, ConcurrentBag<Location>> AddNamedTypeFactory(string r) 1228var dict = new ConcurrentDictionary<string, ConcurrentBag<Location>>(); 1236ConcurrentDictionary<string, ConcurrentBag<Location>> UpdateNamedTypeFactory(string r, ConcurrentDictionary<string, ConcurrentBag<Location>> existingValue)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
19public static void Add<K, V>(this ConcurrentDictionary<K, V> dict, K key, V value) 28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 45this ConcurrentDictionary<TKey, TValue> dictionary,
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
58var shouldAnalyzeMap = new ConcurrentDictionary<SyntaxTree, bool>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
14private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _semanticModelMap;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (3)
420private static readonly BoundedCache<Compilation, ConcurrentDictionary<IMethodSymbol, IBlockOperation?>> s_methodToTopmostOperationBlockCache 428var methodToBlockMap = s_methodToTopmostOperationBlockCache.GetOrCreateValue(compilation); 536public static bool IsBenchmarkOrXUnitTestMethod(this IMethodSymbol method, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
72public static bool IsBenchmarkOrXUnitTestAttribute(this INamedTypeSymbol attributeClass, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
273private static readonly BoundedCache<Compilation, ConcurrentDictionary<IOperation, ControlFlowGraph?>> s_operationToCfgCache 280var operationToCfgMap = s_operationToCfgCache.GetOrCreateValue(operation.SemanticModel.Compilation);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
21private readonly ConcurrentDictionary<OptionKey, (bool found, object? value)> _computedOptionValuesMap;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new(); 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult; 381internal ref readonly ConcurrentDictionary<ISymbol, string> SymbolToDeclarationId => ref _symbolNamesWithValueOption._symbolToDeclarationId;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
17/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool. 52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
16/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
42private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledDictionary<K, V>>> s_poolInstancesByComparer
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (4)
19private static readonly BoundedCacheWithFactory<Compilation, ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache>> s_byCompilationCache = new(); 29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 50ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> dict = 55static ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> CreateConcurrentDictionary(Compilation compilation)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\UnusedValue.cs (1)
10/// A placeholder value type for <see cref="ConcurrentDictionary{TKey, TValue}"/> used as a set.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
67private readonly ConcurrentDictionary<string, INamedTypeSymbol?> _fullNameToTypeMap; 81private static readonly ConcurrentDictionary<string, ImmutableArray<string>> _fullTypeNameToNamespaceNames =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
19private static readonly ConcurrentDictionary<(Type type, string name), Type?> s_typeImplementingMethod = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (2)
22private ConcurrentDictionary<int, TriviaData> _map; 32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
302public static void ClearAndFree<TKey, TValue>(this ObjectPool<ConcurrentDictionary<TKey, TValue>> pool, ConcurrentDictionary<TKey, TValue> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
26private readonly ConcurrentDictionary<string, Optional<T>> _cachedValues = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (4)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new(); 34if (!s_treeAliasMap.TryGetValue(semanticModel.Compilation, out var treeMap) || 50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>(); 156ConcurrentDictionary<SyntaxNode, SyntaxNode> reducedNodesMap, 157ConcurrentDictionary<SyntaxToken, SyntaxToken> reducedTokensMap,
Microsoft.CodeAnalysis.AnalyzerUtilities (46)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
19public static void Add<K, V>(this ConcurrentDictionary<K, V> dict, K key, V value) 28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 45this ConcurrentDictionary<TKey, TValue> dictionary,
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
14private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _semanticModelMap;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (3)
420private static readonly BoundedCache<Compilation, ConcurrentDictionary<IMethodSymbol, IBlockOperation?>> s_methodToTopmostOperationBlockCache 428var methodToBlockMap = s_methodToTopmostOperationBlockCache.GetOrCreateValue(compilation); 536public static bool IsBenchmarkOrXUnitTestMethod(this IMethodSymbol method, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
72public static bool IsBenchmarkOrXUnitTestAttribute(this INamedTypeSymbol attributeClass, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
273private static readonly BoundedCache<Compilation, ConcurrentDictionary<IOperation, ControlFlowGraph?>> s_operationToCfgCache 280var operationToCfgMap = s_operationToCfgCache.GetOrCreateValue(operation.SemanticModel.Compilation);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
21private readonly ConcurrentDictionary<OptionKey, (bool found, object? value)> _computedOptionValuesMap;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new(); 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult; 381internal ref readonly ConcurrentDictionary<ISymbol, string> SymbolToDeclarationId => ref _symbolNamesWithValueOption._symbolToDeclarationId;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
17/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool. 52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
16/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
42private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledDictionary<K, V>>> s_poolInstancesByComparer
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (4)
19private static readonly BoundedCacheWithFactory<Compilation, ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache>> s_byCompilationCache = new(); 29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 50ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> dict = 55static ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> CreateConcurrentDictionary(Compilation compilation)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\UnusedValue.cs (1)
10/// A placeholder value type for <see cref="ConcurrentDictionary{TKey, TValue}"/> used as a set.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
67private readonly ConcurrentDictionary<string, INamedTypeSymbol?> _fullNameToTypeMap; 81private static readonly ConcurrentDictionary<string, ImmutableArray<string>> _fullTypeNameToNamespaceNames =
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisHelper.cs (1)
45private ConcurrentDictionary<INamedTypeSymbol, ImmutableHashSet<IFieldSymbol>>? _lazyDisposableFieldsMap;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\WebInputSources.cs (2)
25private static readonly BoundedCacheWithFactory<Compilation, ConcurrentDictionary<INamedTypeSymbol, bool>> s_classIsControllerByCompilation = new(); 92var classCache = s_classIsControllerByCompilation.GetOrCreateValue(wellKnownTypeProvider.Compilation, (compilation) => new ConcurrentDictionary<INamedTypeSymbol, bool>());
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\SingleThreadedConcurrentDictionary.cs (1)
32private readonly ConcurrentDictionary<TKey, Entry> BackingDictionary = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
19private static readonly ConcurrentDictionary<(Type type, string name), Type?> s_typeImplementingMethod = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (2)
22private ConcurrentDictionary<int, TriviaData> _map; 32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
302public static void ClearAndFree<TKey, TValue>(this ObjectPool<ConcurrentDictionary<TKey, TValue>> pool, ConcurrentDictionary<TKey, TValue> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
26private readonly ConcurrentDictionary<string, Optional<T>> _cachedValues = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (4)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new(); 34if (!s_treeAliasMap.TryGetValue(semanticModel.Compilation, out var treeMap) || 50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
Microsoft.CodeAnalysis.CodeStyle (46)
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
58private readonly ConcurrentDictionary<IParameterSymbol, bool> _referencedParameters;
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (2)
36private readonly ConcurrentDictionary<IMethodSymbol, bool> _methodsUsedAsDelegates = []; 45private readonly ConcurrentDictionary<IParameterSymbol, bool> _unusedParameters = [];
src\roslyn\src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (6)
22private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new(); 23private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new(); 27(s_diagnosticIdToLanguageSpecificOptionsMap.TryGetValue(language, out var map) && 66var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>()); 79private static void AddOptionMapping(ConcurrentDictionary<string, ImmutableHashSet<IOption2>> map, string diagnosticId, ImmutableHashSet<IOption2> options)
src\roslyn\src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
42var fieldStateMap = new ConcurrentDictionary<IFieldSymbol, (bool isCandidate, bool written)>();
src\roslyn\src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (6)
47var idToCachedResult = new ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>>( 106private static readonly Func<Guid, ConcurrentDictionary<string, string?>> s_createCache = 114ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>> idToCachedResult) 145var cache = idToCachedResult.GetOrAdd(applicableRule.NamingStyle.ID, s_createCache);
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
208private readonly ConcurrentDictionary<SyntaxTree, (StrongBox<bool> completed, TextSpanMutableIntervalTree? intervalTree)> _codeBlockIntervals = [];
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (12)
51private static readonly ObjectPool<ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>>> s_fieldToUsageLocationPool = new(() => []); 58protected static void AddFieldUsage(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, IFieldSymbol field, SyntaxNode location) 61private static void ClearAndFree(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> multiMap) 94HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 109var ineligibleFieldUsageIfOutsideProperty = s_fieldToUsageLocationPool.Allocate(); 114var fieldReads = s_fieldToUsageLocationPool.Allocate(); 115var fieldWrites = s_fieldToUsageLocationPool.Allocate(); 222ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads, 223ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, 538ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, 539ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads, 540ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites,
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
19public static void Add<K, V>(this ConcurrentDictionary<K, V> dict, K key, V value) 28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 45this ConcurrentDictionary<TKey, TValue> dictionary,
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
19private static readonly ConcurrentDictionary<(Type type, string name), Type?> s_typeImplementingMethod = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (2)
22private ConcurrentDictionary<int, TriviaData> _map; 32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
302public static void ClearAndFree<TKey, TValue>(this ObjectPool<ConcurrentDictionary<TKey, TValue>> pool, ConcurrentDictionary<TKey, TValue> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
26private readonly ConcurrentDictionary<string, Optional<T>> _cachedValues = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (4)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new(); 34if (!s_treeAliasMap.TryGetValue(semanticModel.Compilation, out var treeMap) || 50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>(); 156ConcurrentDictionary<SyntaxNode, SyntaxNode> reducedNodesMap, 157ConcurrentDictionary<SyntaxToken, SyntaxToken> reducedTokensMap,
Microsoft.CodeAnalysis.CSharp (63)
Binder\InMethodBinder.cs (1)
38public ConcurrentDictionary<IdentifierNameSyntax, int> IdentifierMap;
BoundTree\UnboundLambda.cs (2)
543Constraint = "Avoid " + nameof(ConcurrentDictionary<(NamedTypeSymbol, bool), BoundLambda>) + " which has a large default size, but this cache is normally small.")] 548Constraint = "Avoid " + nameof(ConcurrentDictionary<ReturnInferenceCacheKey, BoundLambda>) + " which has a large default size, but this cache is normally small.")]
Compilation\CSharpCompilation.cs (4)
71private ConcurrentDictionary<ImportInfo, ImmutableArray<AssemblySymbol>>? _lazyImportInfos; 1572private ConcurrentDictionary<string, NamespaceSymbol>? _externAliasTargets; 2553private ConcurrentDictionary<(ImmutableArray<byte> ContentHash, int Position), OneOrMany<(Location AttributeLocation, MethodSymbol Interceptor)>>? _interceptions; 2560var dictionary = LazyInitializer.EnsureInitialized(ref _interceptions,
Compiler\ClsComplianceChecker.cs (1)
32private readonly ConcurrentDictionary<Symbol, Compliance> _declaredOrInheritedCompliance;
Compiler\MethodCompiler.cs (4)
1938ConcurrentDictionary<IdentifierNameSyntax, int>? identifierMap; 2134out InMethodBinder? inMethodBinder, out ConcurrentDictionary<IdentifierNameSyntax, int>? identifierMap) 2187static void addIdentifiers(CSharpSyntaxNode? node, ConcurrentDictionary<IdentifierNameSyntax, int> identifierMap) 2275static void assertBindIdentifierTargets(InMethodBinder? inMethodBinder, ConcurrentDictionary<IdentifierNameSyntax, int>? identifierMap, BoundNode methodBody, BindingDiagnosticBag diagnostics)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
121private readonly ConcurrentDictionary<Symbol, Symbol?> _matches = new(ReferenceEqualityComparer.Instance); 129private readonly ConcurrentDictionary<ISymbolInternal, IReadOnlyDictionary<string, ImmutableArray<ISymbolInternal>>> _otherMembers = new(ReferenceEqualityComparer.Instance); 853private readonly ConcurrentDictionary<Symbol, Symbol> _matches;
Emitter\Model\PEModuleBuilder.cs (4)
31protected readonly ConcurrentDictionary<Symbol, Cci.IModuleReference> AssemblyOrModuleSymbolToModuleRefMap = new ConcurrentDictionary<Symbol, Cci.IModuleReference>(); 32private readonly ConcurrentDictionary<Symbol, object> _genericInstanceMap = new ConcurrentDictionary<Symbol, object>(Symbols.SymbolEqualityComparer.ConsiderEverything); 33private readonly ConcurrentDictionary<ImportChain, ImmutableArray<Cci.UsedNamespaceOrType>> _translatedImportsMap = 53private readonly ConcurrentDictionary<int, NamedTypeSymbol> _inlineArrayTypes = new ConcurrentDictionary<int, NamedTypeSymbol>();
Emitter\NoPia\EmbeddedTypesManager.cs (2)
38private readonly ConcurrentDictionary<AssemblySymbol, string> _assemblyGuidMap = new ConcurrentDictionary<AssemblySymbol, string>(ReferenceEqualityComparer.Instance); 39private readonly ConcurrentDictionary<Symbol, bool> _reportedSymbolsMap = new ConcurrentDictionary<Symbol, bool>(ReferenceEqualityComparer.Instance);
FlowAnalysis\NullableWalker.cs (1)
37internal readonly ConcurrentDictionary<object, NullableWalker.Data> Data;
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (10)
30private ConcurrentDictionary<string, AnonymousTypeTemplateSymbol>? _lazyAnonymousTypeTemplates; 36private ConcurrentDictionary<SynthesizedDelegateKey, AnonymousDelegateTemplateSymbol>? _lazyAnonymousDelegates; 90private readonly ConcurrentDictionary<Location, bool> _sourceLocationsSeen = new ConcurrentDictionary<Location, bool>(); 112private ConcurrentDictionary<string, AnonymousTypeTemplateSymbol> AnonymousTypeTemplates 120var previousCache = Compilation.PreviousSubmission?.AnonymousTypeManager.AnonymousTypeTemplates; 133private ConcurrentDictionary<SynthesizedDelegateKey, AnonymousDelegateTemplateSymbol> AnonymousDelegates 140var previousCache = Compilation.PreviousSubmission?.AnonymousTypeManager._lazyAnonymousDelegates; 555var anonymousTypes = _lazyAnonymousTypeTemplates; 573var anonymousDelegates = _lazyAnonymousDelegates; 595var delegates = _lazyAnonymousDelegates;
Symbols\Metadata\PE\MetadataDecoder.cs (3)
106protected override ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> GetTypeHandleToTypeMap() 111protected override ConcurrentDictionary<TypeReferenceHandle, TypeSymbol> GetTypeRefHandleToTypeMap() 312ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> cache = GetTypeHandleToTypeMap();
Symbols\Metadata\PE\PEModuleSymbol.cs (2)
67internal readonly ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol> TypeHandleToTypeMap = 76internal readonly ConcurrentDictionary<TypeReferenceHandle, TypeSymbol> TypeRefHandleToTypeMap =
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
198public ConcurrentDictionary<MethodSymbol, MethodSymbol?>? LazyImplementationMap;
Symbols\MetadataOrSourceOrRetargetingAssemblySymbol.cs (2)
143private ConcurrentDictionary<AssemblySymbol, IVTConclusion> _assembliesToWhichInternalAccessHasBeenAnalyzed; 145internal ConcurrentDictionary<AssemblySymbol, IVTConclusion> AssembliesToWhichInternalAccessHasBeenDetermined
Symbols\NonMissingAssemblySymbol.cs (1)
32private readonly ConcurrentDictionary<MetadataTypeName.Key, NamedTypeSymbol> _emittedNameToTypeMap =
Symbols\Retargeting\RetargetingAssemblySymbol.cs (2)
75private ConcurrentDictionary<NamedTypeSymbol, NamedTypeSymbol> _noPiaUnificationMap; 80internal ConcurrentDictionary<NamedTypeSymbol, NamedTypeSymbol> NoPiaUnificationMap =>
Symbols\Retargeting\RetargetingModuleSymbol.cs (2)
57private ConcurrentDictionary<NamedTypeSymbol, NamedTypeSymbol>? _symbolMap; 59public ConcurrentDictionary<NamedTypeSymbol, NamedTypeSymbol> SymbolMap => LazyInitializer.EnsureInitialized(ref _symbolMap);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (3)
31private readonly ConcurrentDictionary<Symbol, Symbol> _symbolMap = 118private ConcurrentDictionary<Symbol, Symbol> SymbolMap 314var map = this.RetargetingAssembly.NoPiaUnificationMap;
Symbols\Source\SourceAssemblySymbol.cs (11)
97private readonly ConcurrentDictionary<FieldSymbol, bool> _unassignedFieldsMap = new ConcurrentDictionary<FieldSymbol, bool>(); 533private ConcurrentDictionary<AssemblySymbol, bool> _optimisticallyGrantedInternalsAccess; 738foreach (var keys in _lazyInternalsVisibleToMap.Values) 2102ConcurrentDictionary<AssemblySymbol, bool> haveGrantedAssemblies = _optimisticallyGrantedInternalsAccess; 2133ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>> result = null; 2197private ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>>> _lazyInternalsVisibleToMap; 2275ref ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>>> lazyInternalsVisibleToMap) 2309new ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, String>>>(StringComparer.OrdinalIgnoreCase), null); 2329ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>> keys = null;
Symbols\TypeSymbol.cs (4)
62private ConcurrentDictionary<Symbol, SymbolAndDiagnostics> _implementationForInterfaceMemberMap; 64public ConcurrentDictionary<Symbol, SymbolAndDiagnostics> ImplementationForInterfaceMemberMap 68var map = _implementationForInterfaceMemberMap; 752var map = info.ImplementationForInterfaceMemberMap;
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
259private readonly ConcurrentDictionary<SyntaxTree, SyntaxTreeState> _codeBlockIntervals = [];
src\roslyn\src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
49ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
35private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
31private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (4)
79var namedTypeToAnalyzer = new ConcurrentDictionary<INamedTypeSymbol, Analyzer>(); 145ConcurrentDictionary<INamedTypeSymbol, Analyzer> namedTypeToAnalyzer) 154private readonly ConcurrentDictionary<INamedTypeSymbol, Analyzer> _namedTypeToAnalyzer = namedTypeToAnalyzer; 204ConcurrentDictionary<INamedTypeSymbol, Analyzer> namedTypeToAnalyzer)
Microsoft.CodeAnalysis.CSharp.Features (8)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
259private readonly ConcurrentDictionary<SyntaxTree, SyntaxTreeState> _codeBlockIntervals = [];
src\roslyn\src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
49ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
35private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\roslyn\src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
31private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (4)
79var namedTypeToAnalyzer = new ConcurrentDictionary<INamedTypeSymbol, Analyzer>(); 145ConcurrentDictionary<INamedTypeSymbol, Analyzer> namedTypeToAnalyzer) 154private readonly ConcurrentDictionary<INamedTypeSymbol, Analyzer> _namedTypeToAnalyzer = namedTypeToAnalyzer; 204ConcurrentDictionary<INamedTypeSymbol, Analyzer> namedTypeToAnalyzer)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.CodeQuality.Analyzers\Maintainability\CSharpAvoidUninstantiatedInternalClasses.cs (1)
17public override void RegisterLanguageSpecificChecks(CompilationStartAnalysisContext context, ConcurrentDictionary<INamedTypeSymbol, object?> instantiatedTypes)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CaseCorrection\CSharpCaseCorrectionService.cs (1)
30ConcurrentDictionary<SyntaxToken, SyntaxToken> replacements,
Microsoft.CodeAnalysis.Extensions.Package (1)
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
Microsoft.CodeAnalysis.Features (62)
AddImport\AbstractAddImportFeatureService.cs (6)
147var projectToAssembly = new ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>>(concurrencyLevel: 2, capacity: project.Solution.ProjectIds.Count); 148var referenceToCompilation = new ConcurrentDictionary<PortableExecutableReference, Compilation>(concurrencyLevel: 2, capacity: project.Solution.Projects.Sum(p => p.MetadataReferences.Count)); 172ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> projectToAssembly, 173ConcurrentDictionary<PortableExecutableReference, Compilation> referenceToCompilation, 217ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> projectToAssembly, 262ConcurrentDictionary<PortableExecutableReference, Compilation> referenceToCompilation,
AddImport\SearchScopes\SourceSymbolsProjectSearchScope.cs (2)
24ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> projectToAssembly, 27private readonly ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> _projectToAssembly = projectToAssembly;
AddImport\SymbolReferenceFinder.cs (1)
97internal Task<ImmutableArray<SymbolReference>> FindInSourceSymbolsInProjectAsync(ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> projectToAssembly, Project project, bool exact, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (4)
254var documentIdToChangedDocuments = new ConcurrentDictionary<DocumentId, ConcurrentBag<(CodeAction, Document)>>(); 283var documentIdToFinalText = new ConcurrentDictionary<DocumentId, SourceText>(); 298ConcurrentDictionary<DocumentId, SourceText> documentIdToFinalText, 345ConcurrentDictionary<DocumentId, ConcurrentBag<(CodeAction, Document)>> documentIdToChangedDocuments,
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.cs (1)
32private static readonly ConcurrentDictionary<ProjectId, ExtensionMemberImportCompletionCacheEntry> s_projectItemsCache = new();
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.SymbolComputer.cs (1)
43private readonly ConcurrentDictionary<ITypeSymbol, bool> _checkedReceiverTypes = [];
Completion\SharedSyntaxContextsWithSpeculativeModel.cs (1)
20private readonly ConcurrentDictionary<Document, AsyncLazy<SyntaxContext>> _cache;
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
60private readonly ConcurrentDictionary<DocumentId, (string? category, VersionStamp projectVersion)> _documentToLastReportedInformation = [];
Diagnostics\CodeAnalysisDiagnosticAnalyzerService.cs (1)
37private readonly ConcurrentDictionary<ProjectId, ImmutableArray<DiagnosticData>> _analyzedProjectToDiagnostics = [];
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (1)
34private readonly ConcurrentDictionary<DocumentId, /*unused*/ object?> _higherPriorityDocumentsNotProcessed;
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
49private readonly ConcurrentDictionary<string, (MetadataAsSourceGeneratedFileInfo Metadata, DocumentId DocumentId)> _generatedFilenameToInformation = new(StringComparer.OrdinalIgnoreCase);
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (8)
24using CachedIndexMap = ConcurrentDictionary<(IChecksummedPersistentStorageService service, DocumentKey documentKey, StringTable stringTable), AsyncLazy<TopLevelSyntaxTreeIndex?>>; 25using CachedFilterIndexMap = ConcurrentDictionary<(IChecksummedPersistentStorageService service, DocumentKey documentKey, StringTable stringTable), AsyncLazy<NavigateToSearchIndex?>>; 34private static CachedIndexMap? s_cachedIndexMap = []; 40private static CachedFilterIndexMap? s_cachedFilterIndexMap = []; 58[NotNullWhen(true)] out CachedIndexMap? cachedIndexMap, 59[NotNullWhen(true)] out CachedFilterIndexMap? cachedFilterIndexMap, 188if (!ShouldSearchCachedDocuments(out _, out var cachedFilterIndexMap, out var stringTable)) 209if (!ShouldSearchCachedDocuments(out var cachedIndexMap, out _, out var stringTable))
Organizing\AbstractOrganizingService.cs (1)
33var map = new ConcurrentDictionary<Type, IEnumerable<ISyntaxOrganizer>>();
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
67private readonly ConcurrentDictionary<string, SourceDocumentInfo> _fileToDocumentInfoMap = new(StringComparer.OrdinalIgnoreCase);
Shared\Extensions\ISymbolExtensions_Sorting.cs (2)
36var symbolToParameterTypeNames = new ConcurrentDictionary<TSymbol, string[]>(); 154ConcurrentDictionary<TSymbol, string[]> symbolToParameterTypeNames,
SignatureHelp\SignatureHelpService.cs (1)
27private readonly ConcurrentDictionary<string, ImmutableArray<ISignatureHelpProvider>> _providersByLanguage = [];
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
58private readonly ConcurrentDictionary<IParameterSymbol, bool> _referencedParameters;
src\9547feb31df4cc5d\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (2)
36private readonly ConcurrentDictionary<IMethodSymbol, bool> _methodsUsedAsDelegates = []; 45private readonly ConcurrentDictionary<IParameterSymbol, bool> _unusedParameters = [];
src\roslyn\src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (6)
22private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new(); 23private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new(); 27(s_diagnosticIdToLanguageSpecificOptionsMap.TryGetValue(language, out var map) && 66var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>()); 79private static void AddOptionMapping(ConcurrentDictionary<string, ImmutableHashSet<IOption2>> map, string diagnosticId, ImmutableHashSet<IOption2> options)
src\roslyn\src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
42var fieldStateMap = new ConcurrentDictionary<IFieldSymbol, (bool isCandidate, bool written)>();
src\roslyn\src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (6)
47var idToCachedResult = new ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>>( 106private static readonly Func<Guid, ConcurrentDictionary<string, string?>> s_createCache = 114ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>> idToCachedResult) 145var cache = idToCachedResult.GetOrAdd(applicableRule.NamingStyle.ID, s_createCache);
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
208private readonly ConcurrentDictionary<SyntaxTree, (StrongBox<bool> completed, TextSpanMutableIntervalTree? intervalTree)> _codeBlockIntervals = [];
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (12)
51private static readonly ObjectPool<ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>>> s_fieldToUsageLocationPool = new(() => []); 58protected static void AddFieldUsage(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, IFieldSymbol field, SyntaxNode location) 61private static void ClearAndFree(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> multiMap) 94HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 109var ineligibleFieldUsageIfOutsideProperty = s_fieldToUsageLocationPool.Allocate(); 114var fieldReads = s_fieldToUsageLocationPool.Allocate(); 115var fieldWrites = s_fieldToUsageLocationPool.Allocate(); 222ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads, 223ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, 538ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, 539ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads, 540ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites,
Microsoft.CodeAnalysis.Features.ExternalAccess (3)
Copilot\Internal\Analyzer\AbstractCopilotCodeAnalysisService.cs (3)
38private readonly ConditionalWeakTable<Document, ConcurrentDictionary<string, (ImmutableArray<Diagnostic> Diagnostics, bool IsCompleteResult)>> _diagnosticsCache = new(); 104if (_diagnosticsCache.TryGetValue(document, out var existingDiagnosticsMap) 126var diagnosticsMap = _diagnosticsCache.GetOrCreateValue(document);
Microsoft.CodeAnalysis.NetAnalyzers (116)
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUninstantiatedInternalClasses.cs (4)
41public abstract void RegisterLanguageSpecificChecks(CompilationStartAnalysisContext context, ConcurrentDictionary<INamedTypeSymbol, object?> instantiatedTypes); 50ConcurrentDictionary<INamedTypeSymbol, object?> instantiatedTypes = new ConcurrentDictionary<INamedTypeSymbol, object?>(); 51var internalTypes = new ConcurrentDictionary<INamedTypeSymbol, object?>(); 373protected void ProcessGenericTypes(IEnumerable<(ITypeParameterSymbol param, ITypeSymbol arg)> generics, ConcurrentDictionary<INamedTypeSymbol, object?> instantiatedTypes)
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUnusedPrivateFields.cs (2)
47ConcurrentDictionary<IFieldSymbol, UnusedValue> maybeUnreferencedPrivateFields = new ConcurrentDictionary<IFieldSymbol, UnusedValue>(); 48ConcurrentDictionary<IFieldSymbol, UnusedValue> referencedPrivateFields = new ConcurrentDictionary<IFieldSymbol, UnusedValue>();
Microsoft.NetCore.Analyzers\InteropServices\DisableRuntimeMarshallingAnalyzer.AutoLayoutTypeCache.cs (1)
19private readonly ConcurrentDictionary<ITypeSymbol, bool> _cache = new();
Microsoft.NetCore.Analyzers\InteropServices\PlatformCompatibilityAnalyzer.cs (4)
191var platformSpecificMembers = new ConcurrentDictionary<ISymbol, PlatformAttributes>(); 314ConcurrentDictionary<ISymbol, PlatformAttributes> platformSpecificMembers, 1337ConcurrentDictionary<ISymbol, PlatformAttributes> platformSpecificMembers, ImmutableArray<string> msBuildPlatforms, 1783bool crossPlatform, ConcurrentDictionary<ISymbol, PlatformAttributes> platformSpecificMembers,
Microsoft.NetCore.Analyzers\Performance\PreferReadOnlySpanOverSpan.cs (3)
73ConcurrentDictionary<IParameterSymbol, INamedTypeSymbol>? candidateParameters = null; 74ConcurrentDictionary<IParameterSymbol, int> parameterReferenceCounts = new(SymbolEqualityComparer.Default); 128ConcurrentDictionary<IParameterSymbol, INamedTypeSymbol> candidateParameters,
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.Collector.cs (11)
22public ConcurrentDictionary<IFieldSymbol, PooledConcurrentSet<IMethodSymbol>> VirtualDispatchFields { get; } = new(SymbolEqualityComparer.Default); 23public ConcurrentDictionary<IPropertySymbol, PooledConcurrentSet<IMethodSymbol>> VirtualDispatchProperties { get; } = new(SymbolEqualityComparer.Default); 24public ConcurrentDictionary<ILocalSymbol, PooledConcurrentSet<IMethodSymbol>> VirtualDispatchLocals { get; } = new(SymbolEqualityComparer.Default); 25public ConcurrentDictionary<IParameterSymbol, PooledConcurrentSet<IMethodSymbol>> VirtualDispatchParameters { get; } = new(SymbolEqualityComparer.Default); 27public ConcurrentDictionary<IFieldSymbol, PooledConcurrentSet<ITypeSymbol>> FieldAssignments { get; } = new(SymbolEqualityComparer.Default); 28public ConcurrentDictionary<IPropertySymbol, PooledConcurrentSet<ITypeSymbol>> PropertyAssignments { get; } = new(SymbolEqualityComparer.Default); 29public ConcurrentDictionary<ILocalSymbol, PooledConcurrentSet<ITypeSymbol>> LocalAssignments { get; } = new(SymbolEqualityComparer.Default); 30public ConcurrentDictionary<IParameterSymbol, PooledConcurrentSet<ITypeSymbol>> ParameterAssignments { get; } = new(SymbolEqualityComparer.Default); 32public ConcurrentDictionary<IMethodSymbol, PooledConcurrentSet<ITypeSymbol>> MethodReturns { get; } = new(SymbolEqualityComparer.Default); 34public ConcurrentDictionary<IMethodSymbol, bool> MethodsAssignedToDelegate { get; } = new(SymbolEqualityComparer.Default); 62static void DrainDictionary<T, U>(ConcurrentDictionary<T, PooledConcurrentSet<U>> d)
Microsoft.NetCore.Analyzers\Runtime\DetectPreviewFeatureAnalyzer.cs (18)
244ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols = new(); 291ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 322ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 337ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 373ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 387ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 458ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 518private static bool SymbolIsStaticAndAbstract(ISymbol symbol, ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, INamedTypeSymbol previewFeatureAttributeSymbol) 526ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 670ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 701ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 718ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 743ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 848ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 909ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 935ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 962ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, 986private static bool SymbolIsAnnotatedAsPreview(ISymbol symbol, ConcurrentDictionary<ISymbol, (bool isPreview, string? message, string? url)> requiresPreviewFeaturesSymbols, INamedTypeSymbol previewFeatureAttribute)
Microsoft.NetCore.Analyzers\Runtime\DisposeObjectsBeforeLosingScope.cs (1)
87var reportedLocations = new ConcurrentDictionary<Location, bool>();
Microsoft.NetCore.Analyzers\Runtime\ProvideCorrectArgumentsToFormattingMethods.cs (1)
344private readonly ConcurrentDictionary<IMethodSymbol, Info?> _map;
Microsoft.NetCore.Analyzers\Runtime\UseAsyncMethodInAsyncContext.cs (5)
62ConcurrentDictionary<string, INamedTypeSymbol> syncBlockingTypes = new(); 206private static void GetTypeAndAddToDictionary(string key, string typeName, ConcurrentDictionary<string, INamedTypeSymbol> syncBlockingTypes, WellKnownTypeProvider wellKnownTypeProvider) 277private static bool HasAsyncCompatibleReturnType(IMethodSymbol methodSymbol, ConcurrentDictionary<string, INamedTypeSymbol> syncBlockingTypes) 286static bool CheckReturnTypeMatch(string targetType, ISymbol returnType, ConcurrentDictionary<string, INamedTypeSymbol> syncBlockingTypes) 320private static bool IsInTaskReturningMethodOrDelegate(OperationAnalysisContext context, ConcurrentDictionary<string, INamedTypeSymbol> syncBlockingTypes)
Microsoft.NetCore.Analyzers\Security\DataSetDataTableInSerializableTypeAnalyzer.cs (1)
127ConcurrentDictionary<INamedTypeSymbol, bool> visitedTypes =
Microsoft.NetCore.Analyzers\Security\DoNotCallDangerousMethodsInDeserialization.cs (4)
124var callGraph = new ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>>(); 130ConcurrentDictionary<ISymbol, bool> calledMethods; 251if (!callGraph.TryGetValue(methodSymbol, out var calledMethods))
Microsoft.NetCore.Analyzers\Security\DoNotSerializeTypeWithPointerFields.cs (2)
56ConcurrentDictionary<ITypeSymbol, bool> visitedType = new ConcurrentDictionary<ITypeSymbol, bool>(); 57ConcurrentDictionary<IFieldSymbol, bool> pointerFields = new ConcurrentDictionary<IFieldSymbol, bool>();
Microsoft.NetCore.Analyzers\Security\Helpers\InsecureDeserializationTypeDecider.cs (2)
119private readonly ConcurrentDictionary<ITypeSymbol, ITypeSymbol?> IsTypeInsecureCache = 166private readonly ConcurrentDictionary<(ITypeSymbol, ObjectGraphOptions), ImmutableArray<InsecureObjectGraphResult>> IsObjectGraphInsecureCache =
Microsoft.NetCore.Analyzers\Security\PotentialReferenceCycleInDeserializedObjectGraph.cs (17)
63ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>> forwardGraph = new ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>>(); 64ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>> invertedGraph = new ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>>(); 67ConcurrentDictionary<ISymbol, int> inDegree = new ConcurrentDictionary<ISymbol, int>(); 70ConcurrentDictionary<ISymbol, int> outDegree = new ConcurrentDictionary<ISymbol, int>(); 183void AddLine(ISymbol from, ISymbol to, ConcurrentDictionary<ISymbol, int> degree, ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>> graph) 198static bool AddPoint(ISymbol point, ConcurrentDictionary<ISymbol, int> degree, ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>> graph) 228static void ModifyDegree(ConcurrentDictionary<ISymbol, int> degree, ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>> graph)
Microsoft.NetCore.Analyzers\Security\UseAutoValidateAntiforgeryToken.cs (7)
105var inverseGraph = new ConcurrentDictionary<ISymbol, ConcurrentDictionary<ISymbol, bool>>(); 113ConcurrentDictionary<IMethodSymbol, bool> onAuthorizationMethodSymbols = new ConcurrentDictionary<IMethodSymbol, bool>(); 114var actionMethodSymbols = new ConcurrentDictionary<(IMethodSymbol, string), bool>(); 115var actionMethodNeedAddingHttpVerbAttributeSymbols = new ConcurrentDictionary<IMethodSymbol, bool>(); 137ConcurrentDictionary<ISymbol, bool>? callers = null; 385if (!inverseGraph.TryGetValue(methodSymbol, out var callingMethods))
Microsoft.NetFramework.Analyzers\DoNotUseInsecureDtdProcessingInApiDesign.cs (2)
84private readonly ConcurrentDictionary<INamedTypeSymbol, bool> _xmlDocumentDerivedTypes = new(); 85private readonly ConcurrentDictionary<INamedTypeSymbol, bool> _xmlTextReaderDerivedTypes = new();
Microsoft.NetFramework.Analyzers\DoNotUseInsecureXSLTScriptExecution.cs (1)
105private readonly ConcurrentDictionary<ISymbol, XsltSettingsEnvironment> _xsltSettingsEnvironments = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
15private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _semanticModelMap;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (3)
559private static readonly BoundedCache<Compilation, ConcurrentDictionary<IMethodSymbol, IBlockOperation?>> s_methodToTopmostOperationBlockCache 567var methodToBlockMap = s_methodToTopmostOperationBlockCache.GetOrCreateValue(compilation); 730public static bool IsBenchmarkOrXUnitTestMethod(this IMethodSymbol method, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
275public static bool IsBenchmarkOrXUnitTestAttribute(this INamedTypeSymbol attributeClass, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
444private static readonly BoundedCache<Compilation, ConcurrentDictionary<IOperation, ControlFlowGraph?>> s_operationToCfgCache 451var operationToCfgMap = s_operationToCfgCache.GetOrCreateValue(operation.SemanticModel.Compilation);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
20private readonly ConcurrentDictionary<OptionKey, (bool found, object? value)> _computedOptionValuesMap;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\OptionKey.cs (1)
12private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
57private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 59private readonly ConcurrentDictionary<ISymbol, string?> _symbolToDeclarationId = new(); 384internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult; 386internal ref readonly ConcurrentDictionary<ISymbol, string?> SymbolToDeclarationId => ref _symbolNamesWithValueOption._symbolToDeclarationId;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
15/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool. 50private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
15/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool.
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
81private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledDictionary<K, V>>> s_poolInstancesByComparer
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledHashSet.cs (1)
63private static readonly ConcurrentDictionary<IEqualityComparer<T>, ObjectPool<PooledHashSet<T>>> s_poolInstancesByComparer = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
45private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\SymbolDisplayStringCache.cs (4)
18private static readonly BoundedCacheWithFactory<Compilation, ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache>> s_byCompilationCache = new(); 28private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 49ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> dict = 54static ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> CreateConcurrentDictionary(Compilation compilation)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\UnusedValue.cs (1)
9/// A placeholder value type for <see cref="ConcurrentDictionary{TKey, TValue}"/> used as a set.
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\WellKnownTypeProvider.cs (2)
65private readonly ConcurrentDictionary<string, INamedTypeSymbol?> _fullNameToTypeMap; 81private static readonly ConcurrentDictionary<string, ImmutableArray<string>> _fullTypeNameToNamespaceNames =
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisHelper.cs (1)
44private ConcurrentDictionary<INamedTypeSymbol, ImmutableHashSet<IFieldSymbol>>? _lazyDisposableFieldsMap;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\WebInputSources.cs (2)
23private static readonly BoundedCacheWithFactory<Compilation, ConcurrentDictionary<INamedTypeSymbol, bool>> s_classIsControllerByCompilation = new(); 90var classCache = s_classIsControllerByCompilation.GetOrCreateValue(wellKnownTypeProvider.Compilation, (compilation) => new ConcurrentDictionary<INamedTypeSymbol, bool>());
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\SingleThreadedConcurrentDictionary.cs (1)
31private readonly ConcurrentDictionary<TKey, Entry> BackingDictionary = new();
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\SymbolCache.AssemblySymbolData.cs (1)
18private readonly ConcurrentDictionary<int, TagHelperCollection> _tagHelpers = [];
Microsoft.CodeAnalysis.ResxSourceGenerator (42)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
19public static void Add<K, V>(this ConcurrentDictionary<K, V> dict, K key, V value) 28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 45this ConcurrentDictionary<TKey, TValue> dictionary,
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
14private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _semanticModelMap;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (3)
420private static readonly BoundedCache<Compilation, ConcurrentDictionary<IMethodSymbol, IBlockOperation?>> s_methodToTopmostOperationBlockCache 428var methodToBlockMap = s_methodToTopmostOperationBlockCache.GetOrCreateValue(compilation); 536public static bool IsBenchmarkOrXUnitTestMethod(this IMethodSymbol method, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
72public static bool IsBenchmarkOrXUnitTestAttribute(this INamedTypeSymbol attributeClass, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
273private static readonly BoundedCache<Compilation, ConcurrentDictionary<IOperation, ControlFlowGraph?>> s_operationToCfgCache 280var operationToCfgMap = s_operationToCfgCache.GetOrCreateValue(operation.SemanticModel.Compilation);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
21private readonly ConcurrentDictionary<OptionKey, (bool found, object? value)> _computedOptionValuesMap;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new(); 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult; 381internal ref readonly ConcurrentDictionary<ISymbol, string> SymbolToDeclarationId => ref _symbolNamesWithValueOption._symbolToDeclarationId;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
17/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool. 52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
16/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
42private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledDictionary<K, V>>> s_poolInstancesByComparer
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (4)
19private static readonly BoundedCacheWithFactory<Compilation, ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache>> s_byCompilationCache = new(); 29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 50ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> dict = 55static ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> CreateConcurrentDictionary(Compilation compilation)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\UnusedValue.cs (1)
10/// A placeholder value type for <see cref="ConcurrentDictionary{TKey, TValue}"/> used as a set.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
67private readonly ConcurrentDictionary<string, INamedTypeSymbol?> _fullNameToTypeMap; 81private static readonly ConcurrentDictionary<string, ImmutableArray<string>> _fullTypeNameToNamespaceNames =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
19private static readonly ConcurrentDictionary<(Type type, string name), Type?> s_typeImplementingMethod = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (2)
22private ConcurrentDictionary<int, TriviaData> _map; 32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
302public static void ClearAndFree<TKey, TValue>(this ObjectPool<ConcurrentDictionary<TKey, TValue>> pool, ConcurrentDictionary<TKey, TValue> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
26private readonly ConcurrentDictionary<string, Optional<T>> _cachedValues = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (4)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new(); 34if (!s_treeAliasMap.TryGetValue(semanticModel.Compilation, out var treeMap) || 50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
Microsoft.CodeAnalysis.VisualBasic (31)
Binding\BinderFactory.vb (1)
29Private ReadOnly _cache As ConcurrentDictionary(Of ValueTuple(Of VisualBasicSyntaxNode, Byte), Binder)
Compilation\ClsComplianceChecker.vb (1)
35Private ReadOnly _declaredOrInheritedCompliance As ConcurrentDictionary(Of Symbol, Compliance)
Compilation\VisualBasicCompilation.vb (1)
114Private _lazyImportClauseDependencies As ConcurrentDictionary(Of (SyntaxTree As SyntaxTree, ImportsClausePosition As Integer), ImmutableArray(Of AssemblySymbol))
Emit\EditAndContinue\VisualBasicSymbolMatcher.vb (3)
94Private ReadOnly _matches As ConcurrentDictionary(Of Symbol, Symbol) 105Private ReadOnly _otherMembers As ConcurrentDictionary(Of ISymbolInternal, IReadOnlyDictionary(Of String, ImmutableArray(Of ISymbolInternal))) 577Private ReadOnly _matches As ConcurrentDictionary(Of Symbol, Symbol)
Emit\PEModuleBuilder.vb (1)
22Private ReadOnly _disableJITOptimization As ConcurrentDictionary(Of MethodSymbol, Boolean) = New ConcurrentDictionary(Of MethodSymbol, Boolean)(ReferenceEqualityComparer.Instance)
Operations\VisualBasicOperationFactory.vb (1)
16Private _lazyPlaceholderToParentMap As ConcurrentDictionary(Of BoundValuePlaceholderBase, BoundNode) = Nothing
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (5)
18Private _concurrentTypesCache As ConcurrentDictionary(Of String, AnonymousTypeTemplateSymbol) = Nothing 21Private _concurrentDelegatesCache As ConcurrentDictionary(Of String, AnonymousDelegateTemplateSymbol) = Nothing 44Private ReadOnly Property AnonymousTypeTemplates As ConcurrentDictionary(Of String, AnonymousTypeTemplateSymbol) 64Private ReadOnly Property AnonymousDelegateTemplates As ConcurrentDictionary(Of String, AnonymousDelegateTemplateSymbol) 153cache As ConcurrentDictionary(Of String, T))
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (1)
24Private ReadOnly _symbols As ConcurrentDictionary(Of Symbol, Boolean)
Symbols\Metadata\PE\MetadataDecoder.vb (3)
105Protected Overrides Function GetTypeHandleToTypeMap() As ConcurrentDictionary(Of TypeDefinitionHandle, TypeSymbol) 109Protected Overrides Function GetTypeRefHandleToTypeMap() As ConcurrentDictionary(Of TypeReferenceHandle, TypeSymbol) 273Dim cache As ConcurrentDictionary(Of TypeDefinitionHandle, TypeSymbol) = GetTypeHandleToTypeMap()
Symbols\MetadataOrSourceOrRetargetingAssemblySymbol.vb (2)
112Private _assembliesToWhichInternalAccessHasBeenAnalyzed As ConcurrentDictionary(Of AssemblySymbol, IVTConclusion) 114Protected ReadOnly Property AssembliesToWhichInternalAccessHasBeenDetermined As ConcurrentDictionary(Of AssemblySymbol, IVTConclusion)
Symbols\Retargeting\RetargetingModuleSymbol.vb (1)
55Public SymbolMap As ConcurrentDictionary(Of NamedTypeSymbol, NamedTypeSymbol)
Symbols\Retargeting\RetargetingSymbolTranslator.vb (1)
89Private ReadOnly Property SymbolMap As ConcurrentDictionary(Of Symbol, Symbol)
Symbols\Source\SourceAssemblySymbol.vb (7)
75Private _lazyInternalsVisibleToMap As ConcurrentDictionary(Of String, ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String))) 869Private _optimisticallyGrantedInternalsAccess As ConcurrentDictionary(Of AssemblySymbol, Boolean) 875Dim haveGrantedAssemblies As ConcurrentDictionary(Of AssemblySymbol, Boolean) = _optimisticallyGrantedInternalsAccess 909Dim result As ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)) = Nothing 979New ConcurrentDictionary(Of String, ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)))(StringComparer.OrdinalIgnoreCase), Nothing) 998Dim keys As ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)) = Nothing
Symbols\Source\SourceNamedTypeSymbol.vb (1)
44Private _lazyWithEventsOverrides As ConcurrentDictionary(Of PropertySymbol, SynthesizedOverridingWithEventsProperty)
Symbols\TypeSymbol.vb (2)
48Private _lazyImplementationForInterfaceMemberMap As ConcurrentDictionary(Of Symbol, Symbol) 692Private ReadOnly Property ImplementationForInterfaceMemberMap As ConcurrentDictionary(Of Symbol, Symbol)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\roslyn\src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (1)
42ineligibleFieldUsageIfOutsideProperty As ConcurrentDictionary(Of IFieldSymbol, ConcurrentSet(Of SyntaxNode)),
Microsoft.CodeAnalysis.VisualBasic.Features (1)
src\roslyn\src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (1)
42ineligibleFieldUsageIfOutsideProperty As ConcurrentDictionary(Of IFieldSymbol, ConcurrentSet(Of SyntaxNode)),
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (1)
Microsoft.CodeQuality.Analyzers\Maintainability\BasicAvoidUninstantiatedInternalClasses.vb (1)
14Public Overrides Sub RegisterLanguageSpecificChecks(context As CompilationStartAnalysisContext, instantiatedTypes As ConcurrentDictionary(Of INamedTypeSymbol, Object))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
CaseCorrection\VisualBasicCaseCorrectionService.vb (3)
30replacements As ConcurrentDictionary(Of SyntaxToken, SyntaxToken), 40replacements As ConcurrentDictionary(Of SyntaxToken, SyntaxToken), 57Private Shared Sub Rewrite(token As SyntaxToken, rewriter As Rewriter, replacements As ConcurrentDictionary(Of SyntaxToken, SyntaxToken))
Microsoft.CodeAnalysis.Workspaces (41)
CaseCorrection\AbstractCaseCorrectionService.cs (2)
20protected abstract void AddReplacements(SemanticModel? semanticModel, SyntaxNode root, ImmutableArray<TextSpan> spans, ConcurrentDictionary<SyntaxToken, SyntaxToken> replacements, CancellationToken cancellationToken); 49var replacements = new ConcurrentDictionary<SyntaxToken, SyntaxToken>();
Diagnostics\DiagnosticAnalyzerInfoCache.cs (1)
53private readonly ConcurrentDictionary<string, DiagnosticDescriptor?> _idToDescriptorsMap = [];
Diagnostics\HostDiagnosticAnalyzers.cs (1)
31private readonly ConcurrentDictionary<string, ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>> _hostDiagnosticAnalyzersPerLanguageMap;
FindSymbols\FindReferences\FindReferenceCache.cs (2)
66private readonly ConcurrentDictionary<SyntaxNode, SymbolInfo> _symbolInfoCache = []; 67private readonly ConcurrentDictionary<string, ImmutableArray<SyntaxToken>> _identifierCache;
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (2)
30private readonly ConcurrentDictionary<ProjectId, (VersionStamp semanticVersion, SymbolTreeInfo info)> _projectIdToInfo = []; 31private readonly ConcurrentDictionary<PortableExecutableReference, MetadataInfo> _peReferenceToInfo = [];
Log\AbstractLogAggregator.cs (1)
27private readonly ConcurrentDictionary<object, TValue> _map = new(concurrencyLevel: 2, capacity: 2);
Remote\RemoteServiceCallbackDispatcher.cs (2)
19internal readonly struct Handle(ConcurrentDictionary<RemoteServiceCallbackId, object> callbackInstances, RemoteServiceCallbackId callbackId) : IDisposable 30private readonly ConcurrentDictionary<RemoteServiceCallbackId, object> _callbackInstances = new(concurrencyLevel: 2, capacity: 10);
Serialization\SerializerService.cs (1)
48private readonly ConcurrentDictionary<string, IOptionsSerializationService> _lazyLanguageSerializationService = new(concurrencyLevel: 2, capacity: workspaceServices.SupportedLanguages.Count());
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
43private readonly ConcurrentDictionary<string, AsynchronousOperationListener> _singletonListeners;
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
32private static readonly ConcurrentDictionary<string, DirectoryCleanupState> s_directoryCleanupStates = new(AnalyzerAssemblyLoader.OriginalPathComparer); 77private ConcurrentDictionary<string, int> OriginalDirectoryMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 84private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
19public static void Add<K, V>(this ConcurrentDictionary<K, V> dict, K key, V value) 28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 45this ConcurrentDictionary<TKey, TValue> dictionary,
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
19private static readonly ConcurrentDictionary<(Type type, string name), Type?> s_typeImplementingMethod = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (2)
22private ConcurrentDictionary<int, TriviaData> _map; 32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
302public static void ClearAndFree<TKey, TValue>(this ObjectPool<ConcurrentDictionary<TKey, TValue>> pool, ConcurrentDictionary<TKey, TValue> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
26private readonly ConcurrentDictionary<string, Optional<T>> _cachedValues = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (4)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new(); 34if (!s_treeAliasMap.TryGetValue(semanticModel.Compilation, out var treeMap) || 50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>(); 156ConcurrentDictionary<SyntaxNode, SyntaxNode> reducedNodesMap, 157ConcurrentDictionary<SyntaxToken, SyntaxToken> reducedTokensMap,
Storage\StorageDatabaseLogger.cs (1)
23private readonly ConcurrentDictionary<Type, Exception> _set = new(concurrencyLevel: 2, capacity: 10);
Workspace\Solution\ProjectState.AnalyzerConfigOptionsCache.cs (1)
26private readonly ConcurrentDictionary<string, AnalyzerConfigData> _sourcePathToResult = [];
Workspace\Solution\SolutionState.cs (2)
73private readonly ConcurrentDictionary<string, ImmutableArray<DocumentId>> _lazyFilePathToRelatedDocumentIds = new(FilePathComparer); 1295var fileMap = _lazyFilePathToRelatedDocumentIds;
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Rpc\RpcClient.cs (1)
36private readonly ConcurrentDictionary<int, (TaskCompletionSource<object?>, System.Type? expectedReturnType)> _outstandingRequests = [];
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
MSBuild\Logging\MSBuildDiagnosticLogger.cs (1)
21private readonly ConcurrentDictionary<int, DiagnosticLog> _logsBySubmissionId = new();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\BinderEquivalence.cs (1)
32private static readonly ConcurrentDictionary<ICSharpBinder, ICSharpBinder> binderEquivalenceCache =
Microsoft.Diagnostics.DataContractReader.Legacy (1)
MetaDataImportImpl.cs (1)
33private readonly ConcurrentDictionary<nint, byte> _cdacEnumHandles = new();
Microsoft.Diagnostics.NETCore.Client (1)
ReversedServer\ReversedDiagnosticsServer.cs (1)
28private readonly ConcurrentDictionary<Guid, HandleableCollection<Stream>> _streamCollections = new();
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
22static ConcurrentDictionary<string, PackageIndex> s_indexCache = new ConcurrentDictionary<string, PackageIndex>();
Microsoft.DotNet.HotReload.WebAssembly.Browser (2)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (2)
31private readonly ConcurrentDictionary<Guid, List<RuntimeManagedCodeUpdate>> _moduleUpdates = new(); 32private readonly ConcurrentDictionary<Assembly, Assembly> _appliedAssemblies = new();
Microsoft.DotNet.ProjectTools (1)
BuildService.cs (1)
78private readonly ConcurrentDictionary<string, Microsoft.Build.Construction.ProjectRootElement> _projectRootElements = new(StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.SdkResolver (2)
NETCoreSdkResolver.cs (2)
18private static readonly ConcurrentDictionary<string, Version> s_minimumMSBuildVersions 21private static readonly ConcurrentDictionary<CompatibleSdkKey, CompatibleSdkValue> s_compatibleSdks
Microsoft.Extensions.AI (1)
ChatRouting\OrderedFailoverChatClient.cs (1)
36private readonly ConcurrentDictionary<RoutingContext, int> _requestStates = new();
Microsoft.Extensions.AI.Abstractions (2)
Functions\AIFunctionFactory.cs (2)
707private static readonly ConditionalWeakTable<JsonSerializerOptions, ConcurrentDictionary<DescriptorKey, ReflectionAIFunctionDescriptor>> _descriptorCache = new(); 720ConcurrentDictionary<DescriptorKey, ReflectionAIFunctionDescriptor> innerCache = _descriptorCache.GetOrCreateValue(serializerOptions);
Microsoft.Extensions.AI.Evaluation.Reporting (1)
ResponseCachingChatClient.cs (1)
17private readonly ConcurrentDictionary<string, Stopwatch> _stopWatches;
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyService.cs (1)
28private static readonly ConcurrentDictionary<UrlCacheKey, string> _serviceUrlCache =
Microsoft.Extensions.AI.Tests (1)
TestInMemoryCacheStorage.cs (1)
14private readonly ConcurrentDictionary<string, byte[]> _storage = new();
Microsoft.Extensions.Caching.Hybrid (3)
Internal\DefaultHybridCache.Serialization.cs (1)
17private readonly ConcurrentDictionary<Type, object> _serializers = new();
Internal\DefaultHybridCache.Stampede.cs (1)
14private readonly ConcurrentDictionary<StampedeKey, StampedeState> _currentOperations = new();
Internal\DefaultHybridCache.TagInvalidation.cs (1)
15private readonly ConcurrentDictionary<string, Task<long>> _tagInvalidationTimes = [];
Microsoft.Extensions.Caching.Memory (3)
MemoryCache.cs (3)
786private readonly ConcurrentDictionary<string, CacheEntry> _stringEntries = []; 790private readonly ConcurrentDictionary<object, CacheEntry> _nonStringEntries = []; 793private readonly ConcurrentDictionary<string, CacheEntry>.AlternateLookup<ReadOnlySpan<char>> _stringAltLookup;
Microsoft.Extensions.DependencyInjection (6)
ServiceLookup\CallSiteFactory.cs (2)
18private readonly ConcurrentDictionary<ServiceCacheKey, ServiceCallSite> _callSiteCache = new ConcurrentDictionary<ServiceCacheKey, ServiceCallSite>(); 20private readonly ConcurrentDictionary<ServiceIdentifier, object> _callSiteLocks = new ConcurrentDictionary<ServiceIdentifier, object>();
ServiceLookup\CallSiteValidator.cs (1)
13private readonly ConcurrentDictionary<ServiceCacheKey, Type?> _scopedServices = new ConcurrentDictionary<ServiceCacheKey, Type?>();
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (1)
45private readonly ConcurrentDictionary<ServiceCacheKey, Func<ServiceProviderEngineScope, object>> _scopeResolverCache;
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (1)
55private readonly ConcurrentDictionary<ServiceCacheKey, GeneratedMethod> _scopeResolverCache;
ServiceProvider.cs (1)
31private readonly ConcurrentDictionary<ServiceIdentifier, ServiceAccessor> _serviceAccessors;
Microsoft.Extensions.DependencyInjection.Abstractions (1)
ActivatorUtilities.cs (1)
28private static readonly ConcurrentDictionary<Type, ConstructorInfoEx[]> s_constructorInfos = new();
Microsoft.Extensions.Diagnostics.HealthChecks.Common (3)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Factory.g.cs (2)
10private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckReportCounter> 14private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::Microsoft.Extensions.Diagnostics.HealthChecks.UnhealthyHealthCheckCounter>
ManualHealthCheckTracker.cs (1)
15private readonly ConcurrentDictionary<IManualHealthCheck, bool> _checks = new();
Microsoft.Extensions.Diagnostics.Testing (2)
Logging\FakeLogger.cs (1)
33private readonly ConcurrentDictionary<LogLevel, bool> _disabledLevels = new(); // used as a set, the value is ignored
Logging\FakeLoggerProvider.cs (1)
21private readonly ConcurrentDictionary<string, FakeLogger> _loggers = new();
Microsoft.Extensions.DotNetDeltaApplier (2)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (2)
31private readonly ConcurrentDictionary<Guid, List<RuntimeManagedCodeUpdate>> _moduleUpdates = new(); 32private readonly ConcurrentDictionary<Assembly, Assembly> _appliedAssemblies = new();
Microsoft.Extensions.FileProviders.Physical (6)
PhysicalFilesWatcher.cs (6)
31private readonly ConcurrentDictionary<string, ChangeTokenInfo> _filePathTokenLookup = new(StringComparer.OrdinalIgnoreCase); 32private readonly ConcurrentDictionary<string, ChangeTokenInfo> _wildcardTokenLookup = new(StringComparer.OrdinalIgnoreCase); 157internal ConcurrentDictionary<IPollingChangeToken, IPollingChangeToken> PollingChangeTokens { get; } 423void CancelAll(ConcurrentDictionary<string, ChangeTokenInfo> tokens, Func<string, bool> requiresSubdirectories) 840var changeTokens = (ConcurrentDictionary<IPollingChangeToken, IPollingChangeToken>)state;
Microsoft.Extensions.Http (1)
DefaultHttpClientFactory.cs (1)
51internal readonly ConcurrentDictionary<string, Lazy<ActiveHandlerTrackingEntry>> _activeHandlers;
Microsoft.Extensions.Http.Diagnostics (3)
Latency\Internal\HttpRequestLatencyListener.cs (1)
20private readonly ConcurrentDictionary<string, EventSource?> _eventSources = new()
Logging\Internal\LoggerMessageStateExtensions.cs (2)
14private static readonly ConcurrentDictionary<string, string> _requestPrefixedNamesCache = new(); 15private static readonly ConcurrentDictionary<string, string> _responsePrefixedNamesCache = new();
Microsoft.Extensions.Http.Resilience (1)
Resilience\Internal\ByAuthorityPipelineKeyProvider.cs (1)
12private readonly ConcurrentDictionary<(string scheme, string host, int port), string> _cache = new();
Microsoft.Extensions.Localization (4)
ResourceManagerStringLocalizer.cs (1)
23private readonly ConcurrentDictionary<string, object?> _missingManifestCache = new ConcurrentDictionary<string, object?>();
ResourceManagerStringLocalizerFactory.cs (1)
26private readonly ConcurrentDictionary<string, ResourceManagerStringLocalizer> _localizerCache =
ResourceNamesCache.cs (2)
11/// An implementation of <see cref="IResourceNamesCache"/> backed by a <see cref="ConcurrentDictionary{TKey, TValue}"/>. 15private readonly ConcurrentDictionary<string, IList<string>?> _cache = new ConcurrentDictionary<string, IList<string>?>();
Microsoft.Extensions.Logging (1)
LoggerFactory.cs (1)
23private readonly ConcurrentDictionary<string, Logger> _loggers = new ConcurrentDictionary<string, Logger>(StringComparer.Ordinal);
Microsoft.Extensions.Logging.Abstractions (1)
FormattedLogValues.cs (1)
23private static readonly ConcurrentDictionary<string, LogValuesFormatter> s_formatters = new ConcurrentDictionary<string, LogValuesFormatter>();
Microsoft.Extensions.Logging.Console (3)
ConsoleLoggerProvider.cs (3)
22private readonly ConcurrentDictionary<string, ConsoleLogger> _loggers; 23private ConcurrentDictionary<string, ConsoleFormatter> _formatters; 100var cd = new ConcurrentDictionary<string, ConsoleFormatter>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Logging.TraceSource (1)
TraceSourceLoggerProvider.cs (1)
20private readonly ConcurrentDictionary<string, DiagnosticsTraceSource> _sources = new ConcurrentDictionary<string, DiagnosticsTraceSource>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.ML (1)
PredictionEnginePool.cs (1)
26private readonly ConcurrentDictionary<string, PoolLoader<TData, TPrediction>> _namedPools;
Microsoft.Extensions.Options (1)
OptionsCache.cs (1)
18private readonly ConcurrentDictionary<string, Lazy<TOptions>> _cache = new ConcurrentDictionary<string, Lazy<TOptions>>(concurrencyLevel: 1, capacity: 31, StringComparer.Ordinal); // 31 == default capacity
Microsoft.Extensions.ServiceDiscovery (2)
Http\HttpServiceEndpointResolver.cs (1)
21private readonly ConcurrentDictionary<string, ResolverEntry> _resolvers = new();
ServiceEndpointResolver.cs (1)
20private readonly ConcurrentDictionary<string, ResolverEntry> _resolvers = new();
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
parent\parent\Shared\FxPolyfills\ConcurrentDictionary.cs (1)
8extension<TKey, TValue>(ConcurrentDictionary<TKey, TValue> dictionary)
Microsoft.Extensions.Telemetry (6)
Http\HttpRouteParser.cs (1)
24private readonly ConcurrentDictionary<string, ParsedRouteSegments> _routeTemplateSegmentsCache = new();
parent\parent\parent\eng\MSBuild\parent\parent\src\LegacySupport\GetOrAdd\GetOrAddExtensions.cs (2)
9/// Extensions for <see cref="ConcurrentDictionary{Tkey,TValue}"/>. 26public static TValue GetOrAdd<TKey, TValue, TArg>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Memoization\MemoizedFunction.cs (2)
58private readonly ConcurrentDictionary<Arg, Lazy<TResult>> _values; 131private readonly ConcurrentDictionary<Args, Lazy<TResult>> _values;
Sampling\LogSamplingRuleSelector.cs (1)
17private readonly ConcurrentDictionary<(string, LogLevel, EventId), T?> _ruleCache = new();
Microsoft.Extensions.Validation.ValidationsGenerator (4)
Analyzers\ValidationsDiagnosticAnalyzer.cs (4)
106ConcurrentDictionary<ITypeSymbol, byte> allValidatableTypes, 178var topLevelValidatableTypes = new ConcurrentDictionary<ITypeSymbol, byte>(SymbolEqualityComparer.Default); 179var endpointParameters = new ConcurrentDictionary<IParameterSymbol, byte>(SymbolEqualityComparer.Default); 181var validatableTypeAttributeLocations = new ConcurrentDictionary<Location, byte>();
Microsoft.Gen.Metrics.Generated.Tests (95)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Factory.g.cs (95)
8private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, NoNamespaceCounterInstrument> 12private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, NoNamespaceHistogramInstrument> 42private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedClass.Metrics.NestedClassCounter> 46private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedClass.Metrics.NestedClassHistogram> 70private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedClass.Metrics.MultiLevelNestedClassCounter> 74private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedClass.Metrics.MultiLevelNestedClassHistogram> 105private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedRecordClass.Metrics.NestedRecordClassCounter> 109private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedRecordClass.Metrics.NestedRecordClassHistogram> 140private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedRecordStruct.Metrics.NestedRecordStructCounter> 144private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedRecordStruct.Metrics.NestedRecordStructHistogram> 175private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedStruct.Metrics.NestedStructCounter> 179private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::NestedStruct.Metrics.NestedStructHistogram> 210private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::PublicMetrics.PublicCounter> 214private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::PublicMetrics.PublicHistogram> 245private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericIntCounter0D> 249private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericIntCounterExt0D> 253private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.Counter0D> 257private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.MyNamedCounter> 261private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExt0D> 265private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericIntCounter1D> 269private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericIntCounterExt1D> 273private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericFloatCounter1D> 277private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericFloatCounterExt1D> 281private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.Counter2D> 285private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExt2D> 289private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.Counter3D> 293private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExt3D> 297private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.Counter4D> 301private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExt4D> 305private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterS0D2> 309private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExtS0D2> 313private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterS1D1> 317private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExtS1D1> 321private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterS3D2> 325private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExtS3D2> 329private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterS5D5> 333private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExtS5D5> 337private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.TestCounter> 341private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.TestCounterExt> 345private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterWithVariableParams> 349private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExtWithVariableParams> 353private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterX> 357private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExtX> 361private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterY> 365private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterExtY> 369private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.StrongTypeDecimalCounter> 373private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.StrongTypeDecimalCounterExt> 377private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.StructTypeCounter> 381private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.StructTypeCounterExt> 385private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.RecordClassTypeCounter> 749private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.FileScopedNamespaceCounter> 753private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.FileScopedNamespaceGenericDoubleCounter> 777private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.Histogram0D> 781private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericIntHistogram0D> 785private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExt0D> 789private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericIntHistogramExt0D> 793private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.Histogram1D> 797private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExt1D> 801private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.Histogram2D> 805private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericIntHistogram2D> 809private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericIntHistogramExt2D> 813private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExt2D> 817private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.Histogram3D> 821private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExt3D> 825private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.Histogram4D> 829private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExt4D> 833private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramS0D2> 837private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExtS0D2> 841private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramS1D1> 845private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExtS1D1> 849private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramS3D2> 853private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExtS3D2> 857private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramS5D5> 861private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExtS5D5> 865private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.TestHistogram> 869private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.TestHistogramExt> 873private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramWithVariableParams> 877private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramExtWithVariableParams> 881private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.StrongTypeHistogram> 885private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.StrongTypeHistogramExt> 889private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.StructTypeHistogram> 893private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.StructTypeHistogramExt> 1197private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterFromRecordClass> 1211private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterFromRecordStruct> 1225private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterFromStruct> 1239private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterWithUnit> 1243private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterWithUnitAndDims> 1247private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.CounterStrongTypeWithUnit> 1251private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericDoubleCounterWithUnit> 1255private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramWithUnit> 1259private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramStrongTypeWithUnit> 1263private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.HistogramWithUnitAndDims> 1267private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClasses.GenericIntHistogramWithUnit> 1358private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClassesNspace.Metrics.OverlappingNamesCounter> 1362private static global::System.Collections.Concurrent.ConcurrentDictionary<global::System.Diagnostics.Metrics.Meter, global::TestClassesNspace.Metrics.OverlappingNamesHistogram>
Microsoft.Interop.ComInterfaceGenerator (3)
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (3)
85var interfaceInfoCache = new ConcurrentDictionary<INamedTypeSymbol, DiagnosticOr<(ComInterfaceInfo, INamedTypeSymbol)>>(SymbolEqualityComparer.Default); 118ConcurrentDictionary<INamedTypeSymbol, DiagnosticOr<(ComInterfaceInfo, INamedTypeSymbol)>> interfaceInfoCache) 216ConcurrentDictionary<INamedTypeSymbol, DiagnosticOr<(ComInterfaceInfo, INamedTypeSymbol)>> interfaceInfoCache,
Microsoft.JSInterop (8)
Infrastructure\DotNetDispatcher.cs (3)
29private static readonly ConcurrentDictionary<AssemblyKey, IReadOnlyDictionary<string, (MethodInfo, Type[])>> _cachedMethodsByAssembly = new(); 31private static readonly ConcurrentDictionary<Type, IReadOnlyDictionary<string, (MethodInfo, Type[])>> _cachedMethodsByType = new(); 33private static readonly ConcurrentDictionary<Type, Func<object, Task>> _cachedConvertToTaskByType = new();
Infrastructure\TaskGenericsUtil.cs (2)
11private static readonly ConcurrentDictionary<Type, ITaskResultGetter> _cachedResultGetters 14private static readonly ConcurrentDictionary<Type, ITcsResultSetter> _cachedResultSetters
JSRuntime.cs (3)
23private readonly ConcurrentDictionary<long, IPendingAsyncCall> _pendingTasks = new(); 24private readonly ConcurrentDictionary<long, IDotNetObjectReference> _trackedRefsById = new(); 25private readonly ConcurrentDictionary<long, CancellationTokenRegistration> _cancellationRegistrations = new();
Microsoft.Maui (8)
Handlers\HybridWebView\HybridWebViewTaskManager.cs (1)
12 private readonly ConcurrentDictionary<string, TaskCompletionSource<string?>> _asyncTaskCallbacks = new();
Hosting\ImageSources\ImageSourceServiceProvider.cs (2)
15 readonly ConcurrentDictionary<Type, Type> _imageSourceCache = new ConcurrentDictionary<Type, Type>(); 16 readonly ConcurrentDictionary<Type, Type> _serviceCache = new ConcurrentDictionary<Type, Type>();
Hosting\ImageSources\ImageSourceToImageSourceServiceTypeMapping.cs (1)
10 private static readonly ConcurrentDictionary<IImageSourceServiceCollection, ImageSourceToImageSourceServiceTypeMapping> s_instances = new();
Hosting\Internal\MauiFactory.cs (1)
17 readonly ConcurrentDictionary<ServiceDescriptor, object?> _singletons;
Hosting\Internal\MauiHandlersFactory.cs (1)
12 readonly ConcurrentDictionary<Type, Type> _serviceCache = new ConcurrentDictionary<Type, Type>();
Hosting\Internal\RegisteredHandlerServiceTypeSet.cs (1)
10 private static readonly ConcurrentDictionary<IMauiHandlersCollection, RegisteredHandlerServiceTypeSet> s_instances = new();
MauiContext.cs (1)
55 readonly ConcurrentDictionary<Type, (object, Func<object, object?>)> _scopeStatic = new();
Microsoft.Maui.Controls (2)
AnimationExtensions.cs (1)
46 static readonly ConcurrentDictionary<int, Animation> s_tweeners;
Xaml\TypeConversionExtensions.cs (1)
43 static readonly ConcurrentDictionary<MemberInfo, TypeConverter> s_converterCache = new();
Microsoft.ML.Core (3)
Data\ProgressReporter.cs (1)
38private readonly ConcurrentDictionary<int, SubChannel> _subChannels;
Data\Repository.cs (1)
99protected readonly ConcurrentDictionary<string, string> PathMap;
Environment\HostEnvironmentBase.cs (1)
355protected readonly ConcurrentDictionary<Type, Dispatcher> ListenerDict;
Microsoft.ML.Core.Tests (2)
UnitTests\TestHosts.cs (2)
31var children = new ConcurrentDictionary<IHost, List<IHost>>(); 94var children = new ConcurrentDictionary<IHost, List<IHost>>();
Microsoft.ML.Data (1)
DataLoadSave\Text\TextLoaderParser.cs (1)
45private static readonly ConcurrentDictionary<DoubleParser.OptionFlags, ValueCreatorCache> _customInstances
Microsoft.ML.Ensemble (7)
Selector\DiversityMeasure\BaseDisagreementDiversityMeasure.cs (1)
15ConcurrentDictionary<FeatureSubsetModel<TOutput>, TOutput[]> predictions)
Selector\IDiversityMeasure.cs (1)
17ConcurrentDictionary<FeatureSubsetModel<TOutput>, TOutput[]> predictions);
Selector\SubModelSelector\BaseDiverseSelector.cs (2)
22private readonly ConcurrentDictionary<FeatureSubsetModel<TOutput>, TOutput[]> _predictions; 116ConcurrentDictionary<FeatureSubsetModel<TOutput>, TOutput[]> predictions);
Selector\SubModelSelector\BestDiverseSelectorBinary.cs (1)
42ConcurrentDictionary<FeatureSubsetModel<float>, Single[]> predictions)
Selector\SubModelSelector\BestDiverseSelectorMulticlass.cs (1)
43ConcurrentDictionary<FeatureSubsetModel<VBuffer<float>>, VBuffer<Single>[]> predictions)
Selector\SubModelSelector\BestDiverseSelectorRegression.cs (1)
40ConcurrentDictionary<FeatureSubsetModel<float>, Single[]> predictions)
Microsoft.ML.FastTree (1)
Utils\BufferPoolManager.cs (1)
30private static readonly ConcurrentDictionary<Type, SortedList<int, List<Array>>> _bufferPools = new ConcurrentDictionary<Type, SortedList<int, List<Array>>>();
Microsoft.ML.IntegrationTests (1)
Debugging.cs (1)
197public readonly ConcurrentDictionary<string, int> Lines;
Microsoft.ML.InternalCodeAnalyzer (4)
BaseTestClassAnalyzer.cs (1)
55private readonly ConcurrentDictionary<INamedTypeSymbol, bool> _knownTestAttributes = new ConcurrentDictionary<INamedTypeSymbol, bool>(SymbolEqualityComparer.Default);
IMethodSymbolExtensions.cs (1)
12public static bool IsTestMethod(this IMethodSymbol method, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol factAttribute)
INamedTypeSymbolExtensions.cs (1)
13public static bool IsTestAttribute(this INamedTypeSymbol attributeClass, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol factAttribute)
RelaxTestNamingSuppressor.cs (1)
31var knownTestAttributes = new ConcurrentDictionary<INamedTypeSymbol, bool>(SymbolEqualityComparer.Default);
Microsoft.ML.Tokenizers (1)
Model\TiktokenTokenizer.cs (1)
1291private static readonly ConcurrentDictionary<string, (Dictionary<ReadOnlyMemory<byte>, int> encoder, Dictionary<StringSpanOrdinalKey, (int Id, string Token)> vocab, Dictionary<int, ReadOnlyMemory<byte>> decoder)> _tiktokenCache = new(StringComparer.OrdinalIgnoreCase);
Microsoft.NET.Build.Containers (2)
AuthHandshakeMessageHandler.cs (1)
44private static ConcurrentDictionary<string, AuthenticationHeaderValue?> _authenticationHeaders = new();
LocalDaemons\ContainerRuntimeOperations.cs (1)
20private readonly ConcurrentDictionary<string, string> _commandPaths = new(StringComparer.Ordinal);
Microsoft.NET.Build.Extensions.Tasks (2)
src\sdk\src\Tasks\Common\FileUtilities.cs (1)
12private static readonly ConcurrentDictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_fileVersionCache
src\sdk\src\Tasks\Common\FileUtilities.MetadataReader.cs (1)
23private static readonly ConcurrentDictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_versionCache = new(StringComparer.OrdinalIgnoreCase /* Not strictly correct on *nix. Fix? */);
Microsoft.NET.Build.Tasks (7)
FrameworkPackages\FrameworkPackages.cs (4)
28private static readonly ConcurrentDictionary<NuGetFramework, ConcurrentDictionary<string, FrameworkPackages>> FrameworkPackagesByFramework = []; 73if (!FrameworkPackagesByFramework.TryGetValue(frameworkPackages.Framework, out var frameworkPackagesForVersion)) 109if (FrameworkPackagesByFramework.TryGetValue(nearestFramework, out var frameworkPackagesForVersion) &&
RuntimeGraphCache.cs (1)
14private static readonly ConcurrentDictionary<string, object> s_keyLocks = new();
src\sdk\src\Tasks\Common\FileUtilities.cs (1)
12private static readonly ConcurrentDictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_fileVersionCache
src\sdk\src\Tasks\Common\FileUtilities.MetadataReader.cs (1)
23private static readonly ConcurrentDictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_versionCache = new(StringComparer.OrdinalIgnoreCase /* Not strictly correct on *nix. Fix? */);
Microsoft.NET.StringTools (4)
WeakStringCache.Concurrent.cs (4)
17private readonly ConcurrentDictionary<int, string> _stringsByHashCode; 18private readonly ConcurrentDictionary<int, StringWeakHandle> _weakHandlesByHashCode; 48ConcurrentDictionary<int, string> stringsByHashCode = _stringsByHashCode; 68ConcurrentDictionary<int, StringWeakHandle> weakHandlesByHashCode = _weakHandlesByHashCode;
Microsoft.TemplateEngine.Cli (1)
HostSpecificDataLoader.cs (1)
25private readonly ConcurrentDictionary<ITemplateInfo, HostSpecificTemplateData> _cache =
Microsoft.TemplateEngine.Core (7)
Expressions\Cpp2\Cpp2StyleEvaluatorDefinition.cs (1)
14private static readonly ConcurrentDictionary<Encoding, ITokenTrie> TokenCache = new();
Expressions\MSBuild\MSBuildStyleEvaluatorDefinition.cs (1)
14private static readonly ConcurrentDictionary<Encoding, ITokenTrie> TokenCache = new();
Expressions\VisualBasic\VisualBasicStyleEvaluatorDefintion.cs (1)
14private static readonly ConcurrentDictionary<Encoding, ITokenTrie> TokenCache = new();
Util\ProcessorState.cs (4)
13private static readonly ConcurrentDictionary<IReadOnlyList<IOperationProvider>, ConcurrentDictionary<Encoding, Trie<OperationTerminal>>> TrieLookup = new(); 14private static readonly ConcurrentDictionary<IReadOnlyList<IOperationProvider>, List<string>> OperationsToExplicitlySetOnByDefault = new(); 74ConcurrentDictionary<Encoding, Trie<OperationTerminal>> byEncoding = TrieLookup.GetOrAdd(operationProviders, x => new());
Microsoft.TemplateEngine.Edge (2)
Installers\NuGet\NugetApiPackageManager.cs (1)
18private static readonly ConcurrentDictionary<PackageSource, SourceRepository> SourcesCache = new();
ReflectionLoadProbingPath.cs (1)
15private static readonly ConcurrentDictionary<string, Assembly?> LoadedAssemblies = new ConcurrentDictionary<string, Assembly?>(StringComparer.OrdinalIgnoreCase);
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
Macros\GeneratePortNumberConfig.cs (1)
108private static ConcurrentDictionary<int, int> UnavailablePorts { get; } = new(UnsafePorts.ToDictionary(p => p));
Microsoft.TestPlatform.CoreUtilities (2)
FeatureFlag\FeatureFlag.cs (1)
32private readonly ConcurrentDictionary<string, bool> _cache = new();
Helpers\MicrosoftTestingPlatformDetector.cs (1)
31private static readonly ConcurrentDictionary<string, bool> Cache = new(StringComparer.OrdinalIgnoreCase);
Microsoft.TestPlatform.CrossPlatEngine (4)
AttachmentsProcessing\DataCollectorAttachmentsProcessorsFactory.cs (1)
25private static readonly ConcurrentDictionary<string, DataCollectorExtensionManager> DataCollectorExtensionManagerCache = new();
Client\Parallel\DiscoveryDataAggregator.cs (2)
25private readonly ConcurrentDictionary<string, object> _metricsAggregator = new(); 26private readonly ConcurrentDictionary<string, DiscoveryStatus> _sourcesWithDiscoveryStatus = new();
Client\Parallel\ParallelRunDataAggregator.cs (1)
28private readonly ConcurrentDictionary<string, object> _metricsAggregator;
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
BlameCollector.cs (1)
43private ConcurrentDictionary<Guid, BlameTestObject>? _testObjectDictionary;
Microsoft.VisualStudio.TestPlatform.Common (7)
DataCollection\DataCollectionAttachmentManager.cs (5)
54private readonly ConcurrentDictionary<DataCollectionContext, ConcurrentBag<Task>> _attachmentTasks; 83AttachmentSets = new ConcurrentDictionary<DataCollectionContext, ConcurrentDictionary<Uri, AttachmentSet>>(); 94internal ConcurrentDictionary<DataCollectionContext, ConcurrentDictionary<Uri, AttachmentSet>> AttachmentSets 152if (AttachmentSets.TryGetValue(dataCollectionContext, out var uriAttachmentSetMap))
Telemetry\MetricsCollection.cs (1)
17private readonly ConcurrentDictionary<string, object> _metricDictionary;
Utilities\MetadataReaderHelper.cs (1)
44private static readonly ConcurrentDictionary<string, Type[]> AssemblyCache = new();
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (2)
HtmlLogger.cs (2)
70public ConcurrentDictionary<Guid, ObjectModel.TestResult>? Results { get; private set; } 75public ConcurrentDictionary<string, TestResultCollection>? ResultCollectionDictionary { get; private set; }
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (6)
ObjectModel\TestElementAggregation.cs (1)
20/// <see cref="System.Collections.Concurrent.ConcurrentDictionary{TKey, TValue}"/> so that the
TrxLogger.cs (5)
64private ConcurrentDictionary<Guid, ITestResult>? _results; 65private ConcurrentDictionary<Guid, ITestElement>? _testElements; 66private ConcurrentDictionary<Guid, TestEntry>? _entries; 69private ConcurrentDictionary<Guid, ITestResult>? _innerResults; 70private ConcurrentDictionary<Guid, TestEntry>? _innerTestEntries;
Microsoft.VisualStudio.TestPlatform.ObjectModel (3)
Nuget.Frameworks\CompatibilityProvider.cs (1)
16private readonly ConcurrentDictionary<CompatibilityCacheKey, bool> _cache;
TestObject.cs (1)
29private readonly ConcurrentDictionary<TestProperty, object?> _store = new();
TestProperty\TestProperty.cs (1)
20private static readonly ConcurrentDictionary<string, Type> TypeCache = new();
MSBuild (28)
OutOfProcTaskHostNode.cs (3)
206private readonly ConcurrentDictionary<int, TaskCompletionSource<INodePacket>> _pendingCallbackRequests = new(); 212private readonly ConcurrentDictionary<int, TaskExecutionContext> _taskContexts 1022var pendingRequests = context?.PendingCallbackRequests ?? _pendingCallbackRequests;
src\msbuild\src\Shared\RegisteredTaskObjectCacheBase.cs (13)
24private static readonly Lazy<ConcurrentDictionary<object, object>> s_appDomainLifetimeObjects = new Lazy<ConcurrentDictionary<object, object>>(); 29private Lazy<ConcurrentDictionary<object, object>> _buildLifetimeObjects = new Lazy<ConcurrentDictionary<object, object>>(); 60ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: false); 70ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: true); 82ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: true); 96var collection = GetCollectionForLifetime(lifetime, dontCreate: true); 103protected ConcurrentDictionary<object, object> GetCollectionForLifetime(RegisteredTaskObjectLifetime lifetime, bool dontCreate) 105Lazy<ConcurrentDictionary<object, object>> dict = GetLazyCollectionForLifetime(lifetime); 119protected Lazy<ConcurrentDictionary<object, object>> GetLazyCollectionForLifetime(RegisteredTaskObjectLifetime lifetime) 121Lazy<ConcurrentDictionary<object, object>> dict = null; 139private static void DisposeObjects(Lazy<ConcurrentDictionary<object, object>> lifetimeObjects)
src\msbuild\src\Shared\TypeLoader.cs (11)
57private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 62private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 349ConcurrentDictionary<Type, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> cache, 358ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes> loadInfoToType = 401private ConcurrentDictionary<string, Type> _typeNameToType; 408private ConcurrentDictionary<string, LoadedType> _publicTypeNameToLoadedType;
TaskExecutionContext.cs (1)
94public ConcurrentDictionary<int, TaskCompletionSource<INodePacket>> PendingCallbackRequests { get; } = new();
MSBuild.Coordinator (1)
CoordinatorServer.cs (1)
71ConcurrentDictionary<Task, byte> clientTasks = [];
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
77[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Concurrent.ConcurrentDictionary<,>))]
netstandard (1)
netstandard.cs (1)
95[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Concurrent.ConcurrentDictionary<,>))]
NuGet.Build.Tasks.Console (5)
MSBuildStaticGraphRestore.cs (4)
970var projects = LoadProjects(entryProjects, interactive, binaryLoggerParameters, createProjectFactory, updateProjectFactory, projectFinalizeDelegate); 986var projectPathLookup = new ConcurrentDictionary<string, string>(uniqueNameComparer); 1257private ConcurrentDictionary<string, TProject> LoadProjects<TProject>( 1286var projects = new ConcurrentDictionary<string, TProject>(PathUtility.GetStringComparerBasedOnOS());
RestoreProjectAdapter.cs (1)
35private ConcurrentDictionary<string, ITargetFramework> _targetFrameworks;
NuGet.Commands (15)
RestoreCommand\DependencyGraphResolver.DependencyGraphItemIndexer.cs (2)
60private readonly ConcurrentDictionary<string, LibraryDependencyIndex> _libraryDependencyTable = new ConcurrentDictionary<string, LibraryDependencyIndex>(StringComparer.OrdinalIgnoreCase); 65private readonly ConcurrentDictionary<LibraryRange, LibraryRangeIndex> _libraryRangeTable = new(LibraryRangeComparer.Instance);
RestoreCommand\LockFileBuilderCache.cs (3)
27private readonly ConcurrentDictionary<(string Id, NuGetVersion Version, string sha512), ContentItemCollection> _contentItems 31private readonly ConcurrentDictionary<CriteriaKey, List<(List<SelectionCriteria>, bool)>> _criteriaSets = 34private readonly ConcurrentDictionary<(CriteriaKey, string path, string aliases, LibraryIncludeFlags, int dependencyCount, bool restoreEnableAnalyzerAssets), Lazy<(LockFileTargetLibrary, bool, NuGetFramework, NuGetFramework)>> _lockFileTargetLibraryCache =
RestoreCommand\Logging\WarningPropertiesCollection.cs (1)
24private readonly ConcurrentDictionary<string, string> _getTargetGraphAliasCache = new ConcurrentDictionary<string, string>();
RestoreCommand\RequestFactory\RestoreArgs.cs (2)
74private ConcurrentDictionary<string, ISettings> _settingsCache 78private ConcurrentDictionary<string, List<SourceRepository>> _sourcesCache
RestoreCommand\RestoreCommand.cs (1)
35private static readonly ConcurrentDictionary<NuGetFramework, string> _frameworkShortNameCache = new(NuGetFrameworkFullComparer.Instance);
RestoreCommand\RestoreCommandProvidersCache.cs (4)
20private readonly ConcurrentDictionary<SourceRepository, IRemoteDependencyProvider> _remoteProviders 23private readonly ConcurrentDictionary<string, IRemoteDependencyProvider> _localProvider 26private readonly ConcurrentDictionary<string, NuGetv3LocalRepository> _globalCache 29private readonly ConcurrentDictionary<SourceRepository, IVulnerabilityInformationProvider> _vulnerabilityInformationProviders
src\nuget-client\build\Shared\TaskResultCache.cs (2)
23private readonly ConcurrentDictionary<TKey, Task<TValue>> _cache; 28private readonly ConcurrentDictionary<TKey, object> _perTaskLock;
NuGet.Common (1)
PathUtil\NuGetEnvironment.cs (1)
31private static readonly ConcurrentDictionary<NuGetFolderPath, string> Cache = new ConcurrentDictionary<NuGetFolderPath, string>();
NuGet.Configuration (2)
Proxy\ProxyCache.cs (1)
23private readonly ConcurrentDictionary<Uri, ICredentials> _cachedCredentials = new ConcurrentDictionary<Uri, ICredentials>();
Settings\SettingsLoadingContext.cs (1)
17private readonly ConcurrentDictionary<string, Lazy<SettingsFile>> _cache = new ConcurrentDictionary<string, Lazy<SettingsFile>>(PathUtility.GetStringComparerBasedOnOS());
NuGet.Credentials (2)
CredentialService.cs (2)
22private readonly ConcurrentDictionary<string, bool> _retryCache 24private readonly ConcurrentDictionary<string, CredentialResponse> _providerCredentialCache
NuGet.DependencyResolver.Core (2)
src\nuget-client\build\Shared\TaskResultCache.cs (2)
23private readonly ConcurrentDictionary<TKey, Task<TValue>> _cache; 28private readonly ConcurrentDictionary<TKey, object> _perTaskLock;
NuGet.Frameworks (1)
CompatibilityProvider.cs (1)
16private readonly ConcurrentDictionary<CompatibilityCacheKey, bool> _cache;
NuGet.LibraryModel (3)
LibraryDependencyTargetUtils.cs (1)
139private static readonly ConcurrentDictionary<LibraryDependencyTarget, string> LibraryDependencyTargetCache = new();
LibraryIncludeFlagUtils.cs (1)
123private static readonly ConcurrentDictionary<LibraryIncludeFlags, string> LibraryIncludeFlagsCache = new();
LibraryType.cs (1)
11private static ConcurrentDictionary<string, LibraryType> _knownLibraryTypes = new ConcurrentDictionary<string, LibraryType>(StringComparer.OrdinalIgnoreCase);
NuGet.PackageManagement (3)
Resolution\GatherCache.cs (2)
24private readonly ConcurrentDictionary<GatherSingleCacheKey, SourcePackageDependencyInfo> _singleVersion 28private readonly ConcurrentDictionary<GatherAllCacheKey, List<SourcePackageDependencyInfo>> _allPackageVersions
Resolution\ResolverGather.cs (1)
35private readonly ConcurrentDictionary<string, TimeSpan> _timeTaken = new ConcurrentDictionary<string, TimeSpan>(StringComparer.OrdinalIgnoreCase);
NuGet.Packaging (5)
ContentModel\ContentItemCollection.cs (1)
23private ConcurrentDictionary<ReadOnlyMemory<char>, string?>? _assemblyRelatedExtensions;
RuntimeModel\RuntimeGraph.cs (3)
19private readonly ConcurrentDictionary<RuntimeCompatKey, bool>? _areCompatible; 20private readonly ConcurrentDictionary<string, HashSet<string>>? _expandCache; 21private readonly ConcurrentDictionary<RuntimeDependencyKey, List<RuntimePackageDependency>>? _dependencyCache;
Signing\RepositorySignatureInfoProvider.cs (1)
15private ConcurrentDictionary<string, RepositorySignatureInfo> _dict = new ConcurrentDictionary<string, RepositorySignatureInfo>();
NuGet.ProjectModel (1)
LockFile\BuildAction.cs (1)
13private static ConcurrentDictionary<string, BuildAction> _knownBuildActions = new ConcurrentDictionary<string, BuildAction>(StringComparer.OrdinalIgnoreCase);
NuGet.Protocol (35)
CachingSourceProvider.cs (1)
24private readonly ConcurrentDictionary<string, SourceRepository> _cachedSources
HttpSource\HttpSourceResourceProvider.cs (1)
25private readonly ConcurrentDictionary<PackageSource, HttpSourceResource> _cache
HttpSource\TokenStore.cs (1)
11private readonly ConcurrentDictionary<Uri, string> _tokenCache = new ConcurrentDictionary<Uri, string>();
LegacyFeed\LegacyFeedCapabilityResourceV2Feed.cs (1)
22private static readonly ConcurrentDictionary<string, Task<Capabilities>> CachedCapabilities
LegacyFeed\ODataServiceDocumentResourceV2Provider.cs (1)
16private readonly ConcurrentDictionary<string, ODataServiceDocumentCacheInfo> _cache;
LocalRepositories\FindLocalPackagesResourceUnzippedProvider.cs (1)
16private readonly ConcurrentDictionary<PackageSource, FindLocalPackagesResourceUnzipped> _cache =
LocalRepositories\LocalV2FindPackageByIdResource.cs (1)
30private readonly ConcurrentDictionary<string, IReadOnlyList<LocalPackageInfo>> _packageInfoCache
LocalRepositories\LocalV3FindPackageByIdResource.cs (1)
30private readonly ConcurrentDictionary<string, List<NuGetVersion>> _cache
PackagesFolder\LocalPackageFileCache.cs (6)
24private readonly ConcurrentDictionary<string, Lazy<NuspecReader>> _nuspecCache 28private readonly ConcurrentDictionary<string, Lazy<IReadOnlyList<string>>> _filesCache 32private readonly ConcurrentDictionary<string, Lazy<string>> _sha512Cache 36private readonly ConcurrentDictionary<string, bool> _fileExistsCache 40private readonly ConcurrentDictionary<string, Lazy<RuntimeGraph?>> _runtimeCache 44private readonly ConcurrentDictionary<string, bool> _metadataFileCache
PackagesFolder\NuGetv3LocalRepository.cs (3)
23private readonly ConcurrentDictionary<string, LocalPackageInfo> _packageCache 27private readonly ConcurrentDictionary<string, List<LocalPackageInfo>> _cache 31private readonly ConcurrentDictionary<string, object> _idLocks
Plugins\MessageDispatcher.cs (2)
25private readonly ConcurrentDictionary<string, InboundRequestContext> _inboundRequestContexts; 27private readonly ConcurrentDictionary<string, OutboundRequestContext> _outboundRequestContexts;
Plugins\PluginFactory.cs (1)
26private readonly ConcurrentDictionary<string, Lazy<Task<IPlugin>>> _plugins;
Plugins\PluginManager.cs (2)
57private ConcurrentDictionary<PluginRequestKey, Lazy<Task<IReadOnlyList<OperationClaim>>>> _pluginOperationClaims; 58private ConcurrentDictionary<string, Lazy<IPluginMulticlientUtilities>> _pluginUtilities;
Plugins\PluginMulticlientUtilities.cs (1)
16private readonly ConcurrentDictionary<string, Lazy<Task>> _actions;
Plugins\PluginPackageReader.cs (1)
26private readonly ConcurrentDictionary<string, Lazy<Task<FileStreamCreator?>>> _fileStreams;
Plugins\RequestHandlers.cs (1)
15private readonly ConcurrentDictionary<MessageMethod, IRequestHandler> _handlers;
Plugins\RequestHandlers\GetCredentialsRequestHandler.cs (1)
30private readonly ConcurrentDictionary<string, SourceRepository> _repositories;
Plugins\RequestHandlers\GetServiceIndexRequestHandler.cs (1)
22private readonly ConcurrentDictionary<string, SourceRepository> _repositories;
Plugins\RequestHandlers\MonitorNuGetProcessExitRequestHandler.cs (1)
22private readonly ConcurrentDictionary<int, Process> _processes;
Providers\FeedTypeResourceProvider.cs (1)
18private readonly ConcurrentDictionary<PackageSource, FeedTypeResource> _feedTypeCache
Providers\ServiceIndexResourceV3Provider.cs (1)
29private readonly ConcurrentDictionary<string, ServiceIndexCacheInfo> _cache;
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (1)
41private readonly ConcurrentDictionary<string, AsyncLazy<HashSet<NuGetVersion>?>> _packageVersionsCache =
RemoteRepositories\PluginFindPackageByIdResource.cs (1)
28private readonly ConcurrentDictionary<string, AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>> _packageInfoCache =
src\nuget-client\build\Shared\TaskResultCache.cs (2)
23private readonly ConcurrentDictionary<TKey, Task<TValue>> _cache; 28private readonly ConcurrentDictionary<TKey, object> _perTaskLock;
Utility\FindPackagesByIdNupkgDownloader.cs (1)
24private readonly ConcurrentDictionary<string, NuspecReader> _nuspecReaders =
PresentationCore (1)
MS\Internal\AppModel\DefaultCredentialsZonePolicy.cs (1)
147private static readonly ConcurrentDictionary<string, bool> s_localHostCache =
PresentationFramework (5)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (1)
19private static readonly ConcurrentDictionary<string, Func<IInspectable, object>> TypedObjectFactoryCache = new ConcurrentDictionary<string, Func<IInspectable, object>>();
System\Windows\Markup\Baml2006\WpfXamlType.cs (4)
34private ConcurrentDictionary<string, XamlMember> _attachableMembers; 35private ConcurrentDictionary<string, XamlMember> _members; 50protected ConcurrentDictionary<string, XamlMember> Members 62protected ConcurrentDictionary<string, XamlMember> AttachableMembers
Roslyn.Diagnostics.Analyzers (56)
AbstractDoNotCopyValue.cs (1)
1665private readonly ConcurrentDictionary<INamedTypeSymbol, bool> _typesToNonCopyable
AbstractRunIterations`1.cs (1)
41var knownTestAttributes = new ConcurrentDictionary<INamedTypeSymbol, bool>();
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (5)
50var knownNonDefaultableTypes = new ConcurrentDictionary<ITypeSymbol, bool>(); 56private static void AnalyzeField(SymbolAnalysisContext context, INamedTypeSymbol nonDefaultableAttribute, ConcurrentDictionary<ITypeSymbol, bool> knownNonDefaultableTypes) 61private static void AnalyzeNamedType(SymbolAnalysisContext context, INamedTypeSymbol nonDefaultableAttribute, ConcurrentDictionary<ITypeSymbol, bool> knownNonDefaultableTypes) 76private static void AnalyzeField(SymbolAnalysisContext originalContext, IFieldSymbol field, INamedTypeSymbol nonDefaultableAttribute, ConcurrentDictionary<ITypeSymbol, bool> knownNonDefaultableTypes) 110private static bool IsDefaultable(ITypeSymbol type, INamedTypeSymbol nonDefaultableAttribute, ConcurrentDictionary<ITypeSymbol, bool> knownNonDefaultableTypes)
RelaxTestNamingSuppressor.cs (1)
39var knownTestAttributes = new ConcurrentDictionary<INamedTypeSymbol, bool>();
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
19public static void Add<K, V>(this ConcurrentDictionary<K, V> dict, K key, V value) 28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 45this ConcurrentDictionary<TKey, TValue> dictionary,
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
src\roslyn\src\Dependencies\PooledObjects\PoolTracker.cs (1)
112private readonly ConcurrentDictionary<object, AllocationInfo> _outstanding = new ConcurrentDictionary<object, AllocationInfo>(ReferenceEqualityComparer.Instance);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (1)
14private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _semanticModelMap;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (3)
420private static readonly BoundedCache<Compilation, ConcurrentDictionary<IMethodSymbol, IBlockOperation?>> s_methodToTopmostOperationBlockCache 428var methodToBlockMap = s_methodToTopmostOperationBlockCache.GetOrCreateValue(compilation); 536public static bool IsBenchmarkOrXUnitTestMethod(this IMethodSymbol method, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
72public static bool IsBenchmarkOrXUnitTestAttribute(this INamedTypeSymbol attributeClass, ConcurrentDictionary<INamedTypeSymbol, bool> knownTestAttributes, INamedTypeSymbol? benchmarkAttribute, INamedTypeSymbol? xunitFactAttribute)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
273private static readonly BoundedCache<Compilation, ConcurrentDictionary<IOperation, ControlFlowGraph?>> s_operationToCfgCache 280var operationToCfgMap = s_operationToCfgCache.GetOrCreateValue(operation.SemanticModel.Compilation);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (1)
21private readonly ConcurrentDictionary<OptionKey, (bool found, object? value)> _computedOptionValuesMap;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\OptionKey.cs (1)
13private static readonly ConcurrentDictionary<(string ruleId, string optionName), OptionKey> s_keys = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (4)
59private readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> _wildcardMatchResult = new(); 61private readonly ConcurrentDictionary<ISymbol, string> _symbolToDeclarationId = new(); 379internal ref readonly ConcurrentDictionary<ISymbol, KeyValuePair<string?, TValue?>> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult; 381internal ref readonly ConcurrentDictionary<ISymbol, string> SymbolToDeclarationId => ref _symbolNamesWithValueOption._symbolToDeclarationId;
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (2)
17/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool. 52private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledConcurrentDictionary<K, V>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
16/// <see cref="ConcurrentDictionary{TKey, TValue}"/> that can be recycled via an object pool.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
42private static readonly ConcurrentDictionary<IEqualityComparer<K>, ObjectPool<PooledDictionary<K, V>>> s_poolInstancesByComparer
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\SymbolDisplayStringCache.cs (4)
19private static readonly BoundedCacheWithFactory<Compilation, ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache>> s_byCompilationCache = new(); 29private readonly ConcurrentDictionary<ISymbol, string> SymbolToDisplayNames = new(); 50ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> dict = 55static ConcurrentDictionary<SymbolDisplayFormat, SymbolDisplayStringCache> CreateConcurrentDictionary(Compilation compilation)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\UnusedValue.cs (1)
10/// A placeholder value type for <see cref="ConcurrentDictionary{TKey, TValue}"/> used as a set.
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (2)
67private readonly ConcurrentDictionary<string, INamedTypeSymbol?> _fullNameToTypeMap; 81private static readonly ConcurrentDictionary<string, ImmutableArray<string>> _fullTypeNameToNamespaceNames =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
19private static readonly ConcurrentDictionary<(Type type, string name), Type?> s_typeImplementingMethod = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Changes.cs (2)
22private ConcurrentDictionary<int, TriviaData> _map; 32var map = InterlockedOperations.Initialize(ref _map, () => new ConcurrentDictionary<int, TriviaData>(concurrencyLevel: 1, capacity: 8));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (2)
302public static void ClearAndFree<TKey, TValue>(this ObjectPool<ConcurrentDictionary<TKey, TValue>> pool, ConcurrentDictionary<TKey, TValue> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
26private readonly ConcurrentDictionary<string, Optional<T>> _cachedValues = [];
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Simplification\SpecialTypeAnnotation.cs (2)
14private static readonly ConcurrentDictionary<SpecialType, string> s_fromSpecialTypes = new(); 15private static readonly ConcurrentDictionary<string, SpecialType> s_toSpecialTypes = new();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (4)
13using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 17private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new(); 34if (!s_treeAliasMap.TryGetValue(semanticModel.Compilation, out var treeMap) || 50var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>(); 156ConcurrentDictionary<SyntaxNode, SyntaxNode> reducedNodesMap, 157ConcurrentDictionary<SyntaxToken, SyntaxToken> reducedTokensMap,
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (2)
75private readonly ConcurrentDictionary<INamedTypeSymbol, UnusedValue> _sourceSymbolsToCheck = new(); 76private readonly ConcurrentDictionary<INamedTypeSymbol, UnusedValue> _typesWithSymbolDeclaredEventInvoked = new();
Shared (2)
Memoization\MemoizedFunction.cs (2)
58private readonly ConcurrentDictionary<Arg, Lazy<TResult>> _values; 131private readonly ConcurrentDictionary<Args, Lazy<TResult>> _values;
System.Collections.Concurrent (1)
src\runtime\artifacts\obj\System.Collections.Concurrent\Release\net11.0\System.Collections.Concurrent.Forwards.cs (1)
3[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Concurrent.ConcurrentDictionary<,>))]
System.ComponentModel.Annotations (4)
System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (3)
96private static readonly ConcurrentDictionary<Type, Type?> s_metadataTypeCache = new ConcurrentDictionary<Type, Type?>(); 99private static readonly ConcurrentDictionary<(Type, string), Attribute[]> s_typeMemberCache = new ConcurrentDictionary<(Type, string), Attribute[]>(); 102private static readonly ConcurrentDictionary<(Type, Type), bool> s_validatedMetadataTypeCache = new ConcurrentDictionary<(Type, Type), bool>();
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
23private readonly ConcurrentDictionary<Type, TypeStoreItem> _typeStoreItems = new();
System.ComponentModel.TypeConverter (2)
System\ComponentModel\CollectibleKeyConcurrentHashtable.cs (1)
22private readonly ConcurrentDictionary<TKey, TValue> _defaultTable = new ConcurrentDictionary<TKey, TValue>();
System\ComponentModel\PropertyDescriptor.cs (1)
21private ConcurrentDictionary<object, EventHandler?>? _valueChangedHandlers;
System.Data.Common (3)
System\Data\Common\DataStorage.cs (1)
128private static readonly ConcurrentDictionary<Type, Tuple<bool, bool, bool, bool>> s_typeImplementsInterface = new ConcurrentDictionary<Type, Tuple<bool, bool, bool, bool>>();
System\Data\Common\DbProviderFactories.cs (1)
36private static readonly ConcurrentDictionary<string, ProviderRegistration> _registeredFactories = new ConcurrentDictionary<string, ProviderRegistration>();
System\Data\Common\SqlUDTStorage.cs (1)
23private static readonly ConcurrentDictionary<Type, object> s_typeToNull = new ConcurrentDictionary<Type, object>();
System.Data.Odbc (3)
src\runtime\src\libraries\Common\src\System\Data\ProviderBase\DbConnectionPoolGroup.cs (3)
33private ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool> _poolCollection; 105ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>? oldPoolCollection = null; 237var newPoolCollection = new ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>();
System.Data.OleDb (3)
System\Data\ProviderBase\DbConnectionPoolGroup.cs (3)
32private ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool> _poolCollection; 129ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>? oldPoolCollection = null; 271var newPoolCollection = new ConcurrentDictionary<DbConnectionPoolIdentity, DbConnectionPool>();
System.Diagnostics.DiagnosticSource (12)
System\Diagnostics\DsesFilterAndTransform.cs (1)
1044private ConcurrentDictionary<Type, TransformSpec?>? _implicitTransformsTable; // If there is more than one object type for an implicit transform, they go here.
System\Diagnostics\Metrics\AggregationManager.cs (1)
28private readonly ConcurrentDictionary<Instrument, InstrumentState> _instrumentStates = new();
System\Diagnostics\Metrics\AggregatorStore.cs (10)
167public ConcurrentDictionary<TObjectSequence, TAggregator> GetLabelValuesDictionary<TStringSequence, TObjectSequence>(in TStringSequence names) 354ConcurrentDictionary<ObjectSequence1, TAggregator> valuesDict1 = 363ConcurrentDictionary<ObjectSequence2, TAggregator> valuesDict2 = 373ConcurrentDictionary<ObjectSequence3, TAggregator> valuesDict3 = 387ConcurrentDictionary<ObjectSequenceMany, TAggregator> valuesDictMany = 415private readonly ConcurrentDictionary<TObjectSequence, TAggregator> _valuesDict; 421ConcurrentDictionary<TObjectSequence, TAggregator> valuesDict, 481ConcurrentDictionary<TStringSequence, ConcurrentDictionary<TObjectSequence, TAggregator>> 488foreach (KeyValuePair<TStringSequence, ConcurrentDictionary<TObjectSequence, TAggregator>> kvName in this) 513public ConcurrentDictionary<TObjectSequence, TAggregator> GetValuesDictionary(in TStringSequence names) =>
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
134private readonly ConcurrentDictionary<int, Watch> _wdToWatch = new ConcurrentDictionary<int, Watch>();
System.Net.Http (7)
System\Net\Http\Metrics\MetricsHandler.cs (1)
66private readonly ConcurrentDictionary<ActiveRequestsTagKey, long> _counts = new();
System\Net\Http\SocketsHttpHandler\FailedProxyCache.cs (1)
31private readonly ConcurrentDictionary<Uri, long> _failedProxies = new ConcurrentDictionary<Uri, long>();
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (4)
37private readonly ConcurrentDictionary<HttpConnectionKey, HttpConnectionPool> _pools; 51/// <see cref="ConcurrentDictionary{TKey,TValue}.IsEmpty"/> call. 177var poolsRef = new WeakReference<ConcurrentDictionary<HttpConnectionKey, HttpConnectionPool>>(_pools); 180if (poolsRef.TryGetTarget(out ConcurrentDictionary<HttpConnectionKey, HttpConnectionPool>? pools))
System\Net\Http\SocketsHttpHandler\Metrics\SocketsHttpHandlerMetrics.cs (1)
71private readonly ConcurrentDictionary<OpenConnectionsTagKey, long> _counts = new();
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpHandler.cs (1)
100private readonly ConcurrentDictionary<CachedCertificateKey, CachedCertificateValue> _cachedCertificates = new();
System.Net.Quic (1)
src\runtime\src\libraries\Common\src\System\Net\SafeHandleCache.cs (1)
38private readonly ConcurrentDictionary<TKey, THandle> _cache = new();
System.Net.Requests (1)
System\Net\ServicePoint\ServicePointManager.cs (1)
18private static readonly ConcurrentDictionary<string, WeakReference<ServicePoint>> s_servicePointTable = new ConcurrentDictionary<string, WeakReference<ServicePoint>>();
System.Net.Security (2)
src\runtime\src\libraries\Common\src\System\Net\SafeHandleCache.cs (1)
38private readonly ConcurrentDictionary<TKey, THandle> _cache = new();
System\Net\Security\SslSessionsCache.cs (1)
17private static readonly ConcurrentDictionary<SslCredKey, SafeCredentialReference> s_cachedCreds =
System.Private.CoreLib (88)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (85)
17/// All public and protected members of <see cref="ConcurrentDictionary{TKey,TValue}"/> are thread-safe and may be used 69/// Initializes a new instance of the <see cref="ConcurrentDictionary{TKey,TValue}"/> 77/// Initializes a new instance of the <see cref="ConcurrentDictionary{TKey,TValue}"/> 82/// <see cref="ConcurrentDictionary{TKey,TValue}"/> concurrently, or -1 to indicate a default value.</param> 83/// <param name="capacity">The initial number of elements that the <see cref="ConcurrentDictionary{TKey,TValue}"/> can contain.</param> 90/// Initializes a new instance of the <see cref="ConcurrentDictionary{TKey,TValue}"/> 95/// cref="IEnumerable{T}"/> whose elements are copied to the new <see cref="ConcurrentDictionary{TKey,TValue}"/>.</param> 102/// Initializes a new instance of the <see cref="ConcurrentDictionary{TKey,TValue}"/> 111/// Initializes a new instance of the <see cref="ConcurrentDictionary{TKey,TValue}"/> 115/// <param name="collection">The <see cref="IEnumerable{T}"/> whose elements are copied to the new <see cref="ConcurrentDictionary{TKey,TValue}"/>.</param> 127/// Initializes a new instance of the <see cref="ConcurrentDictionary{TKey,TValue}"/> 133/// The estimated number of threads that will update the <see cref="ConcurrentDictionary{TKey,TValue}"/> concurrently, or -1 to indicate a default value. 136/// <see cref="ConcurrentDictionary{TKey,TValue}"/>.</param> 150/// Initializes a new instance of the <see cref="ConcurrentDictionary{TKey,TValue}"/> 154/// <param name="concurrencyLevel">The estimated number of threads that will update the <see cref="ConcurrentDictionary{TKey,TValue}"/> concurrently, or -1 to indicate a default value.</param> 155/// <param name="capacity">The initial number of elements that the <see cref="ConcurrentDictionary{TKey,TValue}"/> can contain.</param> 233/// Gets an instance of a type that may be used to perform operations on a <see cref="ConcurrentDictionary{TKey, TValue}"/> 254/// Gets an instance of a type that may be used to perform operations on a <see cref="ConcurrentDictionary{TKey, TValue}"/> 357/// Attempts to add the specified key and value to the <see cref="ConcurrentDictionary{TKey, TValue}"/>. 363/// true if the key/value pair was added to the <see cref="ConcurrentDictionary{TKey, TValue}"/> successfully; otherwise, false. 366/// <exception cref="OverflowException">The <see cref="ConcurrentDictionary{TKey, TValue}"/> contains too many elements.</exception> 378/// Determines whether the <see cref="ConcurrentDictionary{TKey, TValue}"/> contains the specified key. 380/// <param name="key">The key to locate in the <see cref="ConcurrentDictionary{TKey, TValue}"/>.</param> 381/// <returns>true if the <see cref="ConcurrentDictionary{TKey, TValue}"/> contains an element with the specified key; otherwise, false.</returns> 386/// Attempts to remove and return the value with the specified key from the <see cref="ConcurrentDictionary{TKey, TValue}"/>. 391/// <see cref="ConcurrentDictionary{TKey,TValue}"/> or the default value of <typeparamref 507/// Attempts to get the value associated with the specified key from the <see cref="ConcurrentDictionary{TKey,TValue}"/>. 512/// the <see cref="ConcurrentDictionary{TKey,TValue}"/> with the specified key or the default value of 515/// <returns>true if the key was found in the <see cref="ConcurrentDictionary{TKey,TValue}"/>; otherwise, false.</returns> 709/// Removes all keys and values from the <see cref="ConcurrentDictionary{TKey,TValue}"/>. 777/// Copies the key and value pairs stored in the <see cref="ConcurrentDictionary{TKey,TValue}"/> to a 780/// <returns>A new array containing a snapshot of key and value pairs copied from the <see cref="ConcurrentDictionary{TKey,TValue}"/>. 851/// cref="ConcurrentDictionary{TKey,TValue}"/>.</summary> 852/// <returns>An enumerator for the <see cref="ConcurrentDictionary{TKey,TValue}"/>.</returns> 862private sealed class Enumerator(ConcurrentDictionary<TKey, TValue> dictionary) : IEnumerator<KeyValuePair<TKey, TValue>> 870private readonly ConcurrentDictionary<TKey, TValue> _dictionary = dictionary; 872private ConcurrentDictionary<TKey, TValue>.VolatileNode[]? _buckets; 901ConcurrentDictionary<TKey, TValue>.VolatileNode[]? buckets = _buckets ??= _dictionary._tables._buckets; 1099/// <see cref="ConcurrentDictionary{TKey, TValue}" /> and to provide hash values for the keys. 1102/// <see cref="ConcurrentDictionary{TKey, TValue}" /> requires an equality implementation to determine 1127/// cref="ConcurrentDictionary{TKey,TValue}"/>. 1132/// cref="ConcurrentDictionary{TKey,TValue}"/>.</value> 1134/// cref="ConcurrentDictionary{TKey,TValue}"/> 1168/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> 1208/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> 1250/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> 1282/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key does not already 1283/// exist, or updates a key/value pair in the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key 1358/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key does not already 1359/// exist, or updates a key/value pair in the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key 1431/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key does not already 1432/// exist, or updates a key/value pair in the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key 1497/// Gets a value that indicates whether the <see cref="ConcurrentDictionary{TKey,TValue}"/> is empty. 1499/// <value>true if the <see cref="ConcurrentDictionary{TKey,TValue}"/> is empty; otherwise, 1544/// cref="ConcurrentDictionary{TKey,TValue}"/>.</exception> 1568/// Gets a snapshot containing all the keys in the <see cref="ConcurrentDictionary{TKey,TValue}"/>. 1570/// <remarks>The property returns a copy of all the keys. It's not kept in sync with <see cref="ConcurrentDictionary{TKey,TValue}"/>.</remarks> 1577/// Gets a snapshot containing all the values in the <see cref="ConcurrentDictionary{TKey,TValue}"/>. 1579/// <remarks>The property returns a copy of all the values. It's not kept in sync with <see cref="ConcurrentDictionary{TKey,TValue}"/>.</remarks> 1594/// cref="ConcurrentDictionary{TKey,TValue}"/>.</param> 1598/// cref="ConcurrentDictionary{TKey,TValue}"/> 1601/// <see cref="ConcurrentDictionary{TKey,TValue}"/></exception> 1622/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always returns 1632/// cref="ConcurrentDictionary{TKey,TValue}"/>.</param> 1645/// cref="ConcurrentDictionary{TKey,TValue}"/>.</summary> 1646/// <returns>An enumerator for the <see cref="ConcurrentDictionary{TKey,TValue}"/>.</returns> 1653IEnumerator IEnumerable.GetEnumerator() => ((ConcurrentDictionary<TKey, TValue>)this).GetEnumerator(); 1670/// name="TKey"/> of the <see cref="ConcurrentDictionary{TKey,TValue}"/>. -or- 1672/// the type of values in the <see cref="ConcurrentDictionary{TKey,TValue}"/>. 1674/// cref="ConcurrentDictionary{TKey,TValue}"/>. 1725/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always 1735/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always 1782/// cref="ConcurrentDictionary{TKey,TValue}"/>.</value> 1788/// cref="ConcurrentDictionary{TKey,TValue}"/>. -or- A value is being 1791/// cref="ConcurrentDictionary{TKey,TValue}"/> 1823((ConcurrentDictionary<TKey, TValue>)this)[(TKey)key] = (TValue)value!; 1919/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always 2294internal DictionaryEnumerator(ConcurrentDictionary<TKey, TValue> dictionary) => _enumerator = dictionary.GetEnumerator(); 2311private static bool IsCompatibleKey<TAlternateKey>(ConcurrentDictionary<TKey, TValue>.Tables tables) 2320private static IAlternateEqualityComparer<TAlternateKey, TKey> GetAlternateComparer<TAlternateKey>(ConcurrentDictionary<TKey, TValue>.Tables tables) 2328/// Provides a type that may be used to perform operations on a <see cref="ConcurrentDictionary{TKey, TValue}"/> 2335internal AlternateLookup(ConcurrentDictionary<TKey, TValue> dictionary) 2342/// <summary>Gets the <see cref="ConcurrentDictionary{TKey, TValue}"/> against which this instance performs operations.</summary> 2343public ConcurrentDictionary<TKey, TValue> Dictionary { get; } 2359/// <summary>Determines whether the <see cref="ConcurrentDictionary{TKey, TValue}"/> contains the specified alternate key.</summary>
src\runtime\src\libraries\System.Private.CoreLib\src\System\CurrentSystemTimeZone.cs (1)
164private readonly ConcurrentDictionary<int, DaylightTime> m_CachedDaylightChanges = [];
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
18private static ConcurrentDictionary<string, int>? s_nameToCodePage;
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Cache.cs (1)
1396private readonly ConcurrentDictionary<int, int> _transitionCache = new ConcurrentDictionary<int, int>();
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\ContextAware.cs (1)
54private readonly ConcurrentDictionary<TKey, TValue> _fastDictionary = new();
System\Runtime\Serialization\DataContract.cs (1)
319private static readonly ConcurrentDictionary<nint, int> s_typeToIDCache = new();
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
155private static readonly ConcurrentDictionary<nint, int> s_typeToIDCache = new();
System.Private.Windows.Core.TestUtilities (1)
NoAssertContext.cs (1)
31private static readonly ConcurrentDictionary<int, int> s_suppressedThreads = new();
System.Reflection.MetadataLoadContext (8)
System\CoreRtBridge.cs (1)
52private readonly ConcurrentDictionary<K, V> _dict = new ConcurrentDictionary<K, V>();
System\Reflection\MetadataLoadContext.Loading.cs (1)
18private readonly ConcurrentDictionary<RoAssemblyName, RoAssembly> _loadedAssemblies = new ConcurrentDictionary<RoAssemblyName, RoAssembly>();
System\Reflection\MetadataLoadContext.Resolving.cs (1)
23private readonly ConcurrentDictionary<RoAssemblyName, RoAssembly> _binds = new ConcurrentDictionary<RoAssemblyName, RoAssembly>();
System\Reflection\TypeLoading\Modules\RoModule.Unifier.cs (5)
21private readonly ConcurrentDictionary<RoType, RoArrayType> _szArrayDict = new ConcurrentDictionary<RoType, RoArrayType>(); 35private readonly ConcurrentDictionary<RoArrayType.Key, RoArrayType> _mdArrayDict = new ConcurrentDictionary<RoArrayType.Key, RoArrayType>(); 48private readonly ConcurrentDictionary<RoType, RoByRefType> _byRefDict = new ConcurrentDictionary<RoType, RoByRefType>(); 59private readonly ConcurrentDictionary<RoType, RoPointerType> _pointerDict = new ConcurrentDictionary<RoType, RoPointerType>(); 70private readonly ConcurrentDictionary<RoConstructedGenericType.Key, RoConstructedGenericType> _constructedGenericTypeDict = new ConcurrentDictionary<RoConstructedGenericType.Key, RoConstructedGenericType>();
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\SerializationEvents.cs (1)
14private static readonly ConcurrentDictionary<Type, SerializationEvents> s_cache = new();
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\DefaultCaching.cs (1)
15private readonly ConcurrentDictionary<RuntimeTypeHandle, IIUnknownCacheStrategy.TableInfo> _cache = new(concurrencyLevel: 1, capacity: 16);
System.Runtime.Serialization.Formatters (2)
System\Runtime\Serialization\FormatterServices.cs (1)
18private static readonly ConcurrentDictionary<MemberHolder, MemberInfo[]> s_memberInfoTable = new ConcurrentDictionary<MemberHolder, MemberInfo[]>();
System\Runtime\Serialization\SerializationEventsCache.cs (1)
98private static readonly ConcurrentDictionary<Type, SerializationEvents> s_cache = new ConcurrentDictionary<Type, SerializationEvents>();
System.Security.Cryptography (7)
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\BCryptAlgorithmCache.cs (2)
14private static readonly ConcurrentDictionary<(string HashAlgorithmId, BCryptOpenAlgorithmProviderFlags Flags), (SafeBCryptAlgorithmHandle Handle, int HashSizeInBytes)> s_handles = new(); 15private static readonly ConcurrentDictionary<(string HashAlgorithmId, BCryptOpenAlgorithmProviderFlags Flags), bool> s_supported = new();
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.SignVerify.cs (1)
17private static readonly ConcurrentDictionary<HashAlgorithmName, int> s_hashSizes =
System\Security\Cryptography\CryptoConfig.cs (2)
42private static readonly ConcurrentDictionary<string, Type> appNameHT = new ConcurrentDictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 43private static readonly ConcurrentDictionary<string, string> appOidHT = new ConcurrentDictionary<string, string>(StringComparer.OrdinalIgnoreCase);
System\Security\Cryptography\OidLookup.cs (2)
12private static readonly ConcurrentDictionary<string, string> s_lateBoundOidToFriendlyName = 15private static readonly ConcurrentDictionary<string, string> s_lateBoundFriendlyNameToOid =
System.ServiceModel.Primitives (4)
Internals\System\Runtime\InternalBufferManager.cs (1)
52private ConcurrentDictionary<int, string> _buffersPooled = new ConcurrentDictionary<int, string>();
Internals\System\Runtime\TimeoutHelper.cs (1)
258private static readonly ConcurrentDictionary<long, Task<CancellationToken>> s_tokenCache =
System\ServiceModel\Channels\ServiceChannelProxy.cs (1)
283private static ConcurrentDictionary<Type, TaskCompletionSourceInfo> s_cache = new ConcurrentDictionary<Type, TaskCompletionSourceInfo>();
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
1291private static ConcurrentDictionary<XmlMapping, string> s_dictionary = new ConcurrentDictionary<XmlMapping, string>();
System.Text.Encoding.CodePages (5)
System\Text\EncodingTable.cs (5)
11private static readonly ConcurrentDictionary<string, int> s_nameToCodePageCache = new(StringComparer.OrdinalIgnoreCase); 12private static readonly ConcurrentDictionary<int, string> s_codePageToWebNameCache = new(); 13private static readonly ConcurrentDictionary<int, string> s_codePageToEnglishNameCache = new(); 14private static readonly ConcurrentDictionary<int, (ushort FamilyCodePage, byte CodePageFlags)> s_codePageToItemCache = new(); 135private static string? GetNameFromCodePage(int codePage, string names, ReadOnlySpan<int> indices, ConcurrentDictionary<int, string> cache)
System.Text.Json (12)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (3)
45private readonly ConcurrentDictionary<ulong, JsonEncodedText> _nameCacheForWriting; 50private readonly ConcurrentDictionary<string, ulong> _nameCacheForReading; 252ConcurrentDictionary<string, ulong>.AlternateLookup<ReadOnlySpan<char>> lookup = _nameCacheForReading.GetAlternateLookup<ReadOnlySpan<char>>();
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (1)
239private readonly ConcurrentDictionary<Type, CacheEntry> _cache = new();
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (6)
157ConcurrentDictionary<Type, UnionCaseEntry?> caseIndex = CreateCaseIndex(orderedCases); 199private static ConcurrentDictionary<Type, UnionCaseEntry?> CreateCaseIndex(UnionCaseEntry[] orderedCases) 201var caseIndex = new ConcurrentDictionary<Type, UnionCaseEntry?>(); 215ConcurrentDictionary<Type, UnionCaseEntry?> caseIndex, 348ConcurrentDictionary<Type, UnionCaseEntry?> caseIndex, 377ConcurrentDictionary<Type, UnionCaseEntry?> caseIndex,
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
18private readonly ConcurrentDictionary<Type, DerivedJsonTypeInfo?> _typeToDiscriminatorId = new();
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.Cache.cs (1)
20private readonly ConcurrentDictionary<TKey, CacheEntry> _cache = new();
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\Regex.Cache.cs (1)
73private static readonly ConcurrentDictionary<Key, Node> s_cacheDictionary = new ConcurrentDictionary<Key, Node>(concurrencyLevel: 1, capacity: 31);
System.Windows.Forms (7)
System\Resources\AssemblyNamesTypeResolutionService.cs (2)
13private ConcurrentDictionary<AssemblyName, Assembly>? _cachedAssemblies; 14private ConcurrentDictionary<string, Type>? _cachedTypes;
System\Windows\Forms\Application.ThreadContext.cs (1)
26private static readonly ConcurrentDictionary<uint, ThreadContext> s_contextHash = [];
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (1)
17private static readonly ConcurrentDictionary<string, string> s_semiBoldFamilyNames =
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (1)
15private static readonly ConcurrentDictionary<string, bool> s_categoryStates = [];
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
24private static readonly ConcurrentDictionary<int, Font> s_defaultFontCache = new();
System\Windows\Forms\Rendering\Animation\AnimationManager.cs (1)
27private readonly ConcurrentDictionary<AnimatedControlRenderer, AnimationRendererItem> _renderer = [];
System.Xaml (34)
System\Xaml\InfosetObjects\XamlObjectWriter.cs (1)
1463openGeneric == typeof(ConcurrentDictionary<,>);
System\Xaml\MS\Impl\XmlNsInfo.cs (4)
43private ConcurrentDictionary<string, IList<string>> _clrToXmlNs; 44internal ConcurrentDictionary<string, IList<string>> ClrToXmlNs 204private ConcurrentDictionary<string, IList<string>> LoadClrToXmlNs() 206ConcurrentDictionary<string, IList<string>> result =
System\Xaml\Schema\TypeReflector.cs (2)
40private ConcurrentDictionary<XamlDirective, XamlMember> _aliasedProperties; 378var dict = XamlSchemaContext.CreateDictionary<XamlDirective, XamlMember>();
System\Xaml\Schema\XamlNamespace.cs (1)
21private ConcurrentDictionary<string, XamlType> _typeCache;
System\Xaml\XamlSchemaContext.cs (26)
136private ConcurrentDictionary<string, string> _preferredPrefixes; 221ConcurrentDictionary<string, string> preferredPrefixes = CreateDictionary<string, string>(); 231private void UpdatePreferredPrefixes(XmlNsInfo newNamespaces, ConcurrentDictionary<string, string> prefixDict) 366private ConcurrentDictionary<string, string> _xmlNsCompatDict; 369private ConcurrentDictionary<string, string> XmlNsCompatDict 486private ConcurrentDictionary<Type, XamlType> _masterTypeList; 487private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> _masterValueConverterList; 488private ConcurrentDictionary<ReferenceEqualityTuple<MemberInfo, MemberInfo>, XamlMember> _masterMemberList; 489private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > _masterBracketCharacterCache; 498private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > MasterBracketCharacterCache 509private ConcurrentDictionary<Type, XamlType> MasterTypeList 520private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> MasterValueConverterList 531private ConcurrentDictionary<ReferenceEqualityTuple<MemberInfo, MemberInfo>, XamlMember> MasterMemberList 708private ConcurrentDictionary<string, XamlNamespace> _namespaceByUriList; 709private ConcurrentDictionary<Assembly, XmlNsInfo> _xmlnsInfo; 710private ConcurrentDictionary<WeakRefKey, XmlNsInfo> _xmlnsInfoForDynamicAssemblies; 711private ConcurrentDictionary<Assembly, XmlNsInfo> _xmlnsInfoForUnreferencedAssemblies; 726private ConcurrentDictionary<Assembly, XmlNsInfo> XmlnsInfo 737private ConcurrentDictionary<WeakRefKey, XmlNsInfo> XmlnsInfoForDynamicAssemblies 749private ConcurrentDictionary<string, XamlNamespace> NamespaceByUriList 763private ConcurrentDictionary<Assembly, XmlNsInfo> XmlnsInfoForUnreferencedAssemblies 1038ConcurrentDictionary<string, IList<string>> assemblyMappings = nsInfo.ClrToXmlNs; 1205internal static ConcurrentDictionary<K, V> CreateDictionary<K, V>() 1210internal static ConcurrentDictionary<K, V> CreateDictionary<K, V>(IEqualityComparer<K> comparer) 1215internal static V TryAdd<K, V>(ConcurrentDictionary<K, V> dictionary, K key, V value) 1227internal static V TryUpdate<K, V>(ConcurrentDictionary<K, V> dictionary, K key, V value, V comparand)
vstest.console (1)
Internal\ConsoleLogger.cs (1)
171private ConcurrentDictionary<Guid, MinimalTestResult>? LeafTestResults { get; set; }
vstest.console.arm64 (1)
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (1)
171private ConcurrentDictionary<Guid, MinimalTestResult>? LeafTestResults { get; set; }