14 types derived from ConcurrentDictionary
GenerateDocumentationAndConfigFiles (1)
Metrics (1)
Metrics.Legacy (1)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.CodeAnalysis.Analyzers (1)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
Roslyn.Diagnostics.Analyzers (1)
System.Diagnostics.DiagnosticSource (1)
Test.Utilities (1)
Text.Analyzers (1)
786 instantiations of ConcurrentDictionary
Aspire.Dashboard (12)
Aspire.Dashboard.Components.Tests (4)
Controls\ResourceDetailsTests.cs (4)
38builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)]));
122builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)]));
206builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)]));
290builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string, ResourceViewModel>([new KeyValuePair<string, ResourceViewModel> (resource1.Name, resource1)]));
Aspire.Dashboard.Tests (1)
Aspire.Hosting (9)
Aspire.Hosting.Analyzers (1)
Aspire.Hosting.Tests (2)
Aspire.Microsoft.Data.SqlClient (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisConnectionInstrumentation.cs (1)
31= new();
BasicTestApp (1)
DemoConsole (1)
dotnet-svcutil-lib (3)
GenerateDocumentationAndConfigFiles (20)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
HtmlGenerationWebSite (1)
InMemory.FunctionalTests (2)
Interop.FunctionalTests (1)
JwtClientSample (1)
Metrics (19)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
Metrics.Legacy (19)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
Microsoft.AspNetCore.App.Analyzers (2)
Microsoft.AspNetCore.Authorization.Policy (1)
Microsoft.AspNetCore.Components (19)
Microsoft.AspNetCore.Components.Authorization (1)
Microsoft.AspNetCore.Components.Endpoints (8)
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)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.QuickGrid (1)
Microsoft.AspNetCore.Components.Server (5)
Microsoft.AspNetCore.Components.Web (3)
Microsoft.AspNetCore.Components.WebAssembly (5)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Microsoft.AspNetCore.Grpc.Swagger (2)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.Http.Abstractions (4)
Microsoft.AspNetCore.Http.Connections (2)
Microsoft.AspNetCore.Http.Extensions (5)
Microsoft.AspNetCore.Mvc.Abstractions (3)
Microsoft.AspNetCore.Mvc.Core (15)
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
Microsoft.AspNetCore.Mvc.Razor (4)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.RazorPages (2)
Microsoft.AspNetCore.Mvc.TagHelpers (2)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
Microsoft.AspNetCore.Mvc.ViewFeatures (7)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Microsoft.AspNetCore.OpenApi (5)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.Routing (4)
Microsoft.AspNetCore.Routing.Abstractions (2)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Shared.Tests (2)
Microsoft.AspNetCore.SignalR.Client.Core (1)
Microsoft.AspNetCore.SignalR.Core (5)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.Build.Framework (2)
Microsoft.CodeAnalysis (40)
CodeGen\PrivateImplementationDetails.cs (9)
72new ConcurrentDictionary<(ImmutableArray<byte> Data, ushort Alignment), MappedField>(DataAndUShortEqualityComparer.Instance);
76new ConcurrentDictionary<(ImmutableArray<byte> Data, ushort ElementType), CachedArrayField>(DataAndUShortEqualityComparer.Instance);
80new ConcurrentDictionary<(ImmutableArray<ConstantValue> Constants, ushort ElementType), CachedArrayField>(ConstantValueAndUShortEqualityComparer.Instance);
86private readonly ConcurrentDictionary<int, InstrumentationPayloadRootField> _instrumentationPayloadRootFields = new ConcurrentDictionary<int, InstrumentationPayloadRootField>();
91new ConcurrentDictionary<string, Cci.IMethodDefinition>();
95private readonly ConcurrentDictionary<string, Cci.INamespaceTypeDefinition> _synthesizedTopLevelTypes = new ConcurrentDictionary<string, Cci.INamespaceTypeDefinition>();
98private readonly ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference> _dataFieldTypes = new ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference>();
101private readonly ConcurrentDictionary<string, DataSectionStringType> _dataSectionStringLiteralTypes = new ConcurrentDictionary<string, DataSectionStringType>();
104private readonly ConcurrentDictionary<string, string> _dataSectionStringLiteralNames = new ConcurrentDictionary<string, string>();
Emit\NoPia\EmbeddedTypesManager.cs (5)
69public readonly ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType> EmbeddedTypesMap = new ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType>(ReferenceEqualityComparer.Instance);
70public readonly ConcurrentDictionary<TFieldSymbol, TEmbeddedField> EmbeddedFieldsMap = new ConcurrentDictionary<TFieldSymbol, TEmbeddedField>(ReferenceEqualityComparer.Instance);
71public readonly ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod> EmbeddedMethodsMap = new ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod>(ReferenceEqualityComparer.Instance);
72public readonly ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty> EmbeddedPropertiesMap = new ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty>(ReferenceEqualityComparer.Instance);
73public readonly ConcurrentDictionary<TEventSymbol, TEmbeddedEvent> EmbeddedEventsMap = new ConcurrentDictionary<TEventSymbol, TEmbeddedEvent>(ReferenceEqualityComparer.Instance);
Microsoft.CodeAnalysis.Analyzers (24)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
Microsoft.CodeAnalysis.AnalyzerUtilities (22)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
Microsoft.CodeAnalysis.BannedApiAnalyzers (22)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
Microsoft.CodeAnalysis.CodeStyle (13)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.CSharp (30)
Symbols\Source\SourceAssemblySymbol.cs (4)
97private readonly ConcurrentDictionary<FieldSymbol, bool> _unassignedFieldsMap = new ConcurrentDictionary<FieldSymbol, bool>();
2164Interlocked.CompareExchange(ref _optimisticallyGrantedInternalsAccess, new ConcurrentDictionary<AssemblySymbol, bool>(), null);
2307new ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, String>>>(StringComparer.OrdinalIgnoreCase), null);
2334keys = new ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, String>>();
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (3)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures (3)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.Features (17)
Microsoft.CodeAnalysis.LanguageServer (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (21)
Microsoft.CodeAnalysis.PublicApiAnalyzers (22)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Microsoft.CodeAnalysis.Remote.Workspaces (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (19)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
Microsoft.CodeAnalysis.Test.Utilities (3)
Microsoft.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic (23)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (20)
Workspace\Host\Documentation\DocumentationProviderServiceFactory.cs (1)
28new();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
Microsoft.CSharp (1)
Microsoft.DotNet.ArcadeAzureIntegration (1)
Microsoft.DotNet.Build.Tasks.Feed (3)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.XUnitAssert.Tests (4)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Safety (1)
Microsoft.Extensions.AI.Tests (1)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.DependencyInjection (6)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Diagnostics.Testing (2)
Microsoft.Extensions.FileProviders.Physical (3)
Microsoft.Extensions.Http (1)
Microsoft.Extensions.Http.Diagnostics (2)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.Extensions.Localization (3)
Microsoft.Extensions.Logging (1)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.Console (2)
Microsoft.Extensions.Logging.TraceSource (1)
Microsoft.Extensions.ML (1)
Microsoft.Extensions.Options (1)
Microsoft.Extensions.ServiceDiscovery (2)
Microsoft.Extensions.Telemetry (4)
Microsoft.JSInterop (8)
Microsoft.Maui (8)
Microsoft.Maui.Controls (2)
Microsoft.ML.Core (3)
Microsoft.ML.Core.Tests (2)
Microsoft.ML.Data (1)
Microsoft.ML.Ensemble (1)
Microsoft.ML.FastTree (1)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.InternalCodeAnalyzer (2)
Microsoft.ML.Tokenizers (1)
Microsoft.NET.StringTools (2)
Microsoft.VisualStudio.LanguageServices (1)
Microsoft.VisualStudio.LanguageServices.DevKit (2)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
PresentationFramework (3)
Roslyn.Diagnostics.Analyzers (27)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
Shared (2)
SignalRSamples (1)
SocialWeather (1)
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.TypeConverter (4)
System.Data.Common (3)
System.Data.Odbc (3)
System.Diagnostics.DiagnosticSource (3)
System.Private.DataContractSerialization (3)
System.Private.Windows.Core (1)
System.Private.Windows.Core.TestUtilities (1)
System.Reflection.MetadataLoadContext (8)
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.Runtime.InteropServices (1)
System.Runtime.Serialization.Formatters (2)
System.Text.Json (5)
System.Text.RegularExpressions (1)
System.Windows.Forms (3)
System.Xaml (2)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)
Test.Utilities (18)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
TestContentPackage (1)
Text.Analyzers (21)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (1)
39= new();
XmlFileLogger (3)
xunit.assert (4)
xunit.console (3)
1548 references to ConcurrentDictionary
aspire (2)
Aspire.Dashboard (19)
Aspire.Dashboard.Tests (1)
Aspire.Hosting (18)
Dcp\DcpExecutor.cs (3)
84private readonly ConcurrentDictionary<string, (CancellationTokenSource Cancellation, Task Task)> _logStreams = new();
354private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T, CustomResourceSnapshot, CustomResourceSnapshot> snapshotFactory) where T : CustomResource
669private static bool ProcessResourceChange<T>(ConcurrentDictionary<string, T> map, WatchEventType watchEventType, T resource)
Aspire.Hosting.Analyzers (4)
Aspire.Hosting.Tests (2)
Aspire.Microsoft.Data.SqlClient (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
Aspire.StackExchange.Redis (1)
BasicTestApp (1)
DemoConsole (1)
dotnet-svcutil-lib (3)
GenerateDocumentationAndConfigFiles (46)
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,
HtmlGenerationWebSite (1)
InMemory.FunctionalTests (2)
Interop.FunctionalTests (2)
JwtClientSample (1)
Metrics (43)
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,
Metrics.Legacy (43)
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,
Microsoft.AspNetCore.App.Analyzers (5)
Microsoft.AspNetCore.Authorization.Policy (2)
Microsoft.AspNetCore.Components (19)
Microsoft.AspNetCore.Components.Authorization (1)
Microsoft.AspNetCore.Components.Endpoints (13)
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)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.QuickGrid (1)
Microsoft.AspNetCore.Components.Server (5)
Microsoft.AspNetCore.Components.Web (3)
Microsoft.AspNetCore.Components.WebAssembly (5)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Microsoft.AspNetCore.Grpc.Swagger (2)
Microsoft.AspNetCore.HeaderParsing (1)
Microsoft.AspNetCore.Http.Abstractions (7)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Extensions (7)
Microsoft.AspNetCore.Mvc.Abstractions (3)
Microsoft.AspNetCore.Mvc.Core (18)
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (3)
Microsoft.AspNetCore.Mvc.Razor (5)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.Razor.Test (1)
Microsoft.AspNetCore.Mvc.RazorPages (2)
Microsoft.AspNetCore.Mvc.TagHelpers (3)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
Microsoft.AspNetCore.Mvc.ViewFeatures (9)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Microsoft.AspNetCore.OpenApi (5)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.Routing (9)
Microsoft.AspNetCore.Routing.Abstractions (5)
Microsoft.AspNetCore.Server.HttpSys (3)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
Microsoft.AspNetCore.Shared.Tests (5)
Microsoft.AspNetCore.SignalR.Client.Core (1)
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];
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.Build.Framework (3)
Microsoft.CodeAnalysis (64)
CodeGen\PrivateImplementationDetails.cs (9)
71private readonly ConcurrentDictionary<(ImmutableArray<byte> Data, ushort Alignment), MappedField> _mappedFields =
75private readonly ConcurrentDictionary<(ImmutableArray<byte> Data, ushort ElementType), CachedArrayField> _cachedArrayFields =
79private readonly ConcurrentDictionary<(ImmutableArray<ConstantValue> Constants, ushort ElementType), CachedArrayField> _cachedArrayFieldsForConstants =
86private readonly ConcurrentDictionary<int, InstrumentationPayloadRootField> _instrumentationPayloadRootFields = new ConcurrentDictionary<int, InstrumentationPayloadRootField>();
90private readonly ConcurrentDictionary<string, Cci.IMethodDefinition> _synthesizedMethods =
95private readonly ConcurrentDictionary<string, Cci.INamespaceTypeDefinition> _synthesizedTopLevelTypes = new ConcurrentDictionary<string, Cci.INamespaceTypeDefinition>();
98private readonly ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference> _dataFieldTypes = new ConcurrentDictionary<(uint Size, ushort Alignment), Cci.ITypeReference>();
101private readonly ConcurrentDictionary<string, DataSectionStringType> _dataSectionStringLiteralTypes = new ConcurrentDictionary<string, DataSectionStringType>();
104private readonly ConcurrentDictionary<string, string> _dataSectionStringLiteralNames = new ConcurrentDictionary<string, string>();
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);
DiagnosticAnalyzer\AnalyzerDriver.cs (9)
106private ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions>? _lazyPerSymbolAnalyzerActionsCache;
114private ConcurrentDictionary<(INamespaceOrTypeSymbol, DiagnosticAnalyzer), IGroupedAnalyzerActions> PerSymbolAnalyzerActionsCache
231private ConcurrentDictionary<SyntaxTree, bool>? _lazyGeneratedCodeFilesMap;
236private ConcurrentDictionary<SyntaxTree, bool> GeneratedCodeFilesMap
259private ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>>? _lazySuppressedAnalyzersForTreeMap;
264private ConcurrentDictionary<SyntaxTree, ImmutableHashSet<DiagnosticAnalyzer>> SuppressedAnalyzersForTreeMap
289private ConcurrentDictionary<ISymbol, bool>? _lazyIsGeneratedCodeSymbolMap;
294private ConcurrentDictionary<ISymbol, bool> IsGeneratedCodeSymbolMap
306private ConcurrentDictionary<SyntaxTree, bool>? _lazyTreesWithHiddenRegionsMap;
Emit\NoPia\EmbeddedTypesManager.cs (5)
69public readonly ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType> EmbeddedTypesMap = new ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType>(ReferenceEqualityComparer.Instance);
70public readonly ConcurrentDictionary<TFieldSymbol, TEmbeddedField> EmbeddedFieldsMap = new ConcurrentDictionary<TFieldSymbol, TEmbeddedField>(ReferenceEqualityComparer.Instance);
71public readonly ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod> EmbeddedMethodsMap = new ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod>(ReferenceEqualityComparer.Instance);
72public readonly ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty> EmbeddedPropertiesMap = new ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty>(ReferenceEqualityComparer.Instance);
73public readonly ConcurrentDictionary<TEventSymbol, TEmbeddedEvent> EmbeddedEventsMap = new ConcurrentDictionary<TEventSymbol, TEmbeddedEvent>(ReferenceEqualityComparer.Instance);
InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
19public static void Add<K, V>(this ConcurrentDictionary<K, V> dict, K key, V value)
28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument)
45this ConcurrentDictionary<TKey, TValue> dictionary,
Microsoft.CodeAnalysis.Analyzers (57)
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,
Microsoft.CodeAnalysis.AnalyzerUtilities (47)
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,
Microsoft.CodeAnalysis.BannedApiAnalyzers (51)
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,
Microsoft.CodeAnalysis.CodeStyle (46)
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (7)
22private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new();
23private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new();
24private static readonly ConcurrentDictionary<string, PerLanguageOption2<bool>> s_diagnosticIdToFadingOptionMap = new();
28(s_diagnosticIdToLanguageSpecificOptionsMap.TryGetValue(language, out var map) &&
70var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>());
83private static void AddOptionMapping(ConcurrentDictionary<string, ImmutableHashSet<IOption2>> map, string diagnosticId, ImmutableHashSet<IOption2> options)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (12)
51private static readonly ObjectPool<ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>>> s_fieldToUsageLocationPool = new(() => []);
58protected static void AddFieldUsage(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, IFieldSymbol field, SyntaxNode location)
61private static void ClearAndFree(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> multiMap)
94HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken);
109var ineligibleFieldUsageIfOutsideProperty = s_fieldToUsageLocationPool.Allocate();
114var fieldReads = s_fieldToUsageLocationPool.Allocate();
115var fieldWrites = s_fieldToUsageLocationPool.Allocate();
222ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads,
223ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites,
538ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty,
539ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads,
540ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites,
src\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,
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.CSharp (62)
Symbols\Source\SourceAssemblySymbol.cs (11)
97private readonly ConcurrentDictionary<FieldSymbol, bool> _unassignedFieldsMap = new ConcurrentDictionary<FieldSymbol, bool>();
533private ConcurrentDictionary<AssemblySymbol, bool> _optimisticallyGrantedInternalsAccess;
738foreach (var keys in _lazyInternalsVisibleToMap.Values)
2100ConcurrentDictionary<AssemblySymbol, bool> haveGrantedAssemblies = _optimisticallyGrantedInternalsAccess;
2131ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>> result = null;
2195private ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>>> _lazyInternalsVisibleToMap;
2273ref ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>>> lazyInternalsVisibleToMap)
2307new ConcurrentDictionary<string, ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, String>>>(StringComparer.OrdinalIgnoreCase), null);
2327ConcurrentDictionary<ImmutableArray<byte>, Tuple<Location, string>> keys = null;
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (8)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.EditorFeatures (5)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.ExternalAccess.Copilot (3)
Microsoft.CodeAnalysis.Features (61)
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,
src\Analyzers\Core\Analyzers\IDEDiagnosticIdToOptionMappingHelper.cs (7)
22private static readonly ConcurrentDictionary<string, ImmutableHashSet<IOption2>> s_diagnosticIdToOptionMap = new();
23private static readonly ConcurrentDictionary<string, ConcurrentDictionary<string, ImmutableHashSet<IOption2>>> s_diagnosticIdToLanguageSpecificOptionsMap = new();
24private static readonly ConcurrentDictionary<string, PerLanguageOption2<bool>> s_diagnosticIdToFadingOptionMap = new();
28(s_diagnosticIdToLanguageSpecificOptionsMap.TryGetValue(language, out var map) &&
70var map = s_diagnosticIdToLanguageSpecificOptionsMap.GetOrAdd(language, _ => new ConcurrentDictionary<string, ImmutableHashSet<IOption2>>());
83private static void AddOptionMapping(ConcurrentDictionary<string, ImmutableHashSet<IOption2>> map, string diagnosticId, ImmutableHashSet<IOption2> options)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (12)
51private static readonly ObjectPool<ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>>> s_fieldToUsageLocationPool = new(() => []);
58protected static void AddFieldUsage(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites, IFieldSymbol field, SyntaxNode location)
61private static void ClearAndFree(ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> multiMap)
94HashSet<string> fieldNames, ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty, SemanticModel semanticModel, SyntaxNode codeBlock, CancellationToken cancellationToken);
109var ineligibleFieldUsageIfOutsideProperty = s_fieldToUsageLocationPool.Allocate();
114var fieldReads = s_fieldToUsageLocationPool.Allocate();
115var fieldWrites = s_fieldToUsageLocationPool.Allocate();
222ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads,
223ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites,
538ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> ineligibleFieldUsageIfOutsideProperty,
539ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldReads,
540ConcurrentDictionary<IFieldSymbol, ConcurrentSet<SyntaxNode>> fieldWrites,
Microsoft.CodeAnalysis.LanguageServer (5)
Microsoft.CodeAnalysis.LanguageServer.Protocol (11)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (4)
195var concurrentlyExecutingTasks = new ConcurrentDictionary<Task, CancellationTokenSource>();
303/// Reflection invokes <see cref="ProcessQueueCoreAsync{TRequest, TResponse}(IQueueItem{TRequestContext}, IMethodHandler, RequestHandlerMetadata, ConcurrentDictionary{Task, CancellationTokenSource}, CancellationTokenSource?, CancellationToken)"/>
311ConcurrentDictionary<Task, CancellationTokenSource> concurrentlyExecutingTasks,
333ConcurrentDictionary<Task, CancellationTokenSource> concurrentlyExecutingTasks,
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (47)
Microsoft.CodeAnalysis.PublicApiAnalyzers (46)
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,
Microsoft.CodeAnalysis.Remote.ServiceHub (5)
Microsoft.CodeAnalysis.Remote.Workspaces (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (43)
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,
Microsoft.CodeAnalysis.Test.Utilities (3)
Microsoft.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic (31)
Symbols\Source\SourceAssemblySymbol.vb (7)
75Private _lazyInternalsVisibleToMap As ConcurrentDictionary(Of String, ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)))
869Private _optimisticallyGrantedInternalsAccess As ConcurrentDictionary(Of AssemblySymbol, Boolean)
875Dim haveGrantedAssemblies As ConcurrentDictionary(Of AssemblySymbol, Boolean) = _optimisticallyGrantedInternalsAccess
909Dim result As ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)) = Nothing
979New ConcurrentDictionary(Of String, ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)))(StringComparer.OrdinalIgnoreCase), Nothing)
998Dim keys As ConcurrentDictionary(Of ImmutableArray(Of Byte), Tuple(Of Location, String)) = Nothing
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
Microsoft.CodeAnalysis.Workspaces (43)
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,
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (7)
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,
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (6)
Microsoft.CommonLanguageServerProtocol.Framework.Package (6)
RequestExecutionQueue.cs (4)
195var concurrentlyExecutingTasks = new ConcurrentDictionary<Task, CancellationTokenSource>();
303/// Reflection invokes <see cref="ProcessQueueCoreAsync{TRequest, TResponse}(IQueueItem{TRequestContext}, IMethodHandler, RequestHandlerMetadata, ConcurrentDictionary{Task, CancellationTokenSource}, CancellationTokenSource?, CancellationToken)"/>
311ConcurrentDictionary<Task, CancellationTokenSource> concurrentlyExecutingTasks,
333ConcurrentDictionary<Task, CancellationTokenSource> concurrentlyExecutingTasks,
Microsoft.CSharp (1)
Microsoft.DotNet.ArcadeAzureIntegration (1)
Microsoft.DotNet.Build.Tasks.Feed (3)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.XUnitAssert.Tests (4)
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Safety (1)
Microsoft.Extensions.AI.Tests (1)
Microsoft.Extensions.Caching.Hybrid (3)
Microsoft.Extensions.Caching.Memory (3)
Microsoft.Extensions.DependencyInjection (6)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
Microsoft.Extensions.Diagnostics.Testing (2)
Microsoft.Extensions.FileProviders.Physical (5)
Microsoft.Extensions.Http (1)
Microsoft.Extensions.Http.Diagnostics (2)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.Extensions.Localization (4)
Microsoft.Extensions.Logging (1)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.Console (3)
Microsoft.Extensions.Logging.TraceSource (1)
Microsoft.Extensions.ML (1)
Microsoft.Extensions.Options (1)
Microsoft.Extensions.ServiceDiscovery (2)
Microsoft.Extensions.Telemetry (4)
Microsoft.JSInterop (8)
Microsoft.Maui (8)
Microsoft.Maui.Controls (2)
Microsoft.ML.Core (3)
Microsoft.ML.Core.Tests (2)
Microsoft.ML.Data (1)
Microsoft.ML.Ensemble (7)
Microsoft.ML.FastTree (1)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.InternalCodeAnalyzer (4)
Microsoft.ML.Tokenizers (1)
Microsoft.NET.StringTools (3)
Microsoft.VisualStudio.LanguageServices (7)
Microsoft.VisualStudio.LanguageServices.DevKit (4)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
mscorlib (1)
netstandard (1)
PresentationFramework (5)
Roslyn.Diagnostics.Analyzers (57)
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (5)
50var knownNonDefaultableTypes = new ConcurrentDictionary<ITypeSymbol, bool>();
56private static void AnalyzeField(SymbolAnalysisContext context, INamedTypeSymbol nonDefaultableAttribute, ConcurrentDictionary<ITypeSymbol, bool> knownNonDefaultableTypes)
61private static void AnalyzeNamedType(SymbolAnalysisContext context, INamedTypeSymbol nonDefaultableAttribute, ConcurrentDictionary<ITypeSymbol, bool> knownNonDefaultableTypes)
76private static void AnalyzeField(SymbolAnalysisContext originalContext, IFieldSymbol field, INamedTypeSymbol nonDefaultableAttribute, ConcurrentDictionary<ITypeSymbol, bool> knownNonDefaultableTypes)
110private static bool IsDefaultable(ITypeSymbol type, INamedTypeSymbol nonDefaultableAttribute, ConcurrentDictionary<ITypeSymbol, bool> knownNonDefaultableTypes)
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,
Shared (2)
SignalRSamples (1)
SocialWeather (1)
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>
862private sealed class Enumerator(ConcurrentDictionary<TKey, TValue> dictionary) : IEnumerator<KeyValuePair<TKey, TValue>>
870private readonly ConcurrentDictionary<TKey, TValue> _dictionary = dictionary;
872private ConcurrentDictionary<TKey, TValue>.VolatileNode[]? _buckets;
901ConcurrentDictionary<TKey, TValue>.VolatileNode[]? buckets = _buckets ??= _dictionary._tables._buckets;
1099/// <see cref="ConcurrentDictionary{TKey, TValue}" /> and to provide hash values for the keys.
1102/// <see cref="ConcurrentDictionary{TKey, TValue}" /> requires an equality implementation to determine
1127/// cref="ConcurrentDictionary{TKey,TValue}"/>.
1132/// cref="ConcurrentDictionary{TKey,TValue}"/>.</value>
1134/// cref="ConcurrentDictionary{TKey,TValue}"/>
1168/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/>
1208/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/>
1250/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/>
1282/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key does not already
1283/// exist, or updates a key/value pair in the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key
1358/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key does not already
1359/// exist, or updates a key/value pair in the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key
1431/// Adds a key/value pair to the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key does not already
1432/// exist, or updates a key/value pair in the <see cref="ConcurrentDictionary{TKey,TValue}"/> if the key
1497/// Gets a value that indicates whether the <see cref="ConcurrentDictionary{TKey,TValue}"/> is empty.
1499/// <value>true if the <see cref="ConcurrentDictionary{TKey,TValue}"/> is empty; otherwise,
1544/// cref="ConcurrentDictionary{TKey,TValue}"/>.</exception>
1568/// Gets a snapshot containing all the keys in the <see cref="ConcurrentDictionary{TKey,TValue}"/>.
1570/// <remarks>The property returns a copy of all the keys. It's not kept in sync with <see cref="ConcurrentDictionary{TKey,TValue}"/>.</remarks>
1577/// Gets a snapshot containing all the values in the <see cref="ConcurrentDictionary{TKey,TValue}"/>.
1579/// <remarks>The property returns a copy of all the values. It's not kept in sync with <see cref="ConcurrentDictionary{TKey,TValue}"/>.</remarks>
1594/// cref="ConcurrentDictionary{TKey,TValue}"/>.</param>
1598/// cref="ConcurrentDictionary{TKey,TValue}"/>
1601/// <see cref="ConcurrentDictionary{TKey,TValue}"/></exception>
1622/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always returns
1632/// cref="ConcurrentDictionary{TKey,TValue}"/>.</param>
1645/// cref="ConcurrentDictionary{TKey,TValue}"/>.</summary>
1646/// <returns>An enumerator for the <see cref="ConcurrentDictionary{TKey,TValue}"/>.</returns>
1653IEnumerator IEnumerable.GetEnumerator() => ((ConcurrentDictionary<TKey, TValue>)this).GetEnumerator();
1670/// name="TKey"/> of the <see cref="ConcurrentDictionary{TKey,TValue}"/>. -or-
1672/// the type of values in the <see cref="ConcurrentDictionary{TKey,TValue}"/>.
1674/// cref="ConcurrentDictionary{TKey,TValue}"/>.
1725/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always
1735/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always
1782/// cref="ConcurrentDictionary{TKey,TValue}"/>.</value>
1788/// cref="ConcurrentDictionary{TKey,TValue}"/>. -or- A value is being
1791/// cref="ConcurrentDictionary{TKey,TValue}"/>
1823((ConcurrentDictionary<TKey, TValue>)this)[(TKey)key] = (TValue)value!;
1919/// cref="ConcurrentDictionary{TKey,TValue}"/>, this property always
2299internal DictionaryEnumerator(ConcurrentDictionary<TKey, TValue> dictionary) => _enumerator = dictionary.GetEnumerator();
2316private static bool IsCompatibleKey<TAlternateKey>(ConcurrentDictionary<TKey, TValue>.Tables tables)
2325private static IAlternateEqualityComparer<TAlternateKey, TKey> GetAlternateComparer<TAlternateKey>(ConcurrentDictionary<TKey, TValue>.Tables tables)
2333/// Provides a type that may be used to perform operations on a <see cref="ConcurrentDictionary{TKey, TValue}"/>
2340internal AlternateLookup(ConcurrentDictionary<TKey, TValue> dictionary)
2347/// <summary>Gets the <see cref="ConcurrentDictionary{TKey, TValue}"/> against which this instance performs operations.</summary>
2348public ConcurrentDictionary<TKey, TValue> Dictionary { get; }
2364/// <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.TypeConverter (4)
System.Data.Common (3)
System.Data.Odbc (3)
System.Diagnostics.DiagnosticSource (12)
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.Private.DataContractSerialization (3)
System.Private.Windows.Core (1)
System.Private.Windows.Core.TestUtilities (1)
System.Reflection.MetadataLoadContext (8)
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.Runtime.InteropServices (1)
System.Runtime.Serialization.Formatters (2)
System.Text.Json (6)
System.Text.RegularExpressions (1)
System.Windows.Forms (5)
System.Xaml (34)
System\Xaml\XamlSchemaContext.cs (26)
136private ConcurrentDictionary<string, string> _preferredPrefixes;
221ConcurrentDictionary<string, string> preferredPrefixes = CreateDictionary<string, string>();
231private void UpdatePreferredPrefixes(XmlNsInfo newNamespaces, ConcurrentDictionary<string, string> prefixDict)
366private ConcurrentDictionary<string, string> _xmlNsCompatDict;
369private ConcurrentDictionary<string, string> XmlNsCompatDict
486private ConcurrentDictionary<Type, XamlType> _masterTypeList;
487private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> _masterValueConverterList;
488private ConcurrentDictionary<ReferenceEqualityTuple<MemberInfo, MemberInfo>, XamlMember> _masterMemberList;
489private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > _masterBracketCharacterCache;
498private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > MasterBracketCharacterCache
509private ConcurrentDictionary<Type, XamlType> MasterTypeList
520private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> MasterValueConverterList
531private ConcurrentDictionary<ReferenceEqualityTuple<MemberInfo, MemberInfo>, XamlMember> MasterMemberList
708private ConcurrentDictionary<string, XamlNamespace> _namespaceByUriList;
709private ConcurrentDictionary<Assembly, XmlNsInfo> _xmlnsInfo;
710private ConcurrentDictionary<WeakRefKey, XmlNsInfo> _xmlnsInfoForDynamicAssemblies;
711private ConcurrentDictionary<Assembly, XmlNsInfo> _xmlnsInfoForUnreferencedAssemblies;
726private ConcurrentDictionary<Assembly, XmlNsInfo> XmlnsInfo
737private ConcurrentDictionary<WeakRefKey, XmlNsInfo> XmlnsInfoForDynamicAssemblies
749private ConcurrentDictionary<string, XamlNamespace> NamespaceByUriList
763private ConcurrentDictionary<Assembly, XmlNsInfo> XmlnsInfoForUnreferencedAssemblies
1038ConcurrentDictionary<string, IList<string>> assemblyMappings = nsInfo.ClrToXmlNs;
1205internal static ConcurrentDictionary<K, V> CreateDictionary<K, V>()
1210internal static ConcurrentDictionary<K, V> CreateDictionary<K, V>(IEqualityComparer<K> comparer)
1215internal static V TryAdd<K, V>(ConcurrentDictionary<K, V> dictionary, K key, V value)
1227internal static V TryUpdate<K, V>(ConcurrentDictionary<K, V> dictionary, K key, V value, V comparand)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)
Test.Utilities (42)
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,
TestContentPackage (1)
Text.Analyzers (47)
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,
XmlFileLogger (3)
xunit.assert (6)
xunit.console (3)