50 references to ConcurrentDictionary
Microsoft.Build (2)
BackEnd\Components\Caching\ResultsCache.cs (1)
252capacity => new ConcurrentDictionary<int, BuildResult>(NativeMethodsShared.GetLogicalCoreCount(), capacity));
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
536_ => new ConcurrentDictionary<SdkResolver, object>(
Microsoft.CodeAnalysis (1)
InternalUtilities\ConcurrentSet.cs (1)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity);
Microsoft.CodeAnalysis.CodeStyle (4)
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 (1)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity);
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));
Microsoft.CodeAnalysis.CSharp (4)
Symbols\Metadata\PE\PEModuleSymbol.cs (2)
68new ConcurrentDictionary<TypeDefinitionHandle, TypeSymbol>(concurrencyLevel: 2, capacity: DefaultTypeMapCapacity); 77new ConcurrentDictionary<TypeReferenceHandle, TypeSymbol>(concurrencyLevel: 2, capacity: DefaultTypeMapCapacity);
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);
Microsoft.CodeAnalysis.Features (5)
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));
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (1)
54_higherPriorityDocumentsNotProcessed = new ConcurrentDictionary<DocumentId, object?>(concurrencyLevel: 2, capacity: 20);
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 (1)
Logging\RoslynLogger.cs (1)
23private readonly ConcurrentDictionary<int, object> _pendingScopes = new(concurrencyLevel: 2, capacity: 10);
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
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);
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
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.VisualBasic (3)
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\TypeSymbol.vb (1)
676map = New ConcurrentDictionary(Of Symbol, Symbol)(concurrencyLevel:=1, capacity:=1)
Microsoft.CodeAnalysis.Workspaces (8)
Diagnostics\HostDiagnosticAnalyzers.cs (1)
61_hostDiagnosticAnalyzersPerLanguageMap = new ConcurrentDictionary<string, ImmutableDictionary<object, ImmutableArray<DiagnosticAnalyzer>>>(concurrencyLevel: 2, capacity: 2);
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\InternalUtilities\ConcurrentSet.cs (1)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity);
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));
Storage\StorageDatabaseLogger.cs (1)
23private readonly ConcurrentDictionary<Type, Exception> _set = new(concurrencyLevel: 2, capacity: 10);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentSet.cs (1)
42_dictionary = new ConcurrentDictionary<T, byte>(DefaultConcurrencyLevel, DefaultCapacity);
Microsoft.Extensions.Telemetry (2)
src\Shared\Memoization\MemoizedFunction.cs (2)
69_values = new(Concurrency, Capacity); 142_values = new(Concurrency, Capacity);
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);
PresentationFramework (2)
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);
System.ComponentModel.TypeConverter (1)
System\ComponentModel\PropertyDescriptor.cs (1)
175_valueChangedHandlers ??= new ConcurrentDictionary<object, EventHandler?>(concurrencyLevel: 1, capacity: 0);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\DsesFilterAndTransform.cs (1)
444new ConcurrentDictionary<Type, TransformSpec?>(1, 8), null);
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\DefaultCaching.cs (1)
15private readonly ConcurrentDictionary<RuntimeTypeHandle, IIUnknownCacheStrategy.TableInfo> _cache = new(concurrencyLevel: 1, capacity: 16);
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.Xaml (1)
System\Xaml\XamlSchemaContext.cs (1)
1176return new ConcurrentDictionary<K, V>(ConcurrencyLevel, DictionaryCapacity);