2 types derived from ConcurrentDictionary
Microsoft.AspNetCore.SignalR.Core (1)
Internal\HubGroupList.cs (1)
75internal sealed class GroupConnectionList : ConcurrentDictionary<string, HubConnectionContext>
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\AggregatorStore.cs (1)
481ConcurrentDictionary<TStringSequence, ConcurrentDictionary<TObjectSequence, TAggregator>>
609 instantiations of ConcurrentDictionary
Aspire.Dashboard (6)
Model\ResourceOutgoingPeerResolver.cs (1)
14private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName);
Model\ResourceViewModel.cs (1)
151private static readonly ConcurrentDictionary<IconKey, CustomIcon?> s_iconCache = new();
Otlp\Model\ColorGenerator.cs (1)
35_colorIndexByKey = new ConcurrentDictionary<string, Lazy<int>>(StringComparer.OrdinalIgnoreCase);
Otlp\Model\OtlpApplication.cs (1)
31private readonly ConcurrentDictionary<KeyValuePair<string, string>[], OtlpApplicationView> _applicationViews = new(ApplicationViewKeyComparer.Instance);
Otlp\Storage\TelemetryRepository.cs (1)
34private readonly ConcurrentDictionary<ApplicationKey, OtlpApplication> _applications = new();
Utils\FormatHelpers.cs (1)
27private static readonly ConcurrentDictionary<CultureDetailsKey, MillisecondFormatStrings> s_formatStrings = new();
Aspire.Dashboard.Tests (1)
ConsoleLogsTests\CreateResourceSelectModelsTests.cs (1)
35var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>(applications.ToDictionary(app => app.Name));
Aspire.Hosting (6)
ApplicationModel\ResourceLoggerService.cs (1)
22private readonly ConcurrentDictionary<string, ResourceLoggerState> _loggers = new();
ApplicationModel\ResourceNotificationService.cs (1)
20private readonly ConcurrentDictionary<(IResource, string), ResourceNotificationState> _resourceNotificationStates = new();
Dashboard\DashboardLifecycleHook.cs (1)
310var loggerCache = new ConcurrentDictionary<string, ILogger>(StringComparer.Ordinal);
Dcp\ApplicationExecutor.cs (1)
112private readonly ConcurrentDictionary<string, (CancellationTokenSource Cancellation, Task Task)> _logStreams = new();
Eventing\DistributedApplicationEventing.cs (2)
12private readonly ConcurrentDictionary<Type, List<DistributedApplicationEventSubscription>> _eventSubscriptionListLookup = new(); 13private readonly ConcurrentDictionary<DistributedApplicationEventSubscription, Type> _subscriptionEventTypeLookup = new();
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.cs (1)
40modelNameOperations = new ConcurrentDictionary<ModelNameOperation, byte>();
Aspire.Hosting.Tests (1)
Dashboard\DashboardResourceTests.cs (1)
563private readonly ConcurrentDictionary<string, TestLogger> _loggers = new();
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
52private static readonly ConcurrentDictionary<string, SqlConnectionDetails> ConnectionDetailCache = new(StringComparer.OrdinalIgnoreCase);
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
52private static readonly ConcurrentDictionary<string, SqlConnectionDetails> ConnectionDetailCache = new(StringComparer.OrdinalIgnoreCase);
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (1)
31= new();
BasicTestApp (1)
InteropTest\JavaScriptInterop.cs (1)
11public static ConcurrentDictionary<string, object[]> Invocations = new ConcurrentDictionary<string, object[]>();
DesignSurfaceExt (1)
TypeDiscoveryService.cs (1)
19private readonly ConcurrentDictionary<Type, ImmutableArray<Type>> _discoveredTypesCache = 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>();
HtmlGenerationWebSite (1)
SignalTokenProviderService.cs (1)
12= new ConcurrentDictionary<object, ChangeTokenInfo>();
InMemory.FunctionalTests (2)
Http2\Http2TestBase.cs (1)
128protected readonly ConcurrentDictionary<int, TaskCompletionSource> _runningStreams = new ConcurrentDictionary<int, TaskCompletionSource>();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
82internal readonly ConcurrentDictionary<long, Http3StreamBase> _runningStreams = new ConcurrentDictionary<long, Http3StreamBase>();
JwtClientSample (1)
Program.cs (1)
24private readonly ConcurrentDictionary<string, Task<string>> _tokens = new ConcurrentDictionary<string, Task<string>>(StringComparer.Ordinal);
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 (14)
BindConverter.cs (2)
1668private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>(); 1857private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>();
CascadingParameterState.cs (1)
17private 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)
19private static readonly ConcurrentDictionary<Type, ComponentTypeInfoCacheEntry> _cachedComponentTypeInfo = new();
DefaultComponentActivator.cs (1)
12private static readonly ConcurrentDictionary<Type, ObjectFactory> _cachedComponentTypeInfo = new();
Reflection\ComponentProperties.cs (2)
20= new ConcurrentDictionary<Type, WritersForType>(); 276_referenceEqualityWritersCache = new ConcurrentDictionary<string, PropertySetter?>(ReferenceEqualityComparer.Instance);
RenderTree\EventArgsTypeCache.cs (1)
11private 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)
14private static readonly ConcurrentDictionary<(Type, string), InboundRouteEntry> _routeEntryCache = new();
Routing\RouteTableFactory.cs (1)
32private readonly ConcurrentDictionary<RouteKey, RouteTable> _cache = new();
Routing\UrlValueConstraint.cs (1)
17private static readonly ConcurrentDictionary<Type, UrlValueConstraint> _cachedInstances = new();
Microsoft.AspNetCore.Components.Authorization (1)
AttributeAuthorizeDataCache.cs (1)
11private static readonly ConcurrentDictionary<Type, IAuthorizeData[]?> _cache = new();
Microsoft.AspNetCore.Components.Endpoints (8)
Builder\RazorComponentsEndpointHttpContextExtensions.cs (1)
20private static readonly ConcurrentDictionary<Type, bool> AcceptsInteractiveRoutingCache = new();
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();
Rendering\EndpointComponentState.cs (1)
17private static readonly ConcurrentDictionary<Type, StreamRenderingAttribute?> _streamRenderingAttributeByComponentType = new();
Rendering\SSRRenderModeBoundary.cs (1)
23private static readonly ConcurrentDictionary<Type, string> _componentTypeNameHashCache = new();
src\Shared\PropertyHelper\PropertyHelper.cs (2)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new();
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Binding\FormDataMapperTests.cs (1)
905var expected = new ConcurrentDictionary<int, int>(new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, });
Microsoft.AspNetCore.Components.Forms (4)
EditContextDataAnnotationsExtensions.cs (1)
62private 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\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
24private static readonly ConcurrentDictionary<MemberInfo, CapturedValueFormatter> s_capturedValueFormatterCache = new(); 25private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new();
Microsoft.AspNetCore.Components.Forms.Tests (1)
FieldIdentifierTest.cs (1)
146var cache = new ConcurrentDictionary<(Type ModelType, MemberInfo FieldName), Func<object, object>>();
Microsoft.AspNetCore.Components.QuickGrid (1)
Infrastructure\AsyncQueryExecutorSupplier.cs (1)
24private static readonly ConcurrentDictionary<Type, bool> IsEntityFrameworkProviderTypeCache = new();
Microsoft.AspNetCore.Components.Server (5)
Circuits\CircuitRegistry.cs (1)
54ConnectedCircuits = new ConcurrentDictionary<CircuitId, CircuitHost>();
Circuits\RemoteJSRuntime.cs (1)
21private readonly ConcurrentDictionary<long, DotNetStreamReference> _pendingDotNetToJSStreams = new();
ProtectedBrowserStorage\ProtectedBrowserStorage.cs (1)
20= new ConcurrentDictionary<string, IDataProtector>(StringComparer.Ordinal);
src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\Components\Shared\src\RootComponentTypeCache.cs (1)
13private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
Microsoft.AspNetCore.Components.Web (3)
JSComponents\JSComponentInterop.cs (1)
26private static readonly ConcurrentDictionary<Type, ParameterTypeCache> ParameterTypeCaches = new();
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
24private static readonly ConcurrentDictionary<MemberInfo, CapturedValueFormatter> s_capturedValueFormatterCache = new(); 25private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new();
Microsoft.AspNetCore.Components.WebAssembly (5)
HotReload\HotReloadAgent.cs (2)
21private readonly ConcurrentDictionary<Guid, List<UpdateDelta>> _deltas = new(); 22private readonly ConcurrentDictionary<Assembly, Assembly> _appliedAssemblies = new();
Services\WebAssemblyConsoleLoggerProvider.cs (1)
23_loggers = new ConcurrentDictionary<string, WebAssemblyConsoleLogger<object>>();
src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\Components\Shared\src\RootComponentTypeCache.cs (1)
13private 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 (1)
Logging\IncomingHttpRouteUtility.cs (1)
22private readonly ConcurrentDictionary<string, FrozenDictionary<string, DataClassification>> _parametersToRedactCache = new();
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
Internal\CallHandlers\CallHandlerDescriptorInfo.cs (1)
27PathDescriptorsCache = new ConcurrentDictionary<string, List<FieldDescriptor>?>();
src\Grpc\JsonTranscoding\src\Shared\DescriptorRegistry.cs (1)
14private readonly ConcurrentDictionary<Type, DescriptorBase> _typeDescriptorMap = new ConcurrentDictionary<Type, DescriptorBase>();
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
375= new ConcurrentDictionary<Type, Dictionary<object, string>>();
Microsoft.AspNetCore.Grpc.Swagger (2)
src\Grpc\JsonTranscoding\src\Shared\DescriptorRegistry.cs (1)
14private readonly ConcurrentDictionary<Type, DescriptorBase> _typeDescriptorMap = new ConcurrentDictionary<Type, DescriptorBase>();
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
375= new ConcurrentDictionary<Type, Dictionary<object, string>>();
Microsoft.AspNetCore.HeaderParsing (1)
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\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)
180_items = new ConnectionItems(new ConcurrentDictionary<object, object?>());
Internal\HttpConnectionManager.cs (1)
23new ConcurrentDictionary<string, HttpConnectionContext>(StringComparer.Ordinal);
Microsoft.AspNetCore.Http.Extensions (5)
src\Components\Endpoints\src\FormMapping\FormDataMapperOptions.cs (2)
14private readonly ConcurrentDictionary<Type, FormDataConverter> _converters = new(); 27_converters = new(WellKnownConverters.Converters);
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\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\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\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.TagHelpers.Test (4)
JavaScriptResourcesTest.cs (4)
19var cache = new ConcurrentDictionary<string, string>(); 36var cache = new ConcurrentDictionary<string, string>(); 61var cache = new ConcurrentDictionary<string, string>(); 81var cache = new ConcurrentDictionary<string, string>();
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.Mvc.ViewFeatures.Test (1)
ExpressionHelperTest.cs (1)
11private readonly ConcurrentDictionary<LambdaExpression, string> _expressionTextCache = new ConcurrentDictionary<LambdaExpression, string>(LambdaExpressionComparer.Instance);
Microsoft.AspNetCore.OpenApi (7)
Services\OpenApiDocumentService.cs (1)
50private readonly ConcurrentDictionary<string, OpenApiOperationTransformerContext> _operationTransformerContextCache = new();
Services\Schemas\OpenApiSchemaStore.cs (3)
18private readonly ConcurrentDictionary<OpenApiSchemaKey, JsonNode> _schemas = new() 52public readonly ConcurrentDictionary<OpenApiSchema, string?> SchemasByReference = new(OpenApiSchemaComparer.Instance); 53private readonly ConcurrentDictionary<string, int> _referenceIdCounter = new();
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.Routing (4)
DefaultLinkGenerator.cs (1)
55return new ConcurrentDictionary<RouteEndpoint, TemplateBinder>();
DefaultLinkParser.cs (1)
41return new ConcurrentDictionary<RouteEndpoint, MatcherState>();
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\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 (1)
NativeInterop\DisconnectListener.cs (1)
12private readonly ConcurrentDictionary<ulong, ConnectionCancellation> _connectionCancellationTokens = new();
Microsoft.AspNetCore.Server.Kestrel.Core (3)
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\WebTransport\WebTransportSession.cs (1)
24private readonly ConcurrentDictionary<long, WebTransportStream> _openStreams = new();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
82internal readonly ConcurrentDictionary<long, Http3StreamBase> _runningStreams = new ConcurrentDictionary<long, Http3StreamBase>();
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\PropertyHelper\PropertyHelper.cs (2)
41private static readonly ConcurrentDictionary<Type, PropertyHelper[]> PropertiesCache = new(); 43private static readonly ConcurrentDictionary<Type, PropertyHelper[]> VisiblePropertiesCache = new();
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
85private readonly ConcurrentDictionary<string, InvocationHandlerList> _handlers = new ConcurrentDictionary<string, InvocationHandlerList>(StringComparer.Ordinal);
Microsoft.AspNetCore.SignalR.Core (5)
HubConnectionContext.cs (1)
172internal 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\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, IStreamConverter> _lookup = new ConcurrentDictionary<string, IStreamConverter>();
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\SignalR\common\Shared\ClientResultsManager.cs (1)
16private readonly ConcurrentDictionary<string, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete)> _pendingInvocations = new();
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
TestConnectionMultiplexer.cs (1)
240new ConcurrentDictionary<RedisChannel, List<(int, Action<RedisChannel, RedisValue>)>>();
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
ServerLogScope.cs (1)
27_serverLoggers = new ConcurrentDictionary<string, ILogger>(StringComparer.Ordinal);
Microsoft.Build (55)
BackEnd\BuildManager\BuildManager.cs (1)
55internal static ConcurrentDictionary<ProjectCacheDescriptor, ProjectCacheDescriptor> ProjectCacheDescriptors { get; } = new(ProjectCacheDescriptorEqualityComparer.Instance);
BackEnd\Components\Caching\ResultsCache.cs (2)
40_resultsByConfiguration = new ConcurrentDictionary<int, BuildResult>(); 252capacity => new ConcurrentDictionary<int, BuildResult>(NativeMethodsShared.GetLogicalCoreCount(), capacity));
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
180_nodeContexts = new ConcurrentDictionary<int, NodeContext>();
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
68private readonly ConcurrentDictionary<string, byte /*void*/> _processesToIgnore = new();
BackEnd\Components\Communications\TranslatorExtensions.cs (1)
23private static Lazy<ConcurrentDictionary<Type, ConstructorInfo>> parameterlessConstructorCache = new Lazy<ConcurrentDictionary<Type, ConstructorInfo>>(() => new ConcurrentDictionary<Type, ConstructorInfo>());
BackEnd\Components\Logging\LoggingService.cs (2)
298_projectFileMap = new ConcurrentDictionary<int, string>(); 752warningsByProject ??= new ConcurrentDictionary<WarningsConfigKey, ISet<string>>();
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
47private readonly ConcurrentDictionary<ProjectCacheDescriptor, Lazy<Task<ProjectCachePlugin>>> _projectCachePlugins = new(ProjectCacheDescriptorEqualityComparer.Instance); 50private readonly ConcurrentDictionary<BuildRequestConfiguration, IReadOnlyDictionary<string, string>> _globalPropertiesPerConfiguration = new();
BackEnd\Components\SdkResolution\CachingSdkResolverLoader.cs (1)
25private 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)
41private readonly ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>> _resolverStateBySubmission = new ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>>(); 536_ => new ConcurrentDictionary<SdkResolver, object>(
BackEnd\Shared\BuildResult.cs (2)
730_resultsByTarget = new ConcurrentDictionary<string, TargetResult>(_resultsByTarget, StringComparer.OrdinalIgnoreCase), 752return new ConcurrentDictionary<string, TargetResult>(1, capacity, StringComparer.OrdinalIgnoreCase);
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
504private readonly ConcurrentDictionary<int, string> _projectsByInstanceId = new(); 505private 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)
20private readonly ConcurrentDictionary<string, EditorConfigFile> _editorConfigFileCache = new ConcurrentDictionary<string, EditorConfigFile>(StringComparer.InvariantCultureIgnoreCase);
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
Evaluation\ConditionEvaluator.cs (4)
169private static volatile ConcurrentDictionary<int, ExpressionTreeForCurrentOptionsWithSize> s_cachedExpressionTrees = new ConcurrentDictionary<int, ExpressionTreeForCurrentOptionsWithSize>(); 245_ => new ExpressionTreeForCurrentOptionsWithSize(new ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>>(StringComparer.Ordinal))); 321new ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>>(StringComparer.Ordinal)), 328new ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>>(StringComparer.Ordinal));
Evaluation\Context\EvaluationContext.cs (1)
69FileEntryExpansionCache = fileEntryExpansionCache ?? new ConcurrentDictionary<string, IReadOnlyList<string>>();
Evaluation\Expander.cs (1)
2240private static ConcurrentDictionary<string, ItemTransformFunction> s_transformFunctionDelegateCache = new ConcurrentDictionary<string, ItemTransformFunction>(StringComparer.OrdinalIgnoreCase);
Evaluation\ProjectRootElementCache.cs (1)
160_fileLoadLocks = new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase);
Evaluation\SimpleProjectRootElementCache.cs (1)
32_cache = new ConcurrentDictionary<string, ProjectRootElement>(StringComparer.OrdinalIgnoreCase);
FileMatcher.cs (3)
42private static readonly Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>> s_cachedGlobExpansions = new Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>>(() => new ConcurrentDictionary<string, IReadOnlyList<string>>(StringComparer.OrdinalIgnoreCase)); 43private static readonly Lazy<ConcurrentDictionary<string, object>> s_cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 46private readonly Lazy<ConcurrentDictionary<string, object>> _cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase));
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
FrameworkLocationHelper.cs (2)
1326this._pathsToDotNetFramework = new ConcurrentDictionary<DotNetFrameworkArchitecture, string>(); 1327this._pathsToDotNetFrameworkSdkTools = new ConcurrentDictionary<Version, string>();
Graph\GraphBuilder.cs (2)
53private ConcurrentDictionary<ConfigurationMetadata, Lazy<ProjectInstance>> _platformNegotiationInstancesCache = new(); 648new ConcurrentDictionary<(ProjectGraphNode, ProjectGraphNode), ProjectItemInstance>();
Graph\ParallelWorkSet.cs (1)
88_inProgressOrCompletedWork = new ConcurrentDictionary<TKey, Lazy<TResult>>(comparer);
Graph\ProjectGraph.cs (1)
503var nodeIds = new ConcurrentDictionary<ProjectGraphNode, string>();
Instance\TaskRegistry.cs (3)
139new(RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact); 147private readonly ConcurrentDictionary<string, ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord>> _cachedTaskRecordsWithFuzzyMatch = new(StringComparer.OrdinalIgnoreCase); 633_ => new(RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact));
Resources\Constants.cs (1)
288var availableStaticMethods = new ConcurrentDictionary<string, Tuple<string, Type>>(StringComparer.OrdinalIgnoreCase);
TypeLoader.cs (5)
34private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 39private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 246cache.GetOrAdd(_isDesiredType, (_) => new ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>()); 314_typeNameToType = new(StringComparer.OrdinalIgnoreCase); 316_publicTypeNameToLoadedType = new(StringComparer.OrdinalIgnoreCase);
Utilities\EngineFileUtilities.cs (2)
560private static readonly Lazy<ConcurrentDictionary<string, bool>> _regexMatchCache = new Lazy<ConcurrentDictionary<string, bool>>(() => new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase)); 586private readonly Lazy<ConcurrentDictionary<string, bool>> existenceCache = new Lazy<ConcurrentDictionary<string, bool>>(() => new ConcurrentDictionary<string, bool>(), true);
Microsoft.Build.Engine.OM.UnitTests (3)
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Engine.UnitTests (2)
FileMatcher_Tests.cs (1)
134var fileMatcherWithCache = new FileMatcher(FileSystems.Default, new ConcurrentDictionary<string, IReadOnlyList<string>>());
InternalEngineHelpers.cs (1)
44public ConcurrentDictionary<string, int> ResolvedCalls { get; } = new ConcurrentDictionary<string, int>();
Microsoft.Build.Framework (2)
FileClassifier.cs (1)
83private readonly ConcurrentDictionary<string, string> _knownImmutableDirectories = new();
ImmutableFilesTimestampCache.cs (1)
17private readonly ConcurrentDictionary<string, DateTime> _cache = new(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Tasks.Core (18)
AssemblyDependency\ResolveAssemblyReference.cs (1)
2373? new ConcurrentDictionary<string, AssemblyMetadata>()
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
Copy.cs (1)
82private readonly ConcurrentDictionary<string, bool> _directoriesKnownToExist = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
FileMatcher.cs (3)
42private static readonly Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>> s_cachedGlobExpansions = new Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>>(() => new ConcurrentDictionary<string, IReadOnlyList<string>>(StringComparer.OrdinalIgnoreCase)); 43private static readonly Lazy<ConcurrentDictionary<string, object>> s_cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 46private readonly Lazy<ConcurrentDictionary<string, object>> _cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase));
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
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)
51private readonly ConcurrentDictionary<AssemblyNameExtension, bool> _assemblyNameInRedist = new ConcurrentDictionary<AssemblyNameExtension, bool>(AssemblyNameComparer.GenericComparer); 56private readonly ConcurrentDictionary<string, AssemblyEntry> _assemblyNameToUnifiedAssemblyName = new ConcurrentDictionary<string, AssemblyEntry>(StringComparer.OrdinalIgnoreCase); 61private readonly ConcurrentDictionary<string, AssemblyNameExtension> _assemblyNameToAssemblyNameExtension = new ConcurrentDictionary<string, AssemblyNameExtension>(StringComparer.OrdinalIgnoreCase); 67private readonly ConcurrentDictionary<AssemblyNameExtension, AssemblyNameExtension> _remappingCache = new ConcurrentDictionary<AssemblyNameExtension, AssemblyNameExtension>(AssemblyNameComparer.GenericComparerConsiderRetargetable); 70private readonly ConcurrentDictionary<string, Dictionary<string, string>> _cachedDenyList = new ConcurrentDictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
87private static readonly ConcurrentDictionary<RoslynCodeTaskFactoryTaskInfo, Assembly> CompiledAssemblyCache = new ConcurrentDictionary<RoslynCodeTaskFactoryTaskInfo, Assembly>();
SystemState.cs (1)
73private static ConcurrentDictionary<string, FileState> s_processWideFileStateCache = new ConcurrentDictionary<string, FileState>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.UnitTests.Shared (4)
MockEngine.cs (1)
42private readonly ConcurrentDictionary<object, object> _objectCache = new ConcurrentDictionary<object, object>();
ObjectModelHelpers.cs (3)
2166public ConcurrentDictionary<string, int> ExistenceChecks { get; } = new(); 2167public ConcurrentDictionary<string, int> Enumerations { get; } = new(); 2215public ConcurrentDictionary<string, int> ExistenceChecks { get; } = new ConcurrentDictionary<string, int>();
Microsoft.Build.Utilities.Core (8)
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
FileMatcher.cs (3)
42private static readonly Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>> s_cachedGlobExpansions = new Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>>(() => new ConcurrentDictionary<string, IReadOnlyList<string>>(StringComparer.OrdinalIgnoreCase)); 43private static readonly Lazy<ConcurrentDictionary<string, object>> s_cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 46private readonly Lazy<ConcurrentDictionary<string, object>> _cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase));
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
FrameworkLocationHelper.cs (2)
1326this._pathsToDotNetFramework = new ConcurrentDictionary<DotNetFrameworkArchitecture, string>(); 1327this._pathsToDotNetFrameworkSdkTools = new ConcurrentDictionary<Version, string>();
Microsoft.CodeAnalysis (37)
CodeGen\ArrayMembers.cs (1)
100new ConcurrentDictionary<(byte, IReferenceOrISignature), ArrayMethod>();
CodeGen\CompilationTestData.cs (1)
35public readonly ConcurrentDictionary<IMethodSymbolInternal, MethodData> Methods = new ConcurrentDictionary<IMethodSymbolInternal, MethodData>();
CodeGen\ItemTokenMap.cs (1)
22private readonly ConcurrentDictionary<T, uint> _itemToToken = new ConcurrentDictionary<T, uint>(ReferenceEqualityComparer.Instance);
CodeGen\PrivateImplementationDetails.cs (7)
68new ConcurrentDictionary<(ImmutableArray<byte> Data, ushort Alignment), MappedField>(DataAndUShortEqualityComparer.Instance); 72new ConcurrentDictionary<(ImmutableArray<byte> Data, ushort ElementType), CachedArrayField>(DataAndUShortEqualityComparer.Instance); 76new ConcurrentDictionary<(ImmutableArray<ConstantValue> Constants, ushort ElementType), CachedArrayField>(ConstantValueAndUShortEqualityComparer.Instance); 82private readonly ConcurrentDictionary<int, InstrumentationPayloadRootField> _instrumentationPayloadRootFields = new ConcurrentDictionary<int, InstrumentationPayloadRootField>(); 87new ConcurrentDictionary<string, Cci.IMethodDefinition>(); 91private readonly ConcurrentDictionary<string, Cci.INamespaceTypeDefinition> _synthesizedTopLevelTypes = new ConcurrentDictionary<string, Cci.INamespaceTypeDefinition>(); 95private readonly ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference> _proxyTypes = new ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference>();
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)
418_lazyGeneratedCodeFilesMap = new ConcurrentDictionary<SyntaxTree, bool>(); 420_lazyIsGeneratedCodeSymbolMap = new ConcurrentDictionary<ISymbol, bool>(); 421_lazyTreesWithHiddenRegionsMap = new ConcurrentDictionary<SyntaxTree, bool>(); 422_lazySuppressedAnalyzersForTreeMap = new ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>>(); 435_lazyPerSymbolAnalyzerActionsCache = new ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions>();
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
122var analyzerExecutionTimeMap = logExecutionTime ? new ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>() : null; 1506Interlocked.CompareExchange(ref _lazyControlFlowGraphMap, new ConcurrentDictionary<IOperation, ControlFlowGraph>(), null);
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (1)
64_semanticModelsMap = new ConcurrentDictionary<SyntaxTree, SemanticModel>();
DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs (2)
39private readonly ConcurrentDictionary<Guid, Task<string>> _mvidPathMap = new ConcurrentDictionary<Guid, Task<string>>(); 40private readonly ConcurrentDictionary<(Guid, string), Task<string>> _mvidSatelliteAssemblyPathMap = new ConcurrentDictionary<(Guid, string), Task<string>>();
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
108_localSuppressionsBySymbol = new ConcurrentDictionary<ISymbol, ImmutableDictionary<string, SuppressMessageInfo>>();
Emit\CommonPEModuleBuilder.cs (3)
66_methodBodyMap = new ConcurrentDictionary<IMethodSymbolInternal, Cci.IMethodBody>(ReferenceEqualityComparer.Instance); 869new ConcurrentDictionary<TNamedTypeSymbol, SynthesizedDefinitions>(ReferenceEqualityComparer.Instance); 959Interlocked.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)
70public readonly ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType> EmbeddedTypesMap = new ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType>(ReferenceEqualityComparer.Instance); 71public readonly ConcurrentDictionary<TFieldSymbol, TEmbeddedField> EmbeddedFieldsMap = new ConcurrentDictionary<TFieldSymbol, TEmbeddedField>(ReferenceEqualityComparer.Instance); 72public readonly ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod> EmbeddedMethodsMap = new ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod>(ReferenceEqualityComparer.Instance); 73public readonly ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty> EmbeddedPropertiesMap = new ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty>(ReferenceEqualityComparer.Instance); 74public 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)
2650new ConcurrentDictionary<TypeDefinitionHandle, AttributeInfo>(),
Microsoft.CodeAnalysis.CodeStyle (13)
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (4)
23private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new(); 24private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new(); 25private static readonly ConcurrentDictionary<string, PerLanguageOption2<bool>> s_diagnosticIdToFadingOptionMap = new(); 71var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>());
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
42var fieldStateMap = new ConcurrentDictionary<IFieldSymbol, (bool isCandidate, bool written)>();
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (2)
49var idToCachedResult = new ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>>( 109_ => new ConcurrentDictionary<string, string?>(concurrencyLevel: 2, capacity: 0);
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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
52var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (2)
115var reducedNodesMap = new ConcurrentDictionary<SyntaxNode, SyntaxNode>(); 116var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>();
Microsoft.CodeAnalysis.CSharp (28)
Compilation\CSharpCompilation.cs (2)
1495Interlocked.CompareExchange(ref _externAliasTargets, new ConcurrentDictionary<string, NamespaceSymbol>(), null); 2458() => 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)
1997identifierMap = new ConcurrentDictionary<IdentifierNameSyntax, int>(ReferenceEqualityComparer.Instance);
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
106private readonly ConcurrentDictionary<Symbol, Symbol?> _matches = new(ReferenceEqualityComparer.Instance); 844_matches = new ConcurrentDictionary<Symbol, Symbol>(ReferenceEqualityComparer.Instance);
Emitter\Model\PEModuleBuilder.cs (3)
29protected readonly ConcurrentDictionary<Symbol, Cci.IModuleReference> AssemblyOrModuleSymbolToModuleRefMap = new ConcurrentDictionary<Symbol, Cci.IModuleReference>(); 30private readonly ConcurrentDictionary<Symbol, object> _genericInstanceMap = new ConcurrentDictionary<Symbol, object>(Symbols.SymbolEqualityComparer.ConsiderEverything); 32new ConcurrentDictionary<ImportChain, ImmutableArray<Cci.UsedNamespaceOrType>>(ReferenceEqualityComparer.Instance);
Emitter\NoPia\EmbeddedTypesManager.cs (2)
39private readonly ConcurrentDictionary<AssemblySymbol, string> _assemblyGuidMap = new ConcurrentDictionary<AssemblySymbol, string>(ReferenceEqualityComparer.Instance); 40private 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)
92private readonly ConcurrentDictionary<Location, bool> _sourceLocationsSeen = new ConcurrentDictionary<Location, bool>(); 128? new ConcurrentDictionary<string, AnonymousTypeTemplateSymbol>() 129: new ConcurrentDictionary<string, AnonymousTypeTemplateSymbol>(previousCache), 150? new ConcurrentDictionary<SynthesizedDelegateKey, AnonymousDelegateTemplateSymbol>() 151: 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\MetadataOrSourceAssemblySymbol.cs (1)
273Interlocked.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)
96private readonly ConcurrentDictionary<FieldSymbol, bool> _unassignedFieldsMap = new ConcurrentDictionary<FieldSymbol, bool>(); 2163Interlocked.CompareExchange(ref _optimisticallyGrantedInternalsAccess, new ConcurrentDictionary<AssemblySymbol, bool>(), null); 2306new ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, String>>>(StringComparer.OrdinalIgnoreCase), null); 2333keys = new ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, String>>();
Symbols\TypeSymbol.cs (1)
73map = new ConcurrentDictionary<Symbol, SymbolAndDiagnostics>(concurrencyLevel: 1, capacity: 1, comparer: SymbolEqualityComparer.ConsiderEverything);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
35private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
31private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
79var namedTypeToAnalyzer = new ConcurrentDictionary<INamedTypeSymbol, Analyzer>();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4054private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _cache = new ConcurrentDictionary<SyntaxTree, SemanticModel>();
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
35private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
31private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
79var namedTypeToAnalyzer = new ConcurrentDictionary<INamedTypeSymbol, Analyzer>();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
68var localsToIsAssignedMap = new ConcurrentDictionary<ILocalSymbol, bool>();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ObjectFormatterTests.cs (1)
688var obj = new ConcurrentDictionary<string, int>();
Microsoft.CodeAnalysis.EditorFeatures (1)
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
251var includedDefaults = new ConcurrentDictionary<string, MatchResult>();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Lightup\LightupHelpers.cs (2)
15private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<Type, bool>> s_supportedObjectWrappers = new(); 31var wrappedObject = s_supportedObjectWrappers.GetOrAdd(underlyingType, static _ => new ConcurrentDictionary<Type, bool>());
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Debugger\Engine\DkmClrAppDomain.cs (1)
36TypeToEvalAttributesMap = new ConcurrentDictionary<Type, ReadOnlyCollection<DkmClrEvalAttribute>>();
Microsoft.CodeAnalysis.Features (16)
AddImport\AbstractAddImportFeatureService.cs (2)
145var projectToAssembly = new ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>>(concurrencyLevel: 2, capacity: project.Solution.ProjectIds.Count); 146var 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>();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (1)
54_higherPriorityDocumentsNotProcessed = new ConcurrentDictionary<DocumentId, object?>(concurrencyLevel: 2, capacity: 20);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
53private readonly ConcurrentDictionary<string, MetadataAsSourceGeneratedFileInfo> _generatedFilenameToInformation = new(StringComparer.OrdinalIgnoreCase);
Organizing\AbstractOrganizingService.cs (1)
35var map = new ConcurrentDictionary<Type, IEnumerable<ISyntaxOrganizer>>();
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
72private readonly ConcurrentDictionary<string, SourceDocumentInfo> _fileToDocumentInfoMap = new(StringComparer.OrdinalIgnoreCase);
Shared\Extensions\ISymbolExtensions_Sorting.cs (1)
36var symbolToParameterTypeNames = new ConcurrentDictionary<TSymbol, string[]>();
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (4)
23private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new(); 24private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new(); 25private static readonly ConcurrentDictionary<string, PerLanguageOption2<bool>> s_diagnosticIdToFadingOptionMap = new(); 71var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>());
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
42var fieldStateMap = new ConcurrentDictionary<IFieldSymbol, (bool isCandidate, bool written)>();
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (2)
49var idToCachedResult = new ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>>( 109_ => new ConcurrentDictionary<string, string?>(concurrencyLevel: 2, capacity: 0);
Microsoft.CodeAnalysis.LanguageServer (3)
LanguageServer\Handler\DebugConfiguration\ProjectTargetFrameworkManager.cs (1)
17private readonly ConcurrentDictionary<ProjectId, string?> _projectToTargetFrameworkIdentifer = new();
Logging\LspLogMessageLoggerProvider.cs (1)
11private readonly ConcurrentDictionary<string, LspLogMessageLogger> _loggers = new(StringComparer.OrdinalIgnoreCase);
Logging\RoslynLogger.cs (1)
23private readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10);
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.InMemoryStorage.cs (2)
17new(concurrencyLevel: 2, capacity: 10); 33var analyzerMap = s_map.GetOrAdd(analyzer, _ => new ConcurrentDictionary<(object key, string stateKey), CacheEntry>(concurrencyLevel: 2, capacity: 10));
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateSet.cs (2)
37_activeFileStates = new ConcurrentDictionary<DocumentId, ActiveFileState>(concurrencyLevel: 2, capacity: 10); 38_projectStates = new ConcurrentDictionary<ProjectId, ProjectState>(concurrencyLevel: 2, capacity: 1);
Protocol\Converters\SumConverter.cs (1)
183private static readonly ConcurrentDictionary<Type, SumConverter.SumTypeInfoCache> SumTypeCache = new ConcurrentDictionary<Type, SumConverter.SumTypeInfoCache>();
Protocol\Internal\Efficiency\OptimizedVSCompletionListJsonConverter.cs (1)
17private static readonly ConcurrentDictionary<ImageId, string> IconRawJson = new ConcurrentDictionary<ImageId, string>();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (1)
197var concurrentlyExecutingTasks = new ConcurrentDictionary<Task, CancellationTokenSource>();
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
LspFileChangeWatcherTests.cs (1)
120public readonly ConcurrentDictionary<string, Registration> Registrations = new();
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Host\SolutionAssetCache.cs (1)
46private readonly ConcurrentDictionary<Checksum, Entry> _assets = new();
Services\DiagnosticAnalyzer\PerformanceTrackerService.cs (1)
40private readonly ConcurrentDictionary<string, bool> _builtInMap = new ConcurrentDictionary<string, bool>(concurrencyLevel: 2, capacity: 10);
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogger.cs (1)
75private readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10);
Microsoft.CodeAnalysis.Remote.Workspaces (1)
Serialization\MessagePackFormatters.cs (1)
58private readonly ConcurrentDictionary<Guid, ProjectId> _projectIds = new ConcurrentDictionary<Guid, ProjectId>();
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\CommonDiagnosticAnalyzers.cs (2)
1252_controlFlowGraphMapOpt = verifyGetControlFlowGraph ? new ConcurrentDictionary<IOperation, (ControlFlowGraph, ISymbol)>() : null; 1980var seenOperationContainers = new ConcurrentDictionary<OperationAnalysisContext, ISet<ISymbol>>();
TargetFrameworkUtil.cs (1)
168private static readonly ConcurrentDictionary<string, ImmutableArray<PortableExecutableReference>> s_dynamicReferenceMap = new ConcurrentDictionary<string, ImmutableArray<PortableExecutableReference>>(StringComparer.Ordinal);
Microsoft.CodeAnalysis.UnitTests (2)
InternalUtilities\ConcurrentDictionaryExtensionsTests.cs (2)
17var dictionary = new ConcurrentDictionary<int, int>(); 30var dictionary = new ConcurrentDictionary<int, object>();
Microsoft.CodeAnalysis.VisualBasic (23)
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)
18Protected ReadOnly m_AssemblyOrModuleSymbolToModuleRefMap As New ConcurrentDictionary(Of Symbol, Microsoft.Cci.IModuleReference)() 19Private ReadOnly _genericInstanceMap As New ConcurrentDictionary(Of Symbol, Object)()
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (3)
28Private ReadOnly _sourceLocationsSeen As New ConcurrentDictionary(Of Location, Boolean) 56New ConcurrentDictionary(Of String, AnonymousTypeTemplateSymbol), 74New ConcurrentDictionary(Of String, AnonymousDelegateTemplateSymbol),
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\MetadataOrSourceAssemblySymbol.vb (1)
172Interlocked.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)
27Private ReadOnly _symbolMap As New ConcurrentDictionary(Of Symbol, Symbol)()
Symbols\Source\SourceAssemblySymbol.vb (2)
1007keys = New ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)) 1656Interlocked.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)
2576New ConcurrentDictionary(Of PropertySymbol, SynthesizedOverridingWithEventsProperty),
Symbols\TypeSymbol.vb (1)
676map = New ConcurrentDictionary(Of Symbol, Symbol)(concurrencyLevel:=1, capacity:=1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.vb (1)
1707Private ReadOnly _cache As New ConcurrentDictionary(Of SyntaxTree, SemanticModel)()
Microsoft.CodeAnalysis.Workspaces (19)
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)
84_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\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs (2)
39private readonly ConcurrentDictionary<Guid, Task<string>> _mvidPathMap = new ConcurrentDictionary<Guid, Task<string>>(); 40private readonly ConcurrentDictionary<(Guid, string), Task<string>> _mvidSatelliteAssemblyPathMap = new ConcurrentDictionary<(Guid, string), Task<string>>();
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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (1)
52var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
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\Host\Documentation\DocumentationProviderServiceFactory.cs (1)
28new();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
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.CommonLanguageServerProtocol.Framework.Package (1)
RequestExecutionQueue.cs (1)
197var concurrentlyExecutingTasks = new ConcurrentDictionary<Task, CancellationTokenSource>();
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\BinderEquivalence.cs (1)
33new ConcurrentDictionary<ICSharpBinder, ICSharpBinder>(concurrencyLevel: 2, capacity: 32, new BinderEqualityComparer());
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
22static ConcurrentDictionary<string, PackageIndex> s_indexCache = new ConcurrentDictionary<string, PackageIndex>();
Microsoft.DotNet.XUnitAssert.Tests (4)
EqualityAssertsTests.cs (4)
1160 var actual = new ConcurrentDictionary<string, string>(expected); 1170 var actual = new ConcurrentDictionary<string, string> { ["foo"] = "baz" }; 3389 var actual = new ConcurrentDictionary<string, string>(expected); 3412 var actual = new ConcurrentDictionary<string, string> { ["foo"] = "baz" };
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.Serialization.cs (1)
18private readonly ConcurrentDictionary<Type, object> _serializers = new();
Internal\DefaultHybridCache.Stampede.cs (1)
13private readonly ConcurrentDictionary<StampedeKey, StampedeState> _currentOperations = new();
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
679internal ConcurrentDictionary<object, CacheEntry> _entries = new ConcurrentDictionary<object, CacheEntry>();
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 (1)
ManualHealthCheckTracker.cs (1)
15private readonly ConcurrentDictionary<IManualHealthCheck, bool> _checks = new();
Microsoft.Extensions.Diagnostics.Testing (2)
Logging\FakeLogger.cs (1)
22private readonly ConcurrentDictionary<LogLevel, bool> _disabledLevels = new(); // used as a set, the value is ignored
Logging\FakeLoggerProvider.cs (1)
22private readonly ConcurrentDictionary<string, FakeLogger> _loggers = new();
Microsoft.Extensions.FileProviders.Physical (3)
PhysicalFilesWatcher.cs (3)
29private readonly ConcurrentDictionary<string, ChangeTokenInfo> _filePathTokenLookup = new(StringComparer.OrdinalIgnoreCase); 30private readonly ConcurrentDictionary<string, ChangeTokenInfo> _wildcardTokenLookup = new(StringComparer.OrdinalIgnoreCase); 106PollingChangeTokens = 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)
22private readonly ConcurrentDictionary<string, Logger> _loggers = new ConcurrentDictionary<string, Logger>(StringComparer.Ordinal);
Microsoft.Extensions.Logging.Abstractions (1)
FormattedLogValues.cs (1)
22private 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>(); 102var 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)
42_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 (3)
Http\HttpRouteParser.cs (1)
24private readonly ConcurrentDictionary<string, ParsedRouteSegments> _routeTemplateSegmentsCache = new();
src\Shared\Memoization\MemoizedFunction.cs (2)
69_values = new(Concurrency, Capacity); 142_values = new(Concurrency, Capacity);
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)
20private readonly ConcurrentDictionary<long, object> _pendingTasks = new(); 21private readonly ConcurrentDictionary<long, IDotNetObjectReference> _trackedRefsById = new(); 22private readonly ConcurrentDictionary<long, CancellationTokenRegistration> _cancellationRegistrations = new();
Microsoft.Maui (9)
Fonts\FontManager.iOS.cs (1)
27 readonly ConcurrentDictionary<Font, UIFont> _fonts = new();
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
424 ConcurrentDictionary<string, TaskCompletionSource<string>> _asyncTaskCallbacks = new ConcurrentDictionary<string, TaskCompletionSource<string>>();
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>();
RelaxTestNamingSuppressor.cs (1)
31var knownTestAttributes = new ConcurrentDictionary<INamedTypeSymbol, bool>();
Microsoft.ML.Tokenizers (1)
Model\TiktokenTokenizer.cs (1)
1197private 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.StringTools (1)
WeakStringCache.Concurrent.cs (1)
20_stringsByHashCode = new ConcurrentDictionary<int, StringWeakHandle>(Environment.ProcessorCount, _initialCapacity);
Microsoft.VisualStudio.LanguageServices (1)
Telemetry\Shared\TelemetryLogger.cs (1)
75private readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10);
Microsoft.VisualStudio.LanguageServices.DevKit (2)
Logging\VSCodeTelemetryLogger.cs (1)
30private static readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10);
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogger.cs (1)
75private readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10);
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\XamlProjectService.cs (1)
38private readonly ConcurrentDictionary<string, DocumentId> _documentIds = new ConcurrentDictionary<string, DocumentId>(StringComparer.OrdinalIgnoreCase);
MSBuild (8)
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
TypeLoader.cs (5)
34private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 39private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 246cache.GetOrAdd(_isDesiredType, (_) => new ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>()); 314_typeNameToType = new(StringComparer.OrdinalIgnoreCase); 316_publicTypeNameToLoadedType = new(StringComparer.OrdinalIgnoreCase);
PresentationFramework (3)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (1)
19private readonly static ConcurrentDictionary<string, Func<IInspectable, object>> TypedObjectFactoryCache = new ConcurrentDictionary<string, Func<IInspectable, object>>();
System\Windows\Markup\Baml2006\WpfXamlType.cs (2)
57_members = new ConcurrentDictionary<string, XamlMember>(ConcurrencyLevel, Capacity); 69_attachableMembers = new ConcurrentDictionary<string, XamlMember>(ConcurrencyLevel, Capacity);
Shared (2)
Memoization\MemoizedFunction.cs (2)
69_values = new(Concurrency, Capacity); 142_values = new(Concurrency, Capacity);
SignalRSamples (1)
ConnectionList.cs (1)
12private readonly ConcurrentDictionary<string, ConnectionContext> _connections = new ConcurrentDictionary<string, ConnectionContext>(StringComparer.Ordinal);
SocialWeather (1)
ConnectionList.cs (1)
13new ConcurrentDictionary<string, ConnectionContext>(StringComparer.Ordinal);
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 (4)
System\ComponentModel\PropertyDescriptor.cs (1)
175_valueChangedHandlers ??= new ConcurrentDictionary<object, EventHandler?>(concurrencyLevel: 1, capacity: 0);
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
27private readonly ConcurrentDictionary<Type, ReflectedTypeData> _typeData = new ConcurrentDictionary<Type, ReflectedTypeData>();
System\ComponentModel\TypeDescriptor.cs (2)
60private static readonly ConcurrentDictionary<Type, TypeDescriptionNode> s_providerTypeTable = new ConcurrentDictionary<Type, TypeDescriptionNode>(); 65private static readonly ConcurrentDictionary<Type, object?> s_defaultProviderInitialized = new ConcurrentDictionary<Type, object?>();
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\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.Diagnostics.DiagnosticSource (3)
System\Diagnostics\DsesFilterAndTransform.cs (1)
444new ConcurrentDictionary<Type, TransformSpec?>(1, 8), null);
System\Diagnostics\Metrics\AggregationManager.cs (1)
29private readonly ConcurrentDictionary<Instrument, InstrumentState> _instrumentStates = new();
System\Diagnostics\Metrics\AggregatorStore.cs (1)
514GetOrAdd(names, _ => new ConcurrentDictionary<TObjectSequence, TAggregator>());
System.Net.Http (2)
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.Quic (1)
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 (3)
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\Net\Security\SslStreamCertificateContext.Linux.cs (1)
35Interlocked.CompareExchange(ref _sslContexts, new(), null);
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncEngine.Unix.cs (1)
83private readonly ConcurrentDictionary<IntPtr, SocketAsyncContextWrapper> _handleToContextMap = new ConcurrentDictionary<IntPtr, SocketAsyncContextWrapper>();
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\ContextAware.cs (1)
54private readonly ConcurrentDictionary<TKey, TValue> _fastDictionary = new();
System\Runtime\Serialization\DataContract.cs (1)
301private 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 (1)
System\Private\Windows\Core\BinaryFormat\SerializationEvents.cs (1)
12private static readonly ConcurrentDictionary<Type, SerializationEvents> s_cache = new();
System.Private.Windows.Core.TestUtilities (1)
NoAssertContext.cs (1)
26private 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 (6)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.Nid.cs (1)
14new ConcurrentDictionary<string, int>();
System\Security\Cryptography\CryptoConfig.cs (2)
36private static readonly ConcurrentDictionary<string, Type> appNameHT = new ConcurrentDictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 37private 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\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (1)
41new ConcurrentDictionary<int, string>();
System.Text.Json (5)
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)
215private readonly ConcurrentDictionary<Type, CacheEntry> _cache = new();
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)
53private static readonly ConcurrentDictionary<Key, Node> s_cacheDictionary = new ConcurrentDictionary<Key, Node>(concurrencyLevel: 1, capacity: 31);
System.Windows.Forms (3)
System\Resources\AssemblyNamesTypeResolutionService.cs (2)
26_cachedAssemblies ??= new(); 79_cachedTypes ??= new(StringComparer.Ordinal);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
25private static readonly ConcurrentDictionary<int, Font> s_defaultFontCache = new();
System.Xaml (2)
System\Xaml\XamlSchemaContext.cs (2)
1176return new ConcurrentDictionary<K, V>(ConcurrencyLevel, DictionaryCapacity); 1181return new ConcurrentDictionary<K, V>(ConcurrencyLevel, DictionaryCapacity, comparer);
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
src\Shared\E2ETesting\BrowserFixture.cs (1)
19private readonly ConcurrentDictionary<string, (IWebDriver browser, ILogs log)> _browsers = new();
Templates.Blazor.WebAssembly.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
src\Shared\E2ETesting\BrowserFixture.cs (1)
19private readonly ConcurrentDictionary<string, (IWebDriver browser, ILogs log)> _browsers = new();
Templates.Mvc.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
src\Shared\E2ETesting\BrowserFixture.cs (1)
19private readonly ConcurrentDictionary<string, (IWebDriver browser, ILogs log)> _browsers = new();
Templates.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
src\Shared\E2ETesting\BrowserFixture.cs (1)
19private readonly ConcurrentDictionary<string, (IWebDriver browser, ILogs log)> _browsers = new();
TestContentPackage (1)
Services\AsyncOperationService.cs (1)
10private readonly ConcurrentDictionary<string, TaskCompletionSource> _tasks = new();
XmlFileLogger (3)
ObjectModel\Build.cs (2)
21private readonly ConcurrentDictionary<int, Project> _projectIdToProjectMap = new ConcurrentDictionary<int, Project>(); 26private readonly ConcurrentDictionary<string, string> _taskToAssemblyMap = new ConcurrentDictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ObjectModel\Project.cs (1)
29private readonly ConcurrentDictionary<string, Target> _targetNameToTargetMap = new ConcurrentDictionary<string, Target>(StringComparer.OrdinalIgnoreCase);
xunit.assert (4)
Sdk\AssertEqualityComparer.cs (2)
140 static readonly ConcurrentDictionary<Type, TypeInfo> cacheOfIComparableOfT = new ConcurrentDictionary<Type, TypeInfo>(); 141 static readonly ConcurrentDictionary<Type, TypeInfo> cacheOfIEquatableOfT = new ConcurrentDictionary<Type, TypeInfo>();
Sdk\AssertHelper.cs (1)
63 static readonly ConcurrentDictionary<Type, Dictionary<string, Func<object?, object?>>> gettersByType = new ConcurrentDictionary<Type, Dictionary<string, Func<object?, object?>>>();
Sdk\CollectionTrackerExtensions.cs (1)
46 static readonly ConcurrentDictionary<Type, MethodInfo> cacheOfAsTrackerByType = new ConcurrentDictionary<Type, MethodInfo>();
xunit.console (3)
common\AssemblyResolution\DependencyContextAssemblyCache.cs (2)
64managedAssemblyCache = new ConcurrentDictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase); 79unmanagedAssemblyCache = new ConcurrentDictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ConsoleRunner.cs (1)
22readonly ConcurrentDictionary<string, ExecutionSummary> completionMessages = new ConcurrentDictionary<string, ExecutionSummary>();
1141 references to ConcurrentDictionary
Aspire.Dashboard (16)
Components\Pages\ConsoleLogs.razor.cs (2)
81private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName); 325ConcurrentDictionary<string, ResourceViewModel> resourcesByName,
Components\Pages\Resources.razor.cs (7)
59private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName); 60private readonly ConcurrentDictionary<string, bool> _allResourceTypes = []; 61private readonly ConcurrentDictionary<string, bool> _visibleResourceTypes = new(StringComparers.ResourceName); 104static bool SetEqualsKeys(ConcurrentDictionary<string, bool> left, ConcurrentDictionary<string, bool> right) 121static bool UnionWithKeys(ConcurrentDictionary<string, bool> left, ConcurrentDictionary<string, bool> right)
Model\ResourceOutgoingPeerResolver.cs (1)
14private readonly ConcurrentDictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName);
Model\ResourceViewModel.cs (1)
151private static readonly ConcurrentDictionary<IconKey, CustomIcon?> s_iconCache = new();
Otlp\Model\ColorGenerator.cs (1)
29private readonly ConcurrentDictionary<string, Lazy<int>> _colorIndexByKey;
Otlp\Model\OtlpApplication.cs (1)
31private readonly ConcurrentDictionary<KeyValuePair<string, string>[], OtlpApplicationView> _applicationViews = new(ApplicationViewKeyComparer.Instance);
Otlp\Storage\TelemetryRepository.cs (1)
34private readonly ConcurrentDictionary<ApplicationKey, OtlpApplication> _applications = new();
ShortcutManager.cs (1)
12private readonly ConcurrentDictionary<IGlobalKeydownListener, IGlobalKeydownListener> _keydownListenerComponents = [];
Utils\FormatHelpers.cs (1)
27private static readonly ConcurrentDictionary<CultureDetailsKey, MillisecondFormatStrings> s_formatStrings = new();
Aspire.Dashboard.Tests (1)
ConsoleLogsTests\CreateResourceSelectModelsTests.cs (1)
35var resourcesByName = new ConcurrentDictionary<string, ResourceViewModel>(applications.ToDictionary(app => app.Name));
Aspire.Hosting (15)
ApplicationModel\ResourceLoggerService.cs (1)
22private readonly ConcurrentDictionary<string, ResourceLoggerState> _loggers = new();
ApplicationModel\ResourceNotificationService.cs (1)
20private readonly ConcurrentDictionary<(IResource, string), ResourceNotificationState> _resourceNotificationStates = new();
Dashboard\DashboardLifecycleHook.cs (3)
310var loggerCache = new ConcurrentDictionary<string, ILogger>(StringComparer.Ordinal); 341ConcurrentDictionary<string, ILogger> loggerCache, 402private static void LogMessage(ILoggerFactory loggerFactory, ConcurrentDictionary<string, ILogger> loggerCache, DashboardLogMessage logMessage)
Dcp\ApplicationExecutor.cs (8)
107private readonly ConcurrentDictionary<string, Container> _containersMap = []; 108private readonly ConcurrentDictionary<string, Executable> _executablesMap = []; 109private readonly ConcurrentDictionary<string, Service> _servicesMap = []; 110private readonly ConcurrentDictionary<string, Endpoint> _endpointsMap = []; 111private readonly ConcurrentDictionary<(string, string), List<string>> _resourceAssociatedServicesMap = []; 112private readonly ConcurrentDictionary<string, (CancellationTokenSource Cancellation, Task Task)> _logStreams = new(); 387private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T, CustomResourceSnapshot, CustomResourceSnapshot> snapshotFactory) where T : CustomResource 846private static bool ProcessResourceChange<T>(ConcurrentDictionary<string, T> map, WatchEventType watchEventType, T resource)
Eventing\DistributedApplicationEventing.cs (2)
12private readonly ConcurrentDictionary<Type, List<DistributedApplicationEventSubscription>> _eventSubscriptionListLookup = new(); 13private readonly ConcurrentDictionary<DistributedApplicationEventSubscription, Type> _subscriptionEventTypeLookup = 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.Tests (1)
Dashboard\DashboardResourceTests.cs (1)
563private readonly ConcurrentDictionary<string, TestLogger> _loggers = new();
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
52private static readonly ConcurrentDictionary<string, SqlConnectionDetails> ConnectionDetailCache = new(StringComparer.OrdinalIgnoreCase);
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\SqlClientTraceInstrumentationOptions.cs (1)
52private static readonly ConcurrentDictionary<string, SqlConnectionDetails> ConnectionDetailCache = new(StringComparer.OrdinalIgnoreCase);
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (1)
30internal readonly ConcurrentDictionary<(ActivityTraceId TraceId, ActivitySpanId SpanId), (Activity Activity, ProfilingSession Session)> Cache
BasicTestApp (1)
InteropTest\JavaScriptInterop.cs (1)
11public static ConcurrentDictionary<string, object[]> Invocations = new ConcurrentDictionary<string, object[]>();
DesignSurfaceExt (1)
TypeDiscoveryService.cs (1)
19private readonly ConcurrentDictionary<Type, ImmutableArray<Type>> _discoveredTypesCache = 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)
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>();
HtmlGenerationWebSite (1)
SignalTokenProviderService.cs (1)
11private readonly ConcurrentDictionary<object, ChangeTokenInfo> _changeTokens
InMemory.FunctionalTests (2)
Http2\Http2TestBase.cs (1)
128protected readonly ConcurrentDictionary<int, TaskCompletionSource> _runningStreams = new ConcurrentDictionary<int, TaskCompletionSource>();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
82internal readonly ConcurrentDictionary<long, Http3StreamBase> _runningStreams = new ConcurrentDictionary<long, Http3StreamBase>();
JwtClientSample (1)
Program.cs (1)
24private readonly ConcurrentDictionary<string, Task<string>> _tokens = new ConcurrentDictionary<string, Task<string>>(StringComparer.Ordinal);
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 (14)
BindConverter.cs (2)
1668private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>(); 1857private static readonly ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>();
CascadingParameterState.cs (1)
17private 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)
19private static readonly ConcurrentDictionary<Type, ComponentTypeInfoCacheEntry> _cachedComponentTypeInfo = new();
DefaultComponentActivator.cs (1)
12private static readonly ConcurrentDictionary<Type, ObjectFactory> _cachedComponentTypeInfo = new();
Reflection\ComponentProperties.cs (2)
19private static readonly ConcurrentDictionary<Type, WritersForType> _cachedWritersByType 271private readonly ConcurrentDictionary<string, PropertySetter?> _referenceEqualityWritersCache;
RenderTree\EventArgsTypeCache.cs (1)
11private 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)
14private static readonly ConcurrentDictionary<(Type, string), InboundRouteEntry> _routeEntryCache = new();
Routing\RouteTableFactory.cs (1)
32private readonly ConcurrentDictionary<RouteKey, RouteTable> _cache = new();
Routing\UrlValueConstraint.cs (1)
17private static readonly ConcurrentDictionary<Type, UrlValueConstraint> _cachedInstances = new();
Microsoft.AspNetCore.Components.Authorization (1)
AttributeAuthorizeDataCache.cs (1)
11private static readonly ConcurrentDictionary<Type, IAuthorizeData[]?> _cache = new();
Microsoft.AspNetCore.Components.Endpoints (13)
Builder\RazorComponentsEndpointHttpContextExtensions.cs (1)
20private static readonly ConcurrentDictionary<Type, bool> AcceptsInteractiveRoutingCache = new();
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();
Rendering\EndpointComponentState.cs (1)
17private static readonly ConcurrentDictionary<Type, StreamRenderingAttribute?> _streamRenderingAttributeByComponentType = new();
Rendering\SSRRenderModeBoundary.cs (1)
23private static readonly ConcurrentDictionary<Type, string> _componentTypeNameHashCache = new();
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.Components.Endpoints.Tests (3)
Binding\FormDataMapperTests.cs (3)
905var expected = new ConcurrentDictionary<int, int>(new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }); 906CanDeserialize_Dictionary<ConcurrentDictionary<int, int>, ConcurrentDictionary<int, int>, int, int>(expected);
Microsoft.AspNetCore.Components.Forms (5)
EditContextDataAnnotationsExtensions.cs (1)
62private 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(); 155ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func<object, object>>? cache = null)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
24private static readonly ConcurrentDictionary<MemberInfo, CapturedValueFormatter> s_capturedValueFormatterCache = new(); 25private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new();
Microsoft.AspNetCore.Components.Forms.Tests (1)
FieldIdentifierTest.cs (1)
146var cache = new ConcurrentDictionary<(Type ModelType, MemberInfo FieldName), Func<object, object>>();
Microsoft.AspNetCore.Components.QuickGrid (1)
Infrastructure\AsyncQueryExecutorSupplier.cs (1)
24private static readonly ConcurrentDictionary<Type, bool> IsEntityFrameworkProviderTypeCache = new();
Microsoft.AspNetCore.Components.Server (5)
Circuits\CircuitRegistry.cs (1)
67internal ConcurrentDictionary<CircuitId, CircuitHost> ConnectedCircuits { get; }
Circuits\RemoteJSRuntime.cs (1)
21private readonly ConcurrentDictionary<long, DotNetStreamReference> _pendingDotNetToJSStreams = new();
ProtectedBrowserStorage\ProtectedBrowserStorage.cs (1)
19private readonly ConcurrentDictionary<string, IDataProtector> _cachedDataProtectorsByPurpose
src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\Components\Shared\src\RootComponentTypeCache.cs (1)
13private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
Microsoft.AspNetCore.Components.Web (3)
JSComponents\JSComponentInterop.cs (1)
26private static readonly ConcurrentDictionary<Type, ParameterTypeCache> ParameterTypeCaches = new();
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
24private static readonly ConcurrentDictionary<MemberInfo, CapturedValueFormatter> s_capturedValueFormatterCache = new(); 25private static readonly ConcurrentDictionary<MethodInfo, MethodInfoData> s_methodInfoDataCache = new();
Microsoft.AspNetCore.Components.WebAssembly (5)
HotReload\HotReloadAgent.cs (2)
21private readonly ConcurrentDictionary<Guid, List<UpdateDelta>> _deltas = new(); 22private readonly ConcurrentDictionary<Assembly, Assembly> _appliedAssemblies = new();
Services\WebAssemblyConsoleLoggerProvider.cs (1)
15private readonly ConcurrentDictionary<string, WebAssemblyConsoleLogger<object>> _loggers;
src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
12private readonly ConcurrentDictionary<Key, Type?> _typeToKeyLookUp = new();
src\Components\Shared\src\RootComponentTypeCache.cs (1)
13private 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 (1)
Logging\IncomingHttpRouteUtility.cs (1)
22private readonly ConcurrentDictionary<string, FrozenDictionary<string, DataClassification>> _parametersToRedactCache = new();
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
Internal\CallHandlers\CallHandlerDescriptorInfo.cs (1)
37public ConcurrentDictionary<string, List<FieldDescriptor>?> PathDescriptorsCache { get; }
src\Grpc\JsonTranscoding\src\Shared\DescriptorRegistry.cs (1)
14private readonly ConcurrentDictionary<Type, DescriptorBase> _typeDescriptorMap = new ConcurrentDictionary<Type, DescriptorBase>();
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
374private static readonly ConcurrentDictionary<Type, Dictionary<object, string>> _dictionaries
Microsoft.AspNetCore.Grpc.Swagger (2)
src\Grpc\JsonTranscoding\src\Shared\DescriptorRegistry.cs (1)
14private readonly ConcurrentDictionary<Type, DescriptorBase> _typeDescriptorMap = new ConcurrentDictionary<Type, DescriptorBase>();
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
374private static readonly ConcurrentDictionary<Type, Dictionary<object, string>> _dictionaries
Microsoft.AspNetCore.HeaderParsing (1)
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\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\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\Components\Endpoints\src\FormMapping\FormDataMapperOptions.cs (1)
14private readonly ConcurrentDictionary<Type, FormDataConverter> _converters = new();
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\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\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\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.Razor.Test (1)
RazorHotReloadTest.cs (1)
57var cache = pageActivator.ActivationInfo;
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.TagHelpers.Test (4)
JavaScriptResourcesTest.cs (4)
19var cache = new ConcurrentDictionary<string, string>(); 36var cache = new ConcurrentDictionary<string, string>(); 61var cache = new ConcurrentDictionary<string, string>(); 81var cache = new ConcurrentDictionary<string, string>();
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.Mvc.ViewFeatures.Test (1)
ExpressionHelperTest.cs (1)
11private readonly ConcurrentDictionary<LambdaExpression, string> _expressionTextCache = new ConcurrentDictionary<LambdaExpression, string>(LambdaExpressionComparer.Instance);
Microsoft.AspNetCore.OpenApi (9)
Services\OpenApiDocumentService.cs (1)
50private readonly ConcurrentDictionary<string, OpenApiOperationTransformerContext> _operationTransformerContextCache = new();
Services\Schemas\OpenApiSchemaStore.cs (3)
18private readonly ConcurrentDictionary<OpenApiSchemaKey, JsonNode> _schemas = new() 52public readonly ConcurrentDictionary<OpenApiSchema, string?> SchemasByReference = new(OpenApiSchemaComparer.Instance); 53private readonly ConcurrentDictionary<string, int> _referenceIdCounter = new();
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();
Transformers\Implementations\OpenApiSchemaReferenceTransformer.cs (2)
20var schemasByReference = schemaStore.SchemasByReference; 89internal static OpenApiSchema? ResolveReferenceForSchema(OpenApiSchema? schema, ConcurrentDictionary<OpenApiSchema, string?> schemasByReference, bool isTopLevel = false)
Microsoft.AspNetCore.OutputCaching (1)
DispatcherExtensions.cs (1)
10private readonly ConcurrentDictionary<TKey, Task<TValue?>> _workers = new();
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\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\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 (1)
NativeInterop\DisconnectListener.cs (1)
12private readonly ConcurrentDictionary<ulong, ConnectionCancellation> _connectionCancellationTokens = new();
Microsoft.AspNetCore.Server.Kestrel.Core (3)
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\WebTransport\WebTransportSession.cs (1)
24private readonly ConcurrentDictionary<long, WebTransportStream> _openStreams = new();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
82internal readonly ConcurrentDictionary<long, Http3StreamBase> _runningStreams = new ConcurrentDictionary<long, Http3StreamBase>();
Microsoft.AspNetCore.Shared.Tests (5)
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.SignalR.Client.Core (1)
HubConnection.cs (1)
85private 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)
172internal 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\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, IStreamConverter> _lookup = new ConcurrentDictionary<string, IStreamConverter>();
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\SignalR\common\Shared\ClientResultsManager.cs (1)
16private readonly ConcurrentDictionary<string, (Type Type, string ConnectionId, object Tcs, Action<object, CompletionMessage> Complete)> _pendingInvocations = new();
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
TestConnectionMultiplexer.cs (1)
239private readonly ConcurrentDictionary<RedisChannel, List<(int, Action<RedisChannel, RedisValue>)>> _subscriptions =
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
ServerLogScope.cs (1)
14private readonly ConcurrentDictionary<string, ILogger> _serverLoggers;
Microsoft.Build (92)
BackEnd\BuildManager\BuildManager.cs (1)
55internal static ConcurrentDictionary<ProjectCacheDescriptor, ProjectCacheDescriptor> ProjectCacheDescriptors { get; } = new(ProjectCacheDescriptorEqualityComparer.Instance);
BackEnd\Components\Caching\ResultsCache.cs (2)
33private ConcurrentDictionary<int, BuildResult> _resultsByConfiguration; 256_resultsByConfiguration = (ConcurrentDictionary<int, BuildResult>)localReference;
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
27private ConcurrentDictionary<int, NodeContext> _nodeContexts;
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
68private readonly ConcurrentDictionary<string, byte /*void*/> _processesToIgnore = new();
BackEnd\Components\Communications\TranslatorExtensions.cs (2)
23private static Lazy<ConcurrentDictionary<Type, ConstructorInfo>> parameterlessConstructorCache = new Lazy<ConcurrentDictionary<Type, ConstructorInfo>>(() => new ConcurrentDictionary<Type, ConstructorInfo>());
BackEnd\Components\Logging\LoggingService.cs (1)
108private ConcurrentDictionary<int, string> _projectFileMap;
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
47private readonly ConcurrentDictionary<ProjectCacheDescriptor, Lazy<Task<ProjectCachePlugin>>> _projectCachePlugins = new(ProjectCacheDescriptorEqualityComparer.Instance); 50private readonly ConcurrentDictionary<BuildRequestConfiguration, IReadOnlyDictionary<string, string>> _globalPropertiesPerConfiguration = new();
BackEnd\Components\SdkResolution\CachingSdkResolverLoader.cs (1)
25private 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)
41private readonly ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>> _resolverStateBySubmission = new ConcurrentDictionary<int, ConcurrentDictionary<SdkResolver, object>>(); 453ConcurrentDictionary<SdkResolver, object> resolverState; 534ConcurrentDictionary<SdkResolver, object> resolverState = _resolverStateBySubmission.GetOrAdd(
BackEnd\Shared\BuildResult.cs (4)
78private ConcurrentDictionary<string, TargetResult> _resultsByTarget; 750private static ConcurrentDictionary<string, TargetResult> CreateTargetResultDictionary(int capacity) 759private static ConcurrentDictionary<string, TargetResult> CreateTargetResultDictionaryWithContents(BuildResult existingResults, string[] targetNames) 761ConcurrentDictionary<string, TargetResult> resultsByTarget = CreateTargetResultDictionary(targetNames.Length);
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
504private readonly ConcurrentDictionary<int, string> _projectsByInstanceId = new(); 505private 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)
20private readonly ConcurrentDictionary<string, EditorConfigFile> _editorConfigFileCache = new ConcurrentDictionary<string, EditorConfigFile>(StringComparer.InvariantCultureIgnoreCase);
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
Evaluation\ConditionEvaluator.cs (3)
143private readonly ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>> _conditionPools; 148public ExpressionTreeForCurrentOptionsWithSize(ConcurrentDictionary<string, ConcurrentStack<GenericExpressionNode>> conditionPools) 169private static volatile 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\Expander.cs (1)
2240private static ConcurrentDictionary<string, ItemTransformFunction> s_transformFunctionDelegateCache = new ConcurrentDictionary<string, ItemTransformFunction>(StringComparer.OrdinalIgnoreCase);
Evaluation\ProjectRootElementCache.cs (1)
132private ConcurrentDictionary<string, object> _fileLoadLocks;
Evaluation\SimpleProjectRootElementCache.cs (1)
28private readonly ConcurrentDictionary<string, ProjectRootElement> _cache;
FileMatcher.cs (9)
42private static readonly Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>> s_cachedGlobExpansions = new Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>>(() => new ConcurrentDictionary<string, IReadOnlyList<string>>(StringComparer.OrdinalIgnoreCase)); 43private static readonly Lazy<ConcurrentDictionary<string, object>> s_cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 45private readonly ConcurrentDictionary<string, IReadOnlyList<string>> _cachedGlobExpansions; 46private readonly Lazy<ConcurrentDictionary<string, object>> _cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 87public FileMatcher(IFileSystem fileSystem, ConcurrentDictionary<string, IReadOnlyList<string>> fileEntryExpansionCache = null) : this( 100internal FileMatcher(IFileSystem fileSystem, GetFileSystemEntries getFileSystemEntries, ConcurrentDictionary<string, IReadOnlyList<string>> getFileSystemDirectoryEntriesCache = null)
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
FrameworkLocationHelper.cs (2)
1289private readonly ConcurrentDictionary<DotNetFrameworkArchitecture, string> _pathsToDotNetFramework; 1294private readonly ConcurrentDictionary<Version, string> _pathsToDotNetFrameworkSdkTools;
Graph\GraphBuilder.cs (2)
53private ConcurrentDictionary<ConfigurationMetadata, Lazy<ProjectInstance>> _platformNegotiationInstancesCache = new(); 647private ConcurrentDictionary<(ProjectGraphNode, ProjectGraphNode), ProjectItemInstance> ReferenceItems =
Graph\ParallelWorkSet.cs (1)
27private readonly ConcurrentDictionary<TKey, Lazy<TResult>> _inProgressOrCompletedWork;
Graph\ProjectGraph.cs (1)
503var nodeIds = new ConcurrentDictionary<ProjectGraphNode, string>();
Instance\TaskRegistry.cs (5)
138private readonly ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord> _cachedTaskRecordsWithExactMatch = 147private readonly ConcurrentDictionary<string, ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord>> _cachedTaskRecordsWithFuzzyMatch = new(StringComparer.OrdinalIgnoreCase); 564if (_cachedTaskRecordsWithFuzzyMatch.TryGetValue(taskIdentity.Name, out ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord> taskRecords)) 631ConcurrentDictionary<RegisteredTaskIdentity, RegisteredTaskRecord> taskRecords
RegisteredTaskObjectCacheBase.cs (13)
25private static Lazy<ConcurrentDictionary<object, object>> s_appDomainLifetimeObjects = new Lazy<ConcurrentDictionary<object, object>>(); 30private Lazy<ConcurrentDictionary<object, object>> _buildLifetimeObjects = new Lazy<ConcurrentDictionary<object, object>>(); 61ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: false); 71ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: true); 83ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: true); 97var collection = GetCollectionForLifetime(lifetime, dontCreate: true); 104protected ConcurrentDictionary<object, object> GetCollectionForLifetime(RegisteredTaskObjectLifetime lifetime, bool dontCreate) 106Lazy<ConcurrentDictionary<object, object>> dict = GetLazyCollectionForLifetime(lifetime); 120protected Lazy<ConcurrentDictionary<object, object>> GetLazyCollectionForLifetime(RegisteredTaskObjectLifetime lifetime) 122Lazy<ConcurrentDictionary<object, object>> dict = null; 140private static void DisposeObjects(Lazy<ConcurrentDictionary<object, object>> lifetimeObjects)
Resources\Constants.cs (2)
176private static ConcurrentDictionary<string, Tuple<string, Type>> s_availableStaticMethods; 288var availableStaticMethods = new ConcurrentDictionary<string, Tuple<string, Type>>(StringComparer.OrdinalIgnoreCase);
TypeLoader.cs (11)
34private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 39private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 241private LoadedType GetLoadedType(ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> cache, string typeName, AssemblyLoadInfo assembly, bool useTaskHost) 245ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes> loadInfoToType = 283private ConcurrentDictionary<string, Type> _typeNameToType; 290private ConcurrentDictionary<string, LoadedType> _publicTypeNameToLoadedType;
Utilities\EngineFileUtilities.cs (4)
560private static readonly Lazy<ConcurrentDictionary<string, bool>> _regexMatchCache = new Lazy<ConcurrentDictionary<string, bool>>(() => new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase)); 586private readonly Lazy<ConcurrentDictionary<string, bool>> existenceCache = new Lazy<ConcurrentDictionary<string, bool>>(() => new ConcurrentDictionary<string, bool>(), true);
Microsoft.Build.Engine.OM.UnitTests (3)
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Engine.UnitTests (1)
InternalEngineHelpers.cs (1)
44public ConcurrentDictionary<string, int> ResolvedCalls { get; } = new ConcurrentDictionary<string, int>();
Microsoft.Build.Framework (3)
FileClassifier.cs (2)
80/// Although <see cref="ConcurrentDictionary{TKey,TValue}"></see> is not optimal memory-wise, in this particular case it does not matter 83private readonly ConcurrentDictionary<string, string> _knownImmutableDirectories = new();
ImmutableFilesTimestampCache.cs (1)
17private readonly ConcurrentDictionary<string, DateTime> _cache = new(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Tasks.Core (36)
AssemblyDependency\AssemblyInformation.cs (1)
208ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache,
AssemblyDependency\ReferenceTable.cs (2)
152private readonly ConcurrentDictionary<string, AssemblyMetadata> _assemblyMetadataCache; 287ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache)
AssemblyDependency\ResolveAssemblyReference.cs (3)
2371ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache = 2678private AssemblyNameExtension[] GetDependencies(Reference resolvedReference, FileExists fileExists, GetAssemblyMetadata getAssemblyMetadata, ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache) 3214(string path, ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache, out AssemblyNameExtension[] dependencies, out string[] scatterFiles, out FrameworkNameVersioning frameworkName)
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
Copy.cs (1)
82private readonly ConcurrentDictionary<string, bool> _directoriesKnownToExist = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
Delegate.cs (1)
93ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache,
FileMatcher.cs (9)
42private static readonly Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>> s_cachedGlobExpansions = new Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>>(() => new ConcurrentDictionary<string, IReadOnlyList<string>>(StringComparer.OrdinalIgnoreCase)); 43private static readonly Lazy<ConcurrentDictionary<string, object>> s_cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 45private readonly ConcurrentDictionary<string, IReadOnlyList<string>> _cachedGlobExpansions; 46private readonly Lazy<ConcurrentDictionary<string, object>> _cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 87public FileMatcher(IFileSystem fileSystem, ConcurrentDictionary<string, IReadOnlyList<string>> fileEntryExpansionCache = null) : this( 100internal FileMatcher(IFileSystem fileSystem, GetFileSystemEntries getFileSystemEntries, ConcurrentDictionary<string, IReadOnlyList<string>> getFileSystemDirectoryEntriesCache = null)
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
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)
51private readonly ConcurrentDictionary<AssemblyNameExtension, bool> _assemblyNameInRedist = new ConcurrentDictionary<AssemblyNameExtension, bool>(AssemblyNameComparer.GenericComparer); 56private readonly ConcurrentDictionary<string, AssemblyEntry> _assemblyNameToUnifiedAssemblyName = new ConcurrentDictionary<string, AssemblyEntry>(StringComparer.OrdinalIgnoreCase); 61private readonly ConcurrentDictionary<string, AssemblyNameExtension> _assemblyNameToAssemblyNameExtension = new ConcurrentDictionary<string, AssemblyNameExtension>(StringComparer.OrdinalIgnoreCase); 67private readonly ConcurrentDictionary<AssemblyNameExtension, AssemblyNameExtension> _remappingCache = new ConcurrentDictionary<AssemblyNameExtension, AssemblyNameExtension>(AssemblyNameComparer.GenericComparerConsiderRetargetable); 70private readonly ConcurrentDictionary<string, Dictionary<string, string>> _cachedDenyList = new ConcurrentDictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
87private static readonly ConcurrentDictionary<RoslynCodeTaskFactoryTaskInfo, Assembly> CompiledAssemblyCache = new ConcurrentDictionary<RoslynCodeTaskFactoryTaskInfo, Assembly>();
SystemState.cs (2)
73private static ConcurrentDictionary<string, FileState> s_processWideFileStateCache = new ConcurrentDictionary<string, FileState>(StringComparer.OrdinalIgnoreCase); 536ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache,
Microsoft.Build.Tasks.UnitTests (1)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (1)
1797ConcurrentDictionary<string, AssemblyMetadata> assemblyMetadataCache,
Microsoft.Build.UnitTests.Shared (4)
MockEngine.cs (1)
42private readonly ConcurrentDictionary<object, object> _objectCache = new ConcurrentDictionary<object, object>();
ObjectModelHelpers.cs (3)
2166public ConcurrentDictionary<string, int> ExistenceChecks { get; } = new(); 2167public ConcurrentDictionary<string, int> Enumerations { get; } = new(); 2215public ConcurrentDictionary<string, int> ExistenceChecks { get; } = new ConcurrentDictionary<string, int>();
Microsoft.Build.Utilities.Core (14)
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
FileMatcher.cs (9)
42private static readonly Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>> s_cachedGlobExpansions = new Lazy<ConcurrentDictionary<string, IReadOnlyList<string>>>(() => new ConcurrentDictionary<string, IReadOnlyList<string>>(StringComparer.OrdinalIgnoreCase)); 43private static readonly Lazy<ConcurrentDictionary<string, object>> s_cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 45private readonly ConcurrentDictionary<string, IReadOnlyList<string>> _cachedGlobExpansions; 46private readonly Lazy<ConcurrentDictionary<string, object>> _cachedGlobExpansionsLock = new Lazy<ConcurrentDictionary<string, object>>(() => new ConcurrentDictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 87public FileMatcher(IFileSystem fileSystem, ConcurrentDictionary<string, IReadOnlyList<string>> fileEntryExpansionCache = null) : this( 100internal FileMatcher(IFileSystem fileSystem, GetFileSystemEntries getFileSystemEntries, ConcurrentDictionary<string, IReadOnlyList<string>> getFileSystemDirectoryEntriesCache = null)
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
FrameworkLocationHelper.cs (2)
1289private readonly ConcurrentDictionary<DotNetFrameworkArchitecture, string> _pathsToDotNetFramework; 1294private readonly ConcurrentDictionary<Version, string> _pathsToDotNetFrameworkSdkTools;
Microsoft.CodeAnalysis (62)
CodeGen\ArrayMembers.cs (2)
99private readonly ConcurrentDictionary<(byte methodKind, IReferenceOrISignature arrayType), ArrayMethod> _dict = 110var dict = _dict;
CodeGen\CompilationTestData.cs (1)
35public readonly ConcurrentDictionary<IMethodSymbolInternal, MethodData> Methods = new ConcurrentDictionary<IMethodSymbolInternal, MethodData>();
CodeGen\ItemTokenMap.cs (1)
22private readonly ConcurrentDictionary<T, uint> _itemToToken = new ConcurrentDictionary<T, uint>(ReferenceEqualityComparer.Instance);
CodeGen\PrivateImplementationDetails.cs (7)
67private readonly ConcurrentDictionary<(ImmutableArray<byte> Data, ushort Alignment), MappedField> _mappedFields = 71private readonly ConcurrentDictionary<(ImmutableArray<byte> Data, ushort ElementType), CachedArrayField> _cachedArrayFields = 75private readonly ConcurrentDictionary<(ImmutableArray<ConstantValue> Constants, ushort ElementType), CachedArrayField> _cachedArrayFieldsForConstants = 82private readonly ConcurrentDictionary<int, InstrumentationPayloadRootField> _instrumentationPayloadRootFields = new ConcurrentDictionary<int, InstrumentationPayloadRootField>(); 86private readonly ConcurrentDictionary<string, Cci.IMethodDefinition> _synthesizedMethods = 91private readonly ConcurrentDictionary<string, Cci.INamespaceTypeDefinition> _synthesizedTopLevelTypes = new ConcurrentDictionary<string, Cci.INamespaceTypeDefinition>(); 95private readonly ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference> _proxyTypes = new ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference>();
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)
3524private ConcurrentDictionary<SyntaxTree, SmallConcurrentSetOfInts>? _lazyTreeToUsedImportDirectivesMap; 3527private 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)
108private ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions>? _lazyPerSymbolAnalyzerActionsCache; 116private ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions> PerSymbolAnalyzerActionsCache 233private ConcurrentDictionary<SyntaxTree, bool>? _lazyGeneratedCodeFilesMap; 238private ConcurrentDictionary<SyntaxTree, bool> GeneratedCodeFilesMap 261private ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>>? _lazySuppressedAnalyzersForTreeMap; 266private ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>> SuppressedAnalyzersForTreeMap 291private ConcurrentDictionary<ISymbol, bool>? _lazyIsGeneratedCodeSymbolMap; 296private ConcurrentDictionary<ISymbol, bool> IsGeneratedCodeSymbolMap 308private ConcurrentDictionary<SyntaxTree, bool>? _lazyTreesWithHiddenRegionsMap;
DiagnosticAnalyzer\AnalyzerExecutor.cs (4)
51private readonly ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>? _analyzerExecutionTimeMap; 56private ConcurrentDictionary<IOperation, ControlFlowGraph>? _lazyControlFlowGraphMap; 122var analyzerExecutionTimeMap = logExecutionTime ? new ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>() : null; 145ConcurrentDictionary<DiagnosticAnalyzer, StrongBox<long>>? analyzerExecutionTimeMap,
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (1)
55private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _semanticModelsMap;
DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs (3)
39private readonly ConcurrentDictionary<Guid, Task<string>> _mvidPathMap = new ConcurrentDictionary<Guid, Task<string>>(); 40private readonly ConcurrentDictionary<(Guid, string), Task<string>> _mvidSatelliteAssemblyPathMap = new ConcurrentDictionary<(Guid, string), Task<string>>(); 172private static string PrepareLoad<TKey>(ConcurrentDictionary<TKey, Task<string>> mvidPathMap, TKey mvidKey, Func<string> copyContents)
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
36private readonly ConcurrentDictionary<ISymbol, ImmutableDictionary<string, SuppressMessageInfo>> _localSuppressionsBySymbol;
Emit\CommonPEModuleBuilder.cs (4)
37private readonly ConcurrentDictionary<IMethodSymbolInternal, Cci.IMethodBody> _methodBodyMap; 868private readonly ConcurrentDictionary<TNamedTypeSymbol, SynthesizedDefinitions> _synthesizedTypeMembers = 871private ConcurrentDictionary<INamespaceSymbolInternal, ConcurrentQueue<INamespaceOrTypeSymbolInternal>> _lazySynthesizedNamespaceMembers; 992var namespaceMembers = _lazySynthesizedNamespaceMembers;
Emit\DebugDocumentsBuilder.cs (1)
20private readonly ConcurrentDictionary<string, Cci.DebugSourceDocument> _debugDocuments;
Emit\NoPia\EmbeddedTypesManager.cs (5)
70public readonly ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType> EmbeddedTypesMap = new ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType>(ReferenceEqualityComparer.Instance); 71public readonly ConcurrentDictionary<TFieldSymbol, TEmbeddedField> EmbeddedFieldsMap = new ConcurrentDictionary<TFieldSymbol, TEmbeddedField>(ReferenceEqualityComparer.Instance); 72public readonly ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod> EmbeddedMethodsMap = new ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod>(ReferenceEqualityComparer.Instance); 73public readonly ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty> EmbeddedPropertiesMap = new ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty>(ReferenceEqualityComparer.Instance); 74public 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)
90private ConcurrentDictionary<TypeDefinitionHandle, AttributeInfo> _lazyTypeDefToTypeIdentifierMap;
Microsoft.CodeAnalysis.CodeStyle (46)
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (7)
23private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new(); 24private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new(); 25private static readonly ConcurrentDictionary<string, PerLanguageOption2<bool>> s_diagnosticIdToFadingOptionMap = new(); 29(s_diagnosticIdToLanguageSpecificOptionsMap.TryGetValue(language, out var map) && 71var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>()); 84private static void AddOptionMapping(ConcurrentDictionary<string, ImmutableHashSet<IOption2>> map, string diagnosticId, ImmutableHashSet<IOption2> options)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
42var fieldStateMap = new ConcurrentDictionary<IFieldSymbol, (bool isCandidate, bool written)>();
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (6)
49var idToCachedResult = new ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>>( 108private static readonly Func<Guid, ConcurrentDictionary<string, string?>> s_createCache = 116ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>> idToCachedResult) 147var cache = idToCachedResult.GetOrAdd(applicableRule.NamingStyle.ID, s_createCache);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
58private readonly ConcurrentDictionary<IParameterSymbol, bool> _referencedParameters;
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (2)
36private readonly ConcurrentDictionary<IMethodSymbol, bool> _methodsUsedAsDelegates = []; 45private readonly ConcurrentDictionary<IParameterSymbol, bool> _unusedParameters = [];
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
222private readonly ConcurrentDictionary<SyntaxTree, (StrongBox<bool> completed, TextSpanMutableIntervalTree? intervalTree)> _codeBlockIntervals = [];
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (12)
46private static readonly ObjectPool<ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>>> s_fieldToUsageLocationPool = new(() => []); 63protected static void AddFieldUsage(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, IFieldSymbol field, SyntaxNode location) 66private static void ClearAndFree(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> multiMap) 103HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 118var ineligibleFieldUsageIfOutsideProperty = s_fieldToUsageLocationPool.Allocate(); 123var fieldReads = s_fieldToUsageLocationPool.Allocate(); 124var fieldWrites = s_fieldToUsageLocationPool.Allocate(); 229ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads, 230ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, 539ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, 540ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads, 541ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites,
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\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
20private static readonly ConcurrentDictionary<(Type type, string name), Type?> s_typeImplementingMethod = [];
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
23private readonly ConcurrentDictionary<string, Optional<T>> _cachedValues = [];
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (4)
15using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 19private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new(); 36if (!s_treeAliasMap.TryGetValue(semanticModel.Compilation, out var treeMap) || 52var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
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 (60)
Binder\InMethodBinder.cs (1)
37public ConcurrentDictionary<IdentifierNameSyntax, int> IdentifierMap;
BoundTree\UnboundLambda.cs (2)
504Constraint = "Avoid " + nameof(ConcurrentDictionary<(NamedTypeSymbol, bool), BoundLambda>) + " which has a large default size, but this cache is normally small.")] 509Constraint = "Avoid " + nameof(ConcurrentDictionary<ReturnInferenceCacheKey, BoundLambda>) + " which has a large default size, but this cache is normally small.")]
Compilation\CSharpCompilation.cs (3)
70private ConcurrentDictionary<ImportInfo, ImmutableArray<AssemblySymbol>>? _lazyImportInfos; 1489private ConcurrentDictionary<string, NamespaceSymbol>? _externAliasTargets; 2450private ConcurrentDictionary<(ImmutableArray<byte> ContentHash, int Position), OneOrMany<(Location AttributeLocation, MethodSymbol Interceptor)>>? _interceptions;
Compiler\ClsComplianceChecker.cs (1)
32private readonly ConcurrentDictionary<Symbol, Compliance> _declaredOrInheritedCompliance;
Compiler\MethodCompiler.cs (4)
1783ConcurrentDictionary<IdentifierNameSyntax, int>? identifierMap; 1979out InMethodBinder? inMethodBinder, out ConcurrentDictionary<IdentifierNameSyntax, int>? identifierMap) 2032static void addIdentifiers(CSharpSyntaxNode? node, ConcurrentDictionary<IdentifierNameSyntax, int> identifierMap) 2113static void assertBindIdentifierTargets(InMethodBinder? inMethodBinder, ConcurrentDictionary<IdentifierNameSyntax, int>? identifierMap, BoundNode methodBody, BindingDiagnosticBag diagnostics)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
106private readonly ConcurrentDictionary<Symbol, Symbol?> _matches = new(ReferenceEqualityComparer.Instance); 114private readonly ConcurrentDictionary<ISymbolInternal, IReadOnlyDictionary<string, ImmutableArray<ISymbolInternal>>> _otherMembers = new(ReferenceEqualityComparer.Instance); 839private readonly ConcurrentDictionary<Symbol, Symbol> _matches;
Emitter\Model\PEModuleBuilder.cs (3)
29protected readonly ConcurrentDictionary<Symbol, Cci.IModuleReference> AssemblyOrModuleSymbolToModuleRefMap = new ConcurrentDictionary<Symbol, Cci.IModuleReference>(); 30private readonly ConcurrentDictionary<Symbol, object> _genericInstanceMap = new ConcurrentDictionary<Symbol, object>(Symbols.SymbolEqualityComparer.ConsiderEverything); 31private readonly ConcurrentDictionary<ImportChain, ImmutableArray<Cci.UsedNamespaceOrType>> _translatedImportsMap =
Emitter\NoPia\EmbeddedTypesManager.cs (2)
39private readonly ConcurrentDictionary<AssemblySymbol, string> _assemblyGuidMap = new ConcurrentDictionary<AssemblySymbol, string>(ReferenceEqualityComparer.Instance); 40private 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)
32private ConcurrentDictionary<string, AnonymousTypeTemplateSymbol> _lazyAnonymousTypeTemplates; 38private ConcurrentDictionary<SynthesizedDelegateKey, AnonymousDelegateTemplateSymbol> _lazyAnonymousDelegates; 92private readonly ConcurrentDictionary<Location, bool> _sourceLocationsSeen = new ConcurrentDictionary<Location, bool>(); 114private ConcurrentDictionary<string, AnonymousTypeTemplateSymbol> AnonymousTypeTemplates 124var previousCache = (previousSubmission == null) ? null : previousSubmission.AnonymousTypeManager.AnonymousTypeTemplates; 137private ConcurrentDictionary<SynthesizedDelegateKey, AnonymousDelegateTemplateSymbol> AnonymousDelegates 146var previousCache = (previousSubmission == null) ? null : previousSubmission.AnonymousTypeManager._lazyAnonymousDelegates; 608var anonymousTypes = _lazyAnonymousTypeTemplates; 626var anonymousDelegates = _lazyAnonymousDelegates; 648var 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\MetadataOrSourceAssemblySymbol.cs (2)
266private ConcurrentDictionary<AssemblySymbol, IVTConclusion> _assembliesToWhichInternalAccessHasBeenAnalyzed; 268private 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)
96private readonly ConcurrentDictionary<FieldSymbol, bool> _unassignedFieldsMap = new ConcurrentDictionary<FieldSymbol, bool>(); 532private ConcurrentDictionary<AssemblySymbol, bool> _optimisticallyGrantedInternalsAccess; 737foreach (var keys in _lazyInternalsVisibleToMap.Values) 2099ConcurrentDictionary<AssemblySymbol, bool> haveGrantedAssemblies = _optimisticallyGrantedInternalsAccess; 2130ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>> result = null; 2194private ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>>> _lazyInternalsVisibleToMap; 2272ref ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>>> lazyInternalsVisibleToMap) 2306new ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, String>>>(StringComparer.OrdinalIgnoreCase), null); 2326ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>> keys = null;
Symbols\TypeSymbol.cs (4)
60private ConcurrentDictionary<Symbol, SymbolAndDiagnostics> _implementationForInterfaceMemberMap; 62public ConcurrentDictionary<Symbol, SymbolAndDiagnostics> ImplementationForInterfaceMemberMap 66var map = _implementationForInterfaceMemberMap; 748var map = info.ImplementationForInterfaceMemberMap;
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
267private readonly ConcurrentDictionary<SyntaxTree, SyntaxTreeState> _codeBlockIntervals = [];
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
67ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty,
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
35private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
31private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
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.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4054private readonly ConcurrentDictionary<SyntaxTree, SemanticModel> _cache = new ConcurrentDictionary<SyntaxTree, SemanticModel>();
Microsoft.CodeAnalysis.CSharp.Features (8)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
267private readonly ConcurrentDictionary<SyntaxTree, SyntaxTreeState> _codeBlockIntervals = [];
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
67ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty,
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
35private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
31private readonly ConcurrentDictionary<IMethodSymbol, MemberInfo> _methodToMemberInfo = new();
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.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
68var localsToIsAssignedMap = new ConcurrentDictionary<ILocalSymbol, bool>();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ObjectFormatterTests.cs (1)
688var obj = new ConcurrentDictionary<string, int>();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CaseCorrection\CSharpCaseCorrectionService.cs (1)
30ConcurrentDictionary<SyntaxToken, SyntaxToken> replacements,
Microsoft.CodeAnalysis.EditorFeatures (2)
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
251var includedDefaults = new ConcurrentDictionary<string, MatchResult>();
Logging\FunctionIdOptions.cs (1)
15private static readonly ConcurrentDictionary<FunctionId, Option2<bool>> s_options = [];
Microsoft.CodeAnalysis.EditorFeatures.Wpf (3)
Lightup\LightupHelpers.cs (3)
15private static readonly ConcurrentDictionary<Type, ConcurrentDictionary<Type, bool>> s_supportedObjectWrappers = new(); 31var wrappedObject = s_supportedObjectWrappers.GetOrAdd(underlyingType, static _ => new ConcurrentDictionary<Type, bool>());
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Debugger\Engine\DkmClrAppDomain.cs (1)
31internal ConcurrentDictionary<Type, ReadOnlyCollection<DkmClrEvalAttribute>> TypeToEvalAttributesMap { get; }
Microsoft.CodeAnalysis.ExternalAccess.Copilot (1)
Internal\Analyzer\AbstractCopilotCodeAnalysisService.cs (1)
35private readonly ConditionalWeakTable<Document, ConcurrentDictionary<string, (ImmutableArray<Diagnostic> Diagnostics, bool IsCompleteResult)>> _diagnosticsCache = new();
Microsoft.CodeAnalysis.Features (60)
AddImport\AbstractAddImportFeatureService.cs (6)
145var projectToAssembly = new ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>>(concurrencyLevel: 2, capacity: project.Solution.ProjectIds.Count); 146var referenceToCompilation = new ConcurrentDictionary<PortableExecutableReference, Compilation>(concurrencyLevel: 2, capacity: project.Solution.Projects.Sum(p => p.MetadataReferences.Count)); 170ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly, 171ConcurrentDictionary<PortableExecutableReference, Compilation> referenceToCompilation, 215ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly, 260ConcurrentDictionary<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)
98internal 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\AbstractImportCompletionCacheServiceFactory.cs (4)
20private readonly ConcurrentDictionary<string, TMetadataCacheEntry> _peItemsCache = []; 22private readonly ConcurrentDictionary<ProjectId, TProjectCacheEntry> _projectItemsCache = []; 67ConcurrentDictionary<string, TMetadataCacheEntry> peCache, 68ConcurrentDictionary<ProjectId, TProjectCacheEntry> projectCache,
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (1)
40private 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 = [];
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (1)
34private readonly ConcurrentDictionary<DocumentId, /*unused*/ object?> _higherPriorityDocumentsNotProcessed;
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
53private readonly ConcurrentDictionary<string, MetadataAsSourceGeneratedFileInfo> _generatedFilenameToInformation = new(StringComparer.OrdinalIgnoreCase);
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (4)
23using CachedIndexMap = ConcurrentDictionary<(IChecksummedPersistentStorageService service, DocumentKey documentKey, StringTable stringTable), AsyncLazy<TopLevelSyntaxTreeIndex?>>; 32private static CachedIndexMap? s_cachedIndexMap = []; 49[NotNullWhen(true)] out CachedIndexMap? cachedIndexMap, 169if (!ShouldSearchCachedDocuments(out var cachedIndexMap, out var stringTable))
Organizing\AbstractOrganizingService.cs (1)
35var map = new ConcurrentDictionary<Type, IEnumerable<ISyntaxOrganizer>>();
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
72private readonly ConcurrentDictionary<string, SourceDocumentInfo> _fileToDocumentInfoMap = new(StringComparer.OrdinalIgnoreCase);
Shared\Extensions\ISymbolExtensions_Sorting.cs (2)
36var symbolToParameterTypeNames = new ConcurrentDictionary<TSymbol, string[]>(); 156ConcurrentDictionary<TSymbol, string[]> symbolToParameterTypeNames,
SignatureHelp\SignatureHelpService.cs (1)
27private readonly ConcurrentDictionary<string, ImmutableArray<ISignatureHelpProvider>> _providersByLanguage = [];
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (7)
23private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new(); 24private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new(); 25private static readonly ConcurrentDictionary<string, PerLanguageOption2<bool>> s_diagnosticIdToFadingOptionMap = new(); 29(s_diagnosticIdToLanguageSpecificOptionsMap.TryGetValue(language, out var map) && 71var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>()); 84private static void AddOptionMapping(ConcurrentDictionary<string, ImmutableHashSet<IOption2>> map, string diagnosticId, ImmutableHashSet<IOption2> options)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
42var fieldStateMap = new ConcurrentDictionary<IFieldSymbol, (bool isCandidate, bool written)>();
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (6)
49var idToCachedResult = new ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>>( 108private static readonly Func<Guid, ConcurrentDictionary<string, string?>> s_createCache = 116ConcurrentDictionary<Guid, ConcurrentDictionary<string, string?>> idToCachedResult) 147var cache = idToCachedResult.GetOrAdd(applicableRule.NamingStyle.ID, s_createCache);
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
58private readonly ConcurrentDictionary<IParameterSymbol, bool> _referencedParameters;
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (2)
36private readonly ConcurrentDictionary<IMethodSymbol, bool> _methodsUsedAsDelegates = []; 45private readonly ConcurrentDictionary<IParameterSymbol, bool> _unusedParameters = [];
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
222private readonly ConcurrentDictionary<SyntaxTree, (StrongBox<bool> completed, TextSpanMutableIntervalTree? intervalTree)> _codeBlockIntervals = [];
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (9)
46private static readonly ObjectPool<ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>>> s_fieldToUsageLocationPool = new(() => []); 63protected static void AddFieldUsage(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, IFieldSymbol field, SyntaxNode location) 66private static void ClearAndFree(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> multiMap) 103HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken); 229ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads, 230ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, 539ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, 540ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads, 541ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites,
SymbolSearch\Windows\SymbolSearchUpdateEngine.cs (1)
34private readonly ConcurrentDictionary<string, IAddReferenceDatabaseWrapper> _sourceToDatabase = [];
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (1)
49private readonly ConcurrentDictionary<string, object> _sourceToUpdateSentinel = [];
Microsoft.CodeAnalysis.LanguageServer (6)
HostWorkspace\LanguageServerProjectSystem.cs (1)
63private readonly ConcurrentDictionary<string, List<LoadedProject>> _loadedProjects = [];
LanguageServer\Handler\DebugConfiguration\ProjectTargetFrameworkManager.cs (1)
17private readonly ConcurrentDictionary<ProjectId, string?> _projectToTargetFrameworkIdentifer = new();
Logging\LspLogMessageLoggerProvider.cs (1)
11private readonly ConcurrentDictionary<string, LspLogMessageLogger> _loggers = new(StringComparer.OrdinalIgnoreCase);
Logging\RoslynLogger.cs (3)
20private static readonly ConcurrentDictionary<FunctionId, string> s_eventMap = []; 21private static readonly ConcurrentDictionary<(FunctionId id, string name), string> s_propertyMap = []; 23private readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10);
Microsoft.CodeAnalysis.LanguageServer.Protocol (18)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.InMemoryStorage.cs (5)
16private static readonly ConcurrentDictionary<DiagnosticAnalyzer, ConcurrentDictionary<(object key, string stateKey), CacheEntry>> s_map = 24return s_map.TryGetValue(analyzer, out var analyzerMap) && 33var analyzerMap = s_map.GetOrAdd(analyzer, _ => new ConcurrentDictionary<(object key, string stateKey), CacheEntry>(concurrencyLevel: 2, capacity: 10)); 41if (!s_map.TryGetValue(analyzer, out var analyzerMap))
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateSet.cs (2)
28private readonly ConcurrentDictionary<DocumentId, ActiveFileState> _activeFileStates; 29private readonly ConcurrentDictionary<ProjectId, ProjectState> _projectStates;
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
56private readonly ConcurrentDictionary<string, DiagnosticsPullCache> _categoryToVersionedCache = [];
Handler\InlineCompletions\XmlSnippetParser.cs (1)
28private readonly ConcurrentDictionary<string, ParsedXmlSnippet?> _parsedSnippetsCache = [];
Handler\PullHandlers\VersionedPullCache.cs (1)
29private readonly ConcurrentDictionary<(Workspace workspace, ProjectOrDocumentId id), CacheItem> _idToLastReportedResult = [];
Protocol\Converters\SumConverter.cs (1)
183private static readonly ConcurrentDictionary<Type, SumConverter.SumTypeInfoCache> SumTypeCache = new ConcurrentDictionary<Type, SumConverter.SumTypeInfoCache>();
Protocol\Internal\Efficiency\OptimizedVSCompletionListJsonConverter.cs (1)
17private static readonly ConcurrentDictionary<ImageId, string> IconRawJson = new ConcurrentDictionary<ImageId, string>();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractTypeRefResolver.cs (1)
15private readonly ConcurrentDictionary<TypeRef, Type?> _typeRefToTypeMap = [];
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (4)
197var concurrentlyExecutingTasks = new ConcurrentDictionary<Task, CancellationTokenSource>(); 301/// Reflection invokes <see cref="ProcessQueueCoreAsync{TRequest, TResponse}(IQueueItem{TRequestContext}, IMethodHandler, RequestHandlerMetadata, ConcurrentDictionary{Task, CancellationTokenSource}, CancellationTokenSource?, CancellationToken)"/> 309ConcurrentDictionary<Task, CancellationTokenSource> concurrentlyExecutingTasks, 331ConcurrentDictionary<Task, CancellationTokenSource> concurrentlyExecutingTasks,
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\TypeRef.cs (1)
18private static readonly ConcurrentDictionary<(string TypeName, string AssemblyName, string? CodeBase), TypeRef> s_cache = [];
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
LspFileChangeWatcherTests.cs (1)
120public readonly ConcurrentDictionary<string, Registration> Registrations = new();
Microsoft.CodeAnalysis.Remote.ServiceHub (5)
Host\SolutionAssetCache.cs (1)
46private readonly ConcurrentDictionary<Checksum, Entry> _assets = new();
Services\DiagnosticAnalyzer\PerformanceTrackerService.cs (1)
40private readonly ConcurrentDictionary<string, bool> _builtInMap = new ConcurrentDictionary<string, bool>(concurrencyLevel: 2, capacity: 10);
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogger.cs (3)
75private readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10); 82private static readonly ConcurrentDictionary<FunctionId, string> s_eventMap = []; 83private static readonly ConcurrentDictionary<(FunctionId id, string name), string> s_propertyMap = [];
Microsoft.CodeAnalysis.Remote.Workspaces (1)
Serialization\MessagePackFormatters.cs (1)
58private readonly ConcurrentDictionary<Guid, ProjectId> _projectIds = new ConcurrentDictionary<Guid, ProjectId>();
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\CommonDiagnosticAnalyzers.cs (2)
1230private readonly ConcurrentDictionary<IOperation, (ControlFlowGraph Graph, ISymbol AssociatedSymbol)> _controlFlowGraphMapOpt; 1980var seenOperationContainers = new ConcurrentDictionary<OperationAnalysisContext, ISet<ISymbol>>();
TargetFrameworkUtil.cs (1)
168private static readonly ConcurrentDictionary<string, ImmutableArray<PortableExecutableReference>> s_dynamicReferenceMap = new ConcurrentDictionary<string, ImmutableArray<PortableExecutableReference>>(StringComparer.Ordinal);
Microsoft.CodeAnalysis.UnitTests (2)
InternalUtilities\ConcurrentDictionaryExtensionsTests.cs (2)
17var dictionary = new ConcurrentDictionary<int, int>(); 30var dictionary = new ConcurrentDictionary<int, object>();
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)
112Private _lazyImportClauseDependencies As ConcurrentDictionary(Of (SyntaxTree As SyntaxTree, ImportsClausePosition As Integer), ImmutableArray(Of AssemblySymbol))
Emit\EditAndContinue\VisualBasicSymbolMatcher.vb (3)
76Private ReadOnly _matches As ConcurrentDictionary(Of Symbol, Symbol) 87Private ReadOnly _otherMembers As ConcurrentDictionary(Of ISymbolInternal, IReadOnlyDictionary(Of String, ImmutableArray(Of ISymbolInternal))) 561Private 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)
19Private _concurrentTypesCache As ConcurrentDictionary(Of String, AnonymousTypeTemplateSymbol) = Nothing 22Private _concurrentDelegatesCache As ConcurrentDictionary(Of String, AnonymousDelegateTemplateSymbol) = Nothing 45Private ReadOnly Property AnonymousTypeTemplates As ConcurrentDictionary(Of String, AnonymousTypeTemplateSymbol) 65Private ReadOnly Property AnonymousDelegateTemplates As ConcurrentDictionary(Of String, AnonymousDelegateTemplateSymbol) 154cache 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\MetadataOrSourceAssemblySymbol.vb (2)
167Private _assembliesToWhichInternalAccessHasBeenAnalyzed As ConcurrentDictionary(Of AssemblySymbol, IVTConclusion) 169Private 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)
92Private ReadOnly Property SymbolMap As ConcurrentDictionary(Of Symbol, Symbol)
Symbols\Source\SourceAssemblySymbol.vb (7)
74Private _lazyInternalsVisibleToMap As ConcurrentDictionary(Of String, ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String))) 874Private _optimisticallyGrantedInternalsAccess As ConcurrentDictionary(Of AssemblySymbol, Boolean) 880Dim haveGrantedAssemblies As ConcurrentDictionary(Of AssemblySymbol, Boolean) = _optimisticallyGrantedInternalsAccess 914Dim result As ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)) = Nothing 984New ConcurrentDictionary(Of String, ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)))(StringComparer.OrdinalIgnoreCase), Nothing) 1003Dim keys As ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)) = Nothing
Symbols\Source\SourceNamedTypeSymbol.vb (1)
43Private _lazyWithEventsOverrides As ConcurrentDictionary(Of PropertySymbol, SynthesizedOverridingWithEventsProperty)
Symbols\TypeSymbol.vb (2)
48Private _lazyImplementationForInterfaceMemberMap As ConcurrentDictionary(Of Symbol, Symbol) 668Private ReadOnly Property ImplementationForInterfaceMemberMap As ConcurrentDictionary(Of Symbol, Symbol)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (1)
51ineligibleFieldUsageIfOutsideProperty As ConcurrentDictionary(Of IFieldSymbol, ConcurrentSet(Of SyntaxNode)),
Microsoft.CodeAnalysis.VisualBasic.Features (1)
src\Analyzers\VisualBasic\Analyzers\UseAutoProperty\VisualBasicUseAutoPropertyAnalyzer.vb (1)
51ineligibleFieldUsageIfOutsideProperty As ConcurrentDictionary(Of IFieldSymbol, ConcurrentSet(Of SyntaxNode)),
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 (42)
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)
29private readonly ConcurrentDictionary<ProjectId, (VersionStamp semanticVersion, SymbolTreeInfo info)> _projectIdToInfo = []; 30private 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\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs (3)
39private readonly ConcurrentDictionary<Guid, Task<string>> _mvidPathMap = new ConcurrentDictionary<Guid, Task<string>>(); 40private readonly ConcurrentDictionary<(Guid, string), Task<string>> _mvidSatelliteAssemblyPathMap = new ConcurrentDictionary<(Guid, string), Task<string>>(); 172private static string PrepareLoad<TKey>(ConcurrentDictionary<TKey, Task<string>> mvidPathMap, TKey mvidKey, Func<string> copyContents)
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\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
20private static readonly ConcurrentDictionary<(Type type, string name), Type?> s_typeImplementingMethod = [];
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (1)
23private readonly ConcurrentDictionary<string, Optional<T>> _cachedValues = [];
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AliasSymbolCache.cs (4)
15using TreeMap = ConcurrentDictionary<(SyntaxTree tree, int namespaceId), ImmutableDictionary<INamespaceOrTypeSymbol, IAliasSymbol>>; 19private static readonly ConditionalWeakTable<Compilation, TreeMap> s_treeAliasMap = new(); 36if (!s_treeAliasMap.TryGetValue(semanticModel.Compilation, out var treeMap) || 52var treeMap = s_treeAliasMap.GetValue(semanticModel.Compilation, static _ => new TreeMap());
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\SQLite\v2\SQLitePersistentStorage_DocumentIds.cs (1)
19private readonly ConcurrentDictionary<DocumentId, DocumentPrimaryKey> _documentIdToPrimaryKeyMap = [];
Storage\SQLite\v2\SQLitePersistentStorage_ProjectIds.cs (1)
19private readonly ConcurrentDictionary<ProjectId, ProjectPrimaryKey> _projectIdToPrimaryKeyMap = [];
Storage\SQLite\v2\SQLitePersistentStorage_StringIds.cs (1)
17private readonly ConcurrentDictionary<string, int> _stringToIdMap = [];
Storage\StorageDatabaseLogger.cs (1)
23private readonly ConcurrentDictionary<Type, Exception> _set = new(concurrencyLevel: 2, capacity: 10);
Workspace\Host\Documentation\DocumentationProviderServiceFactory.cs (1)
27private readonly ConcurrentDictionary<string, DocumentationProvider> _assemblyPathToDocumentationProviderMap =
Workspace\Solution\ProjectState.AnalyzerConfigOptionsCache.cs (1)
26private readonly ConcurrentDictionary<string, AnalyzerConfigData> _sourcePathToResult = [];
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Rpc\RpcClient.cs (1)
31private readonly ConcurrentDictionary<int, (TaskCompletionSource<object?>, System.Type? expectedReturnType)> _outstandingRequests = [];
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (7)
Rpc\RpcServer.cs (1)
32private readonly ConcurrentDictionary<int, object> _rpcTargets = [];
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\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
35private readonly ConcurrentDictionary<T, byte> _dictionary;
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)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
src\Workspaces\Core\MSBuild.BuildHost\Rpc\RpcServer.cs (1)
32private readonly ConcurrentDictionary<int, object> _rpcTargets = [];
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (6)
Remote\InProcRemoteHostClientProvider.cs (2)
42ConcurrentDictionary<Guid, TestGeneratorReference> sharedTestGeneratorReferences, 51ConcurrentDictionary<Guid, TestGeneratorReference> sharedTestGeneratorReferences,
Remote\TestSerializerService.cs (4)
30ConcurrentDictionary<Guid, TestGeneratorReference> sharedTestGeneratorReferences, 43private readonly ConcurrentDictionary<Guid, TestGeneratorReference> _sharedTestGeneratorReferences = sharedTestGeneratorReferences; 120private ConcurrentDictionary<Guid, TestGeneratorReference>? _sharedTestGeneratorReferences; 133public ConcurrentDictionary<Guid, TestGeneratorReference> SharedTestGeneratorReferences
Microsoft.CommonLanguageServerProtocol.Framework.Package (6)
AbstractTypeRefResolver.cs (1)
15private readonly ConcurrentDictionary<TypeRef, Type?> _typeRefToTypeMap = [];
RequestExecutionQueue.cs (4)
197var concurrentlyExecutingTasks = new ConcurrentDictionary<Task, CancellationTokenSource>(); 301/// Reflection invokes <see cref="ProcessQueueCoreAsync{TRequest, TResponse}(IQueueItem{TRequestContext}, IMethodHandler, RequestHandlerMetadata, ConcurrentDictionary{Task, CancellationTokenSource}, CancellationTokenSource?, CancellationToken)"/> 309ConcurrentDictionary<Task, CancellationTokenSource> concurrentlyExecutingTasks, 331ConcurrentDictionary<Task, CancellationTokenSource> concurrentlyExecutingTasks,
TypeRef.cs (1)
18private static readonly ConcurrentDictionary<(string TypeName, string AssemblyName, string? CodeBase), TypeRef> s_cache = [];
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\BinderEquivalence.cs (1)
32private static readonly ConcurrentDictionary<ICSharpBinder, ICSharpBinder> binderEquivalenceCache =
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
22static ConcurrentDictionary<string, PackageIndex> s_indexCache = new ConcurrentDictionary<string, PackageIndex>();
Microsoft.DotNet.XUnitAssert.Tests (4)
EqualityAssertsTests.cs (4)
1160 var actual = new ConcurrentDictionary<string, string>(expected); 1170 var actual = new ConcurrentDictionary<string, string> { ["foo"] = "baz" }; 3389 var actual = new ConcurrentDictionary<string, string>(expected); 3412 var actual = new ConcurrentDictionary<string, string> { ["foo"] = "baz" };
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.Serialization.cs (1)
18private readonly ConcurrentDictionary<Type, object> _serializers = new();
Internal\DefaultHybridCache.Stampede.cs (1)
13private readonly ConcurrentDictionary<StampedeKey, StampedeState> _currentOperations = new();
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
679internal ConcurrentDictionary<object, CacheEntry> _entries = new ConcurrentDictionary<object, CacheEntry>();
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 (1)
ManualHealthCheckTracker.cs (1)
15private readonly ConcurrentDictionary<IManualHealthCheck, bool> _checks = new();
Microsoft.Extensions.Diagnostics.Testing (2)
Logging\FakeLogger.cs (1)
22private readonly ConcurrentDictionary<LogLevel, bool> _disabledLevels = new(); // used as a set, the value is ignored
Logging\FakeLoggerProvider.cs (1)
22private readonly ConcurrentDictionary<string, FakeLogger> _loggers = new();
Microsoft.Extensions.FileProviders.Physical (5)
PhysicalFilesWatcher.cs (5)
29private readonly ConcurrentDictionary<string, ChangeTokenInfo> _filePathTokenLookup = new(StringComparer.OrdinalIgnoreCase); 30private readonly ConcurrentDictionary<string, ChangeTokenInfo> _wildcardTokenLookup = new(StringComparer.OrdinalIgnoreCase); 114internal ConcurrentDictionary<IPollingChangeToken, IPollingChangeToken> PollingChangeTokens { get; } 474var 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)
22private readonly ConcurrentDictionary<string, Logger> _loggers = new ConcurrentDictionary<string, Logger>(StringComparer.Ordinal);
Microsoft.Extensions.Logging.Abstractions (1)
FormattedLogValues.cs (1)
22private 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; 102var 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)
25private 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.Resilience (2)
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)
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 (5)
Http\HttpRouteParser.cs (1)
24private readonly ConcurrentDictionary<string, ParsedRouteSegments> _routeTemplateSegmentsCache = new();
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)
src\Shared\Memoization\MemoizedFunction.cs (2)
58private readonly ConcurrentDictionary<Arg, Lazy<TResult>> _values; 131private readonly ConcurrentDictionary<Args, Lazy<TResult>> _values;
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)
20private readonly ConcurrentDictionary<long, object> _pendingTasks = new(); 21private readonly ConcurrentDictionary<long, IDotNetObjectReference> _trackedRefsById = new(); 22private readonly ConcurrentDictionary<long, CancellationTokenRegistration> _cancellationRegistrations = new();
Microsoft.Maui (11)
Fonts\FontManager.iOS.cs (1)
27 readonly ConcurrentDictionary<Font, UIFont> _fonts = new();
Handlers\HybridWebView\HybridWebViewHandler.cs (2)
424 ConcurrentDictionary<string, TaskCompletionSource<string>> _asyncTaskCallbacks = new ConcurrentDictionary<string, TaskCompletionSource<string>>(); 431 ConcurrentDictionary<string, TaskCompletionSource<string>> IHybridWebViewTaskManager.AsyncTaskCallbacks => _asyncTaskCallbacks;
Handlers\HybridWebView\IHybridWebViewTaskManager.cs (1)
9 ConcurrentDictionary<string, TaskCompletionSource<string>> AsyncTaskCallbacks { get; }
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>();
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>();
Microsoft.ML.Tokenizers (1)
Model\TiktokenTokenizer.cs (1)
1197private 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.StringTools (1)
WeakStringCache.Concurrent.cs (1)
16private readonly ConcurrentDictionary<int, StringWeakHandle> _stringsByHashCode;
Microsoft.VisualStudio.LanguageServices (6)
DesignerAttribute\VisualStudioDesignerAttributeService.cs (1)
49private readonly ConcurrentDictionary<ProjectId, IProjectItemDesignerTypeUpdateService?> _cpsProjects = [];
Packaging\PackageInstallerServiceFactory.cs (1)
81private readonly ConcurrentDictionary<ProjectId, ProjectState> _projectToInstalledPackageAndVersion = [];
Telemetry\Shared\TelemetryLogger.cs (3)
75private readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10); 82private static readonly ConcurrentDictionary<FunctionId, string> s_eventMap = []; 83private static readonly ConcurrentDictionary<(FunctionId id, string name), string> s_propertyMap = [];
Venus\ContainedDocument.cs (1)
68private static readonly ConcurrentDictionary<DocumentId, ContainedDocument> s_containedDocuments = [];
Microsoft.VisualStudio.LanguageServices.DevKit (4)
Logging\VSCodeTelemetryLogger.cs (1)
30private static readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10);
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogger.cs (3)
75private readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10); 82private static readonly ConcurrentDictionary<FunctionId, string> s_eventMap = []; 83private static readonly ConcurrentDictionary<(FunctionId id, string name), string> s_propertyMap = [];
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\XamlProjectService.cs (1)
38private readonly ConcurrentDictionary<string, DocumentId> _documentIds = new ConcurrentDictionary<string, DocumentId>(StringComparer.OrdinalIgnoreCase);
MSBuild (27)
CachingFileSystemWrapper.cs (2)
16private readonly ConcurrentDictionary<string, bool> _existenceCache = new ConcurrentDictionary<string, bool>(); 17private readonly ConcurrentDictionary<string, DateTime> _lastWriteTimeCache = new ConcurrentDictionary<string, DateTime>();
FileUtilities.cs (1)
120private static readonly ConcurrentDictionary<string, bool> FileExistenceCache = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
RegisteredTaskObjectCacheBase.cs (13)
25private static Lazy<ConcurrentDictionary<object, object>> s_appDomainLifetimeObjects = new Lazy<ConcurrentDictionary<object, object>>(); 30private Lazy<ConcurrentDictionary<object, object>> _buildLifetimeObjects = new Lazy<ConcurrentDictionary<object, object>>(); 61ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: false); 71ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: true); 83ConcurrentDictionary<object, object> dict = GetCollectionForLifetime(lifetime, dontCreate: true); 97var collection = GetCollectionForLifetime(lifetime, dontCreate: true); 104protected ConcurrentDictionary<object, object> GetCollectionForLifetime(RegisteredTaskObjectLifetime lifetime, bool dontCreate) 106Lazy<ConcurrentDictionary<object, object>> dict = GetLazyCollectionForLifetime(lifetime); 120protected Lazy<ConcurrentDictionary<object, object>> GetLazyCollectionForLifetime(RegisteredTaskObjectLifetime lifetime) 122Lazy<ConcurrentDictionary<object, object>> dict = null; 140private static void DisposeObjects(Lazy<ConcurrentDictionary<object, object>> lifetimeObjects)
TypeLoader.cs (11)
34private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 39private static ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> s_cacheOfReflectionOnlyLoadedTypesByFilter = new ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>>(); 241private LoadedType GetLoadedType(ConcurrentDictionary<Func<Type, object, bool>, ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes>> cache, string typeName, AssemblyLoadInfo assembly, bool useTaskHost) 245ConcurrentDictionary<AssemblyLoadInfo, AssemblyInfoToLoadedTypes> loadInfoToType = 283private ConcurrentDictionary<string, Type> _typeNameToType; 290private ConcurrentDictionary<string, LoadedType> _publicTypeNameToLoadedType;
mscorlib (1)
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<,>))]
PresentationFramework (5)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (1)
19private readonly static ConcurrentDictionary<string, Func<IInspectable, object>> TypedObjectFactoryCache = new ConcurrentDictionary<string, Func<IInspectable, object>>();
System\Windows\Markup\Baml2006\WpfXamlType.cs (4)
35private ConcurrentDictionary<string, XamlMember> _attachableMembers; 36private ConcurrentDictionary<string, XamlMember> _members; 51protected ConcurrentDictionary<string, XamlMember> Members 63protected ConcurrentDictionary<string, XamlMember> AttachableMembers
Shared (2)
Memoization\MemoizedFunction.cs (2)
58private readonly ConcurrentDictionary<Arg, Lazy<TResult>> _values; 131private readonly ConcurrentDictionary<Args, Lazy<TResult>> _values;
SignalRSamples (1)
ConnectionList.cs (1)
12private readonly ConcurrentDictionary<string, ConnectionContext> _connections = new ConcurrentDictionary<string, ConnectionContext>(StringComparer.Ordinal);
SocialWeather (1)
ConnectionList.cs (1)
12private readonly ConcurrentDictionary<string, ConnectionContext> _connections =
System.Collections.Concurrent (85)
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> 870private readonly ConcurrentDictionary<TKey, TValue> _dictionary; 872private ConcurrentDictionary<TKey, TValue>.VolatileNode[]? _buckets; 882public Enumerator(ConcurrentDictionary<TKey, TValue> dictionary) 913ConcurrentDictionary<TKey, TValue>.VolatileNode[]? buckets = _buckets; 1124/// <see cref="ConcurrentDictionary{TKey, TValue}" /> and to provide hash values for the keys. 1127/// <see cref="ConcurrentDictionary{TKey, TValue}" /> requires an equality implementation to determine 1152/// cref="ConcurrentDictionary{TKey,TValue}"/>. 1157/// cref="ConcurrentDictionary{TKey,TValue}"/>.</value> 1159/// cref="ConcurrentDictionary{TKey,TValue}"/> 1193/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> 1233/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> 1275/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> 1307/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key does not already 1308/// exist, or updates a key/value pair in the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key 1383/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key does not already 1384/// exist, or updates a key/value pair in the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key 1456/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key does not already 1457/// exist, or updates a key/value pair in the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key 1522/// Gets a value that indicates whether the <see cref="ConcurrentDictionary{TKey,TValue}"/> is empty. 1524/// <value>true if the <see cref="ConcurrentDictionary{TKey,TValue}"/> is empty; otherwise, 1569/// cref="ConcurrentDictionary{TKey,TValue}"/>.</exception> 1593/// Gets a snapshot containing all the keys in the <see cref="ConcurrentDictionary{TKey,TValue}"/>. 1595/// <remarks>The property returns a copy of all the keys. It's not kept in sync with <see cref="ConcurrentDictionary{TKey,TValue}"/>.</remarks> 1602/// Gets a snapshot containing all the values in the <see cref="ConcurrentDictionary{TKey,TValue}"/>. 1604/// <remarks>The property returns a copy of all the values. It's not kept in sync with <see cref="ConcurrentDictionary{TKey,TValue}"/>.</remarks> 1619/// cref="ConcurrentDictionary{TKey,TValue}"/>.</param> 1623/// cref="ConcurrentDictionary{TKey,TValue}"/> 1626/// <see cref="ConcurrentDictionary{TKey,TValue}"/></exception> 1647/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always returns 1657/// cref="ConcurrentDictionary{TKey,TValue}"/>.</param> 1670/// cref="ConcurrentDictionary{TKey,TValue}"/>.</summary> 1671/// <returns>An enumerator for the <see cref="ConcurrentDictionary{TKey,TValue}"/>.</returns> 1678IEnumerator IEnumerable.GetEnumerator() => ((ConcurrentDictionary<TKey, TValue>)this).GetEnumerator(); 1695/// name="TKey"/> of the <see cref="ConcurrentDictionary{TKey,TValue}"/>. -or- 1697/// the type of values in the <see cref="ConcurrentDictionary{TKey,TValue}"/>. 1699/// cref="ConcurrentDictionary{TKey,TValue}"/>. 1750/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always 1760/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always 1807/// cref="ConcurrentDictionary{TKey,TValue}"/>.</value> 1813/// cref="ConcurrentDictionary{TKey,TValue}"/>. -or- A value is being 1816/// cref="ConcurrentDictionary{TKey,TValue}"/> 1848((ConcurrentDictionary<TKey, TValue>)this)[(TKey)key] = (TValue)value!; 1944/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always 2324internal DictionaryEnumerator(ConcurrentDictionary<TKey, TValue> dictionary) => _enumerator = dictionary.GetEnumerator(); 2341private static bool IsCompatibleKey<TAlternateKey>(ConcurrentDictionary<TKey, TValue>.Tables tables) 2350private static IAlternateEqualityComparer<TAlternateKey, TKey> GetAlternateComparer<TAlternateKey>(ConcurrentDictionary<TKey, TValue>.Tables tables) 2358/// Provides a type that may be used to perform operations on a <see cref="ConcurrentDictionary{TKey, TValue}"/> 2365internal AlternateLookup(ConcurrentDictionary<TKey, TValue> dictionary) 2372/// <summary>Gets the <see cref="ConcurrentDictionary{TKey, TValue}"/> against which this instance performs operations.</summary> 2373public ConcurrentDictionary<TKey, TValue> Dictionary { get; } 2389/// <summary>Determines whether the <see cref="ConcurrentDictionary{TKey, TValue}"/> contains the specified alternate key.</summary>
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 (4)
System\ComponentModel\PropertyDescriptor.cs (1)
21private ConcurrentDictionary<object, EventHandler?>? _valueChangedHandlers;
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
27private readonly ConcurrentDictionary<Type, ReflectedTypeData> _typeData = new ConcurrentDictionary<Type, ReflectedTypeData>();
System\ComponentModel\TypeDescriptor.cs (2)
60private static readonly ConcurrentDictionary<Type, TypeDescriptionNode> s_providerTypeTable = new ConcurrentDictionary<Type, TypeDescriptionNode>(); 65private static readonly ConcurrentDictionary<Type, object?> s_defaultProviderInitialized = new ConcurrentDictionary<Type, object?>();
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\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.Diagnostics.DiagnosticSource (12)
System\Diagnostics\DsesFilterAndTransform.cs (1)
1028private 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)
29private 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.Net.Http (5)
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; 53/// <see cref="ConcurrentDictionary{TKey,TValue}.IsEmpty"/> call. 155var poolsRef = new WeakReference<ConcurrentDictionary<HttpConnectionKey, HttpConnectionPool>>(_pools); 158if (poolsRef.TryGetTarget(out ConcurrentDictionary<HttpConnectionKey, HttpConnectionPool>? pools))
System.Net.Quic (1)
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 (5)
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\Net\Security\SslStreamCertificateContext.Linux.cs (3)
28internal ConcurrentDictionary<SslProtocols, SafeSslContextHandle> SslContexts 32ConcurrentDictionary<SslProtocols, SafeSslContextHandle>? sslContexts = _sslContexts; 43private ConcurrentDictionary<SslProtocols, SafeSslContextHandle>? _sslContexts;
System.Net.Sockets (2)
System\Net\Sockets\SocketAsyncEngine.Unix.cs (2)
83private readonly ConcurrentDictionary<IntPtr, SocketAsyncContextWrapper> _handleToContextMap = new ConcurrentDictionary<IntPtr, SocketAsyncContextWrapper>(); 327private readonly ConcurrentDictionary<IntPtr, SocketAsyncContextWrapper> _handleToContextMap;
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\ContextAware.cs (1)
54private readonly ConcurrentDictionary<TKey, TValue> _fastDictionary = new();
System\Runtime\Serialization\DataContract.cs (1)
301private 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 (1)
System\Private\Windows\Core\BinaryFormat\SerializationEvents.cs (1)
12private static readonly ConcurrentDictionary<Type, SerializationEvents> s_cache = new();
System.Private.Windows.Core.TestUtilities (1)
NoAssertContext.cs (1)
26private 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 (6)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.Nid.cs (1)
13private static readonly ConcurrentDictionary<string, int> s_nidLookup =
System\Security\Cryptography\CryptoConfig.cs (2)
36private static readonly ConcurrentDictionary<string, Type> appNameHT = new ConcurrentDictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 37private 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\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (1)
40private static readonly ConcurrentDictionary<int, string> s_errorStrings =
System.Text.Json (6)
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)
215private readonly ConcurrentDictionary<Type, CacheEntry> _cache = new();
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)
53private static readonly ConcurrentDictionary<Key, Node> s_cacheDictionary = new ConcurrentDictionary<Key, Node>(concurrencyLevel: 1, capacity: 31);
System.Windows.Forms (4)
System\Resources\AssemblyNamesTypeResolutionService.cs (2)
13private ConcurrentDictionary<AssemblyName, Assembly>? _cachedAssemblies; 14private ConcurrentDictionary<string, Type>? _cachedTypes;
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)
25private static readonly ConcurrentDictionary<int, Font> s_defaultFontCache = new();
System.Xaml (34)
System\Xaml\InfosetObjects\XamlObjectWriter.cs (1)
1422openGeneric == typeof(ConcurrentDictionary<,>);
System\Xaml\MS\Impl\XmlNsInfo.cs (4)
41private ConcurrentDictionary<string, IList<string>> _clrToXmlNs; 42internal ConcurrentDictionary<string, IList<string>> ClrToXmlNs 194ConcurrentDictionary<string, IList<string>> LoadClrToXmlNs() 196ConcurrentDictionary<string, IList<string>> result =
System\Xaml\Schema\TypeReflector.cs (2)
41private ConcurrentDictionary<XamlDirective, XamlMember> _aliasedProperties; 366var dict = XamlSchemaContext.CreateDictionary<XamlDirective, XamlMember>();
System\Xaml\Schema\XamlNamespace.cs (1)
19private ConcurrentDictionary<string, XamlType> _typeCache;
System\Xaml\XamlSchemaContext.cs (26)
133private ConcurrentDictionary<string, string> _preferredPrefixes; 212ConcurrentDictionary<string, string> preferredPrefixes = CreateDictionary<string, string>(); 221void UpdatePreferredPrefixes(XmlNsInfo newNamespaces, ConcurrentDictionary<string, string> prefixDict) 349private ConcurrentDictionary<string, string> _xmlNsCompatDict; 352private ConcurrentDictionary<string, string> XmlNsCompatDict 465private ConcurrentDictionary<Type, XamlType> _masterTypeList; 466private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> _masterValueConverterList; 467private ConcurrentDictionary<ReferenceEqualityTuple<MemberInfo, MemberInfo>, XamlMember> _masterMemberList; 468private ConcurrentDictionary<XamlType, Dictionary<string,SpecialBracketCharacters> > _masterBracketCharacterCache; 477private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > MasterBracketCharacterCache 488private ConcurrentDictionary<Type, XamlType> MasterTypeList 499private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> MasterValueConverterList 510private ConcurrentDictionary<ReferenceEqualityTuple<MemberInfo, MemberInfo>, XamlMember> MasterMemberList 681private ConcurrentDictionary<String, XamlNamespace> _namespaceByUriList; 682private ConcurrentDictionary<Assembly, XmlNsInfo> _xmlnsInfo; 683private ConcurrentDictionary<WeakRefKey, XmlNsInfo> _xmlnsInfoForDynamicAssemblies; 684private ConcurrentDictionary<Assembly, XmlNsInfo> _xmlnsInfoForUnreferencedAssemblies; 699private ConcurrentDictionary<Assembly, XmlNsInfo> XmlnsInfo 710private ConcurrentDictionary<WeakRefKey, XmlNsInfo> XmlnsInfoForDynamicAssemblies 722private ConcurrentDictionary<String, XamlNamespace> NamespaceByUriList 736private ConcurrentDictionary<Assembly, XmlNsInfo> XmlnsInfoForUnreferencedAssemblies 1004ConcurrentDictionary<string, IList<string>> assemblyMappings = nsInfo.ClrToXmlNs; 1174internal static ConcurrentDictionary<K, V> CreateDictionary<K, V>() 1179internal static ConcurrentDictionary<K, V> CreateDictionary<K, V>(IEqualityComparer<K> comparer) 1184internal static V TryAdd<K, V>(ConcurrentDictionary<K, V> dictionary, K key, V value) 1196internal static V TryUpdate<K, V>(ConcurrentDictionary<K, V> dictionary, K key, V value, V comparand)
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
src\Shared\E2ETesting\BrowserFixture.cs (1)
19private readonly ConcurrentDictionary<string, (IWebDriver browser, ILogs log)> _browsers = new();
Templates.Blazor.WebAssembly.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
src\Shared\E2ETesting\BrowserFixture.cs (1)
19private readonly ConcurrentDictionary<string, (IWebDriver browser, ILogs log)> _browsers = new();
Templates.Mvc.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
src\Shared\E2ETesting\BrowserFixture.cs (1)
19private readonly ConcurrentDictionary<string, (IWebDriver browser, ILogs log)> _browsers = new();
Templates.Tests (2)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
18private readonly ConcurrentDictionary<string, Project> _projects = new ConcurrentDictionary<string, Project>();
src\Shared\E2ETesting\BrowserFixture.cs (1)
19private readonly ConcurrentDictionary<string, (IWebDriver browser, ILogs log)> _browsers = new();
TestContentPackage (1)
Services\AsyncOperationService.cs (1)
10private readonly ConcurrentDictionary<string, TaskCompletionSource> _tasks = new();
XmlFileLogger (3)
ObjectModel\Build.cs (2)
21private readonly ConcurrentDictionary<int, Project> _projectIdToProjectMap = new ConcurrentDictionary<int, Project>(); 26private readonly ConcurrentDictionary<string, string> _taskToAssemblyMap = new ConcurrentDictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ObjectModel\Project.cs (1)
29private readonly ConcurrentDictionary<string, Target> _targetNameToTargetMap = new ConcurrentDictionary<string, Target>(StringComparer.OrdinalIgnoreCase);
xunit.assert (6)
DictionaryAsserts.cs (2)
119 ConcurrentDictionary<TKey, TValue> collection) 260 ConcurrentDictionary<TKey, TValue> collection)
Sdk\AssertEqualityComparer.cs (2)
140 static readonly ConcurrentDictionary<Type, TypeInfo> cacheOfIComparableOfT = new ConcurrentDictionary<Type, TypeInfo>(); 141 static readonly ConcurrentDictionary<Type, TypeInfo> cacheOfIEquatableOfT = new ConcurrentDictionary<Type, TypeInfo>();
Sdk\AssertHelper.cs (1)
63 static readonly ConcurrentDictionary<Type, Dictionary<string, Func<object?, object?>>> gettersByType = new ConcurrentDictionary<Type, Dictionary<string, Func<object?, object?>>>();
Sdk\CollectionTrackerExtensions.cs (1)
46 static readonly ConcurrentDictionary<Type, MethodInfo> cacheOfAsTrackerByType = new ConcurrentDictionary<Type, MethodInfo>();
xunit.console (3)
common\AssemblyResolution\DependencyContextAssemblyCache.cs (2)
32readonly ConcurrentDictionary<string, Assembly> managedAssemblyCache; 36readonly ConcurrentDictionary<string, string> unmanagedAssemblyCache;
ConsoleRunner.cs (1)
22readonly ConcurrentDictionary<string, ExecutionSummary> completionMessages = new ConcurrentDictionary<string, ExecutionSummary>();