58 types derived from Dictionary
Aspire.Hosting (1)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
78private class FileTree : Dictionary<string, FileTree>
ConfigurationSchemaGenerator.Tests (1)
VariousTypes.cs (1)
136public sealed class TreeElement : Dictionary<string, TreeElement>;
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (1)
914internal class MessageHeaderDescriptionTable : Dictionary<QName, MessageHeaderDescription>
GenerateDocumentationAndConfigFiles (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Metrics (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Metrics.Legacy (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelMetadataTest.cs (1)
825private class DerivedDictionary : Dictionary<string, int>
Microsoft.AspNetCore.Mvc.Core (1)
SerializableError.cs (1)
14public sealed class SerializableError : Dictionary<string, object>
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\Metadata\DefaultModelMetadataTest.cs (1)
284private class DerivedDictionary : Dictionary<string, int>
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
SimpleValueProvider.cs (1)
8public sealed class SimpleValueProvider : Dictionary<string, object>, IValueProvider
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
DictionaryModelBinderIntegrationTest.cs (2)
1508private class ClosedGenericDictionary : Dictionary<string, string> 1512private class ClosedGenericKeyDictionary<TValue> : Dictionary<string, TValue>
Microsoft.AspNetCore.Razor.Runtime.Test (4)
Runtime\TagHelpers\TestTagHelpers\TagHelperDescriptorFactoryTagHelpers.cs (4)
396public class DictionarySubclass : Dictionary<string, string> 400public class DictionaryWithoutParameterlessConstructor : Dictionary<string, string> 408public class DictionaryOfIntSubclass : Dictionary<int, string> 412public class GenericDictionarySubclass<TValue> : Dictionary<string, TValue>
Microsoft.AspNetCore.Routing (1)
DecisionTree\DecisionTreeBuilder.cs (1)
216private sealed class Criterion : Dictionary<DecisionCriterionValue, List<ItemDescriptor<TItem>>>
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\PropertyDictionary.cs (1)
9internal class PropertyDictionary : Dictionary<string, object?>
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\PropertyDictionary.cs (1)
9internal class PropertyDictionary : Dictionary<string, object?>
Microsoft.CodeAnalysis (3)
Desktop\DesktopAssemblyIdentityComparer.Fx.cs (2)
20private sealed class FrameworkAssemblyDictionary : Dictionary<string, FrameworkAssemblyDictionary.Value> 48private sealed class FrameworkRetargetingDictionary : Dictionary<FrameworkRetargetingDictionary.Key, List<FrameworkRetargetingDictionary.Value>>
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.Analyzers (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.CodeStyle (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.Collections.Package (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.CSharp (1)
Binder\Binder.RangeVariableMap.cs (1)
26private class RangeVariableMap : Dictionary<RangeVariableSymbol, ImmutableArray<string>>
Microsoft.CodeAnalysis.Debugging.Package (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.Extensions.Package (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.PooledObjects.Package (1)
PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.Threading.Package (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.Workspaces (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Microsoft.DotNet.SignCheckLibrary (1)
Verification\Jar\JarAttributes.cs (1)
13public class JarAttributes : Dictionary<string, string>
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Languages\Language.cs (1)
15public class Templates : Dictionary<string, Template>
Microsoft.Maui (1)
PersistedState.cs (1)
5 public class PersistedState : Dictionary<string, string?>, IPersistedState
Microsoft.Maui.Controls (1)
Shell\ShellRouteParameters.cs (1)
9 internal class ShellRouteParameters : Dictionary<string, object>
Microsoft.Maui.Graphics (1)
Text\TextAttributes.cs (1)
5 public class TextAttributes : Dictionary<TextAttribute, string>, ITextAttributes
Microsoft.ML.FastTree (1)
TreeEnsemble\InternalTreeEnsemble.cs (1)
382internal class FeatureToGainMap : Dictionary<int, double>
Microsoft.ML.GenAI.Core (1)
Utility\Cache.cs (1)
26public class DynamicKVCache : Dictionary<int, (Tensor, Tensor)>, IKVCache
Microsoft.ML.Tokenizers (1)
Utils\StringSpanOrdinalKey.cs (1)
129internal sealed class Vocabulary : Dictionary<StringSpanOrdinalKey, (int, string)>;
PresentationFramework (2)
MS\Internal\Data\CommitManager.cs (1)
150private class Set<T> : Dictionary<T, object>, IEnumerable<T>
MS\Internal\Data\LiveShapingList.cs (1)
683private class DPFromPath : Dictionary<String, DependencyProperty>
Roslyn.Diagnostics.Analyzers (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\ServiceContainer.cs (1)
248private sealed class ServiceCollection<T> : Dictionary<Type, T>
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (1)
480private sealed class ManyElementAsyncLocalValueMap : Dictionary<IAsyncLocal, object?>, IAsyncLocalValueMap
System.Private.Xml (2)
System\Xml\Serialization\Compilation.cs (1)
660internal sealed class TempMethodDictionary : Dictionary<string, TempMethod>
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (1)
54internal sealed class Graph<V> : Dictionary<V, List<V>?>
System.Windows.Forms (1)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObjectCollection.cs (1)
10internal class ComboBoxItemAccessibleObjectCollection : Dictionary<Entry, ComboBoxItemAccessibleObject>
System.Xaml (1)
System\Xaml\Schema\TypeReflector.cs (1)
1134internal class ThreadSafeDictionary<K, V> : Dictionary<K, V> where V : class
System.Xaml.Tests (1)
System\Xaml\XamlTypeTests.cs (1)
2746private class CustomNameScopeDictionary : Dictionary<string, object>, INameScopeDictionary
Test.Utilities (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
Text.Analyzers (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
7264 instantiations of Dictionary
AnalyzerRunner (5)
AnalyzerRunnerHelper.cs (1)
14var properties = new Dictionary<string, string>
DiagnosticAnalyzerRunner.cs (3)
103var projectPerformance = new Dictionary<ProjectId, double>(); 104var documentPerformance = new Dictionary<DocumentId, DocumentAnalyzerPerformance>(); 414var telemetryInfoDictionary = new Dictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo>();
Program.cs (1)
147var diagnosticStatistics = new Dictionary<string, (string description, DiagnosticSeverity severity, int count)>();
aspire (9)
Commands\ExecCommand.cs (1)
90var env = new Dictionary<string, string>();
Commands\PublishCommandBase.cs (2)
96var env = new Dictionary<string, string>(); 248var steps = new Dictionary<string, StepInfo>();
Commands\RunCommand.cs (2)
89var env = new Dictionary<string, string>(); 325private readonly Dictionary<string, RpcResourceState> _resourceStates = new();
Configuration\ConfigurationService.cs (1)
117var allConfig = new Dictionary<string, string>();
DotNetCliRunner.cs (3)
211finalEnv = new Dictionary<string, string>(env ?? new Dictionary<string, string>()) 594var env = new Dictionary<string, string>
Aspire.Azure.AI.OpenAI.Tests (2)
AspireAzureAIOpenAIExtensionsTests.cs (2)
205builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 231builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Azure.Messaging.EventHubs.Tests (2)
tests\Aspire.Azure.Security.KeyVault.Tests\MockTransport.cs (2)
78private readonly Dictionary<string, List<string>> _headers = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase); 134private readonly Dictionary<string, List<string>> _headers = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
AspireAzureEFPostgreSqlExtensionsTests.cs (2)
317builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 347builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Azure.Security.KeyVault.Tests (2)
MockTransport.cs (2)
78private readonly Dictionary<string, List<string>> _headers = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase); 134private readonly Dictionary<string, List<string>> _headers = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
Aspire.Cli.Tests (10)
Commands\PublishCommandPromptingIntegrationTests.cs (1)
555private readonly Dictionary<string, TaskCompletionSource> _promptCompletionSources = new();
DotNet\DotNetCliRunnerTests.cs (5)
50env: new Dictionary<string, string>(), 103configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 165env: new Dictionary<string, string>(), 209env: new Dictionary<string, string>(), 248var existingEnv = new Dictionary<string, string>
Hosting\CliOrphanDetectorTests.cs (2)
36.AddInMemoryCollection(new Dictionary<string, string?> { { "ASPIRE_CLI_PID", "1111" } }) 56.AddInMemoryCollection(new Dictionary<string, string?> { { "ASPIRE_CLI_PID", "1111" } })
Projects\ProjectLocatorTests.cs (1)
333return Task.FromResult(new Dictionary<string, string>());
Utils\CliTestHelper.cs (1)
36var configurationValues = new Dictionary<string, string?>();
Aspire.Confluent.Kafka (1)
MetricsService.cs (1)
15private readonly Dictionary<string, Statistics> _state = new();
Aspire.Dashboard (31)
Authentication\FrontendCompositeAuthenticationHandler.cs (2)
27items: new Dictionary<string, string?>(), 28parameters: new Dictionary<string, object?> { [AspirePolicyEvaluator.SuppressChallengeKey] = true }));
Components\Controls\Chart\ChartBase.cs (4)
63private Dictionary<SpanKey, OtlpSpan> _currentCache = new Dictionary<SpanKey, OtlpSpan>(); 64private Dictionary<SpanKey, OtlpSpan> _newCache = new Dictionary<SpanKey, OtlpSpan>(); 127var traces = new Dictionary<int, ChartTrace> 514_newCache = new Dictionary<SpanKey, OtlpSpan>();
Components\Controls\Chart\PlotlyChart.razor.cs (1)
117var exemplarGroups = new Dictionary<ExemplarGroupKey, List<ChartExemplar>>();
Components\Dialogs\InteractionsInputDialog.razor.cs (1)
34_elementRefs = new();
Components\Layout\AspirePageContentLayout.razor.cs (1)
55public Dictionary<string, Func<Task>> DialogCloseListeners { get; } = new();
Components\Pages\ComponentTelemetryContext.cs (1)
113return new Dictionary<string, AspireTelemetryProperty>
Components\Pages\TraceDetail.razor.cs (1)
288var traceCache = new Dictionary<string, OtlpTrace>(StringComparer.Ordinal);
DashboardWebApplication.cs (1)
506var initialValues = new Dictionary<string, string?>();
Extensions\FluentUIExtensions.cs (1)
15var attributes = new Dictionary<string, object>(StringComparers.HtmlAttribute)
Model\DashboardCommandExecutor.cs (1)
44new Dictionary<string, AspireTelemetryProperty>
Model\ResourceMenuItems.cs (1)
151AdditionalAttributes = new Dictionary<string, object>
Model\TraceHelpers.cs (1)
48var appFirstTimes = new Dictionary<OtlpApplication, OrderedApplication>();
Otlp\Model\OtlpApplication.cs (2)
33private readonly Dictionary<string, OtlpScope> _meters = new(); 34private readonly Dictionary<OtlpInstrumentKey, OtlpInstrument> _instruments = new();
Otlp\Model\OtlpInstrument.cs (2)
39public Dictionary<ReadOnlyMemory<KeyValuePair<string, string>>, DimensionScope> Dimensions { get; } = new(ScopeAttributesComparer.Instance); 40public Dictionary<string, List<string?>> KnownAttributeValues { get; } = new();
Otlp\Storage\TelemetryRepository.cs (7)
43private readonly Dictionary<string, OtlpScope> _logScopes = new(); 47private readonly Dictionary<ApplicationKey, int> _applicationUnviewedErrorLogs = new(); 50private readonly Dictionary<string, OtlpScope> _traceScopes = new(); 709var attributesValues = new Dictionary<string, int>(StringComparers.OtlpAttribute); 745var attributesValues = new Dictionary<string, int>(StringComparers.OtlpAttribute); 927var updatedTraces = new Dictionary<ReadOnlyMemory<byte>, OtlpTrace>(); 1276var allKnownAttributes = new Dictionary<string, List<string?>>();
ServiceClient\DashboardClient.cs (1)
45private readonly Dictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName);
Telemetry\DashboardTelemetryService.cs (1)
25_defaultProperties = new Dictionary<string, AspireTelemetryProperty>
Telemetry\TelemetryLoggerProvider.cs (1)
57new Dictionary<string, AspireTelemetryProperty>
Utils\GlobalizationHelpers.cs (1)
42var dict = new Dictionary<string, List<CultureInfo>>(StringComparers.CultureName);
Aspire.Dashboard.Components.Tests (3)
Pages\ResourcesTests.cs (3)
236new Dictionary<string, bool> { { "Type1", true }, { "Type2", false } }, 238new Dictionary<string, bool> { { "Running", true }, { "Finished", false } }, 240new Dictionary<string, bool> { { "Healthy", true }, { "Unhealthy", false } },
Aspire.Dashboard.Tests (21)
Integration\IntegrationTestHelpers.cs (1)
59var initialData = new Dictionary<string, string?>
Integration\MockOpenIdAuthority.cs (1)
95Claims = new Dictionary<string, object>
Integration\Playwright\Infrastructure\DashboardServerFixture.cs (1)
27Configuration = new Dictionary<string, string?>
Integration\StartupTests.cs (2)
163.AddInMemoryCollection(new Dictionary<string, string?> { [dashboardFileConfigDirectoryNameKey] = fileConfigDirectory.FullName }) 198.AddInMemoryCollection(new Dictionary<string, string?> { [DashboardConfigNames.DashboardFileConfigDirectoryName.ConfigKey] = fileConfigDirectory.FullName })
Model\ApplicationsSelectHelpersTests.cs (1)
110var apps = new Dictionary<string, OtlpApplication>();
Model\ResourceGraphMapperTests.cs (4)
21var resources = new Dictionary<string, ResourceViewModel> 42var resources = new Dictionary<string, ResourceViewModel> 63var resources = new Dictionary<string, ResourceViewModel> 81var resources = new Dictionary<string, ResourceViewModel>
Model\ResourceSourceViewModelTests.cs (1)
18var properties = new Dictionary<string, ResourcePropertyViewModel>();
Model\ResourceStateViewModelTests.cs (1)
72var propertiesDictionary = new Dictionary<string, ResourcePropertyViewModel>();
ResourceOutgoingPeerResolverTests.cs (9)
29var resources = new Dictionary<string, ResourceViewModel> 42var resources = new Dictionary<string, ResourceViewModel> 55var resources = new Dictionary<string, ResourceViewModel> 68var resources = new Dictionary<string, ResourceViewModel> 82var resources = new Dictionary<string, ResourceViewModel> 96var resources = new Dictionary<string, ResourceViewModel> 110var resources = new Dictionary<string, ResourceViewModel> 189var resources = new Dictionary<string, ResourceViewModel> 203var resources = new Dictionary<string, ResourceViewModel>
Aspire.EndToEnd.Tests (4)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
35public Dictionary<string, ProjectInfo> InfoTable { get; private set; } = new(capacity: 0);
tests\Shared\TemplatesTesting\BuildEnvironment.cs (2)
167EnvVars = new Dictionary<string, string>(); 275EnvVars = new Dictionary<string, string>(otherBuildEnvironment.EnvVars);
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
21public Dictionary<string, string> Environment { get; } = new Dictionary<string, string>();
Aspire.Hosting (26)
ApplicationModel\EnvironmentCallbackContext.cs (1)
35public Dictionary<string, object> EnvironmentVariables { get; } = environmentVariables ?? new();
ApplicationModel\ProjectResource.cs (1)
17internal Dictionary<EndpointAnnotation, string> KestrelEndpointAnnotationHosts { get; } = new();
ApplicationModel\ResourceExtensions.cs (2)
190var env = new Dictionary<string, string>(); 344var config = new Dictionary<string, object>();
ApplicationModel\ResourceNotificationService.cs (1)
474var versionsSeen = new Dictionary<string, long>();
Dashboard\DashboardLifecycleHook.cs (1)
365var dashboardResourceTasks = new Dictionary<string, Task>();
Dcp\DcpExecutor.cs (1)
271var resourceLogState = new Dictionary<string, (bool logsAvailable, bool hasSubscribers)>();
Dcp\DcpHost.cs (1)
268var loggerCache = new Dictionary<int, ILogger>();
Dcp\Model\ExecutableReplicaSet.cs (2)
28Annotations = new Dictionary<string, string>(); 38Annotations = new Dictionary<string, string>();
Dcp\Model\ModelCommon.cs (3)
44Metadata.Annotations = new Dictionary<string, string>(); 54Metadata.Annotations = new Dictionary<string, string>(); 64Metadata.Annotations = new Dictionary<string, string>();
Dcp\Model\Schema.cs (1)
8private readonly Dictionary<Type, (string Kind, string Resource)> _byType = new();
Dcp\Process\ProcessSpec.cs (1)
10public IDictionary<string, string> EnvironmentVariables { get; init; } = new Dictionary<string, string>();
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (1)
38remappedUrls ??= new();
DistributedApplicationBuilder.cs (7)
201_innerBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 227_innerBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 310new Dictionary<string, string?> 324new Dictionary<string, string?> 335new Dictionary<string, string?> 499var switchMappings = new Dictionary<string, string>() 516var switchMappings = new Dictionary<string, string>()
Health\ResourceHealthCheckService.cs (1)
16private readonly Dictionary<string, ResourceMonitorState> _resourceMonitoringStates = new();
Publishing\ManifestPublishingContext.cs (1)
488var env = new Dictionary<string, (object, string)>();
src\Shared\SecretsStore.cs (1)
107new Dictionary<string, string?>
Aspire.Hosting.Azure (5)
AzurePublishingContext.cs (2)
139var moduleMap = new Dictionary<AzureBicepResource, ModuleImport>(); 274var outputs = new Dictionary<string, BicepOutputReference>();
AzureResourcePreparer.cs (2)
106var globalRoleAssignments = new Dictionary<AzureProvisioningResource, HashSet<RoleDefinition>>(); 246var result = new Dictionary<AzureProvisioningResource, IEnumerable<RoleDefinition>>();
src\Aspire.Hosting\Dcp\Process\ProcessSpec.cs (1)
10public IDictionary<string, string> EnvironmentVariables { get; init; } = new Dictionary<string, string>();
Aspire.Hosting.Azure.AppContainers (3)
AzureContainerAppExtensions.cs (1)
168var managedStorages = new Dictionary<string, ContainerAppManagedEnvironmentStorage>();
ContainerAppContext.cs (1)
239var endpointIndexMap = new Dictionary<string, int>();
ContainerAppEnvironmentContext.cs (1)
21private readonly Dictionary<IResource, ContainerAppContext> _containerApps = new(new ResourceNameComparer());
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceEnvironmentContext.cs (1)
21private readonly Dictionary<IResource, AzureAppServiceWebsiteContext> _appServices = new(new ResourceNameComparer());
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresFlexibleServerResource.cs (1)
22private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
20private readonly Dictionary<string, AzureSqlDatabaseResource> _databases = new Dictionary<string, AzureSqlDatabaseResource>(StringComparers.ResourceName);
Aspire.Hosting.Azure.Tests (39)
AzureCosmosDBEmulatorFunctionalTests.cs (2)
179hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 227hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
AzureCosmosDBExtensionsTests.cs (3)
151var target = new Dictionary<string, object>(); 339var secrets = new Dictionary<string, string> 443var secrets = new Dictionary<string, string>
AzureEnvironmentResourceTests.cs (1)
224public IDictionary<string, object?> Parameters { get; } = new Dictionary<string, object?>();
AzureEventHubsExtensionsTests.cs (1)
560var target = new Dictionary<string, object>();
AzureFunctionsTests.cs (7)
427Profiles = new Dictionary<string, LaunchProfile> 444Profiles = new Dictionary<string, LaunchProfile> 461Profiles = new Dictionary<string, LaunchProfile> 478Profiles = new Dictionary<string, LaunchProfile> 494Profiles = new Dictionary<string, LaunchProfile> 511Profiles = new Dictionary<string, LaunchProfile> 528Profiles = new Dictionary<string, LaunchProfile>
AzureServiceBusExtensionsTests.cs (1)
660var target = new Dictionary<string, object>();
BicepUtilitiesTests.cs (2)
440configurationBuilder.AddInMemoryCollection(new Dictionary<string, string?> 467configurationBuilder.AddInMemoryCollection(new Dictionary<string, string?>
PublicApiTests\FunctionsPublicApiTests.cs (1)
102Profiles = new Dictionary<string, LaunchProfile>
ResourceWithAzureFunctionsConfigTests.cs (21)
110var target = new Dictionary<string, object>(); 128var target = new Dictionary<string, object>(); 149var target = new Dictionary<string, object>(); 166var target = new Dictionary<string, object>(); 183var target = new Dictionary<string, object>(); 199var target = new Dictionary<string, object>(); 215var target = new Dictionary<string, object>(); 231var target = new Dictionary<string, object>(); 248var target = new Dictionary<string, object>(); 273var target = new Dictionary<string, object>(); 301var target = new Dictionary<string, object>(); 323var target = new Dictionary<string, object>(); 343var target = new Dictionary<string, object>(); 363var target = new Dictionary<string, object>(); 383var target = new Dictionary<string, object>(); 400var target = new Dictionary<string, object>(); 419var target = new Dictionary<string, object>(); 439var target = new Dictionary<string, object>(); 458var target = new Dictionary<string, object>(); 479var target = new Dictionary<string, object>(); 501var target = new Dictionary<string, object>();
Aspire.Hosting.Azure.WebPubSub (1)
AzureWebPubSubResource.cs (1)
18internal Dictionary<string, AzureWebPubSubHubResource> Hubs { get; } = new(StringComparer.OrdinalIgnoreCase);
Aspire.Hosting.Docker (2)
DockerComposeEnvironmentResource.cs (1)
53internal Dictionary<IResource, DockerComposeServiceResource> ResourceMapping { get; } = new(new ResourceNameComparer());
DockerComposeServiceResource.cs (1)
163var env = new Dictionary<string, string>();
Aspire.Hosting.Docker.Tests (3)
DockerComposePublisherTests.cs (3)
512public TestProjectWithLaunchSettings() => Profiles = new() 519EnvironmentVariables = new() 529EnvironmentVariables = new()
Aspire.Hosting.Kubernetes (7)
Extensions\ResourceExtensions.cs (1)
361Capacity = new()
KubernetesPublishingContext.cs (5)
23private readonly Dictionary<string, Dictionary<string, object>> _helmValues = new() 25[HelmExtensions.ParametersKey] = new Dictionary<string, object>(), 26[HelmExtensions.SecretsKey] = new Dictionary<string, object>(), 27[HelmExtensions.ConfigKey] = new Dictionary<string, object>(), 108var paramValues = new Dictionary<string, string>();
KubernetesResource.cs (1)
106Labels = new()
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
45private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.MongoDB (1)
MongoDBServerResource.cs (1)
81private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.MySql (1)
MySqlServerResource.cs (1)
13private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.MySql.Tests (6)
MySqlFunctionalTests.cs (6)
89hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 163hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 232hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 335hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 421hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 491hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
43private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.PostgreSQL (1)
PostgresServerResource.cs (1)
84private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.PostgreSQL.Tests (5)
PostgresFunctionalTests.cs (5)
118hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 240hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 302hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 397hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 483hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.Qdrant.Tests (3)
QdrantFunctionalTests.cs (3)
43hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 128hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 173hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.Redis.Tests (7)
RedisFunctionalTests.cs (7)
105hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 211hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 247hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 294hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 329hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 378hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 408hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
71private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.SqlServer.Tests (2)
SqlServerFunctionalTests.cs (2)
185hb1.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 270hb2.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.Testing (2)
DistributedApplicationFactory.cs (2)
201var additionalConfig = new Dictionary<string, string?>(); 266var additionalConfig = new Dictionary<string, string?>();
Aspire.Hosting.Tests (36)
AddParameterTests.cs (5)
53appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 80appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 130appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 192appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 258appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Dashboard\DashboardLifecycleHookTests.cs (2)
159configurationBuilder.AddInMemoryCollection(new Dictionary<string, string?> 172var envVars = new Dictionary<string, object>();
Dashboard\DashboardResourceTests.cs (7)
31builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 92builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 202builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 241builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 275builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 310builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 354builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Dcp\DcpExecutorTests.cs (2)
126configurationBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1257builder.AddInMemoryCollection(new Dictionary<string, string?>
ExpressionResolverTests.cs (1)
221Expressions = new()
KestrelConfigTests.cs (1)
385Profiles = new()
Orchestrator\ApplicationOrchestratorTests.cs (2)
352new ChildResourceWithConnectionString("child", new Dictionary<string, string> { {"Namespace", "ns"} }, parentResource.Resource) 355new ChildResourceWithConnectionString("grand-child", new Dictionary<string, string> { {"Database", "db"} }, childResource.Resource)
Orchestrator\ParameterProcessorTests.cs (1)
327.AddInMemoryCollection(new Dictionary<string, string?> { [$"Parameters:{name}"] = value })
ProjectResourceTests.cs (7)
675protected Dictionary<string, LaunchProfile>? Profiles { get; set; } = new(); 689Profiles = new() 697EnvironmentVariables = new() 710Profiles = new() 718EnvironmentVariables = new() 731Profiles = new() 739EnvironmentVariables = new()
Utils\EnvironmentVariableEvaluator.cs (1)
20var environmentVariables = new Dictionary<string, string>();
Utils\Grpc\TestServerCallContext.cs (2)
24_authContext = new AuthContext(string.Empty, new Dictionary<string, List<AuthProperty>>()); 25_userState = new Dictionary<object, object>();
VersionChecking\VersionCheckServiceTests.cs (4)
46configurationManager.AddInMemoryCollection(new Dictionary<string, string?> 73configurationManager.AddInMemoryCollection(new Dictionary<string, string?> 108configurationManager.AddInMemoryCollection(new Dictionary<string, string?> 165configurationManager.AddInMemoryCollection(new Dictionary<string, string?>
WithUrlsTests.cs (1)
770Profiles = new Dictionary<string, LaunchProfile>
Aspire.Hosting.Valkey.Tests (3)
ValkeyFunctionalTests.cs (3)
34hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 96hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 147hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.Yarp (2)
ConfigurationBuilder\YarpCluster.cs (1)
54Destinations = new Dictionary<string, DestinationConfig>(StringComparer.OrdinalIgnoreCase)
ConfigurationBuilder\YarpRoute.cs (1)
163var transform = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Aspire.Hosting.Yarp.Tests (11)
YarpConfigGeneratorTests.cs (11)
60new Dictionary<string, string> 64new Dictionary<string, string> 68new Dictionary<string, string> 72new Dictionary<string, string> 78Metadata = new Dictionary<string, string> { { "routeA-K1", "routeA-V1" }, { "routeA-K2", "routeA-V2" } } 120Destinations = new Dictionary<string, DestinationConfig>(StringComparer.OrdinalIgnoreCase) 128Metadata = new Dictionary<string, string> { { "destA-K1", "destA-V1" }, { "destA-K2", "destA-V2" } }, 193Metadata = new Dictionary<string, string> { { "cluster1-K1", "cluster1-V1" }, { "cluster1-K2", "cluster1-V2" } } 198Destinations = new Dictionary<string, DestinationConfig>(StringComparer.OrdinalIgnoreCase) 229var variables = new Dictionary<string, object>(); 265.WithMetadata(new Dictionary<string, string>() { { "custom-metadata", "some-value" } });
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (2)
AspireAzureEfCoreCosmosDBExtensionsTests.cs (2)
360builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 387builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (2)
AspireSqlServerEFCoreSqlClientExtensionsTests.cs (2)
309builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 335builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
AspireEFPostgreSqlExtensionsTests.cs (2)
317builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 347builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Oracle.EntityFrameworkCore.Tests (2)
AspireOracleEFCoreDatabaseExtensionsTests.cs (2)
342builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 368builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Playground.Tests (15)
AppHostTests.cs (14)
146resourceEndpoints: new() { { "apiservice", ["/alive", "/health", "/garnet/ping", "/garnet/get", "/garnet/set", "/redis/ping", "/redis/get", "/redis/set", "/valkey/ping", "/valkey/get", "/valkey/set"] } }, 154resourceEndpoints: new() { { "api", ["/alive", "/health", "/"] } }, 159resourceEndpoints: new() { { "apiservice", ["/alive", "/health", "/create", "/search"] } }, 172resourceEndpoints: new() { { "apiservice", ["/alive", "/health"] } }), 174resourceEndpoints: new() { { "api", ["/alive", "/health", "/"] } }, 181resourceEndpoints: new() { { "apiservice", ["/alive", "/health", "/catalog"] } }, 187resourceEndpoints: new() { 196resourceEndpoints: new() { { "api", ["/", "/alive", "/health"] } }, 201resourceEndpoints: new() { 215resourceEndpoints: new() { { "api", ["/alive", "/health", "/redis"] } }, 222resourceEndpoints: new() { { "apiservice", ["/alive", "/health"] } }, 228resourceEndpoints: new() { { "api", ["/alive", "/health"] } }, 235resourceEndpoints: new() { { "api", ["/", "/alive", "/health"] } }, 241resourceEndpoints: new() {
Infrastructure\DistributedApplicationExtensions.cs (1)
58var renamedVolumes = new Dictionary<string, string>();
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (2)
AspireEFMySqlExtensionsTests.cs (2)
304builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 332builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Templates.Tests (4)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
35public Dictionary<string, ProjectInfo> InfoTable { get; private set; } = new(capacity: 0);
tests\Shared\TemplatesTesting\BuildEnvironment.cs (2)
167EnvVars = new Dictionary<string, string>(); 275EnvVars = new Dictionary<string, string>(otherBuildEnvironment.EnvVars);
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
21public Dictionary<string, string> Environment { get; } = new Dictionary<string, string>();
AuthSamples.FunctionalTests (4)
CookiesTests.cs (1)
85await Client.SendAsync(form, new Dictionary<string, string>()
CustomPolicyProviderTests.cs (1)
127return await client.SendAsync(form, new Dictionary<string, string>()
DynamicSchemeTests.cs (1)
86return await Client.SendAsync(form, new Dictionary<string, string>()
PathSchemeSelectionTests.cs (1)
111await Client.SendAsync(form, new Dictionary<string, string>()
BasicTestApp (2)
InteropTest\JavaScriptInterop.cs (2)
392return new Dictionary<string, DotNetObjectReference<TestDTO>> 402return new Dictionary<string, DotNetObjectReference<TestDTO>>
BasicWebSite (2)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
45routeValues = new Dictionary<string, object>(_actionContext.RouteData.Values),
ValueProviders\CustomValueProviderFactory.cs (1)
19private static readonly Dictionary<string, Func<ValueProviderFactoryContext, StringValues>> Values = new()
blazor-devserver (1)
Server\Program.cs (1)
34var inMemoryConfiguration = new Dictionary<string, string?>
BuildActionTelemetryTable (1)
CodeActionDescriptions.cs (1)
12public static ImmutableDictionary<string, string> CodeActionDescriptionMap { get; } = new Dictionary<string, string>()
BuildBoss (2)
SolutionCheckerUtil.cs (2)
53var solutionMap = new Dictionary<ProjectKey, ProjectData>(); 81map = new Dictionary<ProjectKey, SolutionProjectData>();
BuildValidator (6)
LocalReferenceResolver.cs (4)
26private readonly Dictionary<Guid, AssemblyInfo> _mvidMap = new(); 32private readonly Dictionary<string, List<string>> _nameToLocationsMap = new(); 39private readonly Dictionary<string, List<AssemblyInfo>> _nameMap = new(FileNameEqualityComparer.StringComparer); 65var nameToLocationsMap = new Dictionary<string, List<string>>();
PEReaderExtensions.cs (1)
23_namedExportRva = new Dictionary<string, int>();
Program.cs (1)
182var map = new Dictionary<Guid, AssemblyInfo>();
CodeGenerator (1)
src\Shared\runtime\Http3\QPack\H3StaticTable.Http3.cs (1)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int>
ConfigurationSchemaGenerator (5)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (2)
26private readonly Dictionary<ITypeSymbol, TypeSpec> _createdTypeSpecs = new(SymbolEqualityComparer.Default); 682(properties ??= new(StringComparer.OrdinalIgnoreCase))[propertyName] = spec;
RuntimeSource\Configuration.Binder\Specs\BindingHelperInfo.cs (2)
27private readonly Dictionary<TypeRef, bool> _seenTransitiveTypes = new(); 32private readonly Dictionary<MethodsToGen_CoreBindingHelper, HashSet<TypeSpec>> _typesForGen = new();
RuntimeSource\Configuration.Binder\Specs\InterceptorInfo.cs (1)
134private readonly Dictionary<ComplexTypeSpec, TypedInterceptorInvocationInfo.Builder> _invocationInfoBuilderCache = new();
ConfigurationSchemaGenerator.Tests (2)
VariousTypes.cs (2)
83public IDictionary<string, TimeSpan> PropertyOfStringToTimeSpan { get; } = new Dictionary<string, TimeSpan>(); 93public IDictionary<string, DefaultSettings> PropertyOfStringToDefaultSettings { get; } = new Dictionary<string, DefaultSettings>();
Crossgen2Tasks (1)
CommonFilePulledFromSdkRepo\TaskBase.cs (1)
52(BuildEngine as IBuildEngine5)?.LogTelemetry(eventName, new Dictionary<string, string> {
DemoConsole (1)
DesignSurfaceExtended.cs (1)
216initializer.InitializeNewComponent(new Dictionary<object, object>());
dotnet-openapi (3)
Commands\BaseCommand.cs (3)
174var metadata = new Dictionary<string, string>(); 465var packageVersionsDictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 489var result = new Dictionary<string, string>();
dotnet-svcutil.xmlserializer (3)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (1)
92_contents = new Dictionary<string, IList<string>>(capacity);
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
263_parent._namespaceMappings = new Dictionary<string, string>(namespaceMappingsArgs.Count); 384Dictionary<string, Type> specifiedTypes = new Dictionary<string, Type>(typeArgs.Count);
dotnet-svcutil-lib (213)
AppInsightsTelemetryClient.cs (1)
214var properties = new Dictionary<string, string>();
CmdCredentialsProvider.cs (2)
139private Dictionary<string, X509Certificate> _validatedClientCerts = new Dictionary<string, X509Certificate>(); 219private Dictionary<string, bool> _validatedServerCerts = new Dictionary<string, bool>();
CodeDomFixup\ArrayOfXElementTypeHelper.cs (1)
67Dictionary<string, CodeTypeDeclaration> nameTable = new Dictionary<string, CodeTypeDeclaration>();
CodeDomFixup\CodeDomVisitors\CodeTypeNameScope.cs (1)
13private Dictionary<string, CodeTypeMember> _nameTable = new Dictionary<string, CodeTypeMember>();
CodeDomFixup\CodeDomVisitors\CreateCallbackImpl.cs (1)
214Dictionary<string, string> methodNames = new Dictionary<string, string>();
CodeDomFixup\CodeDomVisitors\EnsureAdditionalAssemblyReference.cs (1)
14private Dictionary<string, string> _namespacesToMatch = new Dictionary<string, string>() { { "System.ServiceModel.XmlSerializerFormatAttribute", "System.Xml.Serialization" }, { "System.Xml.Linq", "System.Xml.Linq" }, { "System.ServiceModel.Duplex", "System.ServiceModel.Extensions" } };
CodeDomFixup\CodeDomVisitors\MakeOldAsyncMethodsPrivate.cs (1)
27_privateIfaceMethods = new Dictionary<string, PrivateInterfaceMethod>();
CodeDomFixup\CodeDomVisitors\NamespaceFixer.cs (2)
18private Dictionary<string, Type> _xmlTypes = new Dictionary<string, Type>(); 19private Dictionary<string, Type> _codeDomTypes = new Dictionary<string, Type>();
CodeDomFixup\CodeDomVisitors\PropertyFieldNameScope.cs (1)
13private Dictionary<string, MemberInfo> _nameTable = new Dictionary<string, MemberInfo>();
CodeDomFixup\CodeDomVisitors\SpecialIXmlSerializableRemapper.cs (1)
13private Dictionary<string, CodeTypeDeclaration> _specialIXmlSerializableTypes = new Dictionary<string, CodeTypeDeclaration>();
CodeDomFixup\CodeDomVisitors\TypeDeclCollection.cs (2)
14internal Dictionary<string, CodeTypeDeclaration> AllTypeDecls = new Dictionary<string, CodeTypeDeclaration>(); 15internal Dictionary<string, string> TypeNamespaceMappings = new Dictionary<string, string>();
CommandProcessorOptions.cs (1)
861Dictionary<string, Type> specifiedTypes = new Dictionary<string, Type>(typeArgs.Count);
FrameworkFork\Microsoft.CodeDom\Configuration\CodeDomCompilationConfiguration.cs (1)
38compilerInfo._providerOptions = new Dictionary<string, string>();
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (2)
379_namespaces = new Dictionary<String, NamespaceDecl>(_hasher); 1826Dictionary<String, String> nstable = new Dictionary<String, String>();
FrameworkFork\Microsoft.Xml\Xml\Core\QueryOutputWriter.cs (1)
58_lookupCDataElems = new Dictionary<XmlQualifiedName, int>();
FrameworkFork\Microsoft.Xml\Xml\Core\QueryOutputWriterV1.cs (1)
79_lookupCDataElems = new Dictionary<XmlQualifiedName, XmlQualifiedName>();
FrameworkFork\Microsoft.Xml\Xml\Core\XmlSubtreeReader.cs (1)
1210return new Dictionary<string, string>();
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (1)
8223_currentEntities = new Dictionary<IDtdEntityInfo, IDtdEntityInfo>();
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextWriter.cs (1)
1487_nsHashtable = new Dictionary<string, int>(new SecureStringHasher());
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWellformedWriter.cs (2)
1868_nsHashtable = new Dictionary<string, int>(_hasher); 2247_attrHashTable = new Dictionary<string, int>(_hasher);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNodeReader.cs (1)
996Dictionary<string, string> dict = new Dictionary<string, string>();
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolver.cs (1)
174_mappings = new Dictionary<Uri, PreloadedData>(16, uriComparer);
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (1)
1375_undeclaredNotations = new Dictionary<string, UndeclaredNotation>();
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaElementDecl.cs (2)
14private Dictionary<XmlQualifiedName, SchemaAttDef> _attdefs = new Dictionary<XmlQualifiedName, SchemaAttDef>(); 23private Dictionary<XmlQualifiedName, XmlQualifiedName> _prohibitedAttributes = new Dictionary<XmlQualifiedName, XmlQualifiedName>();
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaInfo.cs (8)
32private Dictionary<XmlQualifiedName, SchemaElementDecl> _elementDecls = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 33private Dictionary<XmlQualifiedName, SchemaElementDecl> _undeclaredElementDecls = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 43private Dictionary<string, bool> _targetNamespaces = new Dictionary<string, bool>(); 44private Dictionary<XmlQualifiedName, SchemaAttDef> _attributeDecls = new Dictionary<XmlQualifiedName, SchemaAttDef>(); 47private Dictionary<XmlQualifiedName, SchemaElementDecl> _elementDeclsByType = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 84_generalEntities = new Dictionary<XmlQualifiedName, SchemaEntity>(); 96_parameterEntities = new Dictionary<XmlQualifiedName, SchemaEntity>(); 129_notations = new Dictionary<string, SchemaNotation>();
FrameworkFork\Microsoft.Xml\Xml\schema\XmlAtomicValue.cs (1)
70Dictionary<string, string> dict = new Dictionary<string, string>(1);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaObjectTable.cs (1)
18private Dictionary<XmlQualifiedName, XmlSchemaObject> _table = new Dictionary<XmlQualifiedName, XmlSchemaObject>();
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (4)
85_freeLocals = new Dictionary<Tuple<Type, string>, Queue<LocalBuilder>>(); 86_argList = new Dictionary<string, ArgBuilder>(); 155private Dictionary<Type, LocalBuilder> _tmpLocals = new Dictionary<Type, LocalBuilder>(); 2657_locals = new Dictionary<string, LocalBuilder>();
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (1)
1183replaceList = new Dictionary<string, MemberInfo>();
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (4)
19private Dictionary<string, MethodBuilderInfo> _methodBuilders = new Dictionary<string, MethodBuilderInfo>(); 21internal Dictionary<string, Type> CreatedTypes = new Dictionary<string, Type>(); 23internal Dictionary<string, MemberInfo> memberInfos = new Dictionary<string, MemberInfo>(); 67private static Dictionary<string, Regex> s_regexs = new Dictionary<string, Regex>();
FrameworkFork\Microsoft.Xml\Xml\XmlNamespaceManager.cs (3)
188_hashTable = new Dictionary<string, int>(_lastDecl); 221Dictionary<string, string> prefixes = new Dictionary<string, string>(_lastDecl + 1); 257Dictionary<string, string> dict = new Dictionary<string, string>(_lastDecl - i + 1);
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathDocument.cs (2)
399_mapNmsp = new Dictionary<XPathNodeRef, XPathNodeRef>(); 432_idValueMap = new Dictionary<string, XPathNodeRef>();
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigator.cs (1)
536Dictionary<string, string> dict = new Dictionary<string, string>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (1)
930Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (8)
52_namespaces = new Dictionary<string, string>(); 53_clrNamespaces = new Dictionary<string, string>(StringComparer.Ordinal); 277ExportClassDataContractHierarchy(classDataContract.StableName, classDataContract, contractCodeDomInfo, new Dictionary<XmlQualifiedName, object>()); 746dataContract = DataContract.GetDataContract(type).BindGenericParameters(paramContracts, new Dictionary<DataContract, DataContract>()); 937return GetKnownTypeContracts((ClassDataContract)dataContract, new Dictionary<DataContract, object>()); 984dataContract.KnownDataContracts = new DataContractDictionary(); 995DataContractDictionary knownContractDictionary = GetKnownTypeContracts(dataContract, new Dictionary<DataContract, object>()); 1427Dictionary<string, object> fragments = new Dictionary<string, object>(StringComparer.Ordinal);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (1)
164private Dictionary<LocalBuilder, string> _localNames = new Dictionary<LocalBuilder, string>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ContractCodeDomInfo.cs (1)
42_memberNames = new Dictionary<string, object>(StringComparer.Ordinal);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (9)
562s_typeToIDCache = new Dictionary<TypeHandleRef, IntRef>(new TypeHandleRefEqualityComparer()); 816s_typeToBuiltInContract = new Dictionary<Type, DataContract>(); 833s_nameToBuiltInContract = new Dictionary<XmlQualifiedName, DataContract>(); 1024s_namespaces = new Dictionary<string, string>(); 1051s_clrTypeStrings = new Dictionary<string, XmlDictionaryString>(); 2063Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 2147knownDataContracts = new DataContractDictionary(); 2175nameToDataContractTable = new DataContractDictionary(); 2193return Equals(other, new Dictionary<DataContractPairKey, object>());
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (4)
63_contracts = new Dictionary<XmlQualifiedName, DataContract>(); 75_processedContracts = new Dictionary<DataContract, object>(); 352_referencedTypesDictionary = new Dictionary<XmlQualifiedName, object>(); 374_referencedCollectionTypesDictionary = new Dictionary<XmlQualifiedName, object>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\EnumDataContract.cs (3)
160s_typeToName = new Dictionary<Type, XmlQualifiedName>(); 161s_nameToType = new Dictionary<XmlQualifiedName, Type>(); 275Dictionary<string, DataMember> memberValuesTable = new Dictionary<string, DataMember>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (6)
129s_essentialExceptionFields = new Dictionary<string, string>(); 212_knownDataContracts = new Dictionary<XmlQualifiedName, DataContract>(); 269Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>(); 308Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>(); 487Dictionary<string, object> fieldToValueDictionary = new Dictionary<string, object>(); 599Dictionary<string, string> mapDict = new Dictionary<string, string>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExtensionDataReader.cs (2)
57s_nsToPrefixTable = new Dictionary<string, string>(); 58s_prefixToNsTable = new Dictionary<string, string>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\HybridObjectCache.cs (2)
24_objectDictionary = new Dictionary<string, object>(); 42_referencedObjectDictionary = new Dictionary<string, object>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ImportOptions.cs (1)
77_namespaces = new Dictionary<string, string>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ObjectReferenceStack.cs (1)
38_objectDictionary = new Dictionary<object, object>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (4)
188Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>(); 224DataContractDictionary knownDataContracts = new DataContractDictionary(); 243SchemaObjectDictionary schemaObjects = new SchemaObjectDictionary(); 928knownDataContracts = new DataContractDictionary();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerContext.cs (2)
203DataContractDictionary dataContracts = new DataContractDictionary(); 204Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>();
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryReaderSession.cs (1)
39_stringDict = new Dictionary<int, XmlDictionaryString>();
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriterSession.cs (1)
188_dictionary = new Dictionary<K, V>();
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionary.cs (2)
36_lookup = new Dictionary<string, XmlDictionaryString>(); 43_lookup = new Dictionary<string, XmlDictionaryString>(capacity);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\MruCache.cs (2)
43_items = new Dictionary<TKey, CacheEntry>(); 47_items = new Dictionary<TKey, CacheEntry>(comparer);
FrameworkFork\System.ServiceModel\System\IdentityModel\CryptoHelper.cs (1)
16private static Dictionary<string, Func<object>> s_algorithmDelegateDictionary = new Dictionary<string, Func<object>>();
FrameworkFork\System.ServiceModel\System\IdentityModel\IdentityModelDictionary.cs (1)
45Dictionary<string, int> dictionary = new Dictionary<string, int>(_count);
FrameworkFork\System.ServiceModel\System\IdentityModel\Policy\DefaultEvaluationContext.cs (1)
24_properties = new Dictionary<string, object>();
FrameworkFork\System.ServiceModel\System\IdentityModel\SecurityUtils.cs (1)
406Dictionary<string, object> properties = new Dictionary<string, object>();
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenRequirement.cs (1)
33_properties = new Dictionary<string, object>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeaderCollection.cs (2)
119Dictionary<string, int> myHeaders = new Dictionary<string, int>(); 122Dictionary<string, int> otherHeaders = new Dictionary<string, int>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPool.cs (1)
31_endpointPools = new Dictionary<TKey, EndpointConnectionPool>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPoolRegistry.cs (1)
15_registry = new Dictionary<string, List<ConnectionPool>>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
123_connectionMapping = new Dictionary<TItem, IdlingConnectionSettings>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestReplyCorrelator.cs (1)
19_states = new Dictionary<Key, object>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityBindingElement.cs (4)
66_operationSupportingTokenParameters = new Dictionary<string, SupportingTokenParameters>(); 67_optionalOperationSupportingTokenParameters = new Dictionary<string, SupportingTokenParameters>(); 87_operationSupportingTokenParameters = new Dictionary<string, SupportingTokenParameters>(); 92_optionalOperationSupportingTokenParameters = new Dictionary<string, SupportingTokenParameters>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelFactory.cs (1)
200Dictionary<Type, byte> supportedChannels = new Dictionary<Type, byte>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransactionFlowBindingElement.cs (1)
205dictionary = new Dictionary<DirectionalAction, TransactionFlowOption>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportBindingElementImporter.cs (1)
198retValue = new Dictionary<XmlQualifiedName, XmlQualifiedName>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportSecurityHelpers.cs (2)
324private static Dictionary<string, int> s_targetNameCounter = new Dictionary<string, int>(); 339private static Dictionary<HttpRequestMessage, string> s_serverCertMap = new Dictionary<HttpRequestMessage, string>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\UnrecognizedAssertionsBindingElement.cs (2)
48_operationAssertions = new Dictionary<OperationDescription, ICollection<XmlElement>>(); 58_messageAssertions = new Dictionary<MessageDescription, ICollection<XmlElement>>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DataContractSerializerOperationGenerator.cs (4)
18private Dictionary<OperationDescription, DataContractFormatAttribute> _operationAttributes = new Dictionary<OperationDescription, DataContractFormatAttribute>(); 39_isNonNillableReferenceTypes = new Dictionary<MessagePartDescription, bool>(); 59_knownTypes = new Dictionary<MessagePartDescription, ICollection<CodeTypeReference>>(); 86Dictionary<CodeTypeReference, object> operationKnownTypes = new Dictionary<CodeTypeReference, object>(new CodeTypeReferenceComparer());
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ImportedPolicyConversionContext.cs (4)
32private readonly Dictionary<OperationDescription, PolicyAssertionCollection> _operationBindingAssertions = new Dictionary<OperationDescription, PolicyAssertionCollection>(); 33private readonly Dictionary<MessageDescription, PolicyAssertionCollection> _messageBindingAssertions = new Dictionary<MessageDescription, PolicyAssertionCollection>(); 34private readonly Dictionary<FaultDescription, PolicyAssertionCollection> _faultBindingAssertions = new Dictionary<FaultDescription, PolicyAssertionCollection>(); 242Dictionary<K, V> counterValue = new Dictionary<K, V>(sets.Count);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (2)
45_bodyPartsTable = new Dictionary<WsdlNS.Message, IList<string>>(); 850Dictionary<string, object> prefixesUsed = new Dictionary<string, object>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (1)
469_usedRetrievers = new Dictionary<MetadataRetriever, MetadataRetriever>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExporter.cs (4)
17private readonly Dictionary<object, object> _state = new Dictionary<object, object>(); 91_operationBindingAssertions = new Dictionary<OperationDescription, PolicyAssertionCollection>(); 92_messageBindingAssertions = new Dictionary<MessageDescription, PolicyAssertionCollection>(); 93_faultBindingAssertions = new Dictionary<FaultDescription, PolicyAssertionCollection>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataImporter.cs (2)
18private readonly Dictionary<XmlQualifiedName, ContractDescription> _knownContracts = new Dictionary<XmlQualifiedName, ContractDescription>(); 20private readonly Dictionary<object, object> _state = new Dictionary<object, object>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (3)
41_parameterAttributes = new Dictionary<MessagePartDescription, CodeAttributeDeclarationCollection>(); 51_parameterTypes = new Dictionary<MessagePartDescription, CodeTypeReference>(); 61_specialPartName = new Dictionary<MessagePartDescription, string>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceContractGenerator.cs (5)
46_generatedTypes = new Dictionary<ContractDescription, ServiceContractGenerationContext>(); 47_generatedOperations = new Dictionary<OperationDescription, OperationContractGenerationContext>(); 48_referencedTypes = new Dictionary<ContractDescription, Type>(); 189_generatedTypedMessages = new Dictionary<MessageDescription, CodeTypeReference>(MessageDescriptionComparer.Singleton); 707_namespaceMappings = new Dictionary<string, string>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\SoapHelper.cs (1)
165versions = new Dictionary<WsdlNS.Binding, EnvelopeVersion>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TransactionFlowAttribute.cs (1)
56dictionary = new Dictionary<DirectionalAction, TransactionFlowOption>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (2)
51_contracts = new Dictionary<Type, ContractDescription>(); 52_messages = new Dictionary<Type, MessageDescriptionItems>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlContractConversionContext.cs (7)
38_wsdlOperations = new Dictionary<OperationDescription, WsdlNS.Operation>(); 39_operationDescriptions = new Dictionary<WsdlNS.Operation, OperationDescription>(); 40_wsdlOperationMessages = new Dictionary<MessageDescription, WsdlNS.OperationMessage>(); 41_messageDescriptions = new Dictionary<WsdlNS.OperationMessage, MessageDescription>(); 42_wsdlOperationFaults = new Dictionary<FaultDescription, WsdlNS.OperationFault>(); 43_faultDescriptions = new Dictionary<WsdlNS.OperationFault, FaultDescription>(); 44_operationBindings = new Dictionary<WsdlNS.Operation, Collection<WsdlNS.OperationBinding>>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlEndpointConversionContext.cs (6)
35_wsdlOperationBindings = new Dictionary<OperationDescription, WsdlNS.OperationBinding>(); 36_operationDescriptionBindings = new Dictionary<WsdlNS.OperationBinding, OperationDescription>(); 37_wsdlMessageBindings = new Dictionary<MessageDescription, WsdlNS.MessageBinding>(); 38_messageDescriptionBindings = new Dictionary<WsdlNS.MessageBinding, MessageDescription>(); 39_wsdlFaultBindings = new Dictionary<FaultDescription, WsdlNS.FaultBinding>(); 40_faultDescriptionBindings = new Dictionary<WsdlNS.FaultBinding, FaultDescription>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (4)
29= new Dictionary<ContractDescription, WsdlContractConversionContext>(); 30private Dictionary<BindingDictionaryKey, WsdlEndpointConversionContext> _exportedBindings = new Dictionary<BindingDictionaryKey, WsdlEndpointConversionContext>(); 31private Dictionary<EndpointDictionaryKey, ServiceEndpoint> _exportedEndpoints = new Dictionary<EndpointDictionaryKey, ServiceEndpoint>(); 952private readonly Dictionary<string, string> _lookup = new Dictionary<string, string>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (14)
23private readonly Dictionary<WsdlNS.NamedItem, WsdlImportException> _importErrors = new Dictionary<WsdlNS.NamedItem, WsdlImportException>(); 26private readonly Dictionary<XmlQualifiedName, WsdlContractConversionContext> _importedPortTypes = new Dictionary<XmlQualifiedName, WsdlContractConversionContext>(); 27private readonly Dictionary<XmlQualifiedName, WsdlEndpointConversionContext> _importedBindings = new Dictionary<XmlQualifiedName, WsdlEndpointConversionContext>(); 28private readonly Dictionary<WsdlNS.Port, ServiceEndpoint> _importedPorts = new Dictionary<WsdlNS.Port, ServiceEndpoint>(); 34private readonly Dictionary<string, XmlElement> _policyDocuments = new Dictionary<string, XmlElement>(); 35private readonly Dictionary<string, string> _warnings = new Dictionary<string, string>(); 1688Dictionary<XmlElement, XmlElement> unique = new Dictionary<XmlElement, XmlElement>(); 2205policyAlternatives.OperationBindingAlternatives = new Dictionary<OperationDescription, IEnumerable<IEnumerable<XmlElement>>>(endpointContext.Endpoint.Contract.Operations.Count); 2206policyAlternatives.MessageBindingAlternatives = new Dictionary<MessageDescription, IEnumerable<IEnumerable<XmlElement>>>(); 2207policyAlternatives.FaultBindingAlternatives = new Dictionary<FaultDescription, IEnumerable<IEnumerable<XmlElement>>>(); 2287private readonly Dictionary<WsdlNS.ServiceDescription, Dictionary<string, XmlElement>> _embeddedPolicyDictionary = new Dictionary<WsdlNS.ServiceDescription, Dictionary<string, XmlElement>>(); 2288private readonly Dictionary<string, XmlElement> _externalPolicyDictionary = new Dictionary<string, XmlElement>(); 2289private readonly Dictionary<XmlElement, WsdlNS.ServiceDescription> _policySourceTable = new Dictionary<XmlElement, WsdlNS.ServiceDescription>(); 2334wsdlPolicyDictionary = new Dictionary<string, XmlElement>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
568_xmlMappings = new Dictionary<string, XmlMembersMapping>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationGenerator.cs (4)
23private Dictionary<OperationDescription, XmlSerializerFormatAttribute> _operationAttributes = new Dictionary<OperationDescription, XmlSerializerFormatAttribute>(); 35_partInfoTable = new Dictionary<MessagePartDescription, PartInfo>(); 123Dictionary<XmlMembersMapping, XmlMembersMapping> alreadyExported = new Dictionary<XmlMembersMapping, XmlMembersMapping>(); 145_operationGenerator.GenerateOperation(context, ref style, xmlSerializerFormatAttribute.IsEncoded, new WrappedBodyTypeGenerator(context), new Dictionary<MessagePartDescription, ICollection<CodeTypeReference>>());
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (1)
39_operations = new Dictionary<string, ProxyOperationRuntime>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationSelectorBehavior.cs (1)
39_operationMap = new Dictionary<object, string>();
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageHeaderT.cs (1)
81private static Dictionary<Type, TypedHeaderManager> s_cache = new Dictionary<Type, TypedHeaderManager>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ScopedMessagePartSpecification.cs (2)
21_actionParts = new Dictionary<string, MessagePartSpecification>(); 187_readOnlyNormalizedActionParts = new Dictionary<string, MessagePartSpecification>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (3)
124_scopedSupportingTokenAuthenticatorSpecification = new Dictionary<string, ICollection<SupportingTokenAuthenticatorSpecification>>(); 145_scopedSupportingTokenAuthenticatorSpecification = new Dictionary<string, ICollection<SupportingTokenAuthenticatorSpecification>>(factory._scopedSupportingTokenAuthenticatorSpecification); 800_mergedSupportingTokenAuthenticatorsMap = new Dictionary<string, MergedSupportingTokenAuthenticatorSpecification>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (2)
26_scopedCertificates = new Dictionary<Uri, X509Certificate2>(); 38_scopedCertificates = new Dictionary<Uri, X509Certificate2>();
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceModelDictionary.cs (1)
45Dictionary<string, int> dictionary = new Dictionary<string, int>(_count);
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedKeyedCollection.cs (1)
174_dictionary = new Dictionary<K, T>(_comparer);
ImportModule.cs (3)
376private readonly Dictionary<Binding, ContractDescription> _bindingContractMapping = new Dictionary<Binding, ContractDescription>(); 377private readonly Dictionary<Binding, XmlQualifiedName> _bindingWsdlMapping = new Dictionary<Binding, XmlQualifiedName>(); 378private readonly Dictionary<XmlQualifiedName, WsdlNS.Port> _bindingPortMapping = new Dictionary<XmlQualifiedName, WsdlNS.Port>();
Metadata\ServiceDescriptorFactory.cs (1)
23private Dictionary<int, ServiceDescriptor> _cache = new Dictionary<int, ServiceDescriptor>();
Shared\MSBuildProj.cs (1)
34public Dictionary<string, string> GlobalProperties { get; } = new Dictionary<string, string>();
Shared\ProjectPropertyResolver.cs (1)
25var propertyTable = new Dictionary<string, string>();
Shared\Utilities\ProcessRunner.cs (1)
49var emptyVars = new Dictionary<string, string>();
Tool.cs (1)
177var properties = new Dictionary<string, string>()
dotnet-svcutil-lib.Tests (1)
ProjectUtils.cs (1)
89var envVars = new Dictionary<string, string> { { AppInsightsTelemetryClient.OptOutVariable, (!AppInsightsTelemetryClient.IsUserOptedIn).ToString() } };
dotnet-user-jwts (5)
Commands\CreateCommand.cs (1)
208var claims = new Dictionary<string, string>();
Helpers\DevJwtCliHelpers.cs (1)
218claims = new Dictionary<string, string>();
Helpers\Jwt.cs (1)
15public IDictionary<string, string> CustomClaims { get; set; } = new Dictionary<string, string>();
Helpers\JwtStore.cs (2)
24public IDictionary<string, Jwt> Jwts { get; private set; } = new Dictionary<string, Jwt>(); 33Jwts = JsonSerializer.Deserialize<IDictionary<string, Jwt>>(fileStream, JwtSerializerOptions.Default) ?? new Dictionary<string, Jwt>();
FilesWebSite (1)
Controllers\UploadFilesController.cs (1)
32var files = new Dictionary<string, List<string>>();
FormatterWebSite (2)
Controllers\JsonOutputFormatterController.cs (1)
39new Dictionary<string, string>
Controllers\XmlSerializerController.cs (1)
42return new Dictionary<string, string>
GenerateDocumentationAndConfigFiles (39)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Microsoft.CodeAnalysis.Analyzers\Core\MetaAnalyzers\ReleaseTrackingHelper.cs (1)
51var releaseTrackingDataByRulesBuilder = new Dictionary<string, ReleaseTrackingDataForRuleBuilder>();
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (10)
39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
19new Dictionary<BinaryOperatorKind, BinaryOperatorKind>
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
45routeValues = new Dictionary<string, object>(_actionContext.RouteData.Values),
HealthChecksSample (2)
GCInfoHealthCheck.cs (1)
58var data = new Dictionary<string, object>()
Program.cs (1)
12_scenarios = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase)
HelixTestRunner (1)
TestRunner.cs (1)
17EnvironmentVariables = new Dictionary<string, string>();
HtmlGenerationWebSite (1)
ProductsService.cs (1)
13private readonly Dictionary<string, Product[]> _products = new Dictionary<string, Product[]>
http2cat (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
IdeCoreBenchmarks (4)
ClassificationBenchmarks.cs (1)
67_workspace = MSBuildWorkspace.Create(new Dictionary<string, string>
FindReferencesBenchmarks.cs (1)
66_workspace = MSBuildWorkspace.Create(new Dictionary<string, string>
IncrementalSourceGeneratorBenchmarks.cs (1)
68_workspace = MSBuildWorkspace.Create(new Dictionary<string, string>
NavigateToBenchmarks.cs (1)
69_workspace = MSBuildWorkspace.Create(new Dictionary<string, string>
Identity.DefaultUI.WebSite (3)
Services\ContosoAuthenticationHandler.cs (1)
28uri = QueryHelpers.AddQueryString(uri, new Dictionary<string, string>()
src\Identity\test\InMemory.Test\InMemoryUserStore.cs (2)
24private readonly Dictionary<string, TUser> _logins = new Dictionary<string, TUser>(); 26private readonly Dictionary<string, TUser> _users = new Dictionary<string, TUser>();
IIS.FunctionalTests (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
IIS.LongTests (4)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (3)
574var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 609var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 680var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>();
src\Shared\Http2cat\Http2Utilities.cs (1)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
IIS.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
IIS.NewHandler.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (3)
574var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 609var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 680var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>();
src\Shared\Http2cat\Http2Utilities.cs (1)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
IIS.NewShim.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (3)
574var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 609var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 680var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>();
src\Shared\Http2cat\Http2Utilities.cs (1)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
IISExpress.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (3)
574var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 609var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 680var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>();
src\Shared\Http2cat\Http2Utilities.cs (1)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
illink (70)
ILLink.RoslynAnalyzer (18)
DataFlowAnalyzerContext.cs (1)
42var enabledAnalyzers = new Dictionary<RequiresAnalyzerBase, ImmutableArray<ISymbol>>();
DynamicallyAccessedMembersAnalyzer.cs (1)
349Dictionary<string, string?>? DAMArgument = new();
src\tools\illink\src\ILLink.Shared\DataFlow\DefaultValueDictionary.cs (3)
33Dictionary = other.Dictionary == null ? null : new Dictionary<TKey, TValue>(other.Dictionary); 44(Dictionary ??= new Dictionary<TKey, TValue>())[key] = value; 101var dict = new Dictionary<TKey, TValue>();
src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (4)
62branchInput = new(); 63exceptionState = new(); 64exceptionFinallyState = new(); 65finallyInputState = new();
TrimAnalysis\ArrayValue.cs (1)
30IndexValues = new Dictionary<int, MultiValue>();
TrimAnalysis\DiagnosticContext.cs (1)
64Dictionary<string, string?>? DAMArgument = new Dictionary<string, string?>();
TrimAnalysis\TrimAnalysisPatternStore.cs (7)
29AssignmentPatterns = new Dictionary<IOperation, TrimAnalysisAssignmentPattern>(); 30FieldAccessPatterns = new Dictionary<IOperation, TrimAnalysisFieldAccessPattern>(); 31BackingFieldAccessPatterns = new Dictionary<IOperation, TrimAnalysisBackingFieldAccessPattern>(); 32GenericInstantiationPatterns = new Dictionary<IOperation, TrimAnalysisGenericInstantiationPattern>(); 33MethodCallPatterns = new Dictionary<IOperation, TrimAnalysisMethodCallPattern>(); 34ReflectionAccessPatterns = new Dictionary<IOperation, TrimAnalysisReflectionAccessPattern>(); 35FeatureCheckReturnValuePatterns = new Dictionary<IOperation, FeatureCheckReturnValuePattern>();
ILLink.Tasks (5)
CreateRuntimeRootDescriptorFile.cs (5)
94readonly Dictionary<string, string> namespaceDictionary = new Dictionary<string, string>(); 95readonly Dictionary<string, string> classIdsToClassNames = new Dictionary<string, string>(); 96readonly Dictionary<string, ClassMembers> classNamesToClassMembers = new Dictionary<string, ClassMembers>(); 97readonly Dictionary<FeatureSwitchMembers, Dictionary<string, ClassMembers>> featureSwitchMembers = new(); 216featureSwitchMembers.Add(currentFeatureSwitch.Value, new Dictionary<string, ClassMembers>());
Infrastructure.Common (4)
ConditionalWcfTest.cs (1)
18private static Dictionary<string, bool> s_evaluatedConditions = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
JsonSerializer.cs (1)
32Dictionary<string, string> dictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
TestEventListener.cs (1)
15private Dictionary<string, bool> _targetSourceName = new Dictionary<string, bool>();
TestProperties.cs (1)
21Dictionary<String, String> properties = new Dictionary<String, String>(StringComparer.OrdinalIgnoreCase);
InMemory.FunctionalTests (14)
BadHttpRequestTests.cs (1)
57public static Dictionary<string, (string header, string errorMessage)> BadHeaderData => new Dictionary<string, (string, string)>
EventSourceTests.cs (1)
492Payload = new Dictionary<string, string>(eventWrittenEventArgs.PayloadNames.Count);
Http2\Http2ConnectionTests.cs (1)
2432public readonly Dictionary<string, StringValues> Headers = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
Http2\Http2TestBase.cs (3)
129protected readonly Dictionary<string, string> _receivedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 130protected readonly Dictionary<string, string> _receivedTrailers = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 131protected readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Http3\Http3StreamTests.cs (2)
3147headers.Initialize(new Dictionary<string, StringValues>() { 3187trailers.Initialize(new Dictionary<string, StringValues>()
HttpsConnectionMiddlewareTests.cs (1)
73var configuration = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string, string>
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
660public readonly Dictionary<string, string> DecodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 845var settings = new Dictionary<long, long>();
src\Servers\Kestrel\shared\test\RevocationResponder.cs (2)
20new Dictionary<string, CertificateAuthority>(); 23= new Dictionary<string, CertificateAuthority>();
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\shared\WebSockets\TestStartup.cs (1)
17var delegates = new Dictionary<string, RequestDelegate>();
installer.tasks (1)
GenerateFileVersionProps.cs (1)
44var fileVersions = new Dictionary<string, FileVersionData>(StringComparer.OrdinalIgnoreCase);
Interop.FunctionalTests (1)
H2SpecTests.cs (1)
65var toSkip = new Dictionary<string, string>();
KeyManagementSimulator (1)
Program.cs (1)
315private readonly Dictionary<Guid, DateTimeOffset> _missingSinceMap = new();
Metrics (25)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
Metrics.Legacy (25)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
Microsoft.Analyzers.Extra (9)
CallAnalysis\Arrays.cs (1)
31private static readonly Dictionary<string, string[]> _collectionFactories = new()
CallAnalysis\CallAnalyzer.Registrar.cs (1)
52var dict = new Dictionary<string, string[]>
CallAnalysis\CallAnalyzer.State.cs (5)
16public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IInvocationOperation>>> Methods = new(SymbolEqualityComparer.Default); 17public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IObjectCreationOperation>>> Ctors = new(SymbolEqualityComparer.Default); 18public readonly Dictionary<IPropertySymbol, List<Action<OperationAnalysisContext, IPropertyReferenceOperation>>> Props = new(SymbolEqualityComparer.Default); 19public readonly Dictionary<ITypeSymbol, List<Action<OperationAnalysisContext, IThrowOperation>>> ExceptionTypes = new(SymbolEqualityComparer.Default); 20public readonly Dictionary<ITypeSymbol, List<MethodHandlers>> Interfaces = new(SymbolEqualityComparer.Default);
CallAnalysis\StaticTime.cs (2)
16private static readonly Dictionary<string, string[]> _timeMethods = new() 29private static readonly Dictionary<string, string[]> _timeProperties = new()
Microsoft.Analyzers.Local (9)
ApiLifecycle\AssemblyAnalysis.cs (2)
17public Dictionary<ISymbol, List<string>> MissingConstraints { get; } = new(SymbolEqualityComparer.Default); 18public Dictionary<ISymbol, List<string>> MissingBaseTypes { get; } = new(SymbolEqualityComparer.Default);
ApiLifecycle\Json\JsonObject.cs (1)
26_properties = new Dictionary<string, JsonValue>();
CallAnalysis\CallAnalyzer.Registrar.cs (1)
52var dict = new Dictionary<string, string[]>
CallAnalysis\CallAnalyzer.State.cs (5)
16public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IInvocationOperation>>> Methods = new(SymbolEqualityComparer.Default); 17public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IObjectCreationOperation>>> Ctors = new(SymbolEqualityComparer.Default); 18public readonly Dictionary<IPropertySymbol, List<Action<OperationAnalysisContext, IPropertyReferenceOperation>>> Props = new(SymbolEqualityComparer.Default); 19public readonly Dictionary<ITypeSymbol, List<Action<OperationAnalysisContext, IThrowOperation>>> ExceptionTypes = new(SymbolEqualityComparer.Default); 20public readonly Dictionary<ITypeSymbol, List<MethodHandlers>> Interfaces = new(SymbolEqualityComparer.Default);
Microsoft.Arcade.Test.Common (1)
MockFileSystem.cs (1)
32Files = files ?? new();
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticProject.cs (1)
29private static readonly Dictionary<Assembly, Solution> _solutionCache = new Dictionary<Assembly, Solution>();
TestSource.cs (1)
15= new Dictionary<string, DiagnosticLocation>(StringComparer.Ordinal);
Microsoft.AspNetCore.Analyzers (1)
StartupAnalysisBuilder.cs (1)
22_analysesByType = new Dictionary<INamedTypeSymbol, List<object>>(SymbolEqualityComparer.Default);
Microsoft.AspNetCore.Analyzers.Test (1)
StartupFactsTest.cs (1)
101private static readonly Dictionary<string, string> TestSources = new Dictionary<string, string>
Microsoft.AspNetCore.Antiforgery.Test (4)
DefaultAntiforgeryTokenStoreTest.cs (4)
102httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 131httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 160httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 190httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>
Microsoft.AspNetCore.App.Analyzers (1)
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
77internal static readonly Dictionary<string, string> PropertyMapping = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Microsoft.AspNetCore.App.Analyzers.Test (3)
Http\HeaderDictionaryIndexerAnalyzerTests.cs (1)
172var propertyMapping = new Dictionary<string, string>(HeaderDictionaryIndexerAnalyzer.PropertyMapping);
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (1)
56var tempSpans = new Dictionary<string, List<TextSpan>>();
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
160AttributeRouteModel.ReplaceTokens(token.ValueText, new Dictionary<string, string>
Microsoft.AspNetCore.App.CodeFixes (1)
Dependencies\ExtensionMethodsCache.cs (1)
12return new()
Microsoft.AspNetCore.Authentication (1)
PropertiesSerializer.cs (1)
71var extra = new Dictionary<string, string?>(count);
Microsoft.AspNetCore.Authentication.Abstractions (5)
AuthenticationOptions.cs (1)
25public IDictionary<string, AuthenticationSchemeBuilder> SchemeMap { get; } = new Dictionary<string, AuthenticationSchemeBuilder>(StringComparer.Ordinal);
AuthenticationProperties.cs (4)
44Items = items ?? new Dictionary<string, string?>(StringComparer.Ordinal); 45Parameters = parameters ?? new Dictionary<string, object?>(StringComparer.Ordinal); 54new Dictionary<string, string?>(Items, StringComparer.Ordinal), 55new Dictionary<string, object?>(Parameters, StringComparer.Ordinal));
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationHandlerProvider.cs (1)
29private readonly Dictionary<string, IAuthenticationHandler> _handlerMap = new Dictionary<string, IAuthenticationHandler>(StringComparer.Ordinal);
AuthenticationSchemeProvider.cs (1)
21: this(options, new Dictionary<string, AuthenticationScheme>(StringComparer.Ordinal))
Microsoft.AspNetCore.Authentication.Core.Test (8)
AuthenticationPropertiesTests.cs (5)
14var items = new Dictionary<string, string?> 19var parameters = new Dictionary<string, object?> 49var items = new Dictionary<string, string?> 61var items = new Dictionary<string, string?> 65var parameters = new Dictionary<string, object?>
AuthenticationSchemeProviderTests.cs (1)
303: base(options, new Dictionary<string, AuthenticationScheme>(StringComparer.OrdinalIgnoreCase))
AuthenticationTicketTests.cs (2)
13var items = new Dictionary<string, string?> 18var parameters = new Dictionary<string, object?>
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
64var queryStrings = new Dictionary<string, string>
Microsoft.AspNetCore.Authentication.OAuth (3)
OAuthHandler.cs (2)
200var tokenRequestParameters = new Dictionary<string, string>() 305var parameters = new Dictionary<string, string>
OAuthOptions.cs (1)
94public IDictionary<string, string> AdditionalAuthorizationParameters { get; } = new Dictionary<string, string>();
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectOptions.cs (1)
247public IDictionary<string, string> AdditionalAuthorizationParameters { get; } = new Dictionary<string, string>();
Microsoft.AspNetCore.Authentication.Test (13)
CookieTests.cs (1)
154public readonly Dictionary<string, AuthenticationTicket> Store = new Dictionary<string, AuthenticationTicket>();
GoogleTests.cs (3)
224return context.ChallengeAsync("Google", new AuthenticationProperties(new Dictionary<string, string>() 276return context.ChallengeAsync("Google", new GoogleChallengeProperties(new Dictionary<string, string> 1261var properties = new AuthenticationProperties(new Dictionary<string, string>()
OAuthTests.cs (1)
558var properties = new AuthenticationProperties(new Dictionary<string, string>()
OpenIdConnect\OpenIdConnectAuthenticateTests.cs (2)
59request.Content = new FormUrlEncodedContent(new Dictionary<string, string>()); 120var properties = new AuthenticationProperties(new Dictionary<string, string>()
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
970public IDictionary<string, string> PushedParameters { get; set; } = new Dictionary<string, string>();
OpenIdConnect\OpenIdConnectEventTests.cs (1)
1334var properties = new AuthenticationProperties(new Dictionary<string, string>()
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (1)
1332var properties = new AuthenticationProperties(new Dictionary<string, string>()
OpenIdConnect\TestSettings.cs (1)
140new Dictionary<string, string>() :
TwitterTests.cs (2)
400var content = new Dictionary<string, string>() 469var content = new Dictionary<string, string>()
Microsoft.AspNetCore.Authentication.Twitter (4)
TwitterHandler.cs (4)
185var authorizationParts = new SortedDictionary<string, string>(extraOAuthPairs ?? new Dictionary<string, string>()) 273var response = await ExecuteRequestAsync(TwitterDefaults.RequestTokenEndpoint, HttpMethod.Post, extraOAuthPairs: new Dictionary<string, string>() { { "oauth_callback", callBackUri } }); 298var formPost = new Dictionary<string, string> { { "oauth_verifier", verifier } }; 324var response = await ExecuteRequestAsync("https://api.twitter.com/1.1/account/verify_credentials.json", HttpMethod.Get, accessToken, queryParameters: new Dictionary<string, string>() { { "include_email", "true" } });
Microsoft.AspNetCore.Authorization (1)
AuthorizationOptions.cs (1)
18private Dictionary<string, Task<AuthorizationPolicy?>> PolicyMap { get; } = new Dictionary<string, Task<AuthorizationPolicy?>>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.BrowserTesting (6)
BrowserManager.cs (1)
19private readonly Dictionary<string, IBrowser> _launchBrowsers = new(StringComparer.Ordinal);
BrowserManagerConfiguration.cs (4)
29new Dictionary<string, BrowserOptions>(StringComparer.OrdinalIgnoreCase); 35new Dictionary<string, BrowserNewContextOptions>(StringComparer.OrdinalIgnoreCase); 233return mapper(new Dictionary<string, HashSet<string>>()); 235var argsMap = new Dictionary<string, HashSet<string>>();
ContextInformation.cs (1)
22public IDictionary<IPage, PageInformation> Pages { get; } = new Dictionary<IPage, PageInformation>();
Microsoft.AspNetCore.Components (36)
NavigationManagerExtensions.cs (2)
26private static readonly Dictionary<Type, QueryParameterFormatter<object>> _queryParameterFormatters = new() 706var parameterSources = new Dictionary<ReadOnlyMemory<char>, QueryParameterSource>(QueryParameterNameComparer.Instance);
ParameterView.cs (1)
108var result = new Dictionary<string, object?>();
PersistentState\ComponentStatePersistenceManager.cs (1)
19private readonly Dictionary<string, byte[]> _currentState = new(StringComparer.Ordinal);
PersistentState\PersistentServicesRegistry.cs (1)
164_underlyingAccessors = new Dictionary<string, (PropertySetter, PropertyGetter)>(StringComparer.OrdinalIgnoreCase);
Reflection\ComponentProperties.cs (3)
118unmatched ??= new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); 139unmatched ??= new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); 275_underlyingWriters = new Dictionary<string, PropertySetter>(StringComparer.OrdinalIgnoreCase);
Reflection\MemberAssignment.cs (1)
17var dictionary = new Dictionary<string, object>(StringComparer.Ordinal);
Rendering\RenderBatchBuilder.cs (2)
36public Dictionary<string, int> AttributeDiffSet { get; } = new Dictionary<string, int>(); 41= new StackObjectPool<Dictionary<object, KeyedItemInfo>>(maxPreservedItems: 10, () => new Dictionary<object, KeyedItemInfo>());
Rendering\RenderTreeBuilder.cs (2)
808var seenAttributeNames = (_seenAttributeNames ??= new Dictionary<string, int>(SimplifiedStringHashComparer.Instance)); 880var seenAttributeNames = (_seenAttributeNames ??= new Dictionary<string, int>(SimplifiedStringHashComparer.Instance));
RenderTree\Renderer.cs (6)
34private readonly Dictionary<int, ComponentState> _componentStateById = new Dictionary<int, ComponentState>(); 35private readonly Dictionary<IComponent, ComponentState> _componentStateByComponent = new Dictionary<IComponent, ComponentState>(); 37private readonly Dictionary<ulong, (int RenderedByComponentId, EventCallback Callback, string? attributeName)> _eventBindings = new(); 38private readonly Dictionary<ulong, ulong> _eventHandlerIdReplacements = new Dictionary<ulong, ulong>(); 43private readonly object _activityLinksStore = new Dictionary<string, CategoryLink>(StringComparer.OrdinalIgnoreCase); 296_rootComponentsLatestParameters ??= new();
ResourceAssetCollection.cs (1)
29var mappings = new Dictionary<string, ResourceAsset>(StringComparer.OrdinalIgnoreCase);
Routing\QueryParameterValueSupplier.cs (1)
11private readonly Dictionary<ReadOnlyMemory<char>, StringSegmentAccumulator> _queryParameterValuesByName = new(QueryParameterNameComparer.Instance);
Routing\Router.cs (1)
25= new Dictionary<string, object>();
Routing\RouteTableFactory.cs (1)
88var templatesByHandler = new Dictionary<Type, string[]>();
Sections\SectionRegistry.cs (2)
8private readonly Dictionary<object, SectionOutlet> _subscribersByIdentifier = new(); 9private readonly Dictionary<object, List<SectionContent>> _providersByIdentifier = new();
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (5)
34new ReadOnlyDictionary<string, object?>(new Dictionary<string, object?>()); 37new ReadOnlyDictionary<string, IReadOnlyList<RoutePatternParameterPolicyReference>>(new Dictionary<string, IReadOnlyList<RoutePatternParameterPolicyReference>>()); 461updatedDefaults = new Dictionary<string, object?>(defaults.Count, StringComparer.OrdinalIgnoreCase); 602updatedDefaults = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 614parameterPolicyReferences = new Dictionary<string, List<RoutePatternParameterPolicyReference>>(StringComparer.OrdinalIgnoreCase);
src\Http\Routing\src\RouteConstraintBuilder.cs (2)
44_constraints = new Dictionary<string, List<IRouteConstraint>>(StringComparer.OrdinalIgnoreCase); 54var constraints = new Dictionary<string, IRouteConstraint>(StringComparer.OrdinalIgnoreCase);
src\Http\Routing\src\RouteOptions.cs (1)
104var defaults = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase);
src\Http\Routing\src\Tree\TreeRouteBuilder.cs (1)
268var trees = new Dictionary<int, UrlMatchingTree>();
src\Http\Routing\src\Tree\UrlMatchingNode.cs (1)
31Literals = new Dictionary<string, UrlMatchingNode>(StringComparer.OrdinalIgnoreCase);
src\Shared\Components\ComponentsActivityLinkStore.cs (1)
34? new Dictionary<string, CategoryLink>(StringComparer.OrdinalIgnoreCase)
Microsoft.AspNetCore.Components.Authorization.Tests (16)
AuthorizeRouteViewTest.cs (13)
15private static readonly IReadOnlyDictionary<string, object> EmptyParametersDictionary = new Dictionary<string, object>(); 47var routeData = new RouteData(typeof(TestPageRequiringAuthorization), new Dictionary<string, object> 54_renderer.RenderRootComponent(_authorizeRouteViewComponentId, ParameterView.FromDictionary(new Dictionary<string, object> 82var routeData = new RouteData(typeof(TestPageRequiringAuthorization), new Dictionary<string, object> 90_renderer.RenderRootComponent(_authorizeRouteViewComponentId, ParameterView.FromDictionary(new Dictionary<string, object> 129_renderer.RenderRootComponent(_authorizeRouteViewComponentId, ParameterView.FromDictionary(new Dictionary<string, object> 158_renderer.RenderRootComponent(_authorizeRouteViewComponentId, ParameterView.FromDictionary(new Dictionary<string, object> 185_renderer.RenderRootComponent(_authorizeRouteViewComponentId, ParameterView.FromDictionary(new Dictionary<string, object> 212var firstRenderTask = _renderer.RenderRootComponentAsync(_authorizeRouteViewComponentId, ParameterView.FromDictionary(new Dictionary<string, object> 256var firstRenderTask = _renderer.RenderRootComponentAsync(_authorizeRouteViewComponentId, ParameterView.FromDictionary(new Dictionary<string, object> 278_renderer.RenderRootComponent(_authorizeRouteViewComponentId, ParameterView.FromDictionary(new Dictionary<string, object> 336_renderer.RenderRootComponent(_authorizeRouteViewComponentId, ParameterView.FromDictionary(new Dictionary<string, object> 344var render2Task = _renderer.Dispatcher.InvokeAsync(() => _authorizeRouteViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object>
src\Components\Shared\test\CapturedBatch.cs (1)
11= new Dictionary<int, List<RenderTreeDiff>>();
src\Components\Shared\test\TestServiceProvider.cs (2)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 20_keyedFactories ??= new();
Microsoft.AspNetCore.Components.Endpoints (23)
Assets\ImportMapDefinition.cs (1)
146importMap._scopes[key] = new Dictionary<string, string>(value);
Builder\ResourceCollectionUrlEndpoint.cs (2)
60new Dictionary<string, string> 66new Dictionary<string, string>
Builder\ResourcePreloadCollection.cs (1)
10private readonly Dictionary<string, List<PreloadAsset>> _storage = new();
DependencyInjection\WebAssemblySettingsEmitter.cs (1)
32var environmentVariables = new Dictionary<string, string>();
Discovery\ComponentCollectionBuilder.cs (1)
12private readonly Dictionary<string, IReadOnlyList<ComponentBuilder>> _components = new();
Discovery\PageCollectionBuilder.cs (1)
11private readonly Dictionary<string, IReadOnlyList<PageComponentBuilder>> _pages = new();
FormMapping\Converters\DictionaryAdapters\ReadOnlyDictionaryBufferAdapter.cs (1)
19new Dictionary<TKey, TValue>();
FormMapping\FormDataReader.cs (1)
127var result = new Dictionary<FormKey, HashSet<FormKey>>();
FormMapping\HttpContextFormValueMapper.cs (1)
125var dictionary = new Dictionary<FormKey, StringValues>();
FormMapping\Metadata\FormDataMetadataFactory.cs (1)
315public Dictionary<Type, FormDataTypeMetadata> TypeMetadata { get; set; } = new();
FormMapping\WellKnownConverters.cs (1)
19var converters = new Dictionary<Type, FormDataConverter>
Rendering\EndpointHtmlRenderer.EventDispatch.cs (2)
22private readonly Dictionary<(int ComponentId, int FrameIndex), string> _namedSubmitEventsByLocation = new(); 23private readonly Dictionary<string, HashSet<(int ComponentId, int FrameIndex)>> _namedSubmitEventsByScopeQualifiedName = new(StringComparer.Ordinal);
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (2)
265public Dictionary<string, byte[]> Saved { get; private set; } = new(); 271Saved = new Dictionary<string, byte[]>(state);
Results\RazorComponentResult.cs (1)
19= new Dictionary<string, object?>().AsReadOnly();
Results\RazorComponentResultExecutor.cs (1)
57var hostParameters = ParameterView.FromDictionary(new Dictionary<string, object?>
src\Shared\Components\ComponentsActivityLinkStore.cs (1)
34? new Dictionary<string, CategoryLink>(StringComparer.OrdinalIgnoreCase)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
19ExistingState = new Dictionary<string, byte[]>();
src\Shared\Components\ProtectedPrerenderComponentApplicationStore.cs (1)
27ExistingState = new Dictionary<string, byte[]>(deserializedState);
src\Shared\PropertyHelper\PropertyHelper.cs (2)
326return new Dictionary<string, object?>(dictionary, StringComparer.OrdinalIgnoreCase); 329dictionary = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Components.Endpoints.Tests (160)
Assets\ImportMapDefinitionTest.cs (14)
28new Dictionary<string, string> 56new Dictionary<string, IReadOnlyDictionary<string, string>> 58["/scoped/"] = new Dictionary<string, string> 85new Dictionary<string, string> 90new Dictionary<string, string> 136new Dictionary<string, string> 140new Dictionary<string, IReadOnlyDictionary<string, string>> 142["/legacy/"] = new Dictionary<string, string> 147new Dictionary<string, string> 153new Dictionary<string, string> 158new Dictionary<string, IReadOnlyDictionary<string, string>> 160["/scoped/"] = new Dictionary<string, string> 164["/legacy/"] = new Dictionary<string, string> 169new Dictionary<string, string>
Binding\FormDataMapperTests.cs (72)
26var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 46var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 66var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 80var dictionary = new Dictionary<FormKey, StringValues>(collection.Count); 97var collection = new Dictionary<string, StringValues>() { }; 119var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues("abc") }; 136var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues("abc") }; 162var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 179var collection = new Dictionary<string, StringValues>() { }; 196var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 213var collection = new Dictionary<string, StringValues>() { ["value.Slug"] = new StringValues(value) }; 239var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues("(1,1)") }; 257var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues("(1,1)") }; 273var collection = new Dictionary<string, StringValues>() { }; 290var data = new Dictionary<string, StringValues>() { }; 306var data = new Dictionary<string, StringValues>() { ["[0]"] = "10" }; 322var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "10", "11" }) }; 340var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "Red", "Blue" }) }; 358var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "Red", "Blue" }) }; 376var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "10", "a" }) }; 401var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "10", "a", "11" }) }; 431var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 462var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 508var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 569var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 609var collection = new Dictionary<string, StringValues>() 897var expected = new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }; 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, }); 913var expected = ImmutableDictionary.CreateRange(new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }); 921var expected = ImmutableSortedDictionary.CreateRange(new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }); 929var expected = ImmutableDictionary.CreateRange(new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }); 931var collection = new Dictionary<string, StringValues>() 960var expected = new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }; 984var expected = new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }; 985var collection = new Dictionary<string, StringValues>() 1014var expected = new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }; 1015var collection = new Dictionary<string, StringValues>() 1044var collection = new Dictionary<string, StringValues>() { }; 1066var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 1105var expected = new Dictionary<int, int> 1118var collection = new Dictionary<string, StringValues>() 1166var expected = new Dictionary<int, int> 1177var collection = new Dictionary<string, StringValues>() 1226var collection = new Dictionary<string, StringValues>() 1254var collection = new Dictionary<string, StringValues>() 1290var data = new Dictionary<string, StringValues>() 1315var data = new Dictionary<string, StringValues>() 1356var data = new Dictionary<string, StringValues>() 1415var data = new Dictionary<string, StringValues>() 1486var data = new Dictionary<string, StringValues>() 1541Children = new Dictionary<int, RecursiveDictionaryTree>() { [0] = expected } 1545var data = new Dictionary<string, StringValues>() 1590var data = new Dictionary<string, StringValues>() 1629var data = new Dictionary<string, StringValues>() 1660var data = new Dictionary<string, StringValues>() 1679var data = new Dictionary<string, StringValues>() 1698var data = new Dictionary<string, StringValues>() 1717var data = new Dictionary<string, StringValues>() 1739var data = new Dictionary<string, StringValues>() 1761var data = new Dictionary<string, StringValues>() 1787var data = new Dictionary<string, StringValues>() 1812var data = new Dictionary<string, StringValues>() 1832var data = new Dictionary<string, StringValues>() 1852var data = new Dictionary<string, StringValues>() { }; 1875var data = new Dictionary<string, StringValues>() { ["value"] = "20" }; 1906var data = new Dictionary<string, StringValues>(); 1934var data = new Dictionary<string, StringValues>(); 1967var data = new Dictionary<string, StringValues>(); 1989var data = new Dictionary<string, StringValues>(); 2012var data = new Dictionary<string, StringValues>(); 2045var data = new Dictionary<string, StringValues>(); 2080var data = new Dictionary<string, StringValues>()
Builder\TestFileProvider\TestFileProvider.cs (3)
11new Dictionary<string, IFileInfo>(StringComparer.Ordinal); 13new Dictionary<string, IDirectoryContents>(); 16new Dictionary<string, TestFileChangeToken>(StringComparer.Ordinal);
EndpointHtmlRendererTest.cs (21)
212ParameterView.FromDictionary(new Dictionary<string, object> 250ParameterView.FromDictionary(new Dictionary<string, object> 286ParameterView.FromDictionary(new Dictionary<string, object> 336ParameterView.FromDictionary(new Dictionary<string, object> 475var parameters = ParameterView.FromDictionary(new Dictionary<string, object> { { "Name", "SomeName" } }); 533var parameters = ParameterView.FromDictionary(new Dictionary<string, object> { { "Name", "SomeName" } }); 550var parameters = ParameterView.FromDictionary(new Dictionary<string, object> { { "Name", "SomeName" } }); 589var parameters = ParameterView.FromDictionary(new Dictionary<string, object> { { "Name", null } }); 628var parameters = ParameterView.FromDictionary(new Dictionary<string, object> { { "Name", "SomeName" } }); 679var parameters = ParameterView.FromDictionary(new Dictionary<string, object> { { "Name", null } }); 728var parameters = ParameterView.FromDictionary(new Dictionary<string, object> { { "Name", "SomeName" } }); 745var parameters = ParameterView.FromDictionary(new Dictionary<string, object> { { "state", state } }); 775var parameters = ParameterView.FromDictionary(new Dictionary<string, object> { { "state", state } }); 797ParameterView.FromDictionary(new Dictionary<string, object> 817ParameterView.FromDictionary(new Dictionary<string, object> 837ParameterView.FromDictionary(new Dictionary<string, object> 876ParameterView.FromDictionary(new Dictionary<string, object> 892ParameterView.FromDictionary(new Dictionary<string, object> 924ParameterView.FromDictionary(new Dictionary<string, object> 1005ParameterView.FromDictionary(new Dictionary<string, object> 1608ParameterView.FromDictionary(new Dictionary<string, object>
FormMapping\Converters\NullableConverterTests.cs (4)
65var dictionary = new Dictionary<FormKey, StringValues>(); 85var dictionary = new Dictionary<FormKey, StringValues>() 109var dictionary = new Dictionary<FormKey, StringValues>() 132var dictionary = new Dictionary<FormKey, StringValues>()
HttpContextFormValueMapperTest.cs (1)
38formData.SetFormData(incomingFormName, new Dictionary<string, StringValues>(), new FormFileCollection());
ImportMapTest.cs (20)
39new Dictionary<string, string> 44new Dictionary<string, IReadOnlyDictionary<string, string>> 46["development"] = new Dictionary<string, string> 52new Dictionary<string, string> 59importMap.AdditionalAttributes = new Dictionary<string, object> { ["nonce"] = "random" }.AsReadOnly(); 85new Dictionary<string, string> 90new Dictionary<string, IReadOnlyDictionary<string, string>> 92["development"] = new Dictionary<string, string> 98new Dictionary<string, string> 130new Dictionary<string, string> 135new Dictionary<string, IReadOnlyDictionary<string, string>> 137["development"] = new Dictionary<string, string> 143new Dictionary<string, string> 150new Dictionary<string, string> 169await component.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 195new Dictionary<string, string> 200new Dictionary<string, IReadOnlyDictionary<string, string>> 202["development"] = new Dictionary<string, string> 208new Dictionary<string, string> 225await component.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object>
RazorComponentResultTest.cs (2)
35var paramsDict = new Dictionary<string, object> { { "First", 123 } }; 424var parameters = new Dictionary<string, object>
RazorComponentsServiceCollectionExtensionsTest.cs (1)
90return new Dictionary<Type, Type[]>()
WebRootComponentParametersTest.cs (22)
14var parameters1 = CreateParameters(new() { ["First"] = 123 }); 15var parameters2 = CreateParameters(new() { ["First"] = 123, ["Second"] = "abc" }); 28var parameters1 = CreateParameters(new() { ["First"] = 123 }); 29var parameters2 = CreateParameters(new() { ["Second"] = 123 }); 42var parameters1 = CreateParameters(new() { ["First"] = 123 }); 43var parameters2 = CreateParameters(new() { ["First"] = 456 }); 56var parameters1 = CreateParameters(new() { ["First"] = 123 }); 57var parameters2 = CreateParameters(new() { ["First"] = 123L }); 78var parameters1 = CreateParameters(new() { ["First"] = value }); 79var parameters2 = CreateParameters(new() { ["First"] = value }); 92var parameters1 = CreateParameters(new()); 93var parameters2 = CreateParameters(new()); 106var parameters1 = CreateParametersWithNonJsonElements(new() { ["First"] = 123 }); 107var parameters2 = CreateParameters(new() { ["First"] = 456 }); 120var parameters1 = CreateParameters(new() { ["First"] = 123 }); 121var parameters2 = CreateParametersWithNonJsonElements(new() { ["First"] = 456 }); 134var parameters1 = CreateParametersWithNonJsonElements(new() { ["First"] = 123 }); 135var parameters2 = CreateParametersWithNonJsonElements(new() { ["First"] = 123 }); 148var parameters1 = CreateParametersWithNonJsonElements(new() { ["First"] = 123 }); 149var parameters2 = CreateParametersWithNonJsonElements(new() { ["First"] = 456 }); 162var parameters1 = CreateParametersWithNonJsonElements(new() { ["First"] = null }); 163var parameters2 = CreateParametersWithNonJsonElements(new() { ["First"] = null });
Microsoft.AspNetCore.Components.Forms (4)
EditContext.cs (1)
20private readonly Dictionary<FieldIdentifier, FieldState> _fieldStates = new Dictionary<FieldIdentifier, FieldState>();
EditContextDataAnnotationsExtensions.cs (1)
76private readonly Dictionary<string, FieldIdentifier> _validationPathToFieldIdentifierMapping = new();
EditContextProperties.cs (1)
28_contents ??= new Dictionary<object, object>();
ValidationMessageStore.cs (1)
14private readonly Dictionary<FieldIdentifier, List<string>> _messages = new Dictionary<FieldIdentifier, List<string>>();
Microsoft.AspNetCore.Components.Forms.Tests (3)
src\Components\Shared\test\CapturedBatch.cs (1)
11= new Dictionary<int, List<RenderTreeDiff>>();
src\Components\Shared\test\TestServiceProvider.cs (2)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 20_keyedFactories ??= new();
Microsoft.AspNetCore.Components.Performance (2)
RouteTableFactoryBenchmarks.cs (1)
22_templatesByHandler = new Dictionary<Type, string[]>
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.Components.QuickGrid (1)
Infrastructure\EventCallbackSubscribable.cs (1)
14private readonly Dictionary<EventCallbackSubscriber<T>, EventCallback<T>> _callbacks = new();
Microsoft.AspNetCore.Components.Server (9)
Circuits\CircuitPersistenceManager.cs (1)
190var persistedComponents = new Dictionary<int, ComponentMarker>();
Circuits\ComponentParameterDeserializer.cs (1)
25var parametersDictionary = new Dictionary<string, object>();
Circuits\RemoteJSRuntime.cs (1)
27internal readonly Dictionary<long, RemoteJSDataStream> RemoteJSDataStreamInstances = new();
src\Components\Shared\src\RenderBatchWriter.cs (1)
43_deduplicatedStringIndices = new Dictionary<string, int>();
src\Components\Shared\src\WebRootComponentManager.cs (1)
33private readonly Dictionary<int, WebRootComponent> _webRootComponents = new();
src\Shared\Components\ComponentsActivityLinkStore.cs (1)
34? new Dictionary<string, CategoryLink>(StringComparer.OrdinalIgnoreCase)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
19ExistingState = new Dictionary<string, byte[]>();
src\Shared\Components\ProtectedPrerenderComponentApplicationStore.cs (1)
27ExistingState = new Dictionary<string, byte[]>(deserializedState);
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (1)
246var headers = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.AspNetCore.Components.Server.Tests (42)
CircuitDisconnectMiddlewareTest.cs (4)
123await new FormUrlEncodedContent(new Dictionary<string, string> { ["circuitId"] = "1234" }).CopyToAsync(memory); 157await new FormUrlEncodedContent(new Dictionary<string, string> { ["circuitId"] = circuitId.Secret, }).CopyToAsync(memory); 195await new FormUrlEncodedContent(new Dictionary<string, string> { ["circuitId"] = circuitId.Secret, }).CopyToAsync(memory); 234await new FormUrlEncodedContent(new Dictionary<string, string> { ["circuitId"] = circuitId.Secret }).CopyToAsync(memory);
Circuits\CircuitHostTest.cs (8)
531Dictionary<string, object> parameters = new() 557Dictionary<string, object> parameters = new() 582Dictionary<string, object> parameters = new() 608await AddComponentAsync<DynamicallyAddedComponent>(circuitHost, 1, new Dictionary<string, object>() 615Dictionary<string, object> parameters = new() 647await AddComponentAsync<DynamicallyAddedComponent>(circuitHost, 1, new Dictionary<string, object>() 652Dictionary<string, object> parameters = new() 682Dictionary<string, object> parameters = new()
Circuits\CircuitPersistenceManagerTest.cs (11)
41(RootComponentType: typeof(RootComponent), Parameters: new Dictionary<string, object> 76new Dictionary<string, object> 95(RootComponentType: typeof(RootComponent), Parameters: new Dictionary<string, object> 99(RootComponentType: typeof(SecondRootComponent), Parameters: new Dictionary<string, object> 129new Dictionary<string, object> 140new Dictionary<string, object> 159(RootComponentType: typeof(RootComponent), Parameters: new Dictionary<string, object> 192ApplicationState = new Dictionary<string, byte[]> { ["test"] = [1, 2, 3] }, 223(RootComponentType: typeof(RootComponent), Parameters: new Dictionary<string, object> 258ApplicationState = new Dictionary<string, byte[]> { ["test"] = [1, 2, 3] }, 659ApplicationState = new Dictionary<string, byte[]>(state),
Circuits\ComponentHubTest.cs (1)
320var items = new Dictionary<object, object>();
Circuits\DefaultInMemoryCircuitPersistenceProviderTest.cs (1)
130var circuitIds = new Dictionary<string, CircuitId>
Circuits\HybridCacheCircuitPersistenceProviderTest.cs (2)
25ApplicationState = new Dictionary<string, byte[]> { 67ApplicationState = new Dictionary<string, byte[]> {
Circuits\RemoteRendererTest.cs (6)
218ParameterView.FromDictionary(new Dictionary<string, object> 281ParameterView.FromDictionary(new Dictionary<string, object> 344ParameterView.FromDictionary(new Dictionary<string, object> 401ParameterView.FromDictionary(new Dictionary<string, object> 555var parameters = new Dictionary<string, object> { ["Name"] = "value" }; 594var parameters = new Dictionary<string, object> { ["Name"] = "value" };
Circuits\ServerComponentDeserializerTest.cs (7)
44(typeof(TestComponent), new Dictionary<string, object> { ["Parameter"] = "Value" }))); 63(typeof(TestComponent), new Dictionary<string, object> { ["Parameter"] = null }))); 103(typeof(TestComponent), new Dictionary<string, object> { ["First"] = "Value" }), 104(typeof(TestComponent), new Dictionary<string, object> { ["Second"] = null }))); 133(typeof(TestComponent), new Dictionary<string, object> { ["First"] = "Value" }), 323(typeof(TestComponent), new Dictionary<string, object> { ["First"] = "Value" }), 402Marker = CreateMarker(typeof(DynamicallyAddedComponent), new()
src\SignalR\common\SignalR.Common\test\Internal\Protocol\HubMessageHelpers.cs (1)
18hubMessage.Headers = new Dictionary<string, string>();
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (1)
26protected static readonly IDictionary<string, string> TestHeaders = new Dictionary<string, string>
Microsoft.AspNetCore.Components.Tests (175)
CascadingParameterStateTest.cs (1)
429var supplierParams = new Dictionary<string, object>
DynamicComponentTest.cs (6)
16var parameters = new Dictionary<string, object> 50var parameters = ParameterView.FromDictionary(new Dictionary<string, object> 70var childParameters = new Dictionary<string, object> 78var parameters = ParameterView.FromDictionary(new Dictionary<string, object> 108var childParameters = new Dictionary<string, object> 112var parameters = ParameterView.FromDictionary(new Dictionary<string, object>
IPersistentComponentStateSerializerTests.cs (4)
18var currentState = new Dictionary<string, byte[]>(); 34var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 48var existingState = new Dictionary<string, byte[]> { { "test-key", customBytes } }; 50var state = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
LayoutViewTest.cs (8)
40var setParametersTask = _renderer.Dispatcher.InvokeAsync(() => _layoutViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 61var setParametersTask = _renderer.Dispatcher.InvokeAsync(() => _layoutViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 87var setParametersTask = _renderer.Dispatcher.InvokeAsync(() => _layoutViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 119var setParametersTask = _renderer.Dispatcher.InvokeAsync(() => _layoutViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 160var setParametersTask = _renderer.Dispatcher.InvokeAsync(() => _layoutViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 170_renderer.Dispatcher.InvokeAsync(() => _layoutViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 204var setParametersTask1 = _renderer.Dispatcher.InvokeAsync(() => _layoutViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 214var setParametersTask2 = _renderer.Dispatcher.InvokeAsync(() => _layoutViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object>
NavigationManagerTest.cs (4)
159var actualUri = navigationManager.GetUriWithQueryParameters(new Dictionary<string, object> 177var actualUri = navigationManager.GetUriWithQueryParameters(new Dictionary<string, object> 191var unsupportedParameterValues = new Dictionary<string, object> 206var values = new Dictionary<string, object>
ParameterViewTest.Assignment.cs (3)
324var value = new Dictionary<string, object>(); 375{ nameof(HasCaptureUnmatchedValuesProperty.CaptureUnmatchedValues), new Dictionary<string, object>() }, 401{ nameof(HasCaptureUnmatchedValuesProperty.CaptureUnmatchedValues), new Dictionary<string, object>() },
ParameterViewTest.cs (2)
242var dictionary = new Dictionary<string, object>(); 255var dictionary = new Dictionary<string, object>
PersistentState\ComponentApplicationStateTest.cs (15)
14var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 15var existingState = new Dictionary<string, byte[]> 32var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 33var existingState = new Dictionary<string, byte[]> 48var currentState = new Dictionary<string, byte[]>(); 62var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 63var existingState = new Dictionary<string, byte[]> 81var currentState = new Dictionary<string, byte[]>(); 100var currentState = new Dictionary<string, byte[]>(); 117var currentState = new Dictionary<string, byte[]>(); 136var currentState = new Dictionary<string, byte[]>(); 156var existingState = new Dictionary<string, byte[]>() { ["MyState"] = serialized }; 157var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 174var existingState = new Dictionary<string, byte[]>() { ["MyState"] = serialized }; 175var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
PersistentState\ComponentStatePersistenceManagerTest.cs (10)
44var state = new Dictionary<string, byte[]> 66var state = new Dictionary<string, byte[]> 88var state = new Dictionary<string, byte[]>(); 138var state = new Dictionary<string, byte[]>(); 165var state = new Dictionary<string, byte[]>(); 187var state = new Dictionary<string, byte[]>(); 217var state = new Dictionary<string, byte[]>(); 253var state = new Dictionary<string, byte[]>(); 281var state = new Dictionary<string, byte[]>(); 309var state = new Dictionary<string, byte[]>();
PersistentState\PersistentServicesRegistryTest.cs (9)
32var testStore = new TestStore(new Dictionary<string, byte[]>()); 75var testStore = new TestStore(new Dictionary<string, byte[]>()); 109var testStore = new TestStore(new Dictionary<string, byte[]>()); 142var testStore = new TestStore(new Dictionary<string, byte[]>()); 171var testStore = new TestStore(new Dictionary<string, byte[]>()); 211var testStore = new TestStore(new Dictionary<string, byte[]>()); 245var testStore = new TestStore(new Dictionary<string, byte[]>()); 325var testStore = new TestStore(new Dictionary<string, byte[]>()); 370var testStore = new TestStore(new Dictionary<string, byte[]>());
PersistentStateValueProviderTests.cs (24)
25new Dictionary<string, byte[]>(), 54new Dictionary<string, byte[]>(), 76new Dictionary<string, byte[]>(), 99var state = new Dictionary<string, byte[]>(); 124var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 137var state = new Dictionary<string, byte[]>(); 162var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 175var state = new Dictionary<string, byte[]>(); 203var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 248var state = new Dictionary<string, byte[]>(); 276var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 294var state = new Dictionary<string, byte[]>(); 334var state = new Dictionary<string, byte[]>(); 367var state = new Dictionary<string, byte[]>(); 407var state = new Dictionary<string, byte[]>(); 439var state = new Dictionary<string, byte[]>(); 462var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 474var state = new Dictionary<string, byte[]>(); 497var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 509var state = new Dictionary<string, byte[]>(); 532var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 544var state = new Dictionary<string, byte[]>(); 567var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 577var dictionary = new Dictionary<string, byte[]>();
RendererTest.cs (49)
238await renderer.Dispatcher.InvokeAsync(() => renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 240[EventActionsName] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 257[WhatToRenderName] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 282renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 298renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 397await renderer.Dispatcher.InvokeAsync(() => renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 399[EventActionsName] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 416[WhatToRenderName] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 441await renderer.Dispatcher.InvokeAsync(() => renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 443[EventActionsName] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 460[WhatToRenderName] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 485await renderer.Dispatcher.InvokeAsync(() => renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 487[EventActionsName] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 518[WhatToRenderName] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 2632ChildParameters = new Dictionary<string, object> 2759ChildParameters = new Dictionary<string, object> 3552var task = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3554[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3565[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3585var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3587[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3598[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3618var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3620[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3631[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3652var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3654[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3669[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3749var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3751[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3779[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3807var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3809[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3835[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3862var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3864[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3890[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3916var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3918[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3946[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 4046var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 4048[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 4059[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 4080var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 4082[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 4093[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 4117await renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 4119[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 4135[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>>
Rendering\RenderTreeBuilderTest.cs (13)
285builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 292builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 331builder.AddMultipleAttributes(1, new Dictionary<string, object>() 354var attributes = new Dictionary<string, object> 368var attributes = new Dictionary<string, object> 1842builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 1867builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 1892builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 1915builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 1939builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 1962builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 1993builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 2002builder.AddMultipleAttributes(0, new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
RouteViewTest.cs (8)
48var routeParams = new Dictionary<string, object> 55_renderer.Dispatcher.InvokeAsync(() => _routeViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 99var routeParams = new Dictionary<string, object>(); 103_renderer.Dispatcher.InvokeAsync(() => _routeViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 123var routeParams = new Dictionary<string, object>(); 127_renderer.Dispatcher.InvokeAsync(() => _routeViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object> 146var routeParams = new Dictionary<string, object>(); 150_renderer.Dispatcher.InvokeAsync(() => _routeViewComponent.SetParametersAsync(ParameterView.FromDictionary(new Dictionary<string, object>
Routing\RouterTest.cs (4)
186var parameters = new Dictionary<string, object> 206var parameters = new Dictionary<string, object> 232var parameters = new Dictionary<string, object> 253var parameters = new Dictionary<string, object>
Routing\RouteTableFactoryTests.cs (9)
335var expectedParameters = new Dictionary<string, object> 356var expectedParameters = new Dictionary<string, object> 403Assert.Equal(new Dictionary<string, object> 676Assert.Equal(new Dictionary<string, object> 706Assert.Equal(new Dictionary<string, object> 732Assert.Equal(new Dictionary<string, object> 757Assert.Equal(new Dictionary<string, object> 952Assert.Equal(context.Parameters, new Dictionary<string, object> 1111Assert.Equal(new Dictionary<string, object>
Routing\TemplateParserTests.cs (3)
274new Dictionary<string, object>(), 275new Dictionary<string, IReadOnlyList<RoutePatternParameterPolicyReference>>(), 276new Dictionary<string, object>(),
src\Components\Shared\test\CapturedBatch.cs (1)
11= new Dictionary<int, List<RenderTreeDiff>>();
src\Components\Shared\test\TestServiceProvider.cs (2)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 20_keyedFactories ??= new();
Microsoft.AspNetCore.Components.Web (9)
Forms\InputBase.cs (2)
345result = new Dictionary<string, object>(); 354result = new Dictionary<string, object>();
Forms\Mapping\FormMappingContext.cs (3)
97_errors ??= new Dictionary<string, FormMappingError>(); 118_errorsByFormName ??= new Dictionary<string, Dictionary<string, FormMappingError>>(); 121formErrors = new Dictionary<string, FormMappingError>();
JSComponents\JSComponentConfigurationStore.cs (3)
24private readonly Dictionary<string, Type> _jsComponentTypesByIdentifier = new(StringComparer.Ordinal); 25internal Dictionary<string, JSComponentParameter[]> JSComponentParametersByIdentifier { get; } = new(StringComparer.Ordinal); 26internal Dictionary<string, List<string>> JSComponentIdentifiersByInitializer { get; } = new(StringComparer.Ordinal);
JSComponents\JSComponentInterop.cs (1)
202ParameterInfoByName = new(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Components.Web.Tests (20)
Forms\EditFormTest.cs (1)
185AdditionalFormAttributes = new Dictionary<string, object>
Forms\InputBaseTest.cs (2)
240AdditionalAttributes = new Dictionary<string, object>() 471rootComponent.AdditionalAttributes = new Dictionary<string, object>();
Forms\InputDateTest.cs (1)
17AdditionalAttributes = new Dictionary<string, object>
Forms\InputNumberTest.cs (2)
32AdditionalAttributes = new Dictionary<string, object> 76AdditionalAttributes = new Dictionary<string, object>
Forms\InputSelectTest.cs (1)
175AdditionalAttributes = new Dictionary<string, object>
HtmlRendering\HtmlRendererTest.cs (10)
177rtb.AddMultipleAttributes(3, new Dictionary<string, object>() { { "Class", "test2" }, }); 666ParameterView.FromDictionary(new Dictionary<string, object> 763var result = await htmlRenderer.RenderComponentAsync<AsyncComponent>(ParameterView.FromDictionary(new Dictionary<string, object> 789var result = await htmlRenderer.RenderComponentAsync<NestedAsyncComponent>(ParameterView.FromDictionary(new Dictionary<string, object> 811var first = await htmlRenderer.RenderComponentAsync<SectionOutlet>(ParameterView.FromDictionary(new Dictionary<string, object> 819var second = await htmlRenderer.RenderComponentAsync<SectionContent>(ParameterView.FromDictionary(new Dictionary<string, object> 896await htmlRenderer.RenderComponentAsync<ErrorThrowingComponent>(ParameterView.FromDictionary(new Dictionary<string, object> 917htmlRenderer.RenderComponentAsync<ErrorThrowingComponent>(ParameterView.FromDictionary(new Dictionary<string, object> 937htmlRenderer.BeginRenderingComponent<ErrorThrowingComponent>(ParameterView.FromDictionary(new Dictionary<string, object> 957var content = htmlRenderer.BeginRenderingComponent<ErrorThrowingComponent>(ParameterView.FromDictionary(new Dictionary<string, object>
src\Components\Shared\test\CapturedBatch.cs (1)
11= new Dictionary<int, List<RenderTreeDiff>>();
src\Components\Shared\test\TestServiceProvider.cs (2)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 20_keyedFactories ??= new();
Microsoft.AspNetCore.Components.WebAssembly (5)
Hosting\WebAssemblyHostConfiguration.cs (1)
41IDictionary<string, object> IConfigurationBuilder.Properties { get; } = new Dictionary<string, object>();
Http\WebAssemblyHttpRequestMessageExtensions.cs (1)
126fetchOptions = new Dictionary<string, object>(StringComparer.Ordinal);
Prerendering\WebAssemblyComponentParameterDeserializer.cs (1)
26var parametersDictionary = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
src\Components\Shared\src\WebRootComponentManager.cs (1)
33private readonly Dictionary<int, WebRootComponent> _webRootComponents = new();
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
19ExistingState = new Dictionary<string, byte[]>();
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
ContentEncodingNegotiator.cs (1)
18private static readonly Dictionary<StringSegment, string> _encodingExtensionMap = new Dictionary<StringSegment, string>(StringSegmentComparer.OrdinalIgnoreCase)
Microsoft.AspNetCore.Components.WebAssembly.Tests (10)
Hosting\WebAssemblyHostConfigurationTest.cs (10)
15var initialData = new Dictionary<string, string>() { 41var initialData = new Dictionary<string, string>() { { "color", "blue" } }; 65var initialData = new Dictionary<string, string>() { { "color", "blue" } }; 83var initialData = new Dictionary<string, string>() { 110var initialData = new Dictionary<string, string>() { { "color", "blue" } }; 127var dic1 = new Dictionary<string, string>() 134var dic2 = new Dictionary<string, string>() 141var dic3 = new Dictionary<string, string>() 186var dic1 = new Dictionary<string, string>() 190var dic2 = new Dictionary<string, string>()
Microsoft.AspNetCore.Components.WebView (5)
FileExtensionContentTypeProvider.cs (1)
28: this(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
src\Components\Shared\src\RenderBatchWriter.cs (1)
43_deduplicatedStringIndices = new Dictionary<string, int>();
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
380var result = new Dictionary<string, StaticWebAssetNode>(StaticWebAssetManifest.PathComparer);
StaticContentProvider.cs (1)
89=> new Dictionary<string, string>()
WebViewManager.cs (1)
29private readonly Dictionary<string, RootComponent> _rootComponentsBySelector = new();
Microsoft.AspNetCore.Components.WebView.Maui (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
39 private static readonly Dictionary<(string AssemblyName, string RelativePath), (string? ContentType, byte[] Content)> _updatedContent = new()
Microsoft.AspNetCore.Components.WebView.Test (5)
Infrastructure\ElementNode.cs (3)
15_attributes = new Dictionary<string, object>(StringComparer.Ordinal); 16_properties = new Dictionary<string, object>(StringComparer.Ordinal); 17_events = new Dictionary<string, ElementEventDescriptor>(StringComparer.Ordinal);
Infrastructure\TestDocument.cs (1)
14private readonly Dictionary<long, ComponentNode> _componentsById = new();
StaticContentProviderTests.cs (1)
19new Dictionary<string, string>
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
39 private static readonly Dictionary<(string AssemblyName, string RelativePath), (string? ContentType, byte[] Content)> _updatedContent = new()
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
39 private static readonly Dictionary<(string AssemblyName, string RelativePath), (string? ContentType, byte[] Content)> _updatedContent = new()
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (3)
ConcurrencyLimiterEventSourceTests.cs (2)
62new Dictionary<string, string> 103new Dictionary<string, string>
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
20private readonly Dictionary<string, Channel<double>> _counters = new Dictionary<string, Channel<double>>();
Microsoft.AspNetCore.Connections.Abstractions (1)
ConnectionItems.cs (1)
22: this(new Dictionary<object, object?>())
Microsoft.AspNetCore.Cors (1)
Infrastructure\CorsOptions.cs (1)
16= new Dictionary<string, (CorsPolicy, Task<CorsPolicy>)>(StringComparer.Ordinal);
Microsoft.AspNetCore.DataProtection (4)
KeyManagement\KeyRing.cs (1)
22_keyIdToKeyHolderMap = new Dictionary<Guid, KeyHolder>();
XmlEncryption\XmlEncryptionExtensions.cs (2)
35var placeholderReplacements = new Dictionary<XElement, XElement>(); 117var placeholderReplacements = new Dictionary<XElement, EncryptedXmlInfo>();
XmlEncryption\XmlKeyDecryptionOptions.cs (1)
16private readonly Dictionary<string, List<X509Certificate2>> _certs = new Dictionary<string, List<X509Certificate2>>(StringComparer.Ordinal);
Microsoft.AspNetCore.DataProtection.Tests (11)
Internal\KeyManagementOptionsSetupTest.cs (1)
47var registryEntries = new Dictionary<string, object>()
RegistryPolicyResolverTests.cs (10)
21var registryEntries = new Dictionary<string, object>(); 37var registryEntries = new Dictionary<string, object>() 58var registryEntries = new Dictionary<string, object>() 75var registryEntries = new Dictionary<string, object>() 92var registryEntries = new Dictionary<string, object>() 116var registryEntries = new Dictionary<string, object>() 152var registryEntries = new Dictionary<string, object>() 174var registryEntries = new Dictionary<string, object>() 204var registryEntries = new Dictionary<string, object>() 226var registryEntries = new Dictionary<string, object>()
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Diagnostics.HealthChecks (3)
HealthCheckOptions.cs (3)
25private IDictionary<HealthStatus, int> _resultStatusCodes = new Dictionary<HealthStatus, int>(DefaultStatusCodesMapping); 27private static readonly IReadOnlyDictionary<HealthStatus, int> DefaultStatusCodesMapping = new Dictionary<HealthStatus, int> 47set => _resultStatusCodes = value != null ? ValidateStatusCodesMapping(value) : new Dictionary<HealthStatus, int>(DefaultStatusCodesMapping);
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (3)
HealthCheckMiddlewareTests.cs (3)
924ResultStatusCodes = new Dictionary<HealthStatus, int> 937new HealthCheckOptions { ResultStatusCodes = new Dictionary<HealthStatus, int>() } 950ResultStatusCodes = new Dictionary<HealthStatus, int>
Microsoft.AspNetCore.Diagnostics.Middleware (5)
Logging\IncomingHttpRouteUtility.cs (1)
36var parametersToRedact = new Dictionary<string, DataClassification>();
Logging\LoggingRedactionOptions.cs (3)
59public IDictionary<string, DataClassification> RouteParameterDataClasses { get; set; } = new Dictionary<string, DataClassification>(StringComparer.OrdinalIgnoreCase); 70public IDictionary<string, DataClassification> RequestHeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>(StringComparer.OrdinalIgnoreCase); 81public IDictionary<string, DataClassification> ResponseHeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>(StringComparer.OrdinalIgnoreCase);
Logging\RequestHeadersLogEnricherOptions.cs (1)
27public IDictionary<string, DataClassification> HeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (25)
Buffering\PerRequestLogBufferingOptionsConfigureOptionsTests.cs (3)
48var configValues = new Dictionary<string, string?> 71var configValues = new Dictionary<string, string?> 101var configValues = new Dictionary<string, string?>
Latency\RequestLatencyTelemetryExtensionsTests.cs (1)
70.AddInMemoryCollection(new Dictionary<string, string?>
Logging\AcceptanceTests.Routing.cs (1)
79validateRequestState(new Dictionary<string, string?>(state));
Logging\HeaderReaderTests.cs (5)
20var reader = new HeaderReader(new Dictionary<string, DataClassification>(), null!, string.Empty); 22var headers = new HeaderDictionary(new Dictionary<string, StringValues> { [HeaderNames.Accept] = MediaTypeNames.Text.Plain }); 30var reader = new HeaderReader(new Dictionary<string, DataClassification> { [HeaderNames.Accept] = DataClassification.Unknown }, null!, string.Empty); 42var headersToLog = new Dictionary<string, DataClassification> 50var headers = new Dictionary<string, StringValues>
Logging\HttpLoggingServiceExtensionsTests.cs (3)
61o.RouteParameterDataClasses = new Dictionary<string, DataClassification> 66o.RequestHeadersDataClasses = new Dictionary<string, DataClassification> 71o.ResponseHeadersDataClasses = new Dictionary<string, DataClassification>
Logging\IncomingHttpRouteUtilityTests.cs (11)
57var sensitiveParameters = routeUtility.GetSensitiveParameters(httpRoute, mockHttpRequest.Object, new Dictionary<string, DataClassification>(StringComparer.Ordinal)); 95var sensitiveParameters = routeUtility.GetSensitiveParameters(httpRoute, mockHttpRequest.Object, new Dictionary<string, DataClassification>(StringComparer.Ordinal)); 135var sensitiveParameters = routeUtility.GetSensitiveParameters(httpRoute, mockHttpRequest.Object, new Dictionary<string, DataClassification>(StringComparer.Ordinal)); 177var d = new Dictionary<string, DataClassification> 220var d = new Dictionary<string, DataClassification> 267var sensitiveParameters = routeUtility.GetSensitiveParameters(httpRoute, mockHttpRequest.Object, new Dictionary<string, DataClassification>(StringComparer.Ordinal)); 306var d = new Dictionary<string, DataClassification> 354var d = new Dictionary<string, DataClassification> 399var d = new Dictionary<string, DataClassification>(); 438var d = new Dictionary<string, DataClassification> 460var d = new Dictionary<string, DataClassification>
Logging\RequestHeadersEnricherTests.cs (1)
265HeadersDataClasses = new Dictionary<string, DataClassification>
Microsoft.AspNetCore.Grpc.JsonTranscoding (8)
Internal\Json\JsonConverterHelper.cs (1)
23internal static readonly Dictionary<string, Type> WellKnownTypeNames = new Dictionary<string, Type>
Internal\Json\MessageTypeInfoResolver.cs (1)
162var map = new Dictionary<string, FieldDescriptor>();
Internal\JsonTranscodingServerCallContext.cs (1)
21private static readonly AuthContext UnauthenticatedContext = new AuthContext(null, new Dictionary<string, List<AuthProperty>>());
src\Grpc\JsonTranscoding\src\Shared\AuthContextHelpers.cs (1)
32var properties = new Dictionary<string, List<AuthProperty>>(StringComparer.Ordinal);
src\Grpc\JsonTranscoding\src\Shared\Server\MethodOptions.cs (1)
116var resolvedCompressionProviders = new Dictionary<string, ICompressionProvider>(StringComparer.Ordinal);
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (3)
391var routeParameterDescriptors = new Dictionary<string, RouteParameter>(StringComparer.Ordinal); 500return new Dictionary<string, FieldDescriptor>(); 504var queryParameters = new Dictionary<string, FieldDescriptor>();
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (32)
Infrastructure\TestHelpers.cs (1)
96routeParameterDescriptors ?? new Dictionary<string, RouteParameter>(),
JsonTranscodingServerCallContextTests.cs (1)
102new Dictionary<string, RouteParameter>(),
ServerStreamingServerCallHandlerTests.cs (5)
51var routeParameterDescriptors = new Dictionary<string, RouteParameter> 98var routeParameterDescriptors = new Dictionary<string, RouteParameter> 140var routeParameterDescriptors = new Dictionary<string, RouteParameter> 180var routeParameterDescriptors = new Dictionary<string, RouteParameter> 229var routeParameterDescriptors = new Dictionary<string, RouteParameter>
UnaryServerCallHandlerTests.cs (25)
55var routeParameterDescriptors = new Dictionary<string, RouteParameter> 99var routeParameterDescriptors = new Dictionary<string, RouteParameter> 133var routeParameterDescriptors = new Dictionary<string, RouteParameter> 206httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 244httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 291httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 341httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 391httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 441httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 491httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 525httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 553httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 584httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 620httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 651httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 677httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 704httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1326httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1493httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1521httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1604httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1621httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1665httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1760httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1794httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
Microsoft.AspNetCore.Grpc.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.Grpc.Swagger (4)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (1)
68RouteValues = new Dictionary<string, string?>
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (3)
391var routeParameterDescriptors = new Dictionary<string, RouteParameter>(StringComparer.Ordinal); 500return new Dictionary<string, FieldDescriptor>(); 504var queryParameters = new Dictionary<string, FieldDescriptor>();
Microsoft.AspNetCore.HeaderParsing (2)
HeaderParsingOptions.cs (2)
24public IDictionary<string, StringValues> DefaultValues { get; set; } = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase); 42public IDictionary<string, int> MaxCachedValuesPerHeader { get; set; } = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.HeaderParsing.Tests (3)
HeaderParsingExtensionsTests.cs (1)
66.AddInMemoryCollection(new Dictionary<string, string?>
HeaderParsingOptionsTests.cs (2)
15var defValue = new Dictionary<string, StringValues>(); 16var maxCachedValues = new Dictionary<string, int>();
Microsoft.AspNetCore.HeaderPropagation (1)
HeaderPropagationMiddleware.cs (1)
46var headers = _values.Headers ??= new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
HeaderPropagationMessageHandlerTest.cs (1)
17State.Headers = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Hosting (2)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
380var result = new Dictionary<string, StaticWebAssetNode>(StaticWebAssetManifest.PathComparer);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Hosting.Tests (44)
HostingApplicationDiagnosticsTests.cs (2)
47new Dictionary<string, string> 156new Dictionary<string, string>
HostingEnvironmentExtensionsTests.cs (2)
19.AddInMemoryCollection(new Dictionary<string, string>() 66.AddInMemoryCollection(new Dictionary<string, string>()
Internal\HostingEventSourceTests.cs (1)
200new Dictionary<string, string>
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
20private readonly Dictionary<string, Channel<double>> _counters = new Dictionary<string, Channel<double>>();
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (16)
23Children = new(comparer) 27Children = new(comparer) 371Children = new(comparer) 375Children = new(comparer) 512Children = new(comparer) 516Children = new(comparer) 520Children = new(comparer) 562Children = new(comparer) 566Children = new(comparer) 570Children = new(comparer) 619Children = new(comparer) 623Children = new(comparer) 711Children = new() 715Children = new() 719Children = new() { ["file.version.js"] = new() { Match = new() { ContentRoot = 0, Path = "file.js" } } }, 759Children = new Dictionary<string, ManifestStaticWebAssetFileProvider.StaticWebAssetNode>(),
WebHostBuilderTests.cs (10)
294var data = new Dictionary<string, string> 507var settings = new Dictionary<string, string> 533var settings = new Dictionary<string, string> 559var settings = new Dictionary<string, string> 568var overrideSettings = new Dictionary<string, string> 594var vals = new Dictionary<string, string> 623var vals = new Dictionary<string, string> 644var vals = new Dictionary<string, string> 1477var vals = new Dictionary<string, string> 1499var vals = new Dictionary<string, string>
WebHostConfigurationsTests.cs (3)
14var parameters = new Dictionary<string, string>() 39var parameters = new Dictionary<string, string>() { { "ENVIRONMENT", Environments.Development } }; 50var parameters = new Dictionary<string, string>() { { "detailedErrors", value } };
WebHostTests.cs (9)
52var data = new Dictionary<string, string> 71var data = new Dictionary<string, string> 90var data = new Dictionary<string, string> 122var data = new Dictionary<string, string> 196var data = new Dictionary<string, string> 235var data = new Dictionary<string, string> 271var data = new Dictionary<string, string> 813var vals = new Dictionary<string, string> 836var vals = new Dictionary<string, string>
Microsoft.AspNetCore.Http (12)
Builder\ApplicationBuilder.cs (1)
44Properties = new Dictionary<string, object?>(StringComparer.Ordinal);
HeaderDictionary.cs (1)
58Store = new Dictionary<string, StringValues>(capacity, StringComparer.OrdinalIgnoreCase);
Internal\ItemsDictionary.cs (2)
134_items = new Dictionary<object, object?>(); 163public static readonly IDictionary<object, object?> Dictionary = new Dictionary<object, object?>();
QueryCollection.cs (1)
60Store = new Dictionary<string, StringValues>(capacity, StringComparer.OrdinalIgnoreCase);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
47_innerDictionary = new Dictionary<TKey, TValue>(_sourceDictionary,
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (3)
48_copy = new Dictionary<TKey, TValue>(); 61_copy = new Dictionary<TKey, TValue>(); 65_copy = new Dictionary<TKey, TValue>(_source, _source.Comparer);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (2)
82_dictionaryStorage = new Dictionary<TKey, TValue>(capacity, _comparer); 519_dictionaryStorage = new Dictionary<TKey, TValue>(capacity, _comparer);
Timeouts\RequestTimeoutOptions.cs (1)
20public IDictionary<string, RequestTimeoutPolicy> Policies { get; } = new Dictionary<string, RequestTimeoutPolicy>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Http.Abstractions (6)
ProblemDetails\HttpValidationProblemDetails.cs (2)
18: this(new Dictionary<string, string[]>(StringComparer.Ordinal)) 36: this(new Dictionary<string, string[]>(errors ?? throw new ArgumentNullException(nameof(errors)), StringComparer.Ordinal))
ProblemDetails\ProblemDetails.cs (1)
70public IDictionary<string, object?> Extensions { get; set; } = new Dictionary<string, object?>(StringComparer.Ordinal);
Routing\RouteValueDictionary.cs (1)
900var names = new Dictionary<string, PropertyHelper>(StringComparer.OrdinalIgnoreCase);
src\Shared\PropertyHelper\PropertyHelper.cs (2)
326return new Dictionary<string, object?>(dictionary, StringComparer.OrdinalIgnoreCase); 329dictionary = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (2)
GetHeaderSplitBenchmark.cs (1)
16var dict = new Dictionary<string, StringValues>()
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
UseMiddlewareTest.cs (2)
318private readonly Dictionary<Type, object> _services = new Dictionary<Type, object>(); 339private readonly Dictionary<object, Tuple<Type, object>> _services = new Dictionary<object, Tuple<Type, object>>();
UsePathBaseExtensionsTests.cs (1)
245private readonly Dictionary<Type, object> _services = new Dictionary<Type, object>();
Microsoft.AspNetCore.Http.Connections (2)
Internal\HttpConnectionDispatcher.cs (2)
726var requestHeaders = new Dictionary<string, StringValues>(existingRequestFeature.Headers.Count, StringComparer.OrdinalIgnoreCase); 768newHttpContext.Items = new Dictionary<object, object?>(context.Items);
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnectionOptions.cs (1)
46_headers = new Dictionary<string, string>();
Microsoft.AspNetCore.Http.Connections.Tests (18)
HttpConnectionDispatcherTests.cs (18)
228var values = new Dictionary<string, StringValues>(); 308var values = new Dictionary<string, StringValues>(); 350var values = new Dictionary<string, StringValues>(); 388var values = new Dictionary<string, StringValues>(); 427var values = new Dictionary<string, StringValues>(); 467var values = new Dictionary<string, StringValues>(); 530var values = new Dictionary<string, StringValues>(); 598var values = new Dictionary<string, StringValues>(); 661var values = new Dictionary<string, StringValues>(); 765var values = new Dictionary<string, StringValues>(); 907var values = new Dictionary<string, StringValues>(); 1842var values = new Dictionary<string, StringValues>(); 1894var values = new Dictionary<string, StringValues>(); 2570var values = new Dictionary<string, StringValues>(); 2630var values = new Dictionary<string, StringValues>(); 2687var values = new Dictionary<string, StringValues>(); 3703var values = new Dictionary<string, StringValues>(); 3740var values = new Dictionary<string, StringValues>();
Microsoft.AspNetCore.Http.Extensions (9)
RequestDelegateFactory.cs (1)
2230var dictionary = new Dictionary<FormKey, StringValues>();
RequestDelegateFactoryContext.cs (1)
43public Dictionary<string, string> TrackedParameters { get; } = new();
src\Components\Endpoints\src\FormMapping\Converters\DictionaryAdapters\ReadOnlyDictionaryBufferAdapter.cs (1)
19new Dictionary<TKey, TValue>();
src\Components\Endpoints\src\FormMapping\FormDataReader.cs (1)
127var result = new Dictionary<FormKey, HashSet<FormKey>>();
src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (1)
315public Dictionary<Type, FormDataTypeMetadata> TypeMetadata { get; set; } = new();
src\Components\Endpoints\src\FormMapping\WellKnownConverters.cs (1)
19var converters = new Dictionary<Type, FormDataConverter>
src\Shared\ParameterBindingMethodCache.cs (1)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length);
src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (1)
11public static readonly Dictionary<int, (string Type, string Title)> Defaults = new()
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Http.Extensions.Tests (52)
ProblemDetailsDefaultWriterTest.cs (4)
74Extensions = new Dictionary<string, object>() { { "extensionKey", 1 } } 88Assert.Equal(result.Keys, new(new() { { "type", 0 }, { "title", 1 }, { "status", 2 }, { "detail", 3 }, { "instance", 4 }, { "extensionKey", 5 }, { "traceId", expectedTraceId } })); 106Errors = new Dictionary<string, string[]>() { { "name", ["Name is invalid."] } } 120Assert.Equal(result.Keys, new(new() { { "type", 0 }, { "title", 1 }, { "status", 2 }, { "detail", 3 }, { "instance", 4 }, { "errors", 5 }, { "traceId", expectedTraceId } }));
RequestDelegateFactoryTests.cs (15)
251httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 582httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 604httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 628httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 635httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 753httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>() 1777httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1807httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1837httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1865httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 1905httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 2059var urlEncondedForm = new FormUrlEncodedContent(new Dictionary<string, string> { ["message"] = "hello", ["name"] = "foo" }); 2160httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 2197httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 3107httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
RequestDelegateFactoryTests.FormMapping.cs (8)
32httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 79httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 127httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 160httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 183httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 213httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 252httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues> 297httpContext.Request.Form = new FormCollection(new() { { "Description", "A test file" } }, formFiles);
RequestDelegateGenerator\CompileTimeCreationTests.cs (1)
780httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (3)
172httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 760httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 767httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.AsParameters.cs (1)
60var query = new QueryCollection(new Dictionary<string, StringValues>()
RequestDelegateGenerator\RequestDelegateCreationTests.cs (7)
431httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 457httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 504httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 529httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 554httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 584httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 591httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Filters.cs (5)
62httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 141httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 183httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 299httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 340httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (2)
524var urlEncondedForm = new FormUrlEncodedContent(new Dictionary<string, string> { ["message"] = "hello", ["name"] = "foo" }); 897httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (1)
186httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>()
RequestDelegateGenerator\RequestDelegateCreationTests.QueryParameters.cs (1)
54httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (1)
278httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
RequestDelegateGenerator\RuntimeCreationTests.ComplexFormBinding.cs (3)
24var content = new FormUrlEncodedContent(new Dictionary<string, string> { ["Id"] = "1", ["Name"] = "Write tests", ["IsComplete"] = "true" }); 92var content = new FormUrlEncodedContent(new Dictionary<string, string> { ["[foo]"] = "true", ["[bar]"] = "false", ["[baz]"] = "true" }); 201var content = new FormUrlEncodedContent(new Dictionary<string, string> { ["[0]"] = "1", ["[1]"] = "3", ["[2]"] = "5" });
Microsoft.AspNetCore.Http.Microbenchmarks (9)
AdaptiveCapacityDictionaryBenchmark.cs (6)
47_dict = new Dictionary<string, string>(1, StringComparer.OrdinalIgnoreCase); 48_dictTen = new Dictionary<string, string>(10, StringComparer.OrdinalIgnoreCase); 49_filledDictTen = new Dictionary<string, string>(10, StringComparer.OrdinalIgnoreCase); 303_ = new Dictionary<string, string>(capacity: 1); 315_ = new Dictionary<string, string>(capacity: 4); 327_ = new Dictionary<string, string>(capacity: 10);
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
ValidatableTypesBenchmark.cs (2)
48ValidationErrors = new Dictionary<string, string[]>(StringComparer.Ordinal) 63Properties = new Dictionary<string, string>
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
18Dictionary<TSource, ImmutableArray<TElement>.Builder> map = new(comparer);
StaticRouteHandlerModel\EndpointParameter.cs (1)
486var lookupTable = new Dictionary<ParameterLookupKey, IPropertySymbol>();
Microsoft.AspNetCore.Http.Results (1)
src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (1)
11public static readonly Dictionary<int, (string Type, string Title)> Defaults = new()
Microsoft.AspNetCore.Http.Results.Tests (32)
AcceptedAtRouteOfTResultTests.cs (8)
21var routeValues = new RouteValueDictionary(new Dictionary<string, string>() 45var routeValues = new RouteValueDictionary(new Dictionary<string, string>() 70new Dictionary<string, string>() 75new Dictionary<string, string>() 113routeValues: new Dictionary<string, object>(), 162var routeValues = new RouteValueDictionary(new Dictionary<string, string>() 177var routeValues = new RouteValueDictionary(new Dictionary<string, string>() 194var routeValues = new RouteValueDictionary(new Dictionary<string, string>()
AcceptedAtRouteResultTests.cs (3)
24new Dictionary<string, string>() 29new Dictionary<string, string>() 67routeValues: new Dictionary<string, object>());
CreatedAtRouteOfTResultTests.cs (7)
22var routeValues = new RouteValueDictionary(new Dictionary<string, string>() 42new Dictionary<string, string>() { { "hello", "world" } } 46new RouteValueDictionary(new Dictionary<string, string>() { 82routeValues: new Dictionary<string, object>(), 134routeValues: new Dictionary<string, object>(), 149routeValues: new Dictionary<string, object>(), 165routeValues: new Dictionary<string, object>(),
CreatedAtRouteResultTests.cs (4)
25new Dictionary<string, string>() { { "hello", "world" } } 29new RouteValueDictionary(new Dictionary<string, string>() { 65routeValues: new Dictionary<string, object>()); 115routeValues: new Dictionary<string, object>());
ProblemResultTests.cs (1)
141var details = new HttpValidationProblemDetails(new Dictionary<string, string[]>
RedirectToRouteResultTests.cs (1)
21var result = new RedirectToRouteHttpResult(null, new Dictionary<string, object>());
ResultsTests.cs (5)
1256var extensions = new Dictionary<string, object> { { "test", "value" } }; 1304var extensions = (IReadOnlyDictionary<string, object>)new Dictionary<string, object> { ["test"] = "value" }; 1399var errors = new Dictionary<string, string[]>() { { "testField", new[] { "test error" } } }; 1405var extensions = new Dictionary<string, object>() { { "testExtension", "test value" } }; 1780(() => Results.ValidationProblem(new Dictionary<string, string[]>(), null, null, null, null, null, null), typeof(ProblemHttpResult)),
TypedResultsTests.cs (3)
1072var extensions = new Dictionary<string, object> { { "test", "value" } }; 1191var errors = new Dictionary<string, string[]>() { { "testField", new[] { "test error" } } }; 1196var extensions = new Dictionary<string, object>() { { "testExtension", "test value" } };
Microsoft.AspNetCore.Http.Tests (9)
DefaultHttpContextTests.cs (2)
140var items = new Dictionary<object, object>(); 450= new Dictionary<string, byte[]>(StringComparer.OrdinalIgnoreCase);
HeaderDictionaryTests.cs (4)
24new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase) 44new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase) 59new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase) 72new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase)
Internal\DefaultHttpRequestTests.cs (2)
152var query2 = new QueryCollection(new Dictionary<string, StringValues>() 185var cookies2 = new RequestCookieCollection(new Dictionary<string, string>()
QueryCollectionTests.cs (1)
13IQueryCollection query = new QueryCollection(new Dictionary<string, StringValues>());
Microsoft.AspNetCore.HttpOverrides.Tests (3)
HttpMethodOverrideMiddlewareTest.cs (3)
134req.Content = new FormUrlEncodedContent(new Dictionary<string, string>() 172req.Content = new FormUrlEncodedContent(new Dictionary<string, string>() 209req.Content = new FormUrlEncodedContent(new Dictionary<string, string>()
Microsoft.AspNetCore.Identity (2)
IdentityApiEndpointRouteBuilderExtensions.cs (2)
425TypedResults.ValidationProblem(new Dictionary<string, string[]> { 434var errorDictionary = new Dictionary<string, string[]>(1);
Microsoft.AspNetCore.Identity.FunctionalTests (24)
Extensions\HttpClientExtensions.cs (1)
16return client.SendAsync(form, submitButton, new Dictionary<string, string>());
Infrastructure\HtmlPageContext.cs (2)
10protected HtmlPageContext() : this(new Dictionary<string, object>()) 15: this(new Dictionary<string, object>(currentContext._properties))
Infrastructure\ServerFactory.cs (1)
91new Dictionary<UIFramework, string>()
MapIdentityApiTests.cs (1)
1347private static Dictionary<string, Action<IServiceCollection>> AddIdentityActions { get; } = new()
Pages\Account\ExternalLogin.cs (2)
29var response = await Client.SendAsync(_emailForm, new Dictionary<string, string> 41var response = await Client.SendAsync(_emailForm, new Dictionary<string, string>
Pages\Account\ForgotPassword.cs (1)
20var response = await Client.SendAsync(_forgotPasswordForm, new Dictionary<string, string>
Pages\Account\Login.cs (1)
99return await Client.SendAsync(_loginForm, _loginButton, new Dictionary<string, string>()
Pages\Account\LoginWith2fa.cs (1)
28var response = await Client.SendAsync(_twoFactorForm, new Dictionary<string, string>
Pages\Account\LoginWithRecoveryCode.cs (1)
21var response = await Client.SendAsync(_loginWithRecoveryCodeForm, new Dictionary<string, string>
Pages\Account\Manage\ChangePassword.cs (1)
21await Client.SendAsync(_changePasswordForm, new Dictionary<string, string>
Pages\Account\Manage\DeleteUser.cs (1)
32return await Client.SendAsync(_deleteForm, new Dictionary<string, string>()
Pages\Account\Manage\Email.cs (1)
48var response = await Client.SendAsync(_changeEmailForm, _changeEmailButton, new Dictionary<string, string>
Pages\Account\Manage\EnableAuthenticator.cs (1)
34var sendCodeResponse = await Client.SendAsync(_sendCodeForm, new Dictionary<string, string>
Pages\Account\Manage\ManageExternalLogin.cs (1)
21var linkedExternalLogin = await Client.SendAsync(_externalLoginForm, new Dictionary<string, string>
Pages\Account\Manage\PersonalData.cs (1)
30return await Client.SendAsync(_downloadForm, new Dictionary<string, string>());
Pages\Account\Manage\RemoveExternalLogin.cs (1)
21await Client.SendAsync(_removeLoginForm, new Dictionary<string, string>
Pages\Account\Manage\SetPassword.cs (1)
21await Client.SendAsync(_setPasswordForm, new Dictionary<string, string>
Pages\Account\Register.cs (2)
39var registered = await Client.SendAsync(_registerForm, new Dictionary<string, string>() 56var registered = await Client.SendAsync(_registerForm, new Dictionary<string, string>()
Pages\Account\ResendEmailConfirmation.cs (1)
19=> Client.SendAsync(_resendForm, new Dictionary<string, string>
Pages\Account\ResetPassword.cs (1)
28var resetPasswordResponse = await Client.SendAsync(_resetPasswordForm, new Dictionary<string, string>
Pages\Contoso\Login.cs (1)
36var contosoResponse = await Client.SendAsync(_loginForm, new Dictionary<string, string>
Microsoft.AspNetCore.Identity.InMemory.Test (3)
InMemoryStore.cs (1)
70private readonly Dictionary<string, TRole> _roles = new Dictionary<string, TRole>();
InMemoryUserStore.cs (2)
24private readonly Dictionary<string, TUser> _logins = new Dictionary<string, TUser>(); 26private readonly Dictionary<string, TUser> _users = new Dictionary<string, TUser>();
Microsoft.AspNetCore.Identity.Test (1)
SignInManagerTest.cs (1)
1562private static readonly Dictionary<string, AuthenticationScheme> _defaultCookieSchemes = new()
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\Manage\DownloadPersonalData.cshtml.cs (1)
61var personalData = new Dictionary<string, string?>();
Areas\Identity\Pages\V5\Account\Manage\DownloadPersonalData.cshtml.cs (1)
61var personalData = new Dictionary<string, string?>();
Microsoft.AspNetCore.InternalTesting (3)
AssemblyTestLog.cs (1)
30private static readonly Dictionary<Assembly, AssemblyTestLog> _logs = new();
Tracing\CollectingEventListener.cs (1)
17private readonly Dictionary<string, EventSource> _existingSources = new Dictionary<string, EventSource>(StringComparer.OrdinalIgnoreCase);
xunit\AspNetTestAssemblyRunner.cs (1)
18private readonly Dictionary<Type, object> _assemblyFixtureMappings = new();
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (22)
Adapters\AdapterFactoryTests.cs (1)
34IAdapter adapter = factory.Create(new Dictionary<string, string>());
CustomNamingStrategyTests.cs (1)
21var targetObject = new Dictionary<string, int>()
IntegrationTests\DictionaryIntegrationTest.cs (2)
133public IDictionary<string, int> DictionaryOfStringToInteger { get; } = new Dictionary<string, int>(); 138public IDictionary<int, Customer> DictionaryOfStringToCustomer { get; } = new Dictionary<int, Customer>();
Internal\DictionaryAdapterTest.cs (15)
19var dictionary = new Dictionary<string, int>(StringComparer.Ordinal); 39var dictionary = new Dictionary<int, object>(); 61var dictionary = new Dictionary<int, object>(); 89var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 116var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 141var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 161var dictionary = new Dictionary<Guid, object>(); 181var dictionary = new Dictionary<Guid, int>(); 200var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 218var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 236var dictionary = new Dictionary<string, Rectangle>(StringComparer.Ordinal); 260var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 279var dictionary = new Dictionary<Uri, object>(); 298var dictionary = new Dictionary<string, List<object>>(); 322var dictionary = new Dictionary<string, object>();
Internal\ObjectVisitorTest.cs (1)
17public IDictionary<string, string> CountriesAndRegions = new Dictionary<string, string>();
TestObjectModels\DynamicTestObject.cs (1)
11private Dictionary<string, object> _dictionary = new Dictionary<string, object>();
WriteOnceDynamicTestObject.cs (1)
25private Dictionary<string, object> _dictionary = new Dictionary<string, object>();
Microsoft.AspNetCore.JsonPatch.Tests (22)
Adapters\AdapterFactoryTests.cs (1)
38IAdapter adapter = factory.Create(new Dictionary<string, string>(), new DefaultContractResolver());
CustomNamingStrategyTests.cs (1)
97var targetObject = new Dictionary<string, int>()
IntegrationTests\DictionaryIntegrationTest.cs (2)
133public IDictionary<string, int> DictionaryOfStringToInteger { get; } = new Dictionary<string, int>(); 138public IDictionary<int, Customer> DictionaryOfStringToCustomer { get; } = new Dictionary<int, Customer>();
Internal\DictionaryAdapterTest.cs (15)
22var dictionary = new Dictionary<string, int>(StringComparer.Ordinal); 42var dictionary = new Dictionary<int, object>(); 64var dictionary = new Dictionary<int, object>(); 92var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 119var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 144var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 164var dictionary = new Dictionary<Guid, object>(); 184var dictionary = new Dictionary<Guid, int>(); 203var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 221var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 239var dictionary = new Dictionary<string, Rectangle>(StringComparer.Ordinal); 262var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 281var dictionary = new Dictionary<Uri, object>(); 300var dictionary = new Dictionary<string, List<object>>(); 324var dictionary = new Dictionary<string, object>();
Internal\ObjectVisitorTest.cs (1)
17public IDictionary<string, string> CountriesAndRegions = new Dictionary<string, string>();
TestObjectModels\DynamicTestObject.cs (1)
11private Dictionary<string, object> _dictionary = new Dictionary<string, object>();
WriteOnceDynamicTestObject.cs (1)
25private Dictionary<string, object> _dictionary = new Dictionary<string, object>();
Microsoft.AspNetCore.Mvc.Abstractions (8)
Abstractions\ActionDescriptor.cs (2)
21Properties = new Dictionary<object, object?>(); 22RouteValues = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
ApiExplorer\ApiDescription.cs (1)
38public IDictionary<object, object> Properties { get; } = new Dictionary<object, object>();
ModelBinding\ModelMetadata.cs (2)
667var parameterMapping = new Dictionary<ModelMetadata, ModelMetadata>(); 668var propertyMapping = new Dictionary<ModelMetadata, ModelMetadata>();
ModelBinding\Validation\ValidationStateDictionary.cs (1)
27_inner = new Dictionary<object, ValidationStateEntry>(ReferenceEqualityComparer.Instance);
src\Shared\ParameterBindingMethodCache.cs (1)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
AddResponseTypeAttributeCodeFixAction.cs (2)
149var statusCodeConstants = new Dictionary<int, string>(); 179var statusCodes = new Dictionary<int, (int, ITypeSymbol?)>();
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
ApiResponseTypeProvider.cs (2)
145var results = new Dictionary<int, ApiResponseType>(); 230var results = new Dictionary<int, ApiResponseType>();
DefaultApiDescriptionProvider.cs (1)
240var routeParameters = new Dictionary<string, ApiParameterRouteInfo>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Mvc.Core (41)
ApiBehaviorOptions.cs (1)
92public IDictionary<int, ClientErrorData> ClientErrorMapping { get; } = new Dictionary<int, ClientErrorData>();
ApplicationModels\ActionModel.cs (4)
38RouteValues = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase); 39Properties = new Dictionary<object, object?>(); 61Properties = new Dictionary<object, object?>(other.Properties); 62RouteValues = new Dictionary<string, string?>(other.RouteValues, StringComparer.OrdinalIgnoreCase);
ApplicationModels\ApplicationModel.cs (1)
23Properties = new Dictionary<object, object?>();
ApplicationModels\ApplicationModelFactory.cs (4)
60var actionsByMethod = new Dictionary<MethodInfo, List<(ActionModel, SelectorModel)>>(); 61var actionsByRouteName = new Dictionary<string, List<(ActionModel, SelectorModel)>>(StringComparer.OrdinalIgnoreCase); 86var attributeRoutingConfigurationErrors = new Dictionary<MethodInfo, string>(); 131var routeValues = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase)
ApplicationModels\ControllerModel.cs (4)
38Properties = new Dictionary<object, object?>(); 39RouteValues = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase); 60RouteValues = new Dictionary<string, string?>(other.RouteValues, StringComparer.OrdinalIgnoreCase); 61Properties = new Dictionary<object, object?>(other.Properties);
ApplicationModels\ParameterModelBase.cs (2)
28Properties = new Dictionary<object, object?>(); 43Properties = new Dictionary<object, object?>(other.Properties);
Formatters\FormatterMappings.cs (1)
16new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Formatters\TextOutputFormatter.cs (1)
41var cache = new Dictionary<string, string>();
Infrastructure\ActionSelectionTable.cs (2)
107var ordinalEntries = new Dictionary<string[], List<T>>(StringArrayComparer.Ordinal); 108var ordinalIgnoreCaseEntries = new Dictionary<string[], List<T>>(StringArrayComparer.OrdinalIgnoreCase);
Infrastructure\ControllerActionInvoker.cs (1)
73_arguments = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (1)
28var propertyBinders = new Dictionary<ModelMetadata, IModelBinder>();
ModelBinding\Binders\ComplexTypeModelBinderProvider.cs (1)
24var propertyBinders = new Dictionary<ModelMetadata, IModelBinder>();
ModelBinding\Binders\DictionaryModelBinder.cs (2)
161var keyMappings = new Dictionary<string, TKey>(StringComparer.Ordinal); 245return new Dictionary<TKey, TValue>();
ModelBinding\CompositeValueProvider.cs (1)
141return new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ModelBinding\JQueryKeyValuePairNormalizer.cs (1)
20var dictionary = new Dictionary<string, StringValues>(
ModelBinding\Metadata\DisplayMetadata.cs (1)
20public IDictionary<object, object> AdditionalValues { get; } = new Dictionary<object, object>();
ModelBinding\ModelBinderFactory.cs (1)
224Visited = new Dictionary<Key, IModelBinder?>();
ModelBinding\PrefixContainer.cs (1)
77var result = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
MvcOptions.cs (1)
40CacheProfiles = new Dictionary<string, CacheProfile>(StringComparer.OrdinalIgnoreCase);
Routing\ActionEndpointFactory.cs (1)
313resolvedRequiredValues = new Dictionary<string, string?>(action.RouteValues);
Routing\AttributeRoute.cs (1)
145var templateCache = new Dictionary<string, RouteTemplate>(StringComparer.OrdinalIgnoreCase);
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
47_innerDictionary = new Dictionary<TKey, TValue>(_sourceDictionary,
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (3)
48_copy = new Dictionary<TKey, TValue>(); 61_copy = new Dictionary<TKey, TValue>(); 65_copy = new Dictionary<TKey, TValue>(_source, _source.Comparer);
src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (1)
11public static readonly Dictionary<int, (string Type, string Title)> Defaults = new()
src\Shared\PropertyHelper\PropertyHelper.cs (2)
326return new Dictionary<string, object?>(dictionary, StringComparer.OrdinalIgnoreCase); 329dictionary = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
ValidationProblemDetails.cs (1)
37var errorDictionary = new Dictionary<string, string[]>(StringComparer.Ordinal);
Microsoft.AspNetCore.Mvc.Core.Test (312)
AcceptedAtRouteResultTests.cs (4)
62var routeValues = new RouteValueDictionary(new Dictionary<string, string>() 87new Dictionary<string, string>() 92new Dictionary<string, string>() 134routeValues: new Dictionary<string, object>(),
ApplicationModels\AttributeRouteModelTests.cs (30)
183var values = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 495new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 506new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 517new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 528new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 539new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 550new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 561new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 572new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 583new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 594new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 605new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 616new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 627new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 638new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 649new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 660new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 677new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), 684new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), 691new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), 698new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), 705new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 715new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), 722new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), 729new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), 736new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 747new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 758new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 769new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 780new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (2)
1295RouteValues = new Dictionary<string, string>() 1303RouteValues = new Dictionary<string, string>()
ApplicationParts\RelatedAssemblyPartTest.cs (1)
106public Dictionary<string, Assembly> Assemblies { get; } = new Dictionary<string, Assembly>();
Authorization\AuthorizeFilterTest.cs (1)
621var contextItems = new Dictionary<object, object>();
ControllerBaseTest.cs (10)
1406var expected = new Dictionary<string, object> 1446var expected = new Dictionary<string, object> 1467var expected = new Dictionary<string, object> 1600var expected = new Dictionary<string, object> 1625var expected = new Dictionary<string, object> 1646var expected = new Dictionary<string, object> 2444var actionResult = controller.ValidationProblem(extensions: new Dictionary<string, object> { { "ext1", 1 }, { "ext2", 2 } }); 2521var actionResult = controller.Problem(extensions: new Dictionary<string, object> { { "ext1", 1 }, { "ext2", 2 } }); 2590new Dictionary<string, object> { { "hello", "world" } }, 2594var expected2 = new Dictionary<string, object>
Controllers\ControllerBinderDelegateProviderTest.cs (24)
43var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 97var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 165var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 207var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 257var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 293var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 342var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 401var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 436var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 484var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 532var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 579var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 629var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 668var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 708var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 749var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 811var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 874var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 962var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 990var boundPropertyTypes = new Dictionary<string, Type> 998var inputPropertyValues = new Dictionary<string, object> 1021var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 1176var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 1228var arguments = new Dictionary<string, object>(StringComparer.Ordinal);
CreatedAtRouteResultTests.cs (3)
26new Dictionary<string, string>() { { "hello", "world" } } 30new RouteValueDictionary(new Dictionary<string, string>() { 68routeValues: new Dictionary<string, object>(),
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (1)
232return new Dictionary<Type, Type[]>()
Filters\ResponseCacheFilterExecutorTest.cs (1)
538new Dictionary<string, object>(),
Infrastructure\ActionSelectionTableTest.cs (25)
25RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 34RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 61RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 71RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 101RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 111RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 140RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 149RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 175RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 184RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 210RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 219RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 245RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 275RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 308RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 317RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 326RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 357RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 366RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 375RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 403RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 434RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 465RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 496RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 525RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Infrastructure\ActionSelectorTest.cs (20)
35RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 44RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 74RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 84RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 116RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 125RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 154RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 163RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 192RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 228RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 237RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 246RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 280RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 289RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 298RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 329RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 363RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 397RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 431RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 465RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Infrastructure\ConfigureCompatibilityOptionsTest.cs (3)
19var configure = Create(CompatibilityVersion.Version_3_0, new Dictionary<string, object>()); 36new Dictionary<string, object> 59new Dictionary<string, object>
Infrastructure\ControllerActionInvokerTest.cs (26)
858var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 883var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 909var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 932var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 955var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 988var invoker = CreateInvoker(new[] { filter.Object }, nameof(TestController.Echo), new Dictionary<string, object>() { { "input", inputString } }); 1015new Dictionary<string, object>() { { "input", inputString } }); 1038new Dictionary<string, object>()); 1065new Dictionary<string, object>() { { "input", inputString } }); 1091new Dictionary<string, object>()); 1118new Dictionary<string, object>() { { "input", inputString } }); 1134var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 1162var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 1192var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 1215var actionParameters = new Dictionary<string, object> { ["value"] = 3 }; 1241var actionParameters = new Dictionary<string, object> { ["value"] = 3 }; 1271var actionParameters = new Dictionary<string, object> { { "s", inputParam2 }, { "i", inputParam1 } }; 1301var actionParameters = new Dictionary<string, object> { { "value", inputParam } }; 1330var actionParameters = new Dictionary<string, object> { { "i", "Some Invalid Value" }, { "s", inputParam2 } }; 1371new Dictionary<string, object>()); 1405.Returns(new Dictionary<object, object>()); 1453var actionParameters = new Dictionary<string, object> { { "input", inputParam }, }; 1478var actionParameters = new Dictionary<string, object> { { "input", inputParam }, }; 1502var actionParameters = new Dictionary<string, object>(); 1526var actionParameters = new Dictionary<string, object>(); 1685arguments = new Dictionary<string, object>();
Infrastructure\ModelStateInvalidFilterTest.cs (1)
77new Dictionary<string, object>(),
Infrastructure\ValidationProblemDetailsJsonConverterTest.cs (2)
139var problemDetails = new ValidationProblemDetails(new Dictionary<string, string[]>() { { "Property", new string[] { "error0" } } }) 163var errors = new Dictionary<string, string[]>()
ModelBinding\Binders\ArrayModelBinderTest.cs (3)
75bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 109bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 155bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>());
ModelBinding\Binders\CollectionModelBinderTest.cs (5)
261bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 295bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 336bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 369bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 411bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>());
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (9)
292ValueProvider = new TestValueProvider(new Dictionary<string, object>()), 298var binders = new Dictionary<ModelMetadata, IModelBinder>(); 344ValueProvider = new TestValueProvider(new Dictionary<string, object>()), 349new Dictionary<ModelMetadata, IModelBinder>(), 388ValueProvider = new TestValueProvider(new Dictionary<string, object>()), 393new Dictionary<ModelMetadata, IModelBinder>(), 1108var valueProvider = new TestValueProvider(new Dictionary<string, object>()); 1389public IDictionary<int, string> ReadOnlyDictionary { get; } = new Dictionary<int, string>(); 1396public IDictionary<int, string> SettableDictionary { get; set; } = new Dictionary<int, string>
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (13)
352ValueProvider = new TestValueProvider(new Dictionary<string, object>()), 358var binders = new Dictionary<ModelMetadata, IModelBinder>(); 404ValueProvider = new TestValueProvider(new Dictionary<string, object>()), 409new Dictionary<ModelMetadata, IModelBinder>(), 448ValueProvider = new TestValueProvider(new Dictionary<string, object>()), 453new Dictionary<ModelMetadata, IModelBinder>(), 1272var valueProvider = new TestValueProvider(new Dictionary<string, object>()); 1564public IDictionary<int, string> ReadOnlyDictionary { get; } = new Dictionary<int, string>(); 1571public IDictionary<int, string> SettableDictionary { get; set; } = new Dictionary<int, string> 1586var propertyBinders = new Dictionary<ModelMetadata, IModelBinder>(); 1603: this(new Dictionary<ModelMetadata, IModelBinder>()) 1608: this(new Dictionary<ModelMetadata, IModelBinder>(), allowValidatingTopLevelNodes) 1624public Dictionary<ModelMetadata, ModelBindingResult> Results { get; } = new Dictionary<ModelMetadata, ModelBindingResult>();
ModelBinding\Binders\DictionaryModelBinderTest.cs (16)
21var values = new Dictionary<string, string>() 61var values = new Dictionary<string, string>() 72var dictionary = new Dictionary<int, string>(); 101var dictionaryWithOne = new Dictionary<string, string>(StringComparer.Ordinal) 105var dictionaryWithThree = new Dictionary<string, string>(StringComparer.Ordinal) 196var dictionary = new Dictionary<string, string>(StringComparer.Ordinal) 233var dictionary = new Dictionary<string, string>(StringComparer.Ordinal) 268var dictionaryWithOne = new Dictionary<long, int> 272var dictionaryWithThree = new Dictionary<long, int> 319var dictionary = new Dictionary<int, ModelWithProperties> 324var stringDictionary = new Dictionary<string, string> 346new ComplexObjectModelBinder(new Dictionary<ModelMetadata, IModelBinder>() 446bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 481bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 530bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 575bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>());
ModelBinding\Binders\FormCollectionModelBinderTest.cs (1)
18var formCollection = new FormCollection(new Dictionary<string, StringValues>
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (2)
160bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>()); 190bindingContext.ValueProvider = new TestValueProvider(new Dictionary<string, object>());
ModelBinding\CompositeValueProviderTest.cs (2)
70var dictionary = new Dictionary<string, string>(StringComparer.Ordinal) 119var values = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
ModelBinding\DefaultModelBindingContextTest.cs (1)
179new FormCollection(new Dictionary<string, StringValues>()),
ModelBinding\EnumerableValueProviderTest.cs (7)
11protected static Dictionary<string, StringValues> BackingStore { get; } = new Dictionary<string, StringValues> 32var backingStore = new Dictionary<string, StringValues>(); 87var expected = new Dictionary<string, string> 120var expected = new Dictionary<string, string> 142var expected = new Dictionary<string, string> 207var backingStore = new Dictionary<string, StringValues> 238var store = new Dictionary<string, StringValues>(BackingStore)
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
117context.Request.Form = new FormCollection(new Dictionary<string, StringValues>(), new FormFileCollection());
ModelBinding\FormFileValueProviderTest.cs (3)
19httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>(), formFiles); 38httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>(), formFiles); 57httpContext.Request.Form = new FormCollection(new Dictionary<string, StringValues>(), formFiles);
ModelBinding\FormValueProviderFactoryTest.cs (1)
108context.Request.Form = new FormCollection(new Dictionary<string, StringValues>());
ModelBinding\FormValueProviderTest.cs (1)
19var values = new Dictionary<string, StringValues>(BackingStore)
ModelBinding\JQueryFormValueProviderFactoryTest.cs (2)
15private static readonly Dictionary<string, StringValues> _backingStore = new Dictionary<string, StringValues> 193context.Request.Form = new FormCollection(formValues ?? new Dictionary<string, StringValues>());
ModelBinding\JQueryFormValueProviderTest.cs (3)
23var dictionary = new Dictionary<string, StringValues>(); 37var store = new Dictionary<string, StringValues>(BackingStore) 57var values = new Dictionary<string, StringValues>(BackingStore)
ModelBinding\JQueryQueryStringValueProviderFactoryTest.cs (2)
14private static readonly Dictionary<string, StringValues> _backingStore = new Dictionary<string, StringValues> 87var context = CreateContext(new Dictionary<string, StringValues>());
ModelBinding\JQueryQueryStringValueProviderTest.cs (2)
23var dictionary = new Dictionary<string, StringValues>(); 40var store = new Dictionary<string, StringValues>(BackingStore)
ModelBinding\ModelBindingHelperTest.cs (7)
62var values = new Dictionary<string, object> 104var values = new Dictionary<string, object> 175var values = new Dictionary<string, object> 255var values = new Dictionary<string, object> 306var values = new Dictionary<string, object> 505var values = new Dictionary<string, object> 580var values = new Dictionary<string, object>
ModelBinding\QueryStringValueProviderFactoryTest.cs (1)
33var queryValues = new Dictionary<string, StringValues>();
ModelBinding\RouteValueProviderTests.cs (12)
16var values = new RouteValueDictionary(new Dictionary<string, object> 33var values = new RouteValueDictionary(new Dictionary<string, object> 51var values = new RouteValueDictionary(new Dictionary<string, object> 68var values = new RouteValueDictionary(new Dictionary<string, object> 87var values = new RouteValueDictionary(new Dictionary<string, object> 104var values = new RouteValueDictionary(new Dictionary<string, object> 121var values = new RouteValueDictionary(new Dictionary<string, object> 142var values = new RouteValueDictionary(new Dictionary<string, object> 163var values = new RouteValueDictionary(new Dictionary<string, object> 182var values = new RouteValueDictionary(new Dictionary<string, object> 200var values = new RouteValueDictionary(new Dictionary<string, object> 217var values = new RouteValueDictionary(new Dictionary<string, object>
ModelBinding\UnsupportedContentTypeFilterTest.cs (4)
25new Dictionary<string, object>(), 58new Dictionary<string, object>(), 84new Dictionary<string, object>(), 108new Dictionary<string, object>(),
ModelBinding\Validation\DefaultCollectionValidationStrategyTest.cs (1)
49var model = new Dictionary<int, string>()
ModelBinding\Validation\DefaultObjectValidatorTests.cs (2)
985var model = new Dictionary<string, string>() 1032var model = (object)new Dictionary<string, Person> { { "Joe", new Person() }, { "Mark", new Person() } };
ModelBinding\Validation\ExplicitIndexCollectionValidationStrategyTest.cs (1)
49var model = new Dictionary<int, string>()
ModelBinding\Validation\ShortFormDictionaryValidationStrategyTest.cs (6)
12var model = new Dictionary<int, string>() 22var strategy = new ShortFormDictionaryValidationStrategy<int, string>(new Dictionary<string, int>() 60var model = new Dictionary<int, string>() 70var strategy = new ShortFormDictionaryValidationStrategy<int, string>(new Dictionary<string, int>() 101var model = new Dictionary<int, string>() 110var strategy = new ShortFormDictionaryValidationStrategy<int, string>(new Dictionary<string, int>()
RedirectToPageResultTest.cs (1)
31var result = new RedirectToPageResult("/some-page", new Dictionary<string, object>())
RedirectToRouteResultTest.cs (3)
69var result = new RedirectToRouteResult(null, new Dictionary<string, object>()) 200new Dictionary<string, string>() { { "hello", "world" } } 204new RouteValueDictionary(new Dictionary<string, string>() {
ResponseCacheAttributeTest.cs (8)
29var cacheProfiles = new Dictionary<string, CacheProfile>(); 49var cacheProfiles = new Dictionary<string, CacheProfile>(); 92new Dictionary<string, CacheProfile> { { "TestCacheProfile", new CacheProfile 111new Dictionary<string, CacheProfile>() { { "TestCacheProfile", new CacheProfile 130new Dictionary<string, CacheProfile>() { { "TestCacheProfile", new CacheProfile 148new Dictionary<string, CacheProfile>() { { "TestCacheProfile", new CacheProfile() } }, 189var cacheProfiles = new Dictionary<string, CacheProfile>(); 350new Dictionary<string, object>(),
Routing\AttributeRouteTest.cs (10)
126RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 170RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 214RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 261RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 275RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 329RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 372RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 415RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 463RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 477RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Routing\AttributeRoutingTest.cs (2)
119action.RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 152RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase),
Routing\ControllerActionEndpointDataSourceTest.cs (13)
28RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 61RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 69RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 140RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 148RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 222RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 230RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 309RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 317RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 390RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 399RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 491RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 499RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (3)
22RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 30RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 38RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Routing\UrlHelperExtensionsTest.cs (4)
58new Dictionary<string, object> 265RouteValues = new Dictionary<string, string> 499RouteValues = new Dictionary<string, string> 870RouteValues = new Dictionary<string, string>
Routing\UrlHelperTestBase.cs (5)
623var dictionary = new Dictionary<string, object>(); 668var dict = new Dictionary<string, object>(); 889var mockItems = new Dictionary<object, object> 911httpContext.Setup(h => h.Items).Returns(new Dictionary<object, object>()); 930var mockItems = new Dictionary<object, object>
ValidationProblemDetailsTest.cs (1)
79var errors = new Dictionary<string, string[]>
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
CommonFilterTest.cs (1)
198new Dictionary<string, object>(),
LinkBuilder.cs (1)
14Values = new Dictionary<string, object>
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
176var namesAndValues = new Dictionary<string, string>();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (45)
CompareAttributeAdapterTest.cs (6)
33new Dictionary<string, string>()); 76new Dictionary<string, string>()); 111new Dictionary<string, string>()); 148new Dictionary<string, string>()); 188new Dictionary<string, string>()); 221new Dictionary<string, string>());
DataAnnotationsMetadataProviderTest.cs (10)
691{ typeof(EmptyEnum), new Dictionary<string, string>() }, 692{ typeof(EmptyEnum?), new Dictionary<string, string>() }, 695new Dictionary<string, string> 707new Dictionary<string, string> 719new Dictionary<string, string> 732new Dictionary<string, string> 745new Dictionary<string, string> 756new Dictionary<string, string> 767new Dictionary<string, string> 779new Dictionary<string, string>
FileExtensionsAttributeAdapterTest.cs (4)
33var context = new ClientModelValidationContext(new ActionContext(), metadata, provider, new Dictionary<string, string>()); 84var context = new ClientModelValidationContext(new ActionContext(), metadata, provider, new Dictionary<string, string>()); 119var context = new ClientModelValidationContext(new ActionContext(), metadata, provider, new Dictionary<string, string>()); 144var context = new ClientModelValidationContext(new ActionContext(), metadata, provider, new Dictionary<string, string>());
MaxLengthAttributeAdapterTest.cs (5)
36var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 63var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 92var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 125var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 152var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>());
MinLengthAttributeAdapterTest.cs (4)
36var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 63var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 91var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 117var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>());
NumericClientModelValidatorTest.cs (5)
24var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 58var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 90var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 116var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 139var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>());
RangeAttributeAdapterTest.cs (3)
30var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 66var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 94var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>());
RequiredAttributeAdapterTest.cs (3)
37var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 62var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 87var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>());
StringLengthAttributeAdapterTest.cs (5)
37var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 64var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 91var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 119var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>()); 145var context = new ClientModelValidationContext(actionContext, metadata, provider, new Dictionary<string, string>());
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (4)
XmlDataContractSerializerOutputFormatterTest.cs (3)
87yield return new object[] { new Dictionary<string, string>() { { "Hello", "World" } }, 369new Dictionary<string, string> { { "Hello", "world" } }, typeof(object), true }; 371new Dictionary<string, string> { { "Hello", "world" } }, typeof(Dictionary<string,string>), true };
XmlSerializerOutputFormatterTest.cs (1)
342new Dictionary<string, string> { { "Hello", "world" } }, typeof(Dictionary<string,string>), false };
Microsoft.AspNetCore.Mvc.FunctionalTests (33)
ApiBehaviorTest.cs (1)
440var expected = new Dictionary<string, string[]>
BasicTests.cs (5)
398var product = new Dictionary<string, string> 529var formContent = new Dictionary<string, string> 551var formContent = new Dictionary<string, string> 575var formContent = new Dictionary<string, string> 595var formContent = new Dictionary<string, string>
HtmlGenerationTest.cs (9)
142AssertImgElement(document.GetElementById("1"), new() 150AssertImgElement(document.GetElementById("2"), new() 158AssertImgElement(document.GetElementById("3"), new() 166AssertImgElement(document.GetElementById("4"), new() 173AssertImgElement(document.GetElementById("5"), new() 180AssertImgElement(document.GetElementById("6"), new() 187AssertImgElement(document.GetElementById("7"), new() 194AssertImgElement(document.GetElementById("8"), new() 787request.Content = new FormUrlEncodedContent(new Dictionary<string, string>
InputParentValidationTests.cs (1)
93var result = new Dictionary<string, string[]>();
InputValidationTests.cs (2)
36var content = new FormUrlEncodedContent(new Dictionary<string, string> 76var content = new FormUrlEncodedContent(new Dictionary<string, string>
RazorBuildTest.cs (1)
174var updateContent = new FormUrlEncodedContent(new Dictionary<string, string>
RazorPagesTest.cs (3)
788Content = new FormUrlEncodedContent(new Dictionary<string, string> 813Content = new FormUrlEncodedContent(new Dictionary<string, string> 1290Content = new FormUrlEncodedContent(new Dictionary<string, string>
RazorPagesWithBasePathTest.cs (3)
434Content = new FormUrlEncodedContent(new Dictionary<string, string> 463Content = new FormUrlEncodedContent(new Dictionary<string, string> 491Content = new FormUrlEncodedContent(new Dictionary<string, string>
RazorRuntimeCompilationHostingStartupTest.cs (1)
119var updateContent = new FormUrlEncodedContent(new Dictionary<string, string>
ReadFromDisconnectedClientTest.cs (1)
56request.Content = new FormUrlEncodedContent(new Dictionary<string, string>
RemoteAttributeValidationTest.cs (1)
89var contentDictionary = new Dictionary<string, string>
RoutingTestsBase.cs (3)
273new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 297new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 331new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
TagHelpersTest.cs (2)
229var validPostValues = new Dictionary<string, string> 257var validPostValues = new Dictionary<string, string>
Microsoft.AspNetCore.Mvc.IntegrationTests (81)
ActionParametersIntegrationTest.cs (1)
1085var propertyBinders = new Dictionary<ModelMetadata, IModelBinder>();
BindingSourceMetadataProviderIntegrationTest.cs (2)
36request.Form = new FormCollection(new Dictionary<string, StringValues> 125var formCollection = new FormCollection(new Dictionary<string, StringValues>(), fileCollection);
BodyValidationIntegrationTests.cs (1)
895var result = new Dictionary<string, string>();
CollectionModelBinderIntegrationTest.cs (24)
597var formCollection = new FormCollection(new Dictionary<string, StringValues>() 655var formCollection = new FormCollection(new Dictionary<string, StringValues>() 732new Dictionary<string, StringValues> 741new Dictionary<string, StringValues> 751new Dictionary<string, StringValues> 761new Dictionary<string, StringValues> 770new Dictionary<string, StringValues> 779new Dictionary<string, StringValues> 789new Dictionary<string, StringValues> 798new Dictionary<string, StringValues> 808new Dictionary<string, StringValues> 817new Dictionary<string, StringValues> 827new Dictionary<string, StringValues> 836new Dictionary<string, StringValues> 846new Dictionary<string, StringValues> 854new Dictionary<string, StringValues> 862new Dictionary<string, StringValues> 870new Dictionary<string, StringValues> 878new Dictionary<string, StringValues> 886new Dictionary<string, StringValues> 894new Dictionary<string, StringValues> 902new Dictionary<string, StringValues> 910new Dictionary<string, StringValues> 918new Dictionary<string, StringValues>
ComplexRecordIntegrationTest.cs (3)
1201Assert.Equal(new Dictionary<string, int>() { { "key0", 10 } }, model.ProductIds); 1256Assert.Equal(new Dictionary<string, int>() { { "key0", 10 } }, model.ProductIds); 4223var formCollection = new FormCollection(new Dictionary<string, StringValues>(), fileCollection);
ComplexTypeIntegrationTestBase.cs (3)
1219Assert.Equal(new Dictionary<string, int>() { { "key0", 10 } }, model.ProductIds); 1274Assert.Equal(new Dictionary<string, int>() { { "key0", 10 } }, model.ProductIds); 3722var formCollection = new FormCollection(new Dictionary<string, StringValues>(), fileCollection);
DictionaryModelBinderIntegrationTest.cs (32)
42Assert.Equal(new Dictionary<string, int>() { { "key0", 10 } }, model); 82Assert.Equal(new Dictionary<string, int>() { { "key0", 10 } }, model); 120Assert.Equal(new Dictionary<string, int>() { { "key0", 10 } }, model); 173Assert.Equal(new Dictionary<string, int>() { { "key0", 10 }, }, model); 210Assert.Equal(new Dictionary<string, int>() { { "key0", 10 }, }, model); 224var impliedPrefixDictionary = new Dictionary<string, StringValues> 230var reversedImpliedPrefixDictionary = new Dictionary<string, StringValues> 236var longFormDictionary = new Dictionary<string, StringValues> 245var longerFormDictionary = new Dictionary<string, StringValues> 255var longestFormDictionary = new Dictionary<string, StringValues> 269var noPrefixDictionary = new Dictionary<string, StringValues> 275var reversedNoPrefixDictionary = new Dictionary<string, StringValues> 331var expectedDictionary = new Dictionary<string, int> 366var expectedDictionary = new Dictionary<string, int> 527Assert.Equal(new Dictionary<string, Person> { { "key0", new Person { Id = 10 } }, }, model); 544var expectedDictionary = new Dictionary<string, Person> { { "key0", new Person { Id = 10 } } }; 582var expectedDictionary = new Dictionary<string, Person> { { "key0", new Person { Id = 10 } } }; 617var expectedDictionary = new Dictionary<string, Person> { { "42", new Person { Id = 10 } } }; 652var expectedDictionary = new Dictionary<string, Person> { { "42", new Person { Id = 10 } } }; 725Assert.Equal(new Dictionary<string, Person> { { "key0", new Person { Id = 10 } }, }, model); 764Assert.Equal(new Dictionary<string, Person> { { "key0", new Person { Id = 10 } }, }, model); 804Assert.Equal(new Dictionary<string, Person> { { "key0", new Person { Id = 100 } }, }, model); 909var expectedDictionary = new Dictionary<string, string[]> { { "key0", new[] { "10", "11" } } }; 941var expectedDictionary = new Dictionary<string, string[]> { { "key0", new[] { "10", "11" } } }; 975var expectedDictionary = new Dictionary<string, string[]> { { "key0", new[] { "10", "11" } } }; 1014var expectedDictionary = new Dictionary<string, string[]> { { "42", new[] { "10", "11" } } }; 1053var expectedDictionary = new Dictionary<string, string[]> { { "42", new[] { "10", "11" } } }; 1160var expectedDictionary = new Dictionary<string, string> 1359var expectedDictionary = new Dictionary<DayOfWeek, string> 1394var expectedDictionary = new Dictionary<string, DayOfWeek> 1518private readonly IDictionary<string, string> _data = new Dictionary<string, string>(); 1623private readonly IDictionary<TKey, TValue> _data = new Dictionary<TKey, TValue>();
ExcludeBindingMetadataProviderIntegrationTest.cs (2)
37request.Form = new FormCollection(new Dictionary<string, StringValues> 86request.Form = new FormCollection(new Dictionary<string, StringValues>
FormCollectionModelBindingIntegrationTest.cs (1)
160var formCollection = new FormCollection(new Dictionary<string, StringValues>(), fileCollection);
FormFileModelBindingIntegrationTest.cs (2)
1207request.QueryString = QueryString.Create(new Dictionary<string, string> 1252var formCollection = new FormCollection(new Dictionary<string, StringValues>(), new FormFileCollection());
ModelPrefixSelectionIntegrationTest.cs (4)
38request.Form = new FormCollection(new Dictionary<string, StringValues>() 87request.Form = new FormCollection(new Dictionary<string, StringValues>() 175request.Form = new FormCollection(new Dictionary<string, StringValues>() 221request.Form = new FormCollection(new Dictionary<string, StringValues>()
SimpleTypeModelBinderIntegrationTest.cs (2)
643new Dictionary<string, StringValues> 649new Dictionary<string, StringValues>
TryUpdateModelIntegrationTest.cs (3)
107request.QueryString = QueryString.Create(new Dictionary<string, string> 707request.QueryString = QueryString.Create(new Dictionary<string, string> 1277var formCollection = new FormCollection(new Dictionary<string, StringValues>(), fileCollection);
TryValidateModelIntegrationTest.cs (1)
226var result = new Dictionary<string, string>();
Microsoft.AspNetCore.Mvc.NewtonsoftJson (6)
AnnotatedProblemDetails.cs (1)
45public IDictionary<string, object?> Extensions { get; } = new Dictionary<string, object?>(StringComparer.Ordinal);
BsonTempDataSerializer.cs (4)
31private static readonly Dictionary<JTokenType, Type> _tokenTypeLookup = new Dictionary<JTokenType, Type>(8) 53return new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 57var convertedDictionary = new Dictionary<string, object?>( 229var convertedDictionary = new Dictionary<string, TVal?>(StringComparer.Ordinal);
ValidationProblemDetailsConverter.cs (1)
66public IDictionary<string, string[]> Errors { get; } = new Dictionary<string, string[]>(StringComparer.Ordinal);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (35)
BsonTempDataSerializerTest.cs (13)
22{ new Dictionary<string, TestItem>(), typeof(TestItem) }, 47{ new Dictionary<int, string>(), typeof(int) }, 48{ new Dictionary<Uri, Guid>(), typeof(Uri) }, 49{ new Dictionary<object, string>(), typeof(object) }, 50{ new Dictionary<TestItem, TestItem>(), typeof(TestItem) } 83{ new Dictionary<string, int>() }, 97var input = new Dictionary<string, object> 118var input = new Dictionary<string, object> 139var input = new Dictionary<string, object> 161var input = new Dictionary<string, object> 182var input = new Dictionary<string, object> 212var input = new Dictionary<string, object> 239var input = new Dictionary<string, object>
DependencyInjection\MvcNewtonsoftJsonOptionsExtensionsTest.cs (4)
87var dictionary = new Dictionary<string, int> 106var dictionary = new Dictionary<string, int>() 125var dictionary = new Dictionary<string, int> 197var dictionary = new Dictionary<string, int>()
NewtonsoftJsonOutputFormatterTest.cs (1)
241var dictionary = new Dictionary<string, int>(StringComparer.Ordinal)
src\Mvc\Mvc.ViewFeatures\test\Infrastructure\TempDataSerializerTestBase.cs (17)
30var input = new Dictionary<string, object> 54var input = new Dictionary<string, object> 76var input = new Dictionary<string, object> 97var input = new Dictionary<string, object> 118var input = new Dictionary<string, object> 139var input = new Dictionary<string, object> 160var input = new Dictionary<string, object> 182var input = new Dictionary<string, object> 204var input = new Dictionary<string, object> 226var input = new Dictionary<string, object> 247var input = new Dictionary<string, object> 268var input = new Dictionary<string, object> 289var input = new Dictionary<string, object> 309var value = new Dictionary<string, string> 314var input = new Dictionary<string, object> 334var value = new Dictionary<string, int> 339var input = new Dictionary<string, object>
Microsoft.AspNetCore.Mvc.Razor (5)
ApplicationParts\RazorCompiledItemFeatureProvider.cs (1)
67_hotReloadedViews ??= new(StringComparer.Ordinal);
Compilation\DefaultViewCompiler.cs (1)
52var compiledViews = new Dictionary<string, Task<CompiledViewDescriptor>>(
RazorPageBase.cs (1)
28private readonly IDictionary<string, RenderAsyncDelegate> _sectionWriters = new Dictionary<string, RenderAsyncDelegate>(StringComparer.OrdinalIgnoreCase);
RazorViewEngine.cs (1)
244expanderValues = new Dictionary<string, string?>(StringComparer.Ordinal);
TagHelpers\UrlResolutionTagHelper.cs (1)
58new(StringComparer.OrdinalIgnoreCase)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
CSharpCompiler.cs (1)
170new Dictionary<string, ReportDiagnostic>
RuntimeViewCompiler.cs (1)
63_precompiledViews = new Dictionary<string, CompiledViewDescriptor>(
Microsoft.AspNetCore.Mvc.Razor.Test (59)
LanguageViewLocationExpanderTest.cs (3)
141viewLocationExpanderContext.Values = new Dictionary<string, string>(); 166viewLocationExpanderContext.Values = new Dictionary<string, string>(); 194viewLocationExpanderContext.Values = new Dictionary<string, string>();
RazorPageTest.cs (18)
424page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 464page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 487page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 524page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 548page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 572page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 596page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 620page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 697page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 722page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 745page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 770page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 804page.PreviousSectionWriters = new Dictionary<string, RenderAsyncDelegate> 983items: new Dictionary<object, object>(), 1025items: new Dictionary<object, object>(), 1071items: new Dictionary<object, object>(), 1114items: new Dictionary<object, object>(), 1144items: new Dictionary<object, object>(),
RazorViewEngineTest.cs (22)
23private static readonly Dictionary<string, object> _areaTestContext = new Dictionary<string, object>() 29private static readonly Dictionary<string, object> _controllerTestContext = new Dictionary<string, object>() 34private static readonly Dictionary<string, object> _pageTestContext = new Dictionary<string, object>() 546var areaContext = GetActionContext(new Dictionary<string, object>() 561var nonAreaContext = GetActionContext(new Dictionary<string, object>() 610var areaContext1 = GetActionContext(new Dictionary<string, object>() 625var areaContext2 = GetActionContext(new Dictionary<string, object>() 809var context = GetActionContext(new Dictionary<string, object>()); 1283var routeValues = new Dictionary<string, object> 1295var routesInActionDescriptor = new Dictionary<string, string>() 1324var routeValues = new Dictionary<string, object> 1328var routesInActionDescriptor = new Dictionary<string, string>() 1358var routeValues = new Dictionary<string, object> 1363var routesInActionDescriptor = new Dictionary<string, string>() 1393var routeValues = new Dictionary<string, object>() 1401new Dictionary<string, string>()); 1833var routeValues = new Dictionary<string, object> 1870var routeValues = new Dictionary<string, object> 1911var context = GetActionContext(new Dictionary<string, object>()); 1929var context = GetActionContext(new Dictionary<string, object>()); 1951var context = GetActionContext(new Dictionary<string, object>()); 1969var context = GetActionContext(new Dictionary<string, object>());
TagHelpers\TagHelperComponentTagHelperTest.cs (8)
25items: new Dictionary<object, object>(), 74items: new Dictionary<object, object>(), 130items: new Dictionary<object, object>(), 161items: new Dictionary<object, object>(), 192items: new Dictionary<object, object>(), 227items: new Dictionary<object, object>(), 260items: new Dictionary<object, object>(), 291items: new Dictionary<object, object>(),
TagHelpers\UrlResolutionTagHelperTest.cs (8)
80items: new Dictionary<object, object>(), 122items: new Dictionary<object, object>(), 182items: new Dictionary<object, object>(), 240items: new Dictionary<object, object>(), 296items: new Dictionary<object, object>(), 327items: new Dictionary<object, object>(), 376items: new Dictionary<object, object>(), 422items: new Dictionary<object, object>(),
Microsoft.AspNetCore.Mvc.RazorPages (11)
ApplicationModels\PageApplicationModel.cs (1)
65Properties = new Dictionary<object, object?>(other.Properties);
ApplicationModels\PageHandlerModel.cs (2)
29Properties = new Dictionary<object, object?>(); 49Properties = new Dictionary<object, object?>(other.Properties);
ApplicationModels\PageRouteModel.cs (4)
37Properties = new Dictionary<object, object?>(); 39RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 55Properties = new Dictionary<object, object?>(other.Properties); 57RouteValues = new Dictionary<string, string>(other.RouteValues, StringComparer.OrdinalIgnoreCase);
Builder\PageActionEndpointConventionBuilder.cs (1)
26internal IDictionary<string, object> Items { get; set; } = new Dictionary<string, object>();
Infrastructure\CompiledPageActionDescriptorProvider.cs (1)
57var lookup = new Dictionary<string, CompiledViewDescriptor>(feature.ViewDescriptors.Count, StringComparer.Ordinal);
Infrastructure\PageActionDescriptorProvider.cs (1)
105Properties = new Dictionary<object, object?>(model.Properties),
Infrastructure\PageActionInvoker.cs (1)
423_arguments = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Mvc.RazorPages.Test (43)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (5)
27RouteValues = new Dictionary<string, string>(), 55RouteValues = new Dictionary<string, string>(), 106RouteValues = new Dictionary<string, string>(), 148RouteValues = new Dictionary<string, string>(), 410RouteValues = new Dictionary<string, string>(),
Filters\PageSaveTempDataPropertyFilterTest.cs (3)
67new Dictionary<string, object>(), 108new Dictionary<string, object>(), 148new Dictionary<string, object>(),
Filters\PageViewDataAttributeFilterTest.cs (2)
26var context = new PageHandlerExecutingContext(pageContext, new IFilterMetadata[0], new HandlerMethodDescriptor(), new Dictionary<string, object>(), handler); 45var context = new PageHandlerExecutingContext(pageContext, new IFilterMetadata[0], new HandlerMethodDescriptor(), new Dictionary<string, object>(), handler);
Infrastructure\DisallowOptionsRequestsPageFilterTest.cs (1)
129return new PageHandlerExecutingContext(pageContext, Array.Empty<IFilterMetadata>(), handlerMethodDescriptor, new Dictionary<string, object>(), new object());
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (2)
22RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 30RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Infrastructure\PageActionEndpointDataSourceTest.cs (6)
29RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 61RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 105RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 118RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 183RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 225RouteValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Infrastructure\PageBinderFactoryTest.cs (13)
212var binder = new TestParameterBinder(new Dictionary<string, object> 269var binder = new TestParameterBinder(new Dictionary<string, object> 323var binder = new TestParameterBinder(new Dictionary<string, object>()); 382var binder = new TestParameterBinder(new Dictionary<string, object>() 441var binder = new TestParameterBinder(new Dictionary<string, object>() 492var binder = new TestParameterBinder(new Dictionary<string, object> 583var parameterBinder = new TestParameterBinder(new Dictionary<string, object>() 603var arguments = new Dictionary<string, object>(); 626var parameterBinder = new TestParameterBinder(new Dictionary<string, object>() 646var arguments = new Dictionary<string, object>(); 689var arguments = new Dictionary<string, object>(); 713var parameterBinder = new TestParameterBinder(new Dictionary<string, object>() 740var arguments = new Dictionary<string, object>();
Infrastructure\PageHandlerPageFilterTest.cs (4)
29new Dictionary<string, object>(), 77new Dictionary<string, object>(), 120new Dictionary<string, object>(), 153new Dictionary<string, object>(),
Infrastructure\PageViewLocationExpanderTest.cs (1)
216Values = new Dictionary<string, string>(),
PageModelTest.cs (4)
941new Dictionary<string, object> { { "hello", "world" } }, 945var expected2 = new Dictionary<string, object> 1855new Dictionary<string, object>(), 1889new Dictionary<string, object>(),
PageTest.cs (2)
1870new Dictionary<string, object> { { "hello", "world" } }, 1874var expected2 = new Dictionary<string, object>
Microsoft.AspNetCore.Mvc.TagHelpers (12)
AnchorTagHelper.cs (1)
143_routeValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ComponentTagHelper.cs (1)
43_parameters ??= new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
FormActionTagHelper.cs (1)
159_routeValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
FormTagHelper.cs (1)
128_routeValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
InputTagHelper.cs (5)
23new(StringComparer.OrdinalIgnoreCase) 57new(StringComparer.Ordinal) 216htmlAttributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 418htmlAttributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); 460htmlAttributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
SelectTagHelper.cs (1)
139htmlAttributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
TextAreaTagHelper.cs (1)
77htmlAttributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
ValidationMessageTagHelper.cs (1)
67htmlAttributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (175)
AnchorTagHelperTest.cs (16)
35items: new Dictionary<object, object>(), 95items: new Dictionary<object, object>(), 145items: new Dictionary<object, object>(), 197items: new Dictionary<object, object>(), 211var expectedRouteValues = new Dictionary<string, object> { { "area", "Admin" } }; 255items: new Dictionary<object, object>(), 269var expectedRouteValues = new Dictionary<string, object> { { "area", "Admin" } }; 292RouteValues = new Dictionary<string, string> { { "area", "Home" } } 314items: new Dictionary<object, object>(), 328var expectedRouteValues = new Dictionary<string, object> { { "area", string.Empty } }; 372items: new Dictionary<object, object>(), 423items: new Dictionary<object, object>(), 520items: new Dictionary<object, object>(), 560items: new Dictionary<object, object>(), 598items: new Dictionary<object, object>(), 636items: new Dictionary<object, object>(),
AttributeMatcherTest.cs (1)
98items: new Dictionary<object, object>(),
CacheTagHelperTest.cs (2)
495items: new Dictionary<object, object>(), 946items: new Dictionary<object, object>(),
CacheTagKeyTest.cs (1)
554items: new Dictionary<object, object>(),
ComponentTagHelperTest.cs (1)
66new Dictionary<object, object>(),
DistributedCacheTagHelperTest.cs (1)
752items: new Dictionary<object, object>(),
EnvironmentTagHelperTest.cs (1)
215items: new Dictionary<object, object>(),
FormActionTagHelperTest.cs (20)
28items: new Dictionary<object, object>(), 103items: new Dictionary<object, object>(), 173{ new Dictionary<string, string>(), null }, 175new Dictionary<string, string> { { "name", "value" } }, 176new Dictionary<string, object> { { "name", "value" } } 204items: new Dictionary<object, object>(), 264items: new Dictionary<object, object>(), 321{ "Area", new Dictionary<string, string> { { "area", "Home" } }, "Area" }, 324{ string.Empty, new Dictionary<string, string> { { "area", "Home" } }, string.Empty }, 326{ null, new Dictionary<string, string> { { "area", "Admin" } }, "Admin" }, 342items: new Dictionary<object, object>(), 352var expectedRouteValues = new Dictionary<string, object> { { "area", expectedArea } }; 396items: new Dictionary<object, object>(), 406var expectedRouteValues = new Dictionary<string, object> { { "area", expectedArea } }; 445items: new Dictionary<object, object>(), 543items: new Dictionary<object, object>(), 583items: new Dictionary<object, object>(), 621items: new Dictionary<object, object>(), 659items: new Dictionary<object, object>(), 697items: new Dictionary<object, object>(),
FormTagHelperTest.cs (25)
33items: new Dictionary<object, object>(), 81items: new Dictionary<object, object>(), 137items: new Dictionary<object, object>(), 191items: new Dictionary<object, object>(), 249items: new Dictionary<object, object>(), 312items: new Dictionary<object, object>(), 387items: new Dictionary<object, object>(), 441items: new Dictionary<object, object>(), 513items: new Dictionary<object, object>(), 574items: new Dictionary<object, object>(), 632items: new Dictionary<object, object>(), 644var expectedRouteValues = new Dictionary<string, object> { { "area", "Admin" } }; 689items: new Dictionary<object, object>(), 701var expectedRouteValues = new Dictionary<string, object> { { "area", string.Empty } }; 746items: new Dictionary<object, object>(), 758var expectedRouteValues = new Dictionary<string, object> { { "area", "Admin" } }; 776RouteValues = new Dictionary<string, string> { { "area", "Client" } }, 804items: new Dictionary<object, object>(), 859items: new Dictionary<object, object>(), 905items: new Dictionary<object, object>(), 990items: new Dictionary<object, object>(), 1040items: new Dictionary<object, object>(), 1076items: new Dictionary<object, object>(), 1110items: new Dictionary<object, object>(), 1144items: new Dictionary<object, object>(),
ImageTagHelperTest.cs (1)
339items: new Dictionary<object, object>(),
InputTagHelperTest.cs (38)
87items: new Dictionary<object, object>(), 135items: new Dictionary<object, object>(), 182items: new Dictionary<object, object>(), 226items: new Dictionary<object, object>(), 279var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 324var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 378var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 434var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 485var context = new TagHelperContext(expectedAttributes, new Dictionary<object, object>(), "test"); 541var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 643items: new Dictionary<object, object>(), 722items: new Dictionary<object, object>(), 793items: new Dictionary<object, object>(), 887var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 941var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 1001var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 1061var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 1121var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 1156items: new Dictionary<object, object>(), 1256items: new Dictionary<object, object>(), 1304new Dictionary<string, object> { { "type", "hidden" } })) // htmlAttributes 1364var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 1422items: new Dictionary<object, object>(), 1522items: new Dictionary<object, object>(), 1634items: new Dictionary<object, object>(), 1759items: new Dictionary<object, object>(), 1783var htmlAttributes = new Dictionary<string, object> 1832items: new Dictionary<object, object>(), 1844var htmlAttributes = new Dictionary<string, object> 1901items: new Dictionary<object, object>(), 1913var htmlAttributes = new Dictionary<string, object> 1995items: new Dictionary<object, object>(), 2007var htmlAttributes = new Dictionary<string, object> 2075items: new Dictionary<object, object>(), 2137items: new Dictionary<object, object>(), 2205items: new Dictionary<object, object>(), 2271items: new Dictionary<object, object>(), 2329items: new Dictionary<object, object>(),
LabelTagHelperTest.cs (2)
186items: new Dictionary<object, object>(), 311items: new Dictionary<object, object>(),
LinkTagHelperTest.cs (1)
1150items: new Dictionary<object, object>(),
OptionTagHelperTest.cs (3)
401items: new Dictionary<object, object>(), 473items: new Dictionary<object, object>(), 537items: new Dictionary<object, object>(),
PartialTagHelperTest.cs (1)
854new Dictionary<object, object>(),
PersistComponentStateTagHelperTest.cs (1)
243new Dictionary<object, object>(),
PrerenderComponentApplicationStoreTest.cs (2)
17var state = new Dictionary<string, byte[]>() 35var expected = new Dictionary<string, ReadOnlySequence<byte>>()
ProtectedPrerenderComponentApplicationStateTest.cs (3)
24var state = new Dictionary<string, byte[]>() 40var expectedState = new Dictionary<string, byte[]>() 61var expectedState = new Dictionary<string, byte[]>()
RenderAtEndOfFormTagHelperTest.cs (2)
64new Dictionary<object, object>(), 92items: new Dictionary<object, object>(),
ScriptTagHelperTest.cs (9)
714new Dictionary<string, string> 719new Dictionary<string, IReadOnlyDictionary<string, string>> 721["development"] = new Dictionary<string, string> 727new Dictionary<string, string> 759new Dictionary<string, string> 764new Dictionary<string, IReadOnlyDictionary<string, string>> 766["development"] = new Dictionary<string, string> 772new Dictionary<string, string> 1099items: new Dictionary<object, object>(),
SelectTagHelperTest.cs (10)
107var attributeData = new Dictionary<string, string>(StringComparer.Ordinal) 202items: new Dictionary<object, object>(), 292items: new Dictionary<object, object>(), 383items: new Dictionary<object, object>(), 472items: new Dictionary<object, object>(), 560items: new Dictionary<object, object>(), 643items: new Dictionary<object, object>(), 723var context = new TagHelperContext(new TagHelperAttributeList(), new Dictionary<object, object>(), "test"); 761var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test"); 811var tagHelperContext = new TagHelperContext(attributes, new Dictionary<object, object>(), "test");
TagHelperOutputExtensionsTest.cs (12)
342items: new Dictionary<object, object>(), 444items: new Dictionary<object, object>(), 475items: new Dictionary<object, object>(), 511items: new Dictionary<object, object>(), 542items: new Dictionary<object, object>(), 641new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 656new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 671new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 686new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 701new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 716new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 737new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
TestableHtmlGenerator.cs (1)
35validationAttributes: new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase))
TextAreaTagHelperTest.cs (3)
124items: new Dictionary<object, object>(), 178var context = new TagHelperContext(new TagHelperAttributeList(), new Dictionary<object, object>(), "test"); 217var context = new TagHelperContext(attributes, new Dictionary<object, object>(), "test");
ValidationMessageTagHelperTest.cs (8)
45items: new Dictionary<object, object>(), 117new Dictionary<object, object>(), 159new Dictionary<object, object>(), 212new Dictionary<object, object>(), 262items: new Dictionary<object, object>(), 335items: new Dictionary<object, object>(), 397items: new Dictionary<object, object>(), 438items: new Dictionary<object, object>(),
ValidationSummaryTagHelperTest.cs (10)
58items: new Dictionary<object, object>(), 123items: new Dictionary<object, object>(), 191items: new Dictionary<object, object>(), 224items: new Dictionary<object, object>(), 294items: new Dictionary<object, object>(), 378items: new Dictionary<object, object>(), 434items: new Dictionary<object, object>(), 493items: new Dictionary<object, object>(), 549items: new Dictionary<object, object>(), 610items: new Dictionary<object, object>(),
Microsoft.AspNetCore.Mvc.Test (2)
MvcServiceCollectionExtensionsTest.cs (1)
475return new Dictionary<Type, Type[]>()
Routing\ActionConstraintMatcherPolicyTest.cs (1)
349new DataTokensMetadata(new Dictionary<string, object>
Microsoft.AspNetCore.Mvc.Testing (2)
DeferredHostBuilder.cs (1)
13public IDictionary<object, object> Properties { get; } = new Dictionary<object, object>();
WebApplicationFactory.cs (1)
271config.AddInMemoryCollection(new Dictionary<string, string?>
Microsoft.AspNetCore.Mvc.Testing.Tasks (1)
GenerateMvcTestManifestTask.cs (1)
35var output = new Dictionary<string, string>();
Microsoft.AspNetCore.Mvc.ViewFeatures (21)
CookieTempDataProvider.cs (1)
94return new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
DefaultEditorTemplates.cs (1)
179var htmlAttributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
Filters\SaveTempDataPropertyFilterBase.cs (1)
33public IDictionary<PropertyInfo, object> OriginalValues { get; } = new Dictionary<PropertyInfo, object>();
FormContext.cs (3)
35_formData = new Dictionary<string, object>(StringComparer.Ordinal); 107_renderedFields = new Dictionary<string, bool>(StringComparer.Ordinal); 122_invariantFields ??= new(StringComparer.Ordinal);
HtmlHelper.cs (3)
161return new Dictionary<string, object>(dictionary, StringComparer.OrdinalIgnoreCase); 164dictionary = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); 1382var groupList = new Dictionary<string, SelectListGroup>();
Infrastructure\DefaultTempDataSerializer.cs (3)
17return new Dictionary<string, object>(); 27var deserialized = new Dictionary<string, object>(StringComparer.Ordinal); 119var dictionary = new Dictionary<string, string>(StringComparer.Ordinal);
Rendering\ViewContext.cs (1)
207internal Dictionary<object, object?> Items => _items ??= new Dictionary<object, object?>();
SessionStateTempDataProvider.cs (1)
43return new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
TempDataDictionary.cs (2)
141? new Dictionary<string, object?>(providerDictionary, StringComparer.OrdinalIgnoreCase) 142: new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
TemplateRenderer.cs (2)
23new Dictionary<string, Func<IHtmlHelper, IHtmlContent>>(StringComparer.OrdinalIgnoreCase) 38new Dictionary<string, Func<IHtmlHelper, IHtmlContent>>(StringComparer.OrdinalIgnoreCase)
TryGetValueProvider.cs (1)
16new Dictionary<Type, TryGetValueDelegate>();
ViewComponents\DefaultViewComponentHelper.cs (1)
119return new Dictionary<string, object?>(capacity: 1, comparer: StringComparer.OrdinalIgnoreCase)
ViewDataDictionary.cs (1)
119data: new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase),
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (104)
ControllerUnitTestabilityTests.cs (6)
324var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 360var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 397var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 436var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 474var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 508var routeValues = new Dictionary<string, object>() { { "route", "sample" } };
CookieTempDataProviderTest.cs (6)
21private static readonly IDictionary<string, object> Dictionary = new Dictionary<string, object> 118var values = new Dictionary<string, object>(); 269var values = new Dictionary<string, object>(); 280tempDataProvider.SaveTempData(httpContext, new Dictionary<string, object>()); 298var input = new Dictionary<string, object> 341private readonly Dictionary<string, CookieInfo> _cookies = new Dictionary<string, CookieInfo>(StringComparer.OrdinalIgnoreCase);
DefaultHtmlGeneratorTest.cs (12)
116var htmlAttributes = new Dictionary<string, object> 171var htmlAttributes = new Dictionary<string, object> 201var htmlAttributes = new Dictionary<string, object> 225var htmlAttributes = new Dictionary<string, object> 249var htmlAttributes = new Dictionary<string, object> 271var htmlAttributes = new Dictionary<string, object> 293var htmlAttributes = new Dictionary<string, object> 316var htmlAttributes = new Dictionary<string, object> 369var htmlAttributes = new Dictionary<string, object> 399var htmlAttributes = new Dictionary<string, object> 424var htmlAttributes = new Dictionary<string, object> 471var htmlAttributes = new Dictionary<string, object>
Filters\ControllerSaveTempDataPropertyFilterTest.cs (4)
46new Dictionary<string, object>(), 92new Dictionary<string, object>(), 135new Dictionary<string, object>(), 174new Dictionary<string, object>(),
Filters\ControllerViewDataAttributeFilterTest.cs (2)
22var context = new ActionExecutingContext(actionContext, new IFilterMetadata[0], new Dictionary<string, object>(), controller); 40var context = new ActionExecutingContext(actionContext, new IFilterMetadata[0], new Dictionary<string, object>(), controller);
Infrastructure\DefaultTempDataSerializerTest.cs (3)
20var input = new Dictionary<string, object> 40var value = new Dictionary<string, int> 45var input = new Dictionary<string, object>
Infrastructure\TempDataSerializerTestBase.cs (17)
30var input = new Dictionary<string, object> 54var input = new Dictionary<string, object> 76var input = new Dictionary<string, object> 97var input = new Dictionary<string, object> 118var input = new Dictionary<string, object> 139var input = new Dictionary<string, object> 160var input = new Dictionary<string, object> 182var input = new Dictionary<string, object> 204var input = new Dictionary<string, object> 226var input = new Dictionary<string, object> 247var input = new Dictionary<string, object> 268var input = new Dictionary<string, object> 289var input = new Dictionary<string, object> 309var value = new Dictionary<string, string> 314var input = new Dictionary<string, object> 334var value = new Dictionary<string, int> 339var input = new Dictionary<string, object>
Rendering\HtmlHelperCheckboxTest.cs (5)
113var attributes = new Dictionary<string, object> 502var dictionary = new Dictionary<string, object> { { "Property3", "Property3Value" } }; 528var attributes = new Dictionary<string, object> 707var attributes = new Dictionary<string, object> 732var attributes = new Dictionary<string, object> { { "Property3", "PropValue" } };
Rendering\HtmlHelperFormExtensionsTest.cs (2)
22new Dictionary<string, object> { { "isprint", "false" }, { "showreviews", "true" }, }, 34new Dictionary<string, object> { { "p1-name", "p1-value" }, { "p2-name", "p2-value" } },
Rendering\HtmlHelperFormTest.cs (8)
52new Dictionary<string, object> { { "isprint", "false" }, { "showreviews", "false" }, }, 54new Dictionary<string, object> { { "p1-name", "p1-value" }, { "p2-name", "p2-value" } } 58new Dictionary<string, object> { { "isprint", "false" }, { "showreviews", "false" }, }, 60new Dictionary<string, object> { { "p1-name", "p1-value" }, { "p2-name", "p2-value" } } 101new Dictionary<string, object> { { "isprint", "false" }, { "showreviews", "false" }, }, 103new Dictionary<string, object> { { "p1-name", "p1-value" }, { "p2-name", "p2-value" } } 107new Dictionary<string, object> { { "isprint", "false" }, { "showreviews", "false" }, }, 109new Dictionary<string, object> { { "p1-name", "p1-value" }, { "p2-name", "p2-value" } }
Rendering\HtmlHelperHiddenTest.cs (14)
24var htmlAttributes1 = new Dictionary<string, object> 39{ new Dictionary<string, object> { { "foo-baz", "BazValue" } }, expected2 }, 184var attributes = new Dictionary<string, object> { { "data-key", "value" } }; 310var attributes = new Dictionary<string, object> { { "baz", "BazValue" } }; 425var attributes = new Dictionary<string, object> 447var attributes = new Dictionary<string, object> 467var attributes = new Dictionary<string, object> 534var attributes = new Dictionary<string, object> { { "data-test", "val" } }; 573var attributes = new Dictionary<string, object> { { "data-test", "val" } }; 665var attributes = new Dictionary<string, object> { { "key", "value" } }; 731var attributes = new Dictionary<string, object> 809var attributes = new Dictionary<string, object> 876var attributes = new Dictionary<string, object> 986public Dictionary<string, string> Property3 { get; } = new Dictionary<string, string>();
Rendering\HtmlHelperPasswordTest.cs (5)
20new Dictionary<string, object> 185var attributes = new Dictionary<string, object> 242var attributes = new Dictionary<string, object> { { "data-test", "val" } }; 293var attributes = new Dictionary<string, object> 533public Dictionary<string, string> Property3 { get; } = new Dictionary<string, string>();
Rendering\HtmlHelperTextAreaTest.cs (1)
148public Dictionary<string, string> Property3 { get; } = new Dictionary<string, string>();
Rendering\HtmlHelperTextBoxTest.cs (1)
166public Dictionary<string, string> Property3 { get; } = new Dictionary<string, string>();
Rendering\HtmlHelperValidationSummaryTest.cs (1)
19var dictionary = new Dictionary<string, object>
SessionStateTempDataProviderTest.cs (2)
14private static readonly IDictionary<string, object> Dictionary = new Dictionary<string, object> 101private readonly Dictionary<string, byte[]> _innerDictionary = new Dictionary<string, byte[]>();
TempDataDictionaryTest.cs (1)
147var data = new Dictionary<string, object>();
ViewComponentResultTest.cs (1)
216Arguments = new Dictionary<string, object> { ["name"] = "World!" },
ViewComponents\ContentViewComponentResultTest.cs (1)
59new Dictionary<string, object>(),
ViewComponents\DefaultViewComponentHelperTest.cs (1)
122var arguments = new Dictionary<string, object>
ViewComponents\HtmlContentViewComponentResultTest.cs (1)
59new Dictionary<string, object>(),
ViewComponents\ViewComponentContextTest.cs (2)
38new Dictionary<string, object>(), 98new Dictionary<string, object>(),
ViewComponents\ViewViewComponentResultTest.cs (1)
539new Dictionary<string, object>(),
ViewComponentTests.cs (1)
268private readonly Dictionary<string, byte[]> _innerDictionary = new Dictionary<string, byte[]>();
ViewDataDictionaryTest.cs (6)
229{ typeof(Dictionary<string, object>), new Dictionary<string, object>() }, 471new { Foo = new Dictionary<string, object> { { "Bar", "Baz" } } }, 673viewData.Add("Foo", new Dictionary<string, object> { { "Bar", "Baz" } }); 687viewData.Add("Foo", new Dictionary<string, object> { { "NotBar", "Baz" } }); 701var value = new Dictionary<string, object> 703["Bar"] = new Dictionary<string, string>
Microsoft.AspNetCore.Mvc.Views.TestCommon (3)
TestFileProvider.cs (3)
11new Dictionary<string, IFileInfo>(StringComparer.Ordinal); 13new Dictionary<string, IDirectoryContents>(); 16new Dictionary<string, TestFileChangeToken>(StringComparer.Ordinal);
Microsoft.AspNetCore.OpenApi (25)
Extensions\JsonNodeSchemaExtensions.cs (1)
27private static readonly Dictionary<Type, OpenApiSchema> _simpleTypeToOpenApiSchema = new()
Extensions\JsonTypeInfoExtensions.cs (1)
14private static readonly Dictionary<Type, string> _simpleTypeToName = new()
Extensions\OpenApiDocumentExtensions.cs (1)
19document.Components.Schemas ??= new Dictionary<string, IOpenApiSchema>();
Schemas\OpenApiJsonSchema.Helpers.cs (4)
69var values = new Dictionary<string, T>(); 310schema.Discriminator.Mapping ??= new Dictionary<string, OpenApiSchemaReference>(); 317schema.Metadata ??= new Dictionary<string, object>(); 329schema.Metadata ??= new Dictionary<string, object>();
Services\OpenApiDocumentService.cs (13)
93document.Components.Schemas = new Dictionary<string, IOpenApiSchema>( 266var operations = new Dictionary<HttpMethod, OpenApiOperation>(); 270operation.Metadata ??= new Dictionary<string, object>(); 403Content = new Dictionary<string, OpenApiMediaType>() 543Content = new Dictionary<string, OpenApiMediaType>() 546var schema = new OpenApiSchema { Type = JsonSchemaType.Object, Properties = new Dictionary<string, IOpenApiSchema>() }; 583Properties = new Dictionary<string, IOpenApiSchema> 591schema.Properties ??= new Dictionary<string, IOpenApiSchema>(); 623Properties = new Dictionary<string, IOpenApiSchema> 643schema.Properties ??= new Dictionary<string, IOpenApiSchema>(); 653var propertySchema = new OpenApiSchema { Type = JsonSchemaType.Object, Properties = new Dictionary<string, IOpenApiSchema>() }; 665schema.Properties ??= new Dictionary<string, IOpenApiSchema>(); 711Content = new Dictionary<string, OpenApiMediaType>(),
Services\OpenApiGenerator.cs (3)
117var eligibileAnnotations = new Dictionary<int, (Type?, MediaTypeCollection)>(); 200var responseContent = new Dictionary<string, OpenApiMediaType>(); 272var requestBodyContent = new Dictionary<string, OpenApiMediaType>();
src\Shared\ParameterBindingMethodCache.cs (1)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.OpenApi.Microbenchmarks (3)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
TransformersBenchmark.cs (2)
104schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 178schema.Extensions ??= new Dictionary<string, IOpenApiExtension>();
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
18Dictionary<TSource, ImmutableArray<TElement>.Builder> map = new(comparer);
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
AdditionalTextsTests.Schemas.cs (1)
187var references = new Dictionary<string, List<string>>
Microsoft.AspNetCore.OpenApi.Tests (23)
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (1)
708public IDictionary<string, Parent> SelfReferenceDictionary { get; set; } = new Dictionary<string, Parent>();
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (1)
591builder.MapGet("/", () => TypedResults.ValidationProblem(new Dictionary<string, string[]>
Transformers\CustomSchemaTransformerTests.cs (8)
33Content = new Dictionary<string, OpenApiMediaType>() 100Content = new Dictionary<string, OpenApiMediaType>() 112Content = new Dictionary<string, OpenApiMediaType>() 158schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 263Content = new Dictionary<string, OpenApiMediaType>() 349Content = new Dictionary<string, OpenApiMediaType>() 417Content = new Dictionary<string, OpenApiMediaType>() 470Content = new Dictionary<string, OpenApiMediaType>()
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (1)
285schema.Extensions ??= new Dictionary<string, IOpenApiExtension>();
Transformers\SchemaTransformerTests.cs (11)
155schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 162schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 189schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 451builder.MapGet("/dictionary", () => new Dictionary<string, int> { { "key", 1 } }); 499schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 568schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 610schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 652schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 741schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 957schema.Extensions ??= new Dictionary<string, IOpenApiExtension>(); 1006schema.Extensions ??= new Dictionary<string, IOpenApiExtension>();
Transformers\TypeBasedTransformerLifetimeTests.cs (1)
349schema.Extensions ??= new Dictionary<string, IOpenApiExtension>();
Microsoft.AspNetCore.OutputCaching (3)
CacheVaryByRules.cs (1)
21public IDictionary<string, string> VaryByValues => _varyByValues ??= new Dictionary<string, string>();
OutputCacheOptions.cs (2)
55NamedPolicies ??= new Dictionary<string, IOutputCachePolicy>(StringComparer.OrdinalIgnoreCase); 77NamedPolicies ??= new Dictionary<string, IOutputCachePolicy>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.OutputCaching.Tests (1)
TestUtils.cs (1)
328private readonly Dictionary<string, byte[]?> _storage = new();
Microsoft.AspNetCore.Owin (8)
OwinEnvironment.cs (4)
407new Dictionary<string, FeatureMap> 481_contextDependentEntries = new Dictionary<string, FeatureMap> 609_contextEntries = new Dictionary<string, FeatureMap>(StringComparer.Ordinal); 613_contextEntries = new Dictionary<string, FeatureMap>(_entries, StringComparer.Ordinal);
WebSockets\OwinWebSocketAcceptAdapter.cs (1)
59options = new Dictionary<string, object>(1)
WebSockets\OwinWebSocketAcceptContext.cs (2)
18public OwinWebSocketAcceptContext() : this(new Dictionary<string, object>(1)) 47_options = new Dictionary<string, object>(1);
WebSockets\WebSocketAdapter.cs (1)
45_environment = new Dictionary<string, object>();
Microsoft.AspNetCore.Owin.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.Owin.Tests (5)
OwinExtensionTests.cs (3)
46.Invoke(new Dictionary<string, object>()); 80.Invoke(new Dictionary<string, object>()); 113.Invoke(new Dictionary<string, object>());
OwinFeatureCollectionTests.cs (2)
25var env = new Dictionary<string, object> 44var env = new Dictionary<string, object>
Microsoft.AspNetCore.RateLimiting (3)
RateLimiterOptions.cs (2)
17= new Dictionary<string, DefaultRateLimiterPolicy>(StringComparer.Ordinal); 20= new Dictionary<string, Func<IServiceProvider, DefaultRateLimiterPolicy>>(StringComparer.Ordinal);
RateLimitingMiddleware.cs (1)
47_policyMap = new Dictionary<string, DefaultRateLimiterPolicy>(options.Value.PolicyMap);
Microsoft.AspNetCore.Razor.Runtime (7)
Runtime\TagHelpers\TagHelperExecutionContext.cs (2)
29items: new Dictionary<object, object>(), 240_perEncoderChildContent = new Dictionary<HtmlEncoder, TagHelperContent>();
Runtime\TagHelpers\TagHelperScopeManager.cs (1)
65items = new Dictionary<object, object>();
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
47_innerDictionary = new Dictionary<TKey, TValue>(_sourceDictionary,
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (3)
48_copy = new Dictionary<TKey, TValue>(); 61_copy = new Dictionary<TKey, TValue>(); 65_copy = new Dictionary<TKey, TValue>(_source, _source.Comparer);
Microsoft.AspNetCore.Razor.Runtime.Test (16)
Runtime\TagHelpers\TagHelperExecutionContextTest.cs (15)
21items: new Dictionary<object, object>(), 44items: new Dictionary<object, object>(), 69items: new Dictionary<object, object>(), 104items: new Dictionary<object, object>(), 123items: new Dictionary<object, object>(), 149var items = new Dictionary<object, object>(); 167var updatedItems = new Dictionary<object, object>(); 209var expectedItems = new Dictionary<object, object> 272items: new Dictionary<object, object>(), 300items: new Dictionary<object, object>(), 322items: new Dictionary<object, object>(), 349items: new Dictionary<object, object>(), 376items: new Dictionary<object, object>(), 406items: new Dictionary<object, object>(), 433items: new Dictionary<object, object>(),
Runtime\TagHelpers\TagHelperScopeManagerTest.cs (1)
49var parentComplexObject = new Dictionary<string, int>(StringComparer.Ordinal);
Microsoft.AspNetCore.Razor.Test (4)
TagHelpers\TagHelperContextTest.cs (4)
15var initialItems = new Dictionary<object, object> 19var expectedItems = new Dictionary<object, object> 47var expectedItems = new Dictionary<object, object> 72var expectedItems = new Dictionary<object, object>
Microsoft.AspNetCore.RequestDecompression (1)
RequestDecompressionOptions.cs (1)
14public IDictionary<string, IDecompressionProvider> DecompressionProviders { get; } = new Dictionary<string, IDecompressionProvider>(StringComparer.OrdinalIgnoreCase)
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.ResponseCaching.Tests (1)
TestUtils.cs (1)
369private readonly IDictionary<string, IResponseCacheEntry> _storage = new Dictionary<string, IResponseCacheEntry>();
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.Rewrite (4)
ApacheModRewrite\FlagParser.cs (1)
8private static readonly IDictionary<string, FlagType> _ruleFlagLookup = new Dictionary<string, FlagType>(StringComparer.OrdinalIgnoreCase) {
ApacheModRewrite\Flags.cs (1)
22FlagDictionary = new Dictionary<FlagType, string>();
IISUrlRewrite\IISRewriteMap.cs (1)
8private readonly Dictionary<string, string> _map = new Dictionary<string, string>();
IISUrlRewrite\IISRewriteMapCollection.cs (1)
10private readonly Dictionary<string, IISRewriteMap> _rewriteMaps = new Dictionary<string, IISRewriteMap>();
Microsoft.AspNetCore.Rewrite.Tests (8)
ApacheModRewrite\FlagParserTest.cs (5)
14var dict = new Dictionary<FlagType, string>(); 25var dict = new Dictionary<FlagType, string>(); 38var dict = new Dictionary<FlagType, string>(); 79return (other ?? new Dictionary<TKey, TValue>()) 81.SequenceEqual((dictionary ?? new Dictionary<TKey, TValue>())
IISUrlRewrite\InputParserTests.cs (1)
89var variablesDict = new Dictionary<string, string>()
IISUrlRewrite\ServerVariableTests.cs (2)
63httpContext.Features.Set<IServerVariablesFeature>(new TestServerVariablesFeature(new Dictionary<string, string> 111httpContext.Features.Set<IServerVariablesFeature>(new TestServerVariablesFeature(new Dictionary<string, string>
Microsoft.AspNetCore.Routing (34)
DecisionTree\DecisionTreeBuilder.cs (2)
103var criteria = new Dictionary<string, Criterion>(StringComparer.OrdinalIgnoreCase); 153var reducedBranches = new Dictionary<object, DecisionTreeNode<TItem>>(comparer.InnerComparer);
DefaultLinkParser.cs (1)
89var constraints = new Dictionary<string, List<IRouteConstraint>>(StringComparer.OrdinalIgnoreCase);
EndpointNameAddressScheme.cs (1)
38var entries = new Dictionary<string, Endpoint[]>(StringComparer.Ordinal);
Internal\DfaGraphWriter.cs (1)
54var visited = new Dictionary<DfaNode, int>();
Matching\AcceptsMatcherPolicy.cs (1)
150var edges = new Dictionary<string, List<Endpoint>>(StringComparer.OrdinalIgnoreCase);
Matching\ContentEncodingNegotiationMatcherPolicy.cs (1)
70_extraDestinations ??= new Dictionary<string, (int destination, double quality)>(StringComparer.OrdinalIgnoreCase);
Matching\DataSourceDependentMatcher.cs (1)
41var seenEndpointNames = new Dictionary<string, string?>();
Matching\DfaMatcherBuilder.cs (2)
52_assignments = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); 124_cachedParameters = new Dictionary<string, IParameterPolicy>(StringComparer.Ordinal);
Matching\DfaNode.cs (2)
42PolicyEdges = new Dictionary<object, DfaNode>(); 52Literals = new Dictionary<string, DfaNode>(StringComparer.OrdinalIgnoreCase);
Matching\HostMatcherPolicy.cs (1)
198var edges = new Dictionary<EdgeKey, List<Endpoint>>();
Matching\HttpMethodDestinationsLookup.cs (1)
81_extraDestinations ??= new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
Matching\HttpMethodMatcherPolicy.cs (1)
175var edges = new Dictionary<EdgeKey, List<Endpoint>>();
Matching\NegotiationMatcherPolicy.cs (1)
233var edges = new Dictionary<string, List<Endpoint>>(StringComparer.OrdinalIgnoreCase);
Patterns\RoutePatternFactory.cs (7)
34new ReadOnlyDictionary<string, object?>(new Dictionary<string, object?>()); 37new ReadOnlyDictionary<string, IReadOnlyList<RoutePatternParameterPolicyReference>>(new Dictionary<string, IReadOnlyList<RoutePatternParameterPolicyReference>>()); 461updatedDefaults = new Dictionary<string, object?>(defaults.Count, StringComparer.OrdinalIgnoreCase); 602updatedDefaults = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 614parameterPolicyReferences = new Dictionary<string, List<RoutePatternParameterPolicyReference>>(StringComparer.OrdinalIgnoreCase); 653updatedParameterPolicies = new Dictionary<string, List<RoutePatternParameterPolicyReference>>(parameterPolicies.Count, StringComparer.OrdinalIgnoreCase); 1050var combinedDictionary = new Dictionary<string, TValue>(leftDictionary.Count + rightDictionary.Count, StringComparer.OrdinalIgnoreCase);
RouteCollection.cs (1)
22new Dictionary<string, INamedRouter>(StringComparer.OrdinalIgnoreCase);
RouteConstraintBuilder.cs (2)
44_constraints = new Dictionary<string, List<IRouteConstraint>>(StringComparer.OrdinalIgnoreCase); 54var constraints = new Dictionary<string, IRouteConstraint>(StringComparer.OrdinalIgnoreCase);
RouteOptions.cs (1)
104var defaults = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase);
RouteValuesAddressScheme.cs (1)
73var namedOutboundMatchResults = new Dictionary<string, List<OutboundMatchResult>>(StringComparer.OrdinalIgnoreCase);
src\Shared\PropertyHelper\PropertyHelper.cs (2)
326return new Dictionary<string, object?>(dictionary, StringComparer.OrdinalIgnoreCase); 329dictionary = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
Tree\LinkGenerationDecisionTree.cs (1)
176var results = new Dictionary<string, DecisionCriterionValue>(StringComparer.OrdinalIgnoreCase);
Tree\TreeRouteBuilder.cs (1)
268var trees = new Dictionary<int, UrlMatchingTree>();
Tree\TreeRouter.cs (1)
88_namedEntries = new Dictionary<string, OutboundMatch>(StringComparer.OrdinalIgnoreCase);
Tree\UrlMatchingNode.cs (1)
31Literals = new Dictionary<string, UrlMatchingNode>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Routing.Abstractions (2)
src\Shared\PropertyHelper\PropertyHelper.cs (2)
326return new Dictionary<string, object?>(dictionary, StringComparer.OrdinalIgnoreCase); 329dictionary = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Routing.Microbenchmarks (3)
Matching\HttpMethodPolicyJumpTableBenchmark.cs (1)
14private Dictionary<string, int> _destinations = new();
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
66new Dictionary<string, object>(),
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.Routing.Tests (25)
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (1)
249httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (3)
160httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues> 198httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>() 580httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
ConstraintMatcherTest.cs (8)
23var constraints = new Dictionary<string, IRouteConstraint> 50var constraints = new Dictionary<string, IRouteConstraint> 69var constraints = new Dictionary<string, IRouteConstraint> 84var constraints = new Dictionary<string, IRouteConstraint> 104var constraints = new Dictionary<string, IRouteConstraint> 124var constraints = new Dictionary<string, IRouteConstraint> 144var constraints = new Dictionary<string, IRouteConstraint> 164var constraints = new Dictionary<string, IRouteConstraint>
DecisionTreeBuilderTest.cs (1)
198Criteria = new Dictionary<string, DecisionCriterionValue>(StringComparer.OrdinalIgnoreCase);
Matching\RouteMatcherBuilder.cs (1)
66new Dictionary<string, object>(),
MetadataTest.cs (1)
12var metadata = new DataTokensMetadata(new Dictionary<string, object>
RouteTest.cs (7)
308var constraints = new Dictionary<string, object>(); 1538new Dictionary<string, object> { { "key1", "data1" }, { "key2", 13 } }, 1539new Dictionary<string, object> { { "key1", "data1" }, { "key2", 13 } }, 1543new Dictionary<string, object> { { "key1", "data1" }, { "key2", 13 } }, 1547new Dictionary<string,object>(), 1551new Dictionary<string, object>() 1555new Dictionary<string, object> { { "key1", "data1" }, { "key2", 13 } },
Tree\TreeRouterTest.cs (3)
804var values = new Dictionary<string, object> 861var values = new Dictionary<string, object> 893var values = new Dictionary<string, object>
Microsoft.AspNetCore.Security.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.Server.HttpSys (4)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
51: this(new Dictionary<string, StringValues>(4, StringComparer.OrdinalIgnoreCase))
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
36var newDict = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
StandardFeatureCollection.cs (1)
14private static readonly Dictionary<Type, Func<RequestContext, object?>> _featureFuncLookup = new()
UrlPrefixCollection.cs (1)
17private readonly IDictionary<int, UrlPrefix> _prefixes = new Dictionary<int, UrlPrefix>(1);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (6)
RequestHeaderTests.cs (5)
116var headerDictionary = new HeaderDictionary(new Dictionary<string, StringValues> { 139var headerDictionary = new HeaderDictionary(new Dictionary<string, StringValues> { 170var headerDictionary = new HeaderDictionary(new Dictionary<string, StringValues> { 199var headerDictionary = new Dictionary<string, string> 224var headerDictionary = new Dictionary<string, string>
src\Shared\Http2cat\Http2Utilities.cs (1)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.Server.IIS (4)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
51: this(new Dictionary<string, StringValues>(4, StringComparer.OrdinalIgnoreCase))
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
762var info = new Dictionary<int, ReadOnlyMemory<byte>>(count);
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
36var newDict = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Server.IntegrationTesting (3)
CachingApplicationPublisher.cs (1)
10private readonly Dictionary<DotnetPublishParameters, PublishedApplication> _publishCache = new Dictionary<DotnetPublishParameters, PublishedApplication>();
Common\DeploymentParameters.cs (2)
165public IDictionary<string, string> EnvironmentVariables { get; } = new Dictionary<string, string>(); 170public IDictionary<string, string> PublishEnvironmentVariables { get; } = new Dictionary<string, string>();
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
IISDeploymentParameters.cs (2)
44public IDictionary<string, string> WebConfigBasedEnvironmentVariables { get; set; } = new Dictionary<string, string>(); 46public IDictionary<string, string> HandlerSettings { get; set; } = new Dictionary<string, string>();
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Internal\CertificatePathWatcher.cs (2)
23private readonly Dictionary<string, DirectoryWatchMetadata> _metadataForDirectory = new(); 25private readonly Dictionary<string, FileWatchMetadata> _metadataForFile = new();
Internal\ConfigurationReader.cs (2)
41var certificates = new Dictionary<string, CertificateConfig>(0, StringComparer.OrdinalIgnoreCase); 123var sniDictionary = new Dictionary<string, SniConfig>(0, StringComparer.OrdinalIgnoreCase);
Internal\Http\HttpHeaders.cs (1)
26protected Dictionary<string, StringValues> Unknown => MaybeUnknown ??= new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
Internal\Http2\Http2Connection.cs (1)
148internal readonly Dictionary<int, Http2Stream> _streams = new Dictionary<int, Http2Stream>();
Internal\Http3\Http3Connection.cs (3)
25internal readonly Dictionary<long, IHttp3Stream> _streams = new(); 26internal readonly Dictionary<long, Http3PendingStream> _unidentifiedStreams = new(); 73_webtransportSessions = new();
Internal\SniOptionsSelector.cs (1)
28private readonly Dictionary<string, SniOptions> _exactNameOptions = new Dictionary<string, SniOptions>(StringComparer.OrdinalIgnoreCase);
KestrelConfigurationLoader.cs (1)
72= new Dictionary<string, Action<EndpointConfiguration>>(0, StringComparer.OrdinalIgnoreCase);
src\Shared\runtime\Http3\QPack\H3StaticTable.Http3.cs (1)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int>
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (36)
CertificatePathWatcherTests.cs (3)
476var dict = new Dictionary<string, object>(pairs); 521private readonly Dictionary<string, ConfigurationReloadToken> _changeTokens = new(); 522private readonly Dictionary<string, DateTimeOffset?> _lastModifiedTimes = new();
Http2\Http2HPackEncoderTests.cs (2)
579enumerator.Initialize(new Dictionary<string, StringValues>()); 593enumerator.Initialize(new Dictionary<string, StringValues>());
HttpParserTests.cs (1)
906public Dictionary<string, string> Headers { get; } = new Dictionary<string, string>();
SniOptionsSelectorTests.cs (24)
27var sniDictionary = new Dictionary<string, SniConfig> 94var sniDictionary = new Dictionary<string, SniConfig> 140var sniDictionary = new Dictionary<string, SniConfig> 188var sniDictionary = new Dictionary<string, SniConfig> 252var sniDictionary = new Dictionary<string, SniConfig> 297var sniDictionary = new Dictionary<string, SniConfig> 339new Dictionary<string, SniConfig>(), 355var sniDictionary = new Dictionary<string, SniConfig> 387var sniDictionary = new Dictionary<string, SniConfig> 414var sniDictionary = new Dictionary<string, SniConfig> 455var sniDictionary = new Dictionary<string, SniConfig> 508var sniDictionary = new Dictionary<string, SniConfig> 528var sniDictionary = new Dictionary<string, SniConfig> 552var sniDictionary = new Dictionary<string, SniConfig> 580var sniDictionary = new Dictionary<string, SniConfig> 611var sniDictionary = new Dictionary<string, SniConfig> 644var sniDictionary = new Dictionary<string, SniConfig> 674var sniDictionary = new Dictionary<string, SniConfig> 708var sniDictionary = new Dictionary<string, SniConfig> 737var sniDictionary = new Dictionary<string, SniConfig> 773var sniDictionary = new Dictionary<string, SniConfig> 927public Dictionary<object, string> CertToPathDictionary { get; } = new Dictionary<object, string>(ReferenceEqualityComparer.Instance); 928public Dictionary<object, X509Certificate2Collection> CertToFullChain { get; } = new Dictionary<object, X509Certificate2Collection>(ReferenceEqualityComparer.Instance); 954public override IDictionary<object, object> Items { get; set; } = new Dictionary<object, object>();
src\Servers\Kestrel\shared\test\RevocationResponder.cs (2)
20new Dictionary<string, CertificateAuthority>(); 23= new Dictionary<string, CertificateAuthority>();
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (2)
962public Dictionary<string, string> DecodedHeaders { get; } = new Dictionary<string, string>(); 963public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (2)
369public Dictionary<string, string> DecodedHeaders { get; } = new Dictionary<string, string>(); 370public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (4)
InMemoryTransportBenchmark.cs (1)
109new Dictionary<EndPoint, IReadOnlyList<InMemoryConnection>>();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
660public readonly Dictionary<string, string> DecodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 845var settings = new Dictionary<long, long>();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.Session (1)
DefaultDistributedSessionStore.cs (1)
11private readonly Dictionary<EncodedKey, byte[]> _store = new Dictionary<EncodedKey, byte[]>();
Microsoft.AspNetCore.Shared.Tests (22)
CopyOnWriteDictionaryHolderTest.cs (3)
17var source = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 43var source = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 68var source = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
CopyOnWriteDictionaryTest.cs (2)
63var sourceDictionary = new Dictionary<string, object> 87var sourceDictionary = new Dictionary<string, object>
runtime\Http2\HPackDecoderTest.cs (2)
962public Dictionary<string, string> DecodedHeaders { get; } = new Dictionary<string, string>(); 963public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
runtime\Http3\QPackDecoderTest.cs (2)
369public Dictionary<string, string> DecodedHeaders { get; } = new Dictionary<string, string>(); 370public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionary.cs (1)
47_innerDictionary = new Dictionary<TKey, TValue>(_sourceDictionary,
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (3)
48_copy = new Dictionary<TKey, TValue>(); 61_copy = new Dictionary<TKey, TValue>(); 65_copy = new Dictionary<TKey, TValue>(_source, _source.Comparer);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (2)
82_dictionaryStorage = new Dictionary<TKey, TValue>(capacity, _comparer); 519_dictionaryStorage = new Dictionary<TKey, TValue>(capacity, _comparer);
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
51: this(new Dictionary<string, StringValues>(4, StringComparer.OrdinalIgnoreCase))
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
762var info = new Dictionary<int, ReadOnlyMemory<byte>>(count);
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
36var newDict = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
src\Shared\PropertyHelper\PropertyHelper.cs (2)
326return new Dictionary<string, object?>(dictionary, StringComparer.OrdinalIgnoreCase); 329dictionary = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
src\Shared\runtime\Http3\QPack\H3StaticTable.Http3.cs (1)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int>
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.SignalR.Client.Core (3)
HubConnection.cs (3)
786readers = new Dictionary<string, object>(); 1201invocationMessage.Headers ??= new Dictionary<string, string>(); 2130private readonly Dictionary<string, InvocationRequest> _pendingCalls = new Dictionary<string, InvocationRequest>(StringComparer.Ordinal);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.cs (1)
3036new Dictionary<string, IHubProtocol>
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Parser.cs (1)
240var providerSymbols = new Dictionary<string, (ITypeSymbol, MemberAccessExpressionSyntax)>();
HubServerProxyGenerator.Parser.cs (1)
228var hubSymbols = new Dictionary<string, (ITypeSymbol, MemberAccessExpressionSyntax)>();
Microsoft.AspNetCore.SignalR.Client.Tests (3)
HttpConnectionFactoryTests.cs (2)
84var testValues = new Dictionary<string, object> 87{ $"{nameof(HttpConnectionOptions.Headers)}", new Dictionary<string, string>() },
HubConnectionTests.ConnectionLifecycle.cs (1)
28private static readonly IDictionary<string, Func<HubConnection, Task>> MethodsThatRequireActiveConnection = new Dictionary<string, Func<HubConnection, Task>>()
Microsoft.AspNetCore.SignalR.Common.Tests (3)
Internal\Protocol\HubMessageHelpers.cs (1)
18hubMessage.Headers = new Dictionary<string, string>();
Internal\Protocol\JsonHubProtocolTestsBase.cs (1)
20public static readonly IDictionary<string, string> TestHeaders = new Dictionary<string, string>
Internal\Protocol\MessagePackHubProtocolTestBase.cs (1)
26protected static readonly IDictionary<string, string> TestHeaders = new Dictionary<string, string>
Microsoft.AspNetCore.SignalR.Core (2)
Internal\DefaultHubDispatcher.cs (1)
25private readonly Dictionary<string, HubMethodDescriptor> _methods = new(StringComparer.OrdinalIgnoreCase);
Internal\DefaultHubProtocolResolver.cs (1)
22_availableProtocols = new Dictionary<string, IHubProtocol>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
483var headers = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Protocol\MessagePackHubProtocolWorker.cs (1)
246var headers = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Protocol\NewtonsoftJsonHubProtocol.cs (1)
480var headers = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.Activity.cs (2)
132var headers = new Dictionary<string, string> 262var headers = new Dictionary<string, string>
Microsoft.AspNetCore.SpaServices.Extensions (1)
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (1)
73var envVars = new Dictionary<string, string>
Microsoft.AspNetCore.StaticFiles (1)
FileExtensionContentTypeProvider.cs (1)
22: this(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFileContextTest.cs (1)
150private readonly Dictionary<string, IFileInfo> _files = new Dictionary<string, IFileInfo>(StringComparer.Ordinal);
Microsoft.AspNetCore.Tests (17)
WebApplicationTests.cs (17)
415builder.AddInMemoryCollection(new Dictionary<string, string> 423builder.AddInMemoryCollection(new Dictionary<string, string> 431builder.AddInMemoryCollection(new Dictionary<string, string> 439builder.AddInMemoryCollection(new Dictionary<string, string> 447builder.AddInMemoryCollection(new Dictionary<string, string> 455builder.AddInMemoryCollection(new Dictionary<string, string> 1082builder.AddInMemoryCollection(new Dictionary<string, string> 1123config.AddInMemoryCollection(new Dictionary<string, string>() 1132config.AddInMemoryCollection(new Dictionary<string, string>() 1145config.AddInMemoryCollection(new Dictionary<string, string>() 1182config.AddInMemoryCollection(new Dictionary<string, string>() 1192config.AddInMemoryCollection(new Dictionary<string, string>() 1201builder.Configuration.AddInMemoryCollection(new Dictionary<string, string>() 1227config.AddInMemoryCollection(new Dictionary<string, string>() 1245builder.Configuration.AddInMemoryCollection(new Dictionary<string, string>() 1522builder.Configuration.AddInMemoryCollection(new Dictionary<string, string> 2307builder.Configuration.AddInMemoryCollection(new Dictionary<string, string>
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Autobahn\AutobahnExpectations.cs (1)
11private readonly Dictionary<string, Expectation> _expectations = new Dictionary<string, Expectation>();
Microsoft.AspNetCore.WebSockets.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.WebUtilities (4)
KeyValueAccumulator.cs (3)
25_accumulator = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase); 49_expandingAccumulator = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase); 105return _accumulator ?? new Dictionary<string, StringValues>(0, StringComparer.OrdinalIgnoreCase);
QueryHelpers.cs (1)
127return new Dictionary<string, StringValues>();
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.AspNetCore.WebUtilities.Tests (2)
QueryHelpersTests.cs (2)
158var queryStrings = new Dictionary<string, string?>() 191var queryStrings = new Dictionary<string, StringValues>()
Microsoft.Build.Framework (36)
BinaryReaderExtensions.cs (2)
112data.ExtendedMetadata = new Dictionary<string, string?>(); 132var durations = new Dictionary<string, TimeSpan>(count);
BinaryTranslator.cs (5)
587count => new Dictionary<string, string>(count, comparer)); 611dictionary = new Dictionary<string, string>(count, comparer); 612additionalEntries = new(); 699dictionary = new Dictionary<string, T>(count, comparer); 778dictionary = new(count, comparer);
BuildCheck\BuildCheckTracingData.cs (2)
24: this(new Dictionary<string, BuildCheckRuleTelemetryData>(), []) 28: this(new Dictionary<string, BuildCheckRuleTelemetryData>(), executionData)
BuildException\BuildExceptionBase.cs (1)
136customKeyedSerializedData = new Dictionary<string, string?>(count, StringComparer.CurrentCulture);
BuildException\BuildExceptionSerializationHelper.cs (1)
49var exceptionFactories = new Dictionary<string, Func<string, Exception?, BuildExceptionBase>>();
BuildSubmissionStartedEventArgs.cs (2)
20GlobalProperties = new Dictionary<string, string?>(); 84Dictionary<string, string?> globalProperties = new Dictionary<string, string?>(numberOfProperties);
Features.cs (1)
39private static readonly Dictionary<string, FeatureStatus> _featureStatusMap = new Dictionary<string, FeatureStatus>
InterningReadTranslator.cs (1)
80_pathIdsToString = new(_strings.Count);
InterningWriteTranslator.cs (2)
85_stringToIds = new Dictionary<string, int>(initialCapacity, comparer); 86_stringToPathIds = new Dictionary<string, InternPathIds>(initialCapacity, comparer);
LoggerException.cs (1)
116return new Dictionary<string, string?>()
Profiler\EvaluationLocation.cs (1)
63new Dictionary<EvaluationPass, string>
Sdk\SdkResultItem.cs (1)
24Metadata = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
TaskItemData.cs (2)
19private static readonly Dictionary<string, string> _emptyMetadata = new Dictionary<string, string>(); 41var dictionary = new Dictionary<string, string>();
TaskParameterEventArgs.cs (1)
126internal static Func<int, IDictionary<string, string>> DictionaryFactory = capacity => new Dictionary<string, string>(capacity);
Telemetry\BuildCheckTelemetry.cs (3)
25var properties = new Dictionary<string, string>(); 53var properties = new Dictionary<string, string>(); 64properties = new Dictionary<string, string>();
Telemetry\BuildTelemetry.cs (1)
100var properties = new Dictionary<string, string>();
Telemetry\LoggingConfigurationTelemetry.cs (1)
102var properties = new Dictionary<string, string>();
Telemetry\WorkerNodeTelemetryData.cs (2)
54: this(new Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats>(), new Dictionary<TaskOrTargetTelemetryKey, bool>())
Telemetry\WorkerNodeTelemetryEventArgs.cs (2)
43Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats> tasksExecutionData = new(); 54Dictionary<TaskOrTargetTelemetryKey, bool> targetsExecutionData = new();
TelemetryEventArgs.cs (1)
25public IDictionary<string, string?> Properties { get; set; } = new Dictionary<string, string?>();
XamlTypes\ContentType.cs (1)
159var metadata = new Dictionary<string, string>(this.Metadata.Count, StringComparer.OrdinalIgnoreCase);
XamlTypes\Rule.cs (2)
77Metadata = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); 497var map = new Dictionary<string, BaseProperty>(this.Properties.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (2)
92var rootByItemSpec = new Dictionary<string, ITaskItem>(); 123var topLevelMappedPaths = new Dictionary<string, string>();
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (2)
92var rootByItemSpec = new Dictionary<string, ITaskItem>(); 123var topLevelMappedPaths = new Dictionary<string, string>();
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (52)
GenerateMSBuildEditorConfigTests.cs (31)
37ITaskItem property1 = MSBuildUtil.CreateTaskItem("Property1", new Dictionary<string, string> { { "Value", "abc123" } }); 38ITaskItem property2 = MSBuildUtil.CreateTaskItem("Property2", new Dictionary<string, string> { { "Value", "def456" } }); 57ITaskItem item1 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 77ITaskItem item1 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 78ITaskItem item2 = MSBuildUtil.CreateTaskItem("c:/file2.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "def456" } }); 79ITaskItem item3 = MSBuildUtil.CreateTaskItem("c:/file3.cs", new Dictionary<string, string> { { "ItemType", "AdditionalFiles" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "ghi789" } }); 106ITaskItem item1 = MSBuildUtil.CreateTaskItem("c:/{f*i?le1}.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 107ITaskItem item2 = MSBuildUtil.CreateTaskItem("c:/f,ile#2.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "def456" } }); 108ITaskItem item3 = MSBuildUtil.CreateTaskItem("c:/f;i!le[3].cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "ghi789" } }); 134ITaskItem item1 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 135ITaskItem item2 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { { "ItemType", "AdditionalFile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "def456" } }); 156ITaskItem item1 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" } }); 176ITaskItem item1 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { }); 177ITaskItem item2 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { { "ItemType", "Compile" } }); 178ITaskItem item3 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { { "MetadataName", "ToRetrieve" } }); 197ITaskItem item1 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 198ITaskItem item2 = MSBuildUtil.CreateTaskItem("c:/file2.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "def456" } }); 199ITaskItem item3 = MSBuildUtil.CreateTaskItem("c:/file3.cs", new Dictionary<string, string> { { "ItemType", "AdditionalFiles" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "ghi789" } }); 200ITaskItem item4 = MSBuildUtil.CreateTaskItem("c:/file1.cs", new Dictionary<string, string> { { "ItemType", "AdditionalFiles" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "jkl012" } }); 202ITaskItem property1 = MSBuildUtil.CreateTaskItem("Property1", new Dictionary<string, string> { { "Value", "abc123" } }); 203ITaskItem property2 = MSBuildUtil.CreateTaskItem("Property2", new Dictionary<string, string> { { "Value", "def456" } }); 233TaskItem item1 = new TaskItem("file1.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 234TaskItem item2 = new TaskItem("subDir\\file2.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 235TaskItem item3 = new TaskItem("someDir\\otherDir\\thirdDir\\..\\file3.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 267TaskItem item1 = new TaskItem("file1.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 268TaskItem item2 = new TaskItem("someDir\\..\\file1.cs", new Dictionary<string, string> { { "ItemType", "AdditionalFile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "def456" } }); 310TaskItem property1 = new TaskItem("Property1", new Dictionary<string, string> { { "Value", longPropertyValue } }); 311TaskItem property2 = new TaskItem("Property2", new Dictionary<string, string> { { "Value", "def456" } }); 339ITaskItem item1 = MSBuildUtil.CreateTaskItem("c:\\file1.cs", new Dictionary<string, string> { { "ItemType", "Compile" }, { "MetadataName", "ToRetrieve" }, { "ToRetrieve", "abc123" } }); 359ITaskItem property1 = MSBuildUtil.CreateTaskItem("Property1", new Dictionary<string, string> { { "Value", "abc123" } }); 360ITaskItem property2 = MSBuildUtil.CreateTaskItem("Property2", new Dictionary<string, string> { { "Value", "def456" } });
MapSourceRootTests.cs (16)
39new TaskItem(@"c:\MyProjects\MyProject\", new Dictionary<string, string> 43new TaskItem(@"c:\MyProjects\MyProject\a\b\", new Dictionary<string, string> 89new TaskItem(@"****/", new Dictionary<string, string> 93new TaskItem(@"****\|||:;\", new Dictionary<string, string> 161new TaskItem(@"c:\MyProjects\MyProject\a\a\", new Dictionary<string, string> 166new TaskItem(@"c:\MyProjects\MyProject\a\b\", new Dictionary<string, string> 171new TaskItem(@"c:\MyProjects\MyProject\a\c\", new Dictionary<string, string> 250new TaskItem(path1, new Dictionary<string, string> 255new TaskItem(path2, new Dictionary<string, string> 293new TaskItem(path1, new Dictionary<string, string> 302new TaskItem(path1, new Dictionary<string, string> 311new TaskItem(path2, new Dictionary<string, string> 316new TaskItem(path2, new Dictionary<string, string> 365new TaskItem(@"c:\MyProjects\MyProject\a\b\", new Dictionary<string, string> 395new TaskItem(@"c:\MyProjects\MyProject\a\b\", new Dictionary<string, string> 427new TaskItem(path1, new Dictionary<string, string>
TargetTests.cs (3)
932addTask(proj, "WriteLinesToFile", new() 941addTask(proj, "MakeDir", new() 947addTask(proj, "Message", new()
TestUtilities\DotNetSdkTestBase.cs (1)
180EnvironmentVariables = new Dictionary<string, string>()
TestUtilities\SimpleTaskItem.cs (1)
45var map = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.Cci.Extensions (14)
Extensions\TypeExtensions.cs (1)
448private static Dictionary<string, string> s_tokenNames = new Dictionary<string, string>()
Filters\BaselineDifferenceFilter.cs (1)
14private readonly Dictionary<string, bool> _ignoreDifferences = new Dictionary<string, bool>();
Mappings\AssemblyMapping.cs (2)
19_namespaces = new Dictionary<INamespaceDefinition, NamespaceMapping>(settings.NamespaceComparer); 30_properties = new Dictionary<string, ElementMapping<AssemblyProperty>>();
Mappings\AssemblySetMapping.cs (2)
17_namespaces = new Dictionary<INamespaceDefinition, NamespaceMapping>(settings.NamespaceComparer); 18_assemblies = new Dictionary<IAssembly, AssemblyMapping>(settings.AssemblyComparer);
Mappings\AttributesMapping.cs (1)
29_attributes = new Dictionary<string, ElementMapping<AttributeGroup>>();
Mappings\NamespaceMapping.cs (1)
19_types = new Dictionary<ITypeDefinition, TypeMapping>(settings.TypeComparer);
Mappings\TypeMapping.cs (2)
19_members = new Dictionary<ITypeDefinitionMember, MemberMapping>(settings.MemberComparer); 20_nestedTypes = new Dictionary<INestedTypeDefinition, TypeMapping>(settings.TypeComparer);
SRMetadataPEReaderCache.cs (1)
25_cache = new Dictionary<string, (FileStream, PEReader)>();
Traversers\DependencyTraverser.cs (1)
23_dependencies = new Dictionary<IDefinition, HashSet<IReference>>(new ReferenceEqualityComparer<IDefinition>());
Traversers\DocIdToTypeMappingTraverser.cs (1)
15_typesIdMap = new Dictionary<string, ITypeDefinition>();
Traversers\ResolveAllReferencesTraverser.cs (1)
18_missingDependencies = new Dictionary<IReference, HashSet<IReference>>(new ReferenceEqualityComparer());
Microsoft.CodeAnalysis (129)
Binding\AbstractLookupSymbolsInfo.cs (1)
237_nameMap = new Dictionary<string, UniqueSymbolOrArities>(comparer);
CodeGen\CompilationTestData.cs (1)
68var map = new Dictionary<string, MethodData>();
CodeGen\LocalSlotManager.cs (1)
96map = new Dictionary<ILocalSymbolInternal, LocalDefinition>(ReferenceEqualityComparer.Instance);
CodeGen\SwitchStringJumpTableEmitter.cs (2)
140var hashBucketLabelsMap = new Dictionary<uint, object>(count); 196var stringHashMap = new Dictionary<uint, HashBucket>(caseLabels.Length);
Collections\CachingDictionary.cs (1)
140return new Dictionary<TKey, ImmutableArray<TElement>>(capacity, _comparer);
Collections\IdentifierCollection.cs (1)
27private readonly Dictionary<string, object> _map = new Dictionary<string, object>(
Collections\KeyedStack.cs (1)
18private readonly Dictionary<T, Stack<R>> _dict = new Dictionary<T, Stack<R>>();
Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
CommandLine\CommonCompiler.cs (1)
432var embeddedTreeMap = new Dictionary<string, SyntaxTree>(Arguments.EmbeddedFiles.Length);
CommandLine\SarifV1ErrorLogger.cs (2)
235private readonly Dictionary<string, int> _counters = new Dictionary<string, int>(); 238private readonly Dictionary<DiagnosticDescriptor, string> _keys = new Dictionary<DiagnosticDescriptor, string>(SarifDiagnosticComparer.Instance);
CommandLine\SarifV2ErrorLogger.cs (1)
459private readonly Dictionary<DiagnosticDescriptor, DescriptorInfoWithIndex> _distinctDescriptors = new(SarifDiagnosticComparer.Instance);
Compilation\CommonModuleCompilationState.cs (1)
48Interlocked.CompareExchange(ref _lazyStateMachineTypes, new Dictionary<TMethodSymbol, TNamedTypeSymbol>(), null);
DiagnosticAnalyzer\AnalysisResultBuilder.cs (8)
46_completedSyntaxAnalyzersByTree = new Dictionary<SyntaxTree, HashSet<DiagnosticAnalyzer>>(); 47_completedSemanticAnalyzersByTree = new Dictionary<SyntaxTree, HashSet<DiagnosticAnalyzer>>(); 48_completedSyntaxAnalyzersByAdditionalFile = new Dictionary<AdditionalText, HashSet<DiagnosticAnalyzer>>(); 49_analyzerActionCounts = new Dictionary<DiagnosticAnalyzer, AnalyzerActionCounts>(analyzers.Length); 55var map = new Dictionary<DiagnosticAnalyzer, TimeSpan>(analyzers.Length); 340lazyLocalDiagnostics = lazyLocalDiagnostics ?? new Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>(); 353allDiagnostics = new Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>(); 375_nonLocalDiagnosticsOpt = _nonLocalDiagnosticsOpt ?? new Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>();
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (1)
29private readonly Dictionary<string, DirectoryLoadContext> _loadContextByDirectory = new Dictionary<string, DirectoryLoadContext>(GeneratedPathComparer);
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (3)
76private readonly Dictionary<string, (IAnalyzerPathResolver? Resolver, string ResolvedPath, AssemblyName? AssemblyName)> _originalPathInfoMap = new(OriginalPathComparer); 86private readonly Dictionary<string, HashSet<string>> _assemblySimpleNameToOriginalPathListMap = new(SimpleNameComparer.Comparer); 97private readonly Dictionary<string, string> _resolvedToOriginalPathMap = new(GeneratedPathComparer);
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
417_lazyGeneratedCodeSymbolsForTreeMap = new Dictionary<SyntaxTree, ImmutableHashSet<ISymbol>>();
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
230Dictionary<string, ImmutableHashSet<string>.Builder> typeNameMap = new Dictionary<string, ImmutableHashSet<string>.Builder>(StringComparer.OrdinalIgnoreCase);
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (3)
150_lazySymbolScopeTasks ??= new Dictionary<ISymbol, Task<HostSymbolStartAnalysisScope>>(); 170_lazyPendingMemberSymbolsMap ??= new Dictionary<ISymbol, HashSet<ISymbol>?>(); 473_lazyPendingSymbolEndActionsMap ??= new Dictionary<ISymbol, (ImmutableArray<SymbolEndAnalyzerAction>, SymbolDeclaredCompilationEvent)>();
DiagnosticAnalyzer\AnalyzerManager.cs (1)
45var analyzerExecutionContextMap = new Dictionary<DiagnosticAnalyzer, AnalyzerExecutionContext>();
DiagnosticAnalyzer\CompilationAnalysisValueProvider.cs (1)
25_valueMap = new Dictionary<TKey, TValue>(analysisValueProvider.KeyComparer);
DiagnosticAnalyzer\CompilationAnalysisValueProviderFactory.cs (1)
21Interlocked.CompareExchange(ref _lazySharedStateProviderMap, new Dictionary<object, object>(), null);
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
134lazyDiagnosticsMap ??= new Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>();
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (3)
46private readonly Dictionary<string, SuppressMessageInfo> _compilationWideSuppressions = new Dictionary<string, SuppressMessageInfo>(); 47private readonly Dictionary<ISymbol, Dictionary<string, SuppressMessageInfo>> _globalSymbolSuppressions = new Dictionary<ISymbol, Dictionary<string, SuppressMessageInfo>>(); 63suppressions = new Dictionary<string, SuppressMessageInfo>() { { info.Id, info } };
Emit\EditAndContinue\DefinitionMap.cs (4)
67var mappedMethods = new Dictionary<IMethodSymbolInternal, EncMappedMethod>(); 190var declaratorToIndex = new Dictionary<SyntaxNode, int>(); 499var hoistedLocals = new Dictionary<EncHoistedLocalInfo, int>(); 500var awaiters = new Dictionary<Cci.ITypeReference, int>(Cci.SymbolEquivalentEqualityComparer.Instance);
Emit\EditAndContinue\DeltaMetadataWriter.cs (12)
99_deletedTypeMembers = new Dictionary<ITypeDefinition, ImmutableArray<IMethodDefinition>>(ReferenceEqualityComparer.Instance); 107_parameterDefList = new Dictionary<IParameterDefinition, IMethodDefinition>(Cci.SymbolEquivalentEqualityComparer.Instance); 113_customAttributesAdded = new Dictionary<EntityHandle, ImmutableArray<int>>(); 116_firstParamRowMap = new Dictionary<MethodDefinitionHandle, int>(); 117_existingParameterDefs = new Dictionary<IParameterDefinition, int>(ReferenceEqualityComparer.Instance); 127_addedOrChangedMethods = new Dictionary<IMethodDefinition, AddedOrChangedMethodInfo>(Cci.SymbolEquivalentEqualityComparer.Instance); 182var addedOrChangedMethodsByIndex = new Dictionary<int, AddedOrChangedMethodInfo>(); 252var result = new Dictionary<K, V>(comparer); 507var result = new Dictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>>(ReferenceEqualityComparer.Instance); 508var typesUsedByDeletedMembers = new Dictionary<ITypeDefinition, DeletedSourceTypeDefinition>(ReferenceEqualityComparer.Instance); 1463this.added = new Dictionary<T, int>(comparer); 1556_map = new Dictionary<int, T>();
Emit\EditAndContinue\EmitBaseline.cs (15)
176generationOrdinals: new Dictionary<Cci.IDefinition, int>(), 177typesAdded: new Dictionary<Cci.ITypeDefinition, int>(), 178eventsAdded: new Dictionary<Cci.IEventDefinition, int>(), 179fieldsAdded: new Dictionary<Cci.IFieldDefinition, int>(), 180methodsAdded: new Dictionary<Cci.IMethodDefinition, int>(), 181firstParamRowMap: new Dictionary<MethodDefinitionHandle, int>(), 182propertiesAdded: new Dictionary<Cci.IPropertyDefinition, int>(), 183eventMapAdded: new Dictionary<int, int>(), 184propertyMapAdded: new Dictionary<int, int>(), 185methodImplsAdded: new Dictionary<MethodImplKey, int>(), 186customAttributesAdded: new Dictionary<EntityHandle, ImmutableArray<int>>(), 195methodsAddedOrChanged: new Dictionary<int, AddedOrChangedMethodInfo>(), 503var result = new Dictionary<int, int>(); 518var result = new Dictionary<int, int>(); 533var result = new Dictionary<MethodImplKey, int>();
Emit\EditAndContinue\EncVariableSlotAllocator.cs (1)
83var previousLocalInfoToSlot = new Dictionary<EncLocalInfo, int>();
Emit\EditAndContinue\SymbolChanges.cs (3)
356var changesBuilder = new Dictionary<ISymbolInternal, SymbolChange>(); 357var updatedMethodsBuilder = new Dictionary<INamedTypeSymbolInternal, ArrayBuilder<(IMethodSymbolInternal oldMethod, IMethodSymbolInternal newMethod)>>(); 386lazyDeletedMembersBuilder ??= new();
Emit\EditAndContinue\SymbolMatcher.cs (2)
79var result = new Dictionary<K, V>(Cci.SymbolEquivalentEqualityComparer.Instance); 98var result = new Dictionary<int, AddedOrChangedMethodInfo>();
InternalUtilities\ConcurrentLruCache.cs (1)
40_cache = new Dictionary<K, CacheValue>(capacity);
InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
MetadataReader\MetadataHelpers.cs (1)
899var names = new Dictionary<string, int>(nestedNamespaces.Count, nameComparer);
MetadataReader\PEAssembly.cs (1)
136var ivtMap = new Dictionary<string, List<ImmutableArray<byte>>>(StringComparer.OrdinalIgnoreCase);
MetadataReader\PEModule.cs (6)
50private static readonly Dictionary<string, (int FirstIndex, int SecondIndex)> s_sharedEmptyForwardedTypes = new Dictionary<string, (int FirstIndex, int SecondIndex)>(); 51private static readonly Dictionary<string, (string OriginalName, int FirstIndex, int SecondIndex)> s_sharedEmptyCaseInsensitiveForwardedTypes = new Dictionary<string, (string OriginalName, int FirstIndex, int SecondIndex)>(); 676Dictionary<string, ArrayBuilder<TypeDefinitionHandle>?> namespaces = new Dictionary<string, ArrayBuilder<TypeDefinitionHandle>?>(); 757var namespaceHandles = new Dictionary<NamespaceDefinitionHandle, ArrayBuilder<TypeDefinitionHandle>>(NamespaceHandleEqualityComparer.Singleton); 3821var caseInsensitiveMap = new Dictionary<string, (string OriginalName, int FirstIndex, int SecondIndex)>(StringComparer.OrdinalIgnoreCase); 3889typesToAssemblyIndexMap ??= new Dictionary<string, (int FirstIndex, int SecondIndex)>();
MetadataReference\AssemblyIdentityMap.cs (1)
25_map = new Dictionary<string, OneOrMany<KeyValuePair<AssemblyIdentity, TValue>>>(AssemblyIdentityComparer.SimpleNameComparer);
NativePdbWriter\PdbWriter.cs (2)
48_documentIndex = new Dictionary<DebugSourceDocument, int>(); 49_qualifiedNameCache = new Dictionary<object, string>(ReferenceEqualityComparer.Instance);
Operations\ControlFlowGraphBuilder.cs (1)
7975var explicitProperties = new Dictionary<IPropertySymbol, IOperation>(SymbolEqualityComparer.IgnoreAll);
PEWriter\FullMetadataWriter.cs (2)
100_fieldDefIndex = new Dictionary<ITypeDefinition, int>(numTypeDefsGuess, ReferenceEqualityComparer.Instance); 101_methodDefIndex = new Dictionary<ITypeDefinition, int>(numTypeDefsGuess, ReferenceEqualityComparer.Instance);
PEWriter\MetadataWriter.cs (12)
122_smallMethodBodies = new Dictionary<(ImmutableArray<byte>, bool), int>(ByteSequenceBoolTupleComparer.Instance); 123_scopeIndex = new Dictionary<IImportScope, ImportScopeHandle>(new ImportScopeEqualityComparer(context)); 438private readonly Dictionary<ICustomAttribute, BlobHandle> _customAttributeSignatureIndex = new Dictionary<ICustomAttribute, BlobHandle>(); 439private readonly Dictionary<ITypeReference, BlobHandle> _typeSpecSignatureIndex = new Dictionary<ITypeReference, BlobHandle>(ReferenceEqualityComparer.Instance); 440private readonly Dictionary<string, int> _fileRefIndex = new Dictionary<string, int>(32); // more than enough in most cases, value is a RowId 442private readonly Dictionary<IFieldReference, BlobHandle> _fieldSignatureIndex = new Dictionary<IFieldReference, BlobHandle>(ReferenceEqualityComparer.Instance); 447private readonly Dictionary<IMarshallingInformation, BlobHandle> _marshallingDescriptorIndex = new Dictionary<IMarshallingInformation, BlobHandle>(); 449private readonly Dictionary<IGenericMethodInstanceReference, BlobHandle> _methodInstanceSignatureIndex = new Dictionary<IGenericMethodInstanceReference, BlobHandle>(ReferenceEqualityComparer.Instance); 4259: this(writer, new Dictionary<T, int>(), lastRowId) 4286: this(writer, new Dictionary<ITypeReference, int>(ReferenceEqualityComparer.Instance), lastRowId) 4316_instanceIndex = new Dictionary<T, int>(ReferenceEqualityComparer.Instance); 4317_structuralIndex = new Dictionary<T, int>(structuralComparer);
PEWriter\MetadataWriter.DynamicAnalysis.cs (3)
50_blobs = new Dictionary<ImmutableArray<byte>, BlobHandle>(1 + methodCountEstimate + 4 * documentCountEstimate, ByteSequenceComparer.Instance); 54_guids = new Dictionary<Guid, GuidHandle>(documentCountEstimate); 58_documentIndex = new Dictionary<DebugSourceDocument, int>(documentCountEstimate);
PEWriter\MetadataWriter.PortablePdb.cs (1)
54private readonly Dictionary<DebugSourceDocument, DocumentHandle> _documentIndex = new Dictionary<DebugSourceDocument, DocumentHandle>();
ReferenceManager\CommonReferenceManager.Resolution.cs (3)
236var boundReferences = new Dictionary<MetadataReference, MetadataReference>(MetadataReferenceEqualityComparer.Instance); 620lazyAliasMap = new Dictionary<MetadataReference, MergedAliases>(); 829localBoundReferenceDirectives = new Dictionary<(string, string), MetadataReference>();
ReferenceManager\CommonReferenceManager.State.cs (4)
202this.ObservedMetadata = observedMetadata ?? new Dictionary<MetadataReference, MetadataOrDiagnostic>(); 472referencedAssembliesMap = new Dictionary<MetadataReference, int>(referenceMap.Length); 473referencedModulesMap = new Dictionary<MetadataReference, int>(referencedModuleCount); 504(mergedAssemblyReferencesMapOpt ??= new Dictionary<MetadataReference, ImmutableArray<MetadataReference>>()).Add(reference, referenceMap[i].MergedReferences);
RuleSet\RuleSet.cs (2)
108var effectiveSpecificOptions = new Dictionary<string, ReportDiagnostic>(); 290diagnosticOptions = new Dictionary<string, ReportDiagnostic>();
SourceGeneration\Nodes\GeneratorRunStateTable.cs (2)
34_namedSteps = new Dictionary<string, HashSet<IncrementalGeneratorRunStep>>(); 35_outputSteps = new Dictionary<string, HashSet<IncrementalGeneratorRunStep>>();
SpecialTypes.cs (1)
87s_nameToTypeIdMap = new Dictionary<string, ExtendedSpecialType>((int)InternalSpecialType.NextAvailable - 1);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
WellKnownTypes.cs (1)
704private static readonly Dictionary<string, WellKnownType> s_nameToTypeIdMap = new Dictionary<string, WellKnownType>((int)Count);
Microsoft.CodeAnalysis.Analyzers (43)
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (1)
195var newText = await UpdateEntriesInUnshippedFileAsync(unshippedDataDocument, new Dictionary<string, string>() { { ruleId, entryToUpdate } }, cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (1)
145var entriesToUpdate = new Dictionary<string, string>();
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (1)
100var fixInfoMap = new Dictionary<TextDocument, List<FixInfo>>();
MetaAnalyzers\ReleaseTrackingHelper.cs (1)
51var releaseTrackingDataByRulesBuilder = new Dictionary<string, ReleaseTrackingDataForRuleBuilder>();
MetaAnalyzers\SymbolIsBannedInAnalyzersAnalyzer.cs (1)
95var result = new Dictionary<(string ContainerName, string SymbolName), List<BanFileEntry>>();
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (10)
39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
19new Dictionary<BinaryOperatorKind, BinaryOperatorKind>
Microsoft.CodeAnalysis.AnalyzerUtilities (27)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (1)
124var originalCoreAnalysisData = new Dictionary<AnalysisEntity, CopyAbstractValue>(coreAnalysisData);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\LValueFlowCapturesProvider.cs (1)
33var rvalueFlowCaptureIds = new Dictionary<CaptureId, HashSet<IFlowCaptureReferenceOperation>>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
Microsoft.CodeAnalysis.BannedApiAnalyzers (39)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (10)
39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
19new Dictionary<BinaryOperatorKind, BinaryOperatorKind>
SymbolIsBannedAnalyzer.cs (1)
112var result = new Dictionary<(string ContainerName, string SymbolName), List<BanFileEntry>>();
Microsoft.CodeAnalysis.CodeStyle (28)
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
70var result = new Dictionary<int, int>();
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
29var enumMembers = new Dictionary<long, ISymbol>();
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
60var enumMembers = new Dictionary<long, ISymbol>();
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
123private readonly Dictionary<ISymbol, ValueUsageInfo> _symbolValueUsageStateMap_doNotAccessDirectly = new(OriginalDefinitionSymbolEqualityComparer.Instance);
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
Microsoft.CodeAnalysis.CodeStyle.Fixes (15)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
81var typeToNameSegments = new Dictionary<ITypeSymbol, ImmutableArray<string>>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
176var result = new Dictionary<ITypeSymbol, ITypeParameterSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (10)
39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
19new Dictionary<BinaryOperatorKind, BinaryOperatorKind>
Microsoft.CodeAnalysis.Collections.Package (6)
Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.CSharp (76)
Binder\Binder.CapturedParametersFinder.cs (1)
76var result = new Dictionary<ParameterSymbol, FieldSymbol>(ReferenceEqualityComparer.Instance);
Binder\Binder.QueryTranslationState.cs (1)
50public readonly Dictionary<RangeVariableSymbol, ArrayBuilder<string>> allRangeVariables = new Dictionary<RangeVariableSymbol, ArrayBuilder<string>>();
Binder\Binder_Constraints.cs (1)
44var names = new Dictionary<string, int>(n, StringOrdinalComparer.Instance);
Binder\OpenTypeVisitor.cs (1)
45_allowedMap ??= new Dictionary<GenericNameSyntax, bool>();
Binder\PatternExplainer.cs (3)
248constraints = new Dictionary<BoundDagTemp, ArrayBuilder<(BoundDagTest, bool)>>(); 249evaluations = new Dictionary<BoundDagTemp, ArrayBuilder<BoundDagEvaluation>>(); 533var properties = new Dictionary<Symbol, string>();
Binder\RefSafetyAnalysis.cs (2)
199_placeholderScopes ??= new Dictionary<BoundValuePlaceholderBase, SafeContext>(); 464_localEscapeScopes ??= new Dictionary<LocalSymbol, (SafeContext RefEscapeScope, SafeContext ValEscapeScope)>();
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (1)
2879var candidates = new Dictionary<TypeWithAnnotations, TypeWithAnnotations>(EqualsIgnoringDynamicTupleNamesAndNullabilityComparer.Instance);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
902Dictionary<NamedTypeSymbol, ArrayBuilder<TMember>> containingTypeMap = new Dictionary<NamedTypeSymbol, ArrayBuilder<TMember>>();
Binder\SwitchBinder.cs (1)
456var result = new Dictionary<SyntaxNode, LabelSymbol>();
BoundTree\BoundNode_Source.cs (1)
21appendSourceCore(this, indent: 0, tempIdentifiers: new Dictionary<SynthesizedLocal, int>());
CodeGen\EmitStatement.cs (1)
2014_labelClones = labelClones = new Dictionary<LabelSymbol, GeneratedLabelSymbol>();
CommandLine\CSharpCommandLineParser.cs (3)
118var diagnosticOptions = new Dictionary<string, ReportDiagnostic>(); 119var noWarns = new Dictionary<string, ReportDiagnostic>(); 120var warnAsErrors = new Dictionary<string, ReportDiagnostic>();
Compilation\MemberSemanticModel.cs (3)
33private readonly Dictionary<SyntaxNode, OneOrMany<BoundNode>> _guardedBoundNodeMap = new Dictionary<SyntaxNode, OneOrMany<BoundNode>>(); 34private readonly Dictionary<SyntaxNode, IOperation> _guardedIOperationNodeMap = new Dictionary<SyntaxNode, IOperation>(); 1416_lazyGuardedSynthesizedStatementsMap = new Dictionary<SyntaxNode, BoundStatement>();
Compiler\ClsComplianceChecker.cs (1)
1075containingTypes = new Dictionary<NamedTypeSymbol, NamedTypeSymbol>();
Compiler\TypeCompilationState.cs (1)
156_wrappers = new Dictionary<MethodSymbol, MethodSymbol>();
Declarations\MergedNamespaceDeclaration.cs (1)
162var namespaceGroups = new Dictionary<string, ArrayBuilder<SingleNamespaceDeclaration>>(StringOrdinalComparer.Instance);
Emitter\EditAndContinue\CSharpDefinitionMap.cs (2)
64var hoistedLocals = new Dictionary<EncHoistedLocalInfo, int>(); 155var map = new Dictionary<EncLocalInfo, int>();
Emitter\Model\PEModuleBuilder.cs (2)
672var exportedNamesMap = new Dictionary<string, NamedTypeSymbol>(StringOrdinalComparer.Instance); 1467Interlocked.CompareExchange(ref _fixedImplementationTypes, new Dictionary<FieldSymbol, NamedTypeSymbol>(), null);
Errors\ErrorFacts.cs (1)
98var map = new Dictionary<ErrorCode, string>()
FlowAnalysis\AbstractFlowPass.cs (1)
218_loopHeadState = new Dictionary<BoundLoopStatement, TLocalState>(ReferenceEqualityComparer.Instance);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (3)
822_labelsInInterestingTry = labelsInInterestingTry = new Dictionary<BoundTryStatement, HashSet<LabelSymbol>>(); 968this.proxyLabels = proxyLabels = new Dictionary<LabelSymbol, LabelSymbol>(); 1049_hoistedLocals = new Dictionary<LocalSymbol, LocalSymbol>();
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
100_awaiterFields = new Dictionary<TypeSymbol, FieldSymbol>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 103_placeholderMap = new Dictionary<BoundValuePlaceholderBase, BoundExpression>();
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (2)
24private readonly Dictionary<LocalSymbol, LocalSymbol> localMap = new Dictionary<LocalSymbol, LocalSymbol>(); 27private readonly Dictionary<BoundValuePlaceholderBase, BoundExpression> _placeholderMap = new Dictionary<BoundValuePlaceholderBase, BoundExpression>();
Lowering\ClosureConversion\ClosureConversion.cs (3)
85private readonly Dictionary<ParameterSymbol, ParameterSymbol> _parameterMap = new Dictionary<ParameterSymbol, ParameterSymbol>(); 88private readonly Dictionary<BoundNode, Analysis.ClosureEnvironment> _frames = new Dictionary<BoundNode, Analysis.ClosureEnvironment>(); 92private readonly Dictionary<NamedTypeSymbol, Symbol> _framePointers = new Dictionary<NamedTypeSymbol, Symbol>();
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
21private readonly Dictionary<ParameterSymbol, BoundExpression> _parameterMap = new Dictionary<ParameterSymbol, BoundExpression>();
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.IteratorFinallyFrame.cs (2)
84this.knownStates = knownStates = new Dictionary<StateMachineState, IteratorFinallyFrame>(); 109this.proxyLabels = proxyLabels = new Dictionary<LabelSymbol, LabelSymbol>();
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.YieldsInTryAnalysis.cs (1)
77_labelsInYieldingTrys = yieldingTryLabels = new Dictionary<BoundTryStatement, HashSet<LabelSymbol>>();
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
19private readonly Dictionary<(TypeSymbol?, TypeSymbol, MethodSymbol), FieldSymbol> _delegateFields = new(CLRSignatureComparer.Instance);
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
107var containers = _genericCacheContainers ??= new Dictionary<Symbol, DelegateCacheContainer>(ReferenceEqualityComparer.Instance);
Lowering\LocalRewriter\LocalRewriter.cs (1)
537_placeholderReplacementMapDoNotUseDirectly = new Dictionary<BoundValuePlaceholderBase, BoundExpression>();
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
179_lazyUnmatchedLabelCache = new Dictionary<BoundNode, HashSet<LabelSymbol>>();
Lowering\MethodToClassRewriter.cs (1)
24protected Dictionary<Symbol, CapturedSymbolReplacement> proxies = new Dictionary<Symbol, CapturedSymbolReplacement>();
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
40private readonly Dictionary<LocalSymbol, BoundExpression> _boundRefLocalInitializers = new Dictionary<LocalSymbol, BoundExpression>();
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (4)
64private Dictionary<LabelSymbol, List<StateMachineState>> _dispatches = new Dictionary<LabelSymbol, List<StateMachineState>>(); 234_dispatches ??= new Dictionary<LabelSymbol, List<StateMachineState>>(); 499_lazyAvailableReusableHoistedFields = new Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 900oldDispatches ??= new Dictionary<LabelSymbol, List<StateMachineState>>();
Lowering\StateMachineRewriter\StateMachineRewriter.cs (2)
114initialParameters = new Dictionary<Symbol, CapturedSymbolReplacement>(); 142var proxiesBuilder = new Dictionary<Symbol, CapturedSymbolReplacement>();
Lowering\SynthesizedSubmissionFields.cs (1)
77_previousSubmissionFieldMap = new Dictionary<ImplicitNamedTypeSymbol, FieldSymbol>();
Symbols\MemberSymbolExtensions.cs (1)
162ordinals = new Dictionary<TypeParameterSymbol, int>(ReferenceEqualityComparer.Instance);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
34new Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>>(EmptyReadOnlyMemoryOfCharComparer.Instance);
Symbols\Metadata\PE\PENamespaceSymbol.cs (2)
262var namespaces = new Dictionary<ReadOnlyMemory<char>, PENestedNamespaceSymbol>(ReadOnlyMemoryOfCharComparer.Instance); 304noPiaLocalTypes = new Dictionary<string, TypeDefinitionHandle>(StringOrdinalComparer.Instance);
Symbols\ReferenceManager.cs (1)
849missingAssemblies = new Dictionary<AssemblyIdentity, MissingAssemblySymbol>();
Symbols\Retargeting\RetargetingModuleSymbol.cs (1)
50new Dictionary<AssemblySymbol, DestinationData>();
Symbols\Source\QuickAttributeChecker.cs (2)
64_nameToAttributeMap = new Dictionary<string, QuickAttributes>(StringComparer.Ordinal); 70_nameToAttributeMap = new Dictionary<string, QuickAttributes>(previous._nameToAttributeMap, StringComparer.Ordinal);
Symbols\Source\SourceAssemblySymbol.cs (1)
2834forwardedTypesFromSource = new Dictionary<string, NamedTypeSymbol>(StringOrdinalComparer.Instance);
Symbols\Source\SourceMemberContainerSymbol.cs (10)
209new Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>>(EmptyReadOnlyMemoryOfCharComparer.Instance); 1329var conflictDict = new Dictionary<(string name, int arity, SyntaxTree? syntaxTree), SourceNamedTypeSymbol>(); 1618return new Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>(1, ReadOnlyMemoryOfCharComparer.Instance) 1626return new Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>(ReadOnlyMemoryOfCharComparer.Instance); 1977var methodsBySignature = new Dictionary<MethodSymbol, MethodSymbol>(MemberSignatureComparer.DuplicateSourceComparer); 1978var conversionsAsMethods = new Dictionary<MethodSymbol, MethodSymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2232var indexersBySignature = new Dictionary<PropertySymbol, PropertySymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2425membersByName = new Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>(membersByName, ReadOnlyMemoryOfCharComparer.Instance); 2983var instanceMap = new Dictionary<NamedTypeSymbol, NamedTypeSymbol>(ReferenceEqualityComparer.Instance); 4000var membersBySignature = new Dictionary<Symbol, Symbol>(MemberSignatureComparer.PartialMethodsComparer);
Utilities\FirstAmongEqualsSet.cs (1)
51_dictionary = new Dictionary<T, T>(equalityComparer);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
15private static readonly Dictionary<SyntaxKind, int> s_kindPrecedenceMap = new(SyntaxFacts.EqualityComparer) 36private static readonly Dictionary<SyntaxKind, int> s_operatorPrecedenceMap = new(SyntaxFacts.EqualityComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
664var result = new Dictionary<ITypeParameterSymbol, ITypeSymbol>();
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (28)
CommandLineTests.cs (28)
481var parser = new TestCommandLineParser(responseFiles: new Dictionary<string, string>() 595patterns: new Dictionary<string, string[]>() 599recursivePatterns: new Dictionary<string, string[]>() 2426var expectedEmbeddedMap = new Dictionary<string, string>(); 9862Assert.True(args.ParseOptions.Features.SetEquals(new Dictionary<string, string> { { "Test", "false" }, { "Key", "value" } })); 9866Assert.True(args.ParseOptions.Features.SetEquals(new Dictionary<string, string> { { "Test", "true" } })); 13923ValidateEmbeddedSources_Portable(new Dictionary<string, string> { { Path.Combine(dir.Path, generatorPrefix, $"generatedSource.cs"), generatedSource } }, dir, true); 13964ValidateEmbeddedSources_Portable(new Dictionary<string, string> { { Path.Combine(dir.Path, generatorPrefix, "generatedSource.cs"), generatedSource } }, dir, true); 14005ValidateEmbeddedSources_Portable(new Dictionary<string, string> 14089ValidateWrittenSources(new() 14091{ Path.Combine(generatedDir.Path, generatorPrefix, expectedDir), new() { { expectedFileName, generatedSource } } } 14115ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource1 } } } }); 14122ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource2 } } } }); 14152ValidateWrittenSources(new() 14154{ generator1Prefix, new() { { source1Name, source1 } } }, 14155{ generator2Prefix, new() { { source2Name, source2 } } } 14191ValidateWrittenSources(new() 14193{ Path.Combine(generatedDir.Path, generatorPrefix, expectedDir), new() { { generatedFileName, generatedSource } } } 14243ValidateWrittenSources(new() 14246{ Path.Combine(generatedDir.Path, "generator", "TestGenerator"), new() { { "generatedSource.cs", "//from version 2.0.0.0" } } } 14264ValidateWrittenSources(new() { { generatedDir.Path, new() } }); 14308ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource } } } }); 14620ValidateWrittenSources(new() 14622{ generatorPrefix, new() { { "Generated.cs", generatedSource } } },
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (29)
CodeActions\AddUsing\AddUsingTests.cs (1)
2048var resolver = new TestMetadataReferenceResolver(assemblyNames: new Dictionary<string, PortableExecutableReference>()
Formatting\CodeCleanupTests.cs (1)
797var map = new Dictionary<string, ImmutableArray<DiagnosticAnalyzer>>{
MoveToNamespace\MoveToNamespaceTests.cs (27)
106expectedSymbolChanges: new Dictionary<string, string>() 133expectedSymbolChanges: new Dictionary<string, string>() 160expectedSymbolChanges: new Dictionary<string, string>() 187expectedSymbolChanges: new Dictionary<string, string>() 215expectedSymbolChanges: new Dictionary<string, string>() 293expectedSymbolChanges: new Dictionary<string, string>() 361expectedSymbolChanges: new Dictionary<string, string>() 441expectedSymbolChanges: new Dictionary<string, string>() 467expectedSymbolChanges: new Dictionary<string, string>() 503expectedSymbolChanges: new Dictionary<string, string>() 541expectedSymbolChanges: new Dictionary<string, string>() 577expectedSymbolChanges: new Dictionary<string, string>() 615expectedSymbolChanges: new Dictionary<string, string>() 662expectedSymbolChanges: new Dictionary<string, string>() 709expectedSymbolChanges: new Dictionary<string, string>() 756expectedSymbolChanges: new Dictionary<string, string>() 803expectedSymbolChanges: new Dictionary<string, string>() 870expectedSymbolChanges: new Dictionary<string, string>() 927expectedSymbolChanges: new Dictionary<string, string>() 1048expectedSymbolChanges: new Dictionary<string, string>() 1105expectedSymbolChanges: new Dictionary<string, string>() 1162expectedSymbolChanges: new Dictionary<string, string>() 1259expectedSymbolChanges: new Dictionary<string, string>() 1307expectedSymbolChanges: new Dictionary<string, string>() 1487expectedSymbolChanges: new Dictionary<string, string>() 1531expectedSymbolChanges: new Dictionary<string, string>() 1561expectedSymbolChanges: new Dictionary<string, string>()
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (3)
Recommendations\FromKeywordRecommenderTests.cs (1)
248var experimentalFeatures = new System.Collections.Generic.Dictionary<string, string>(); // no experimental features to enable
Recommendations\IsKeywordRecommenderTests.cs (1)
145var experimentalFeatures = new System.Collections.Generic.Dictionary<string, string>(); // no experimental features to enable
Recommendations\KeywordRecommenderTests.cs (1)
17private static readonly Dictionary<SyntaxKind, AbstractSyntacticSingleKeywordRecommender> s_recommenderMap = new(SyntaxFacts.EqualityComparer);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\CompilationEmitTests.cs (1)
4748var warnings = new System.Collections.Generic.Dictionary<string, ReportDiagnostic>();
Emit\EmitErrorTests.cs (1)
304var warnOpts = new System.Collections.Generic.Dictionary<string, ReportDiagnostic>();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (37)
Attributes\AttributeTests_Assembly.cs (3)
182var warnings = new Dictionary<string, ReportDiagnostic>(); 214var warnings = new Dictionary<string, ReportDiagnostic>(); 430var warnings = new Dictionary<string, ReportDiagnostic>();
Attributes\AttributeTests_MarshalAs.cs (21)
230var blobs = new Dictionary<string, byte[]> 327var blobs = new Dictionary<string, byte[]> 374var blobs = new Dictionary<string, byte[]> 461var blobs = new Dictionary<string, byte[]> 486var expectedBlobs = new Dictionary<string, byte[]>(); 594var blobs = new Dictionary<string, byte[]> 632var expectedBlobs = new Dictionary<string, byte[]>(); 760var blobs = new Dictionary<string, byte[]> 800var blobs = new Dictionary<string, byte[]> 832var cciBlobs = new Dictionary<string, byte[]> 913var blobs = new Dictionary<string, byte[]> 1032var blobs = new Dictionary<string, byte[]> 1140var blobs = new Dictionary<string, byte[]>() 1185var blobs = new Dictionary<string, byte[]>() 1220var blobs = new Dictionary<string, byte[]>() 1251CompileAndVerifyFieldMarshal(source, new Dictionary<string, byte[]>() 1278CompileAndVerifyFieldMarshal(source, new Dictionary<string, byte[]>() 1299CompileAndVerifyFieldMarshal(source, new Dictionary<string, byte[]>() 1321CompileAndVerifyFieldMarshal(source, new Dictionary<string, byte[]>() 1349CompileAndVerifyFieldMarshal(source, new Dictionary<string, byte[]>() 1493CompileAndVerifyFieldMarshal(source, new Dictionary<string, byte[]>
Attributes\AttributeTests_WellKnownAttributes.cs (1)
2814var visitedEntryPoints = new Dictionary<string, bool>();
Diagnostics\DiagnosticAnalyzerTests.cs (11)
316var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 331specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 343specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 458var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 530var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 539specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 1140var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 1282specificOptions = specificOptions ?? new Dictionary<string, ReportDiagnostic>(); 1302var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", ReportDiagnostic.Default } }; 1323var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", specificOption } }; 1346var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", specificOption } };
FlowAnalysis\FlowDiagnosticTests.cs (1)
383Dictionary<int, int> warnings = new Dictionary<int, int>();
Microsoft.CodeAnalysis.CSharp.Features (4)
ChangeSignature\CSharpChangeSignatureService.cs (1)
827var dictionary = new Dictionary<string, XmlElementSyntax>();
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
22private static readonly Dictionary<BinaryOperatorKind, SyntaxKind> s_operatorMap = new()
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
697var replacements = new Dictionary<SyntaxNode, SyntaxNode>();
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
96var map = new Dictionary<ITypeSymbol, List<LocalDeclarationStatementSyntax>>();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (5)
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.CodeBlockSuggestions.cs (1)
67private static readonly Dictionary<string, object[]> s_codeBlockSuggestions = new()
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (1)
182var implementationMap = new Dictionary<string, string>
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
451var experimentalFeatures = new Dictionary<string, string>(); // no experimental features to enable 499var featuresToEnable = new Dictionary<string, string>() { { feature, "enabled" } };
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
1154var builtInTypeMap = new Dictionary<string, string>()
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
163files: new Dictionary<string, PortableExecutableReference> { { @"C:\dir\x.dll", (PortableExecutableReference)SystemCoreRef } }));
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
ObjectFormatterTests.cs (1)
583var obj = new Dictionary<string, int>
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (12)
Semantics\InteractiveUsingTests.cs (3)
358var resolver = TestSourceReferenceResolver.Create(new Dictionary<string, string> 429var resolver = TestSourceReferenceResolver.Create(new Dictionary<string, string> 479var resolver = TestSourceReferenceResolver.Create(new Dictionary<string, string>
Semantics\MethodBodyModelTests.cs (1)
126Dictionary<int, int> errors = new Dictionary<int, int>();
Semantics\NullableTests.cs (5)
712var zeros = new Dictionary<string, string>() 730var ones = new Dictionary<string, string>() 1147var twos = new Dictionary<string, string>() 1163var ones = new Dictionary<string, string>() 1180var names = new Dictionary<string, string>()
Semantics\SemanticErrorTests.cs (2)
2115var comp = CreateCompilation(text, options: TestOptions.ReleaseDll.WithSpecificDiagnosticOptions(new Dictionary<string, ReportDiagnostic>() 11037var noWarns = new Dictionary<string, ReportDiagnostic>();
Semantics\UnsafeTests.cs (1)
10579private static readonly Dictionary<SpecialType, int> s_specialTypeSizeOfMap = new Dictionary<SpecialType, int>
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (32)
Compilation\CompilationAPITests.cs (1)
589new TestMetadataReferenceResolver(files: new Dictionary<string, PortableExecutableReference>()
Compilation\CSharpCompilationOptionsTests.cs (3)
87new Dictionary<string, ReportDiagnostic> { { "CS0001", ReportDiagnostic.Error } }.ToImmutableDictionary()); 126new Dictionary<string, ReportDiagnostic> { { "CS0001", ReportDiagnostic.Error } }.ToImmutableDictionary()); 228var warnings = new Dictionary<string, ReportDiagnostic>
Compilation\ReferenceManagerTests.cs (25)
871assemblyNames: new Dictionary<string, PortableExecutableReference> { { "Lib", r3 } }, 872files: new Dictionary<string, PortableExecutableReference> { { p2, r2 }, { p3, r3 } })) 1368files: new Dictionary<string, PortableExecutableReference>() 2328new TestMetadataReferenceResolver(assemblyNames: new Dictionary<string, PortableExecutableReference>() 2357new TestMetadataReferenceResolver(assemblyNames: new Dictionary<string, PortableExecutableReference>() 2530var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2552var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2587var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2639var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2675var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2706var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference>()); 2722var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference>()); 2747var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2772var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2803var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2838var resolver = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2879var resolverA = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2890var resolverC = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2945var resolverA = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 2956var resolverC = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 3008var resolverC = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 3054var resolverC = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 3120var resolverC = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 3184var resolverC = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference> 3224var resolverC = new TestMissingMetadataReferenceResolver(new Dictionary<string, MetadataReference>
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
6814var warnDict = new Dictionary<string, ReportDiagnostic> { { MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_MissingXMLComment), ReportDiagnostic.Suppress } };
Symbols\PartialPropertiesTests.cs (1)
841var visitedEntryPoints = new Dictionary<string, bool>();
Symbols\SymbolErrorTests.cs (1)
108options: TestOptions.ReleaseDll.WithSpecificDiagnosticOptions(new Dictionary<string, ReportDiagnostic>() { { MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_UnreferencedField), ReportDiagnostic.Suppress } }),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (42)
Diagnostics\DiagnosticTest.cs (26)
575IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 619IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 679IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 730IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 786IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 842IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 900IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 958IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1017IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1087IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1158IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1223IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1276IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1330IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1380IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1431var warnings = new Dictionary<string, ReportDiagnostic>(); 1487IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1504warnings = new Dictionary<string, ReportDiagnostic>(); 1554IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1604IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1660IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1707IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1744IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1777IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1826var warnings = new Dictionary<string, ReportDiagnostic>(); 2250var warnings = new Dictionary<string, ReportDiagnostic>();
LexicalAndXml\XmlDocCommentTests.cs (13)
1731VerifyXmlAttributes(xmlElement.StartTag.Attributes, new Dictionary<string, string>() { { "a", "as" } }); 1768VerifyXmlAttributes((firstComment.Content[1] as XmlElementSyntax).StartTag.Attributes, new Dictionary<string, string>() { { "a", "val" } }); 1771VerifyXmlAttributes((secondComment.Content[1] as XmlElementSyntax).StartTag.Attributes, new Dictionary<string, string>() { { "a", "as" } }); 1814VerifyXmlAttributes((secondComment.Content[1] as XmlElementSyntax).StartTag.Attributes, new Dictionary<string, string>() { { "a", "as" } }); 1849VerifyXmlAttributes((firstComment.Content[0] as XmlEmptyElementSyntax).Attributes, new Dictionary<string, string>() { { "a", "val" } }); 1884VerifyXmlAttributes((firstComment.Content[0] as XmlElementSyntax).StartTag.Attributes, new Dictionary<string, string>() { { "a", "val" } }); 1919VerifyXmlAttributes((firstComment.Content[0] as XmlEmptyElementSyntax).Attributes, new Dictionary<string, string>() { { "a", "val" } }); 1954VerifyXmlAttributes((firstComment.Content[0] as XmlEmptyElementSyntax).Attributes, new Dictionary<string, string>() { { "a", "val" } }); 2065VerifyXmlAttributes((firstComment.Content[0] as XmlElementSyntax).StartTag.Attributes, new Dictionary<string, string>() { { "a", "val" } }); 2097VerifyXmlAttributes((firstComment.Content[0] as XmlEmptyElementSyntax).Attributes, new Dictionary<string, string>() { { "a", "val" } }); 2131VerifyXmlAttributes((firstComment.Content[0] as XmlElementSyntax).StartTag.Attributes, new Dictionary<string, string>() { { "a", "val" } }); 2267new Dictionary<string, string>() { { "attr1", "a" }, { "attr2", "b" }, { "attr3", "test" } }); 2309VerifyXmlAttributes(thirdLevelTrivia.StartTag.Attributes, new Dictionary<string, string>() { { "attr", "a" } });
Syntax\SyntaxAnnotationTests.cs (2)
435var nodeOrTokenMap = new Dictionary<SyntaxNodeOrToken, SyntaxNodeOrToken>(); 456var triviaMap = new Dictionary<SyntaxTrivia, SyntaxTrivia>();
Syntax\SyntaxNodeTests.cs (1)
4022var tests = new Dictionary<string, string>
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
TestOptions.cs (1)
63public static readonly CSharpParseOptions Regular6WithV7SwitchBinder = Regular6.WithFeatures(new Dictionary<string, string>() { { "testV7SwitchBinder", "true" } });
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
15private static readonly Dictionary<SyntaxKind, int> s_kindPrecedenceMap = new(SyntaxFacts.EqualityComparer) 36private static readonly Dictionary<SyntaxKind, int> s_operatorPrecedenceMap = new(SyntaxFacts.EqualityComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
664var result = new Dictionary<ITypeParameterSymbol, ITypeSymbol>();
Microsoft.CodeAnalysis.Debugging.Package (4)
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.EditorFeatures (2)
LanguageServer\RazorInProcLanguageClient.cs (1)
76vsServerCapabilities.Experimental ??= new Dictionary<string, bool>();
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (1)
604var bufferToChanges = new Dictionary<ITextBuffer, DiffResult>();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\EditorTestWorkspace.cs (1)
437var tempMappedMarkupSpans = new Dictionary<string, PooledObjects.ArrayBuilder<TextSpan>>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
100var expectedMap = new Dictionary<string, string>();
UnusedReferences\ProjectAssets\TestProjectAssetsFile.cs (5)
49var libraries = new Dictionary<string, ProjectAssetsLibrary>(); 61var libraries = new Dictionary<string, ProjectAssetsTargetLibrary>(); 68Compile = new Dictionary<string, ProjectAssetsTargetLibraryCompile>() { { Path.ChangeExtension(reference.ItemSpecification, "dll"), new ProjectAssetsTargetLibraryCompile() } }, 74return new Dictionary<string, Dictionary<string, ProjectAssetsTargetLibrary>>() { { targetFramework, libraries } }; 98Frameworks = new Dictionary<string, ProjectAssetsProjectFramework>() { { targetFramework, new ProjectAssetsProjectFramework() } }
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
MetadataUtilities.cs (1)
122var refsBySimpleName = new Dictionary<string, ImmutableArray<(AssemblyIdentity, MetadataReference)>>(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
src\ExpressionEvaluator\Core\Source\ResultProvider\Expansion\MemberExpansion.cs (1)
82var favoritesMembersByName = new Dictionary<string, MemberAndDeclarationInfo>();
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (2)
46var previousDeclarationMap = includeInherited ? new Dictionary<string, DeclarationInfo>() : null; 78favoritesMemberNames = new Dictionary<string, object>(favoritesInfo.Favorites.Count);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (3)
src\ExpressionEvaluator\Core\Source\ResultProvider\Expansion\MemberExpansion.cs (1)
82var favoritesMembersByName = new Dictionary<string, MemberAndDeclarationInfo>();
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (2)
46var previousDeclarationMap = includeInherited ? new Dictionary<string, DeclarationInfo>() : null; 78favoritesMemberNames = new Dictionary<string, object>(favoritesInfo.Favorites.Count);
Microsoft.CodeAnalysis.Extensions.Package (6)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.ExternalAccess.Copilot (1)
Internal\CodeMapper\CopilotCSharpMapCodeService.cs (1)
32var options = new Dictionary<string, object>();
Microsoft.CodeAnalysis.Features (62)
ChangeSignature\AbstractChangeSignatureService.cs (5)
254var nodesToUpdate = new Dictionary<DocumentId, List<SyntaxNode>>(); 255var definitionToUse = new Dictionary<SyntaxNode, ISymbol>(); 376var updatedRoots = new Dictionary<DocumentId, SyntaxNode>(); 482var argumentToParameterMap = new Dictionary<IUnifiedArgumentSyntax, IParameterSymbol>(); 483var parameterToIndexMap = new Dictionary<IParameterSymbol, int>();
CodeFixes\Service\CodeFixService.cs (2)
513var uniqueDiagosticToEquivalenceKeysMap = new Dictionary<Diagnostic, PooledHashSet<string?>>(); 518var diagnosticAndEquivalenceKeyToFixersMap = new Dictionary<(Diagnostic diagnostic, string? equivalenceKey), CodeFixProvider>();
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
50var currentDiagnosticSpans = new Dictionary<Diagnostic, TextSpan>();
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
135_childFolders = new Dictionary<string, FolderInfo>(StringComparer.Ordinal);
Completion\CompletionService.ProviderManager.cs (1)
39_rolesToProviders = new Dictionary<ImmutableHashSet<string>, ImmutableArray<CompletionProvider>>(this);
Completion\CompletionService_GetCompletions.cs (1)
307var result = new Dictionary<CompletionProvider, int>(completionProviders.Length);
Completion\Providers\AbstractDocCommentCompletionProvider.cs (1)
31new Dictionary<string, (string tagOpen, string textBeforeCaret, string textAfterCaret, string? tagClose)>()
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
206var typeConvertibilityCache = new Dictionary<ITypeSymbol, bool>(SymbolEqualityComparer.Default);
Completion\Providers\AbstractSymbolCompletionProvider.cs (3)
176var typeConvertibilityCache = new Dictionary<ITypeSymbol, bool>(SymbolEqualityComparer.Default); 392var result = new Dictionary<SymbolAndSelectionInfo, TSyntaxContext>(); 457var missingSymbols = new Dictionary<ISymbol, ArrayBuilder<ProjectId>>(LinkedFilesSymbolEquivalenceComparer.Instance);
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
382var parameterToPropMap = new Dictionary<string, ISymbol>();
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
302var documentToEditorMap = new Dictionary<Document, SyntaxEditor>();
Copilot\ICopilotChangeAnalysisService.cs (10)
193var idToCount = new Dictionary<string, int>(); 194var categoryToCount = new Dictionary<string, int>(); 195var severityToCount = new Dictionary<DiagnosticSeverity, int>(); 255var diagnosticIdToCount = new Dictionary<string, int>(); 256var diagnosticIdToApplicationTime = new Dictionary<string, TimeSpan>(); 257var diagnosticIdToProviderName = new Dictionary<string, HashSet<string>>(); 258var providerNameToApplicationTime = new Dictionary<string, TimeSpan>(); 259var providerNameToHasConflict = new Dictionary<string, bool>(); 260var providerNameToTotalCount = new Dictionary<string, int>(); 261var providerNameToSuccessCount = new Dictionary<string, int>();
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
789var map = new Dictionary<SyntaxNode, EditKind>(editScript.Edits.Length); 1510var map = new Dictionary<SyntaxNode, SyntaxNode>();
EditAndContinue\EditSession.cs (1)
857var changedDocumentsStaleness = new Dictionary<string, bool>(SolutionState.FilePathComparer);
EditAndContinue\Utilities\BidirectionalMap.cs (4)
28var forward = new Dictionary<T, T>(Forward.Count + 1); 29var reverse = new Dictionary<T, T>(Reverse.Count + 1); 50var forward = new Dictionary<T, T>(count); 51var reverse = new Dictionary<T, T>(count);
EmbeddedLanguages\RegularExpressions\RegexCharClass.cs (1)
25new()
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerLogger.cs (1)
195var statMap = new Dictionary<string, List<int>>();
ExtractMethod\AbstractSyntaxTriviaService.cs (3)
74var map = new Dictionary<SyntaxToken, SyntaxToken>(); 97var triviaList = new Dictionary<TriviaLocation, IEnumerable<SyntaxTrivia>> 110var tokens = new Dictionary<TriviaLocation, SyntaxToken>
ExtractMethod\AbstractSyntaxTriviaService.Result.cs (3)
59var map = new Dictionary<SyntaxToken, SyntaxToken>(); 177var map = new Dictionary<SyntaxToken, LeadingTrailingTriviaPair>(); 213var tokenPairs = new Dictionary<TriviaLocation, PreviousNextTokenPair>
ExtractMethod\ExtractMethodFlowControlInformation.cs (1)
62var flowValues = new Dictionary<FlowControlKind, object?>();
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
360var renameTable = new Dictionary<ISymbol, string>();
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (1)
278var methodCallSites = new Dictionary<Document, List<TExpressionSyntax>>();
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (3)
64var nameToParameterDict = new Dictionary<TIdentifierNameSyntax, IParameterSymbol>(); 235var parameterToArgumentMap = new Dictionary<IParameterSymbol, int>(); 487var parameterToArgumentMap = new Dictionary<IParameterSymbol, int>();
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (2)
125var anonymousTypeToName = new Dictionary<INamedTypeSymbol, string>(); 189var transitiveReferences = new Dictionary<INamedTypeSymbol, (int order, int count)>();
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
432var result = new Dictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>(_documentationMap);
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
33private readonly Dictionary<string, Dictionary<(string @namespace, string typeName), string>?> _typeForwardCache = new(StringComparer.OrdinalIgnoreCase);
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
23var result = new Dictionary<Glyph, QuickInfoGlyphElement>(capacity: glyphs.Length);
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
70var result = new Dictionary<int, int>();
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
29var enumMembers = new Dictionary<long, ISymbol>();
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
60var enumMembers = new Dictionary<long, ISymbol>();
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
123private readonly Dictionary<ISymbol, ValueUsageInfo> _symbolValueUsageStateMap_doNotAccessDirectly = new(OriginalDefinitionSymbolEqualityComparer.Instance);
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
81var typeToNameSegments = new Dictionary<ITypeSymbol, ImmutableArray<string>>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
176var result = new Dictionary<ITypeSymbol, ITypeParameterSymbol>(SymbolEqualityComparer.Default);
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
60var builtReferences = new Dictionary<string, ReferenceInfo?>();
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
171var canEdit = new Dictionary<DocumentId, bool>();
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\ActiveStatementsDescription.cs (2)
44var oldDocumentMap = new Dictionary<string, List<ActiveStatement>>(); 138var map = new Dictionary<string, List<ActiveStatement>>();
EditAndContinue\EditAndContinueTestVerifier.cs (1)
517var result = new Dictionary<SyntaxNode, SyntaxNode>();
EditAndContinue\SourceMarkers.cs (1)
48var tagMap = new Dictionary<(int major, int minor), (int start, int end)>();
Microsoft.CodeAnalysis.Features.UnitTests (5)
EditAndContinue\ActiveStatementsMapTests.cs (3)
124var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>(); 179var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>(); 230var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>();
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
504var initialNonRemappableRegions = new Dictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
176var runningProjects1 = new Dictionary<ProjectId, RunningProjectInfo>
Microsoft.CodeAnalysis.InteractiveHost (6)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.LanguageServer (7)
BrokeredServices\Services\Descriptors.cs (1)
40public static ImmutableDictionary<ServiceMoniker, ServiceRegistration> RemoteServicesToRegister = new Dictionary<ServiceMoniker, ServiceRegistration>
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (1)
67private readonly Dictionary<string, int> _watchedFiles = new Dictionary<string, int>(s_stringComparer);
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
109var fileCounts = new Dictionary<string, int>();
LanguageServer\Handler\CopilotCompletion\ContextResolveParam.cs (1)
35var result = new Dictionary<string, object>(this.ActiveExperiments.Count);
Services\ExtensionAssemblyManager.cs (2)
57var directoryLoadContexts = new Dictionary<string, AssemblyLoadContext>(StringComparer.Ordinal); 58var assemblyFullNameToLoadContext = new Dictionary<string, AssemblyLoadContext>(StringComparer.Ordinal);
Testing\RunTestsHandler.cs (1)
59EnvironmentVariables = new()
Microsoft.CodeAnalysis.LanguageServer.Protocol (19)
Extensions\ProtocolConversions.cs (2)
54public static readonly ImmutableDictionary<string, ImmutableArray<LSP.CompletionItemKind>> RoslynTagToCompletionItemKinds = new Dictionary<string, ImmutableArray<LSP.CompletionItemKind>>() 101public static readonly ImmutableDictionary<string, ImmutableArray<LSP.CompletionItemTag>> RoslynTagToCompletionItemTags = new Dictionary<string, ImmutableArray<LSP.CompletionItemTag>>()
Handler\Completion\CompletionResultFactory.cs (2)
70var commitCharactersRuleCache = new Dictionary<ImmutableArray<CharacterSetModificationRule>, string[]>(CommitCharacterArrayComparer.Instance); 269var commitCharacterReferences = new Dictionary<object, int>();
Handler\InlineCompletions\InlineCompletionsHandler.cs (1)
267var fieldOffsets = new Dictionary<SnippetFieldPart, ImmutableArray<TextSpan>>();
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (1)
180var fieldNameToSnippetIndex = new Dictionary<string, int>();
Handler\SemanticTokens\CustomLspSemanticTokenNames.cs (1)
84public static ImmutableDictionary<string, string> ClassificationTypeNameToCustomTokenName = new Dictionary<string, string>
Handler\SemanticTokens\SemanticTokensSchema.cs (4)
23private static readonly ImmutableDictionary<string, string> s_vsDirectTypeMap = new Dictionary<string, string>() 38private static readonly ImmutableDictionary<string, string> s_pureLspDirectTypeMap = s_vsDirectTypeMap.Concat(new Dictionary<string, string> 81public static readonly ImmutableDictionary<string, TokenModifiers> AdditiveClassificationTypeToTokenModifier = new Dictionary<string, TokenModifiers>() 118var tokenTypeToIndex = new Dictionary<string, int>();
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (1)
140var result = new Dictionary<Document, PreviousPullResult>();
LanguageInfoProvider.cs (1)
25private static readonly Dictionary<string, LanguageInformation> s_extensionToLanguageInformation = new()
LspServices\LspServices.cs (1)
41var serviceMap = new Dictionary<string, Lazy<ILspService, LspServiceMetadataView>>();
Protocol\Internal\Efficiency\OptimizedVSCompletionListJsonConverter.cs (1)
72var itemRawJsonCache = new Dictionary<object, string>(capacity: 1);
RoslynLanguageServer.cs (1)
77var baseServiceMap = new Dictionary<string, object>();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\HandlerProvider.cs (1)
50var builder = new Dictionary<RequestHandlerMetadata, Lazy<IMethodHandler>>();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (2)
96var genericMethodMap = new Dictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>>(); 103var languages = new Dictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>();
Microsoft.CodeAnalysis.LanguageServer.UnitTests (3)
Utilities\AbstractLanguageServerClientTests.cs (2)
64Dictionary<DocumentUri, SourceText> files = new() { [codeUri] = text }; 97var locations = new Dictionary<string, IList<LSP.Location>>();
WorkspaceProjectFactoryServiceTests.cs (1)
37new WorkspaceProjectCreationInfo(LanguageNames.CSharp, "DisplayName", FilePath: null, new Dictionary<string, string>()),
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (38)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (10)
39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
19new Dictionary<BinaryOperatorKind, BinaryOperatorKind>
Microsoft.CodeAnalysis.PooledObjects.Package (4)
ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.PublicApiAnalyzers (26)
DeclarePublicApiAnalyzer.Impl.cs (1)
104var publicApiMap = new Dictionary<string, ApiLine>(shippedData.ApiList.Length + unshippedData.ApiList.Length, StringComparer.Ordinal);
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (2)
AnnotatePublicApiFix.cs (2)
74SourceText newSourceText = AnnotateSymbolNamesInSourceText(sourceText, new Dictionary<string, string> { [oldSymbolName] = newSymbolName }); 128var allChanges = new Dictionary<string, Dictionary<string, string>>();
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RebuildCommandLineTests.cs (1)
29public Dictionary<string, TestableFile> FilePathToStreamMap { get; } = new Dictionary<string, TestableFile>(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Host\TestUtils.cs (2)
160var map = new Dictionary<Checksum, object>(); 171var map = new Dictionary<Checksum, object>();
Services\SourceGeneration\RemoteSourceGenerationService.cs (1)
74private static readonly Dictionary<string, (AnalyzerReferenceMap analyzerReferenceMap, AnalyzerReferenceMap.CreateValueCallback callback)> s_languageToAnalyzerReferenceMap = new()
Microsoft.CodeAnalysis.ResxSourceGenerator (25)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
Microsoft.CodeAnalysis.Scripting (7)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (4)
88_assembliesLoadedFromLocationByFullPath = new Dictionary<string, AssemblyAndLocation>(); 89_assembliesLoadedFromLocation = new Dictionary<Assembly, LoadedAssembly>(); 90_loadedAssembliesBySimpleName = new Dictionary<string, List<LoadedAssemblyInfo>>(AssemblyIdentityComparer.SimpleNameComparer); 91_dependenciesWithLocationBySimpleName = new Dictionary<string, List<AssemblyIdentityAndLocation>>();
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (2)
52private readonly Dictionary<FileKey, CacheEntry<MetadataShadowCopy>> _shadowCopies = new Dictionary<FileKey, CacheEntry<MetadataShadowCopy>>(); 56private readonly Dictionary<FileKey, CacheEntry<Metadata>> _noShadowCopyCache = new Dictionary<FileKey, CacheEntry<Metadata>>();
ScriptState.cs (1)
123var map = new Dictionary<string, int>(Script.Compiler.IdentifierComparer);
Microsoft.CodeAnalysis.Test.Utilities (21)
Assert\AssertEx.cs (1)
384var indexes = new Dictionary<string, int>(comparer);
CommonTestBase.cs (1)
603var map = new Dictionary<IOperation, IOperation?>();
Compilation\CompilationExtensions.cs (1)
324var explicitNodeMap = new Dictionary<SyntaxNode, IOperation>();
Compilation\OperationTreeVerifier.cs (2)
45_explicitNodeMap = new Dictionary<SyntaxNode, IOperation>(); 46_labelIdMap = new Dictionary<ILabelSymbol, uint>();
Compilation\TestOperationVisitor.cs (1)
193var explicitNodeMap = new Dictionary<SyntaxNode, IOperation>();
Compilation\TestSyntaxTreeOptionsProvider.cs (1)
32_globalOptions = new Dictionary<string, ReportDiagnostic>(Section.PropertiesKeyComparer) { { globalOption.key, globalOption.diagnostic } };
CompilationVerifier.cs (2)
106var map = new Dictionary<string, ICSharpCode.Decompiler.TypeSystem.IMethod>(); 432var readersByName = new Dictionary<string, PEReader>(StringComparer.OrdinalIgnoreCase);
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
54new Dictionary<string, string> { { "Key1", "Value1" }, { "Key2", "Value2" } }.ToImmutableDictionary();
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (2)
47Dictionary<IFieldSymbol, HashSet<INamedTypeSymbol>> fieldsSourceTypes = new Dictionary<IFieldSymbol, HashSet<INamedTypeSymbol>>(); 54Dictionary<ILocalSymbol, HashSet<INamedTypeSymbol>> localsSourceTypes = new Dictionary<ILocalSymbol, HashSet<INamedTypeSymbol>>();
Diagnostics\OptionsDiagnosticAnalyzer.cs (1)
19private readonly Dictionary<string, AnalyzerOptions> _mismatchedOptions = new Dictionary<string, AnalyzerOptions>();
InstrumentationChecker.cs (1)
279private readonly Dictionary<int /*method*/, MethodChecker> _spanExpectations = new Dictionary<int, MethodChecker>();
MarkedSource\MarkupTestFile.cs (1)
56var tempSpans = new Dictionary<string, ArrayBuilder<TextSpan>>();
Metadata\ILValidation.cs (2)
396var result = new Dictionary<int, string>(); 427var result = new Dictionary<int, string>();
Mocks\TestMetadataReferenceResolver.cs (2)
27_assemblyNames = assemblyNames ?? new Dictionary<string, PortableExecutableReference>(); 28_files = files ?? new Dictionary<string, PortableExecutableReference>();
PDB\DeterministicBuildCompilationTestHelpers.cs (1)
157Dictionary<string, string> kvp = new Dictionary<string, string>();
TestableFileSystem.cs (1)
72public static TestableFileSystem CreateForMap() => CreateForMap(new());
Microsoft.CodeAnalysis.Threading.Package (6)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.UnitTests (17)
CachingLookupTests.cs (4)
156var dict = new Dictionary<string, ImmutableArray<int>>(comparer); 188var dict = new Dictionary<string, ImmutableArray<int>>(comparer); 220var dict = new Dictionary<string, ImmutableArray<int>>(comparer); 250var dict = new Dictionary<string, ImmutableArray<int>>(comparer);
Collections\ImmutableDictionaryTestBase.cs (2)
60var template = new Dictionary<string, int> 68var changes = new Dictionary<string, int>
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (2)
140builder.AddRange(new Dictionary<string, int> { { "a", 1 }, { "b", 2 } }); 151.AddRange(new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } })
Collections\ImmutableSegmentedDictionaryTest.cs (5)
80ImmutableSegmentedDictionary<int, string?> dictionary = new Dictionary<int, string?> 92IEnumerable<KeyValuePair<string, string>> pairs = new Dictionary<string, string> { { "a", "b" } }; 115IEnumerable<KeyValuePair<string, string>> pairs = new Dictionary<string, string> { { "a", "B" } }; 269ImmutableSegmentedDictionary<string, int> dictionary = new Dictionary<string, int> 280ImmutableSegmentedDictionary<string, int> dictionary = new Dictionary<string, int>
Diagnostics\DiagnosticLocalizationTests.cs (4)
130var defaultCultureResources = new Dictionary<string, string>() 138var arResources = new Dictionary<string, string>() 146var resourceSetMap = new Dictionary<string, Dictionary<string, string>>() 166_resourceSetMap = new Dictionary<string, CustomResourceSet>();
Microsoft.CodeAnalysis.VisualBasic (18)
Analysis\IteratorAndAsyncAnalysis\IteratorAndAsyncCaptureWalker.vb (1)
45Me._byRefLocalsInitializers = New Dictionary(Of LocalSymbol, BoundExpression)()
Binding\BackstopBinder.vb (1)
235Private Shared ReadOnly s_defaultXmlNamespaces As New Dictionary(Of String, String) From {
Binding\Binder_XmlLiterals.vb (2)
1122namespaces = New Dictionary(Of String, String) 1146allAttributes = New Dictionary(Of XmlName, BoundXmlAttribute)(XmlNameComparer.Instance)
Binding\GetTypeBinder.vb (1)
67_allowedMap = New Dictionary(Of GenericNameSyntax, Boolean)()
Compilation\DocumentationComments\DocumentationCommentCompiler.Event.vb (1)
47Dim wellKnownElementNodes As New Dictionary(Of WellKnownTag, ArrayBuilder(Of XmlNodeSyntax))
Compilation\DocumentationComments\DocumentationCommentCompiler.Field.vb (1)
44Dim wellKnownElementNodes As New Dictionary(Of WellKnownTag, ArrayBuilder(Of XmlNodeSyntax))
Compilation\DocumentationComments\DocumentationCommentCompiler.Method.vb (1)
70Dim wellKnownElementNodes As New Dictionary(Of WellKnownTag, ArrayBuilder(Of XmlNodeSyntax))
Compilation\DocumentationComments\DocumentationCommentCompiler.NamedType.vb (1)
85Dim wellKnownElementNodes As New Dictionary(Of WellKnownTag, ArrayBuilder(Of XmlNodeSyntax))
Compilation\DocumentationComments\DocumentationCommentCompiler.Property.vb (1)
48Dim wellKnownElementNodes As New Dictionary(Of WellKnownTag, ArrayBuilder(Of XmlNodeSyntax))
Lowering\Diagnostics\DiagnosticsPass.vb (1)
170_withExpressionPlaceholderMap = New Dictionary(Of BoundValuePlaceholderBase, BoundWithStatement)()
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (1)
38Private ReadOnly _parameterMap As Dictionary(Of ParameterSymbol, BoundExpression) = New Dictionary(Of ParameterSymbol, BoundExpression)()
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (2)
50Friend blockParent As Dictionary(Of BoundNode, BoundNode) = New Dictionary(Of BoundNode, BoundNode)() 68Friend gotoBlock As Dictionary(Of BoundGotoStatement, BoundNode) = New Dictionary(Of BoundGotoStatement, BoundNode)()
Lowering\SynthesizedSubmissionFields.vb (1)
67_previousSubmissionFieldMap = New Dictionary(Of ImplicitNamedTypeSymbol, FieldSymbol)()
Symbols\Metadata\PE\PENamespaceSymbol.vb (2)
201Dim members As New Dictionary(Of String, ImmutableArray(Of Symbol))(CaseInsensitiveComparison.Comparer) 258noPiaLocalTypes = New Dictionary(Of String, TypeDefinitionHandle)()
Symbols\Retargeting\RetargetingModuleSymbol.vb (1)
51Private ReadOnly _retargetingAssemblyMap As New Dictionary(Of AssemblySymbol, DestinationData)()
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (24)
Parser\ParseDirectives.vb (24)
2787Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 2793diagOptions = New Dictionary(Of String, ReportDiagnostic) 2827Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 2833diagOptions = New Dictionary(Of String, ReportDiagnostic) 2867Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 2873diagOptions = New Dictionary(Of String, ReportDiagnostic) 2907Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 2913diagOptions = New Dictionary(Of String, ReportDiagnostic) 2947Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 2955diagOptions = New Dictionary(Of String, ReportDiagnostic) 2992Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 3000diagOptions = New Dictionary(Of String, ReportDiagnostic) 3038Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 3045diagOptions = New Dictionary(Of String, ReportDiagnostic) 3081Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 3088diagOptions = New Dictionary(Of String, ReportDiagnostic) 3130Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 3137diagOptions = New Dictionary(Of String, ReportDiagnostic) 3220Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 3226diagOptions = New Dictionary(Of String, ReportDiagnostic) 3262Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 3270diagOptions = New Dictionary(Of String, ReportDiagnostic) 3327Dim diagOptions = New Dictionary(Of String, ReportDiagnostic) 3333diagOptions = New Dictionary(Of String, ReportDiagnostic)
Microsoft.CodeAnalysis.Workspaces (67)
CodeCleanup\AbstractCodeCleanerService.cs (1)
276var tokenAnnotationMap = new Dictionary<SyntaxToken, List<SyntaxAnnotation>>();
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (1)
50var docIdToTextMerger = new Dictionary<DocumentId, TextChangeMerger>();
Differencing\Match.LongestCommonSubsequence.cs (1)
29var result = new Dictionary<TNode, TNode>();
ExtensionManager\IExtensionManagerExtensions.cs (2)
93var map = new Dictionary<Type, ImmutableArray<TExtension>>(); 117var map = new Dictionary<int, ImmutableArray<TExtension>>();
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
107var result = new Dictionary<IAssemblySymbol, (Project? sourceProject, SymbolVisibility visibility)>();
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
465var order = new Dictionary<ProjectId, int>(capacity: solution.ProjectIds.Count);
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
35private static readonly ObjectPool<Dictionary<ISymbol, SymbolGroup>> s_symbolToGroupPool = new(() => new(MetadataUnifyingEquivalenceComparer.Instance));
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (1)
47var hasInheritanceRelationshipCache = new Dictionary<(ISymbol searchSymbol, ISymbol candidateSymbol), bool>();
FindSymbols\ReferenceLocationExtensions.cs (1)
22var result = new Dictionary<ISymbol, List<Location>>();
Rename\ConflictEngine\ConflictingIdentifierTracker.cs (1)
16private readonly Dictionary<string, List<SyntaxToken>> _currentIdentifiersInScope = new Dictionary<string, List<SyntaxToken>>(identifierComparer);
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
262var documentIdErrorStateLookup = new Dictionary<DocumentId, bool>(); 339var reverseMappedLocations = new Dictionary<Location, Location>();
Rename\ConflictEngine\DeclarationConflictHelpers.cs (1)
42var signatureToConflictingMember = new Dictionary<ImmutableArray<ITypeSymbol>, ISymbol>(ConflictingSignatureComparer.Instance);
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (1)
29private readonly Dictionary<string, DirectoryLoadContext> _loadContextByDirectory = new Dictionary<string, DirectoryLoadContext>(GeneratedPathComparer);
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (3)
76private readonly Dictionary<string, (IAnalyzerPathResolver? Resolver, string ResolvedPath, AssemblyName? AssemblyName)> _originalPathInfoMap = new(OriginalPathComparer); 86private readonly Dictionary<string, HashSet<string>> _assemblySimpleNameToOriginalPathListMap = new(SimpleNameComparer.Comparer); 97private readonly Dictionary<string, string> _resolvedToOriginalPathMap = new(GeneratedPathComparer);
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (10)
39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
19new Dictionary<BinaryOperatorKind, BinaryOperatorKind>
Storage\SQLite\v2\Interop\SqlConnection.cs (1)
85var queryToStatement = new Dictionary<string, SqlStatement>();
Utilities\Documentation\XmlDocumentationProvider.cs (1)
73var comments = new Dictionary<string, string>();
Workspace\IsolatedAnalyzerReferenceSet.Core.cs (1)
29private static readonly ObjectPool<Dictionary<string, Guid>> s_pathToMvidMapPool = new(() => new(SolutionState.FilePathComparer));
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
38private readonly Dictionary<string, DocumentId> _documentPathsToDocumentIds = new(StringComparer.OrdinalIgnoreCase);
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
147private readonly Dictionary<string, string?> _dynamicFilePathMaps = new(StringComparer.OrdinalIgnoreCase);
Workspace\Solution\Project.cs (1)
264Interlocked.CompareExchange(ref idMap, new Dictionary<DocumentId, TDocument>(), null);
Workspace\Solution\ProjectState.cs (1)
140var result = new Dictionary<ImmutableArray<byte>, DocumentId>(ImmutableArrayComparer<byte>.Instance);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
494var metadataReferenceToProjectId = new Dictionary<MetadataReference, ProjectId>();
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (1)
48private static readonly Dictionary<string, AnalyzerReferenceMap> s_languageToAnalyzerReferenceMap = new()
Workspace\Solution\TextDocumentStates.cs (1)
40private static readonly ObjectPool<Dictionary<string, OneOrMany<DocumentId>>> s_filePathPool = new(() => new(SolutionState.FilePathComparer));
Workspace\Workspace.cs (1)
1478var outputAssemblyToProjectIdMap = new Dictionary<string, ProjectId>();
Workspace\Workspace_EventsLegacy.cs (1)
17private readonly Dictionary<(object eventHandler, WorkspaceEventType eventType), (int adviseCount, IDisposable disposer)> _disposableEventHandlers = new();
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\ProjectFileExtensionRegistry.cs (1)
26_extensionToLanguageMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (18)
Build\ProjectBuildManager.cs (1)
28private static readonly ImmutableDictionary<string, string> s_defaultGlobalProperties = new Dictionary<string, string>()
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
157private static readonly ImmutableDictionary<string, string> s_debugTypeValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
MSBuild\ProjectFile\ProjectFile.cs (4)
307_documents = new Dictionary<string, MSB.Evaluation.ProjectItem>(); 372metadata = new Dictionary<string, string> 408var metadata = new Dictionary<string, string>(); 482var metadata = new Dictionary<string, string>
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
40_cache = new Dictionary<K, CacheValue>(capacity);
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (4)
BuildHostProcessManagerTests.cs (1)
131var globalMSBuildProperties = new Dictionary<string, string>
MSBuildWorkspaceTestBase.cs (1)
185var properties = new Dictionary<string, string>();
NetCoreTests.cs (1)
37var environmentVariables = new Dictionary<string, string>()
NewlyCreatedProjectsFromDotNetNew.cs (1)
246Dictionary<string, string> additionalEnvironmentVars = new()
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (4)
Options\NamingStyleTestUtilities.cs (1)
51var guidMap = new Dictionary<Guid, int>();
Workspaces\TestHostDocument.cs (1)
69public IDictionary<string, ImmutableArray<TextSpan>> AnnotatedSpans { get; } = new Dictionary<string, ImmutableArray<TextSpan>>();
Workspaces\TestWorkspace`1.cs (2)
611var projectNameToTestHostProject = new Dictionary<string, TProject>(); 612var projectElementToProjectName = new Dictionary<XElement, string>();
Microsoft.CodeAnalysis.Workspaces.UnitTests (28)
EditorConfigStorageLocation\NamingStylePreferenceEditorConfigStorageLocationTests.cs (1)
25var options = StructuredAnalyzerConfigOptions.Create(new DictionaryAnalyzerConfigOptions(new Dictionary<string, string>()
FunctionIdTests.cs (1)
17var map = new Dictionary<FunctionId, string>();
Options\EditorConfigNamingStyleParserTests.cs (19)
21var dictionary = new Dictionary<string, string>() 69var dictionary = new Dictionary<string, string>() 90var dictionary = new Dictionary<string, string>() 132var dictionary = new Dictionary<string, string>() 149var dictionary = new Dictionary<string, string>() 197var dictionary = new Dictionary<string, string>() 239var dictionary = new Dictionary<string, string>() 282var dictionary = new Dictionary<string, string>() 321var dictionary = new Dictionary<string, string>() 346var rule = new Dictionary<string, string>() 377var rule = new Dictionary<string, string>() 397var charpRule = new Dictionary<string, string>() 405var vbRule = new Dictionary<string, string>() 426var rule = new Dictionary<string, string>() 483var namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>() 519var namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>() 555var namingStylePreferences = OptionsTestHelpers.ParseNamingStylePreferences(new Dictionary<string, string>() 580var dictionary = new Dictionary<string, string>() 649var dictionary = new Dictionary<string, string>()
Remote\ServiceDescriptorTests.cs (1)
65var types = new Dictionary<Type, MemberInfo>();
SolutionTests\ProjectDependencyGraphTests.cs (2)
678var references = new Dictionary<string, IEnumerable<string>>(); 718var referencesByTargetProject = new Dictionary<string, List<ProjectReference>>();
UtilityTest\DictionaryExtensionsTests.cs (4)
16var dictionary = new Dictionary<int, string>(); 24var dictionary = new Dictionary<int, string> 42var dictionary = new Dictionary<int, string> 60var dictionary = new Dictionary<int, string>
Microsoft.CommonLanguageServerProtocol.Framework.Package (3)
HandlerProvider.cs (1)
50var builder = new Dictionary<RequestHandlerMetadata, Lazy<IMethodHandler>>();
RequestExecutionQueue.cs (2)
96var genericMethodMap = new Dictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>>(); 103var languages = new Dictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>();
Microsoft.CSharp (11)
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (1)
40_DictionaryOfParameters = new Dictionary<ExprCall, Expression>();
Microsoft\CSharp\RuntimeBinder\Semantics\COperators.cs (1)
100Dictionary<Name, string> dict = new Dictionary<Name, string>(28)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolStore.cs (1)
18private static readonly Dictionary<Key, Symbol> s_dictionary = new Dictionary<Key, Symbol>();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
185var typesByName = new Dictionary<string, PredefinedType>((int)PredefinedType.PT_COUNT);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeArray.cs (1)
82new Dictionary<TypeArrayKey, TypeArray>();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (1)
19new Dictionary<(Assembly, Assembly), bool>();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeTable.cs (5)
52new Dictionary<KeyPair<AggregateSymbol, KeyPair<AggregateType, TypeArray>>, AggregateType>(); 55new Dictionary<KeyPair<CType, int>, ArrayType>(); 58new Dictionary<KeyPair<CType, bool>, ParameterModifierType>(); 61private static readonly Dictionary<CType, PointerType> s_pointerTable = new Dictionary<CType, PointerType>(); 62private static readonly Dictionary<CType, NullableType> s_nullableTable = new Dictionary<CType, NullableType>();
Microsoft.Data.Analysis (8)
DataFrame.IO.cs (1)
394var names = new Dictionary<string, int>();
DataFrame.Join.cs (2)
213var newRetainedIndicesReverseMapping = new Dictionary<long, long>(shrinkedRetainedIndices.Length); 255var shrinkedOccurences = new Dictionary<long, ICollection<long>>();
DataFrameColumn.cs (1)
280var ret = new Dictionary<long, ICollection<long>>();
DataFrameColumnCollection.cs (1)
17private readonly Dictionary<string, int> _columnNameToIndexDictionary = new Dictionary<string, int>(StringComparer.Ordinal);
DataFrameColumns\ArrowStringDataFrameColumn.cs (1)
494Dictionary<string, ICollection<long>> multimap = new Dictionary<string, ICollection<long>>(EqualityComparer<string>.Default);
DataFrameColumns\StringDataFrameColumn.cs (1)
412Dictionary<string, ICollection<long>> multimap = new Dictionary<string, ICollection<long>>(EqualityComparer<string>.Default);
PrimitiveDataFrameColumn.cs (1)
617Dictionary<T, ICollection<long>> multimap = new Dictionary<T, ICollection<long>>(EqualityComparer<T>.Default);
Microsoft.Data.Analysis.Interactive.Tests (1)
DataFrameInteractiveTests.cs (1)
80data.Add(new Dictionary<string, object>
Microsoft.Data.Analysis.Tests (7)
DataFrameTests.cs (7)
1120df.Append(new Dictionary<string, object> { { "Column1", (object)5 }, { "Column2", false } }, inPlace: true); 1124ret = df.Append(new Dictionary<string, object> { { "Column1", (object)5 }, { "Column2", false } }, inPlace: false); 1129df.Append(new Dictionary<string, object> { { "Column1", 5 } }, inPlace: true); 1136ret = df.Append(new Dictionary<string, object> { { "Column1", 5 } }, inPlace: false); 1144df.Append(new Dictionary<string, object> { { "Column2", false } }, inPlace: true); 1150ret = df.Append(new Dictionary<string, object> { { "Column2", false } }, inPlace: false); 1172Assert.Throws<FormatException>(() => df.Append(new Dictionary<string, object> { { "Column2", "str" } }, inPlace: true));
Microsoft.DotNet.Arcade.Sdk (1)
src\InstallDotNetCore.cs (1)
65var runtimeItems = new Dictionary<string, IEnumerable<KeyValuePair<string, string>>>();
Microsoft.DotNet.Arcade.Sdk.Tests (9)
GenerateSourcePackageSourceLinkTargetsFileTests.cs (2)
27new TaskItem(NormalizePath(@"C:\temp\A\"), new Dictionary<string, string> { { "SourceLinkUrl", "http://A-git/commitsha/*" } }), 29new TaskItem(NormalizePath(@"C:\temp\A\B\C\"), new Dictionary<string, string> { { "SourceLinkUrl", "http://C-git/commitsha/*?var=value" } }),
GetAssemblyFullNameTests.cs (2)
24new TaskItem("Item", new Dictionary<string, string> { { "SomePath", objectAssembly.Location } }), 25new TaskItem("Item", new Dictionary<string, string> { { "SomePath", thisAssembly.Location } }),
GroupItemsByTests.cs (5)
21new TaskItem("A", new Dictionary<string, string> { { "Y", "A1.Y" }, { "Z", "A1.Z" }, { "W", "A1.W" } }), 22new TaskItem("B", new Dictionary<string, string> { { "Z", "B1.Z" } }), 23new TaskItem("A", new Dictionary<string, string> { { "X", "A2.X" }, { "Z", "A2.Z" }, { "W", "A2.W" } }), 24new TaskItem("C", new Dictionary<string, string> { { "X", "C1.X" }, { "Z", "C1.Z" } }), 25new TaskItem("C", new Dictionary<string, string> { { "Y", "C2.Y" }, { "Z", "C2.Z" } }),
Microsoft.DotNet.ArcadeLogging (5)
PipelinesLogger.cs (5)
21private readonly Dictionary<BuildEventContext, Guid> _buildEventContextMap = new Dictionary<BuildEventContext, Guid>(BuildEventContextComparer.Instance); 22private readonly Dictionary<Guid, ProjectInfo> _projectInfoMap = new Dictionary<Guid, ProjectInfo>(); 23private readonly Dictionary<Guid, TelemetryTaskInfo> _taskTelemetryInfoMap = new Dictionary<Guid, TelemetryTaskInfo>(); 334return new LoggerParameters(new Dictionary<string, string>(Comparer)); 339var parameters = new Dictionary<string, string>(Comparer);
Microsoft.DotNet.Build.Manifest (5)
ArtifactModel.cs (1)
15public IDictionary<string, string> Attributes { get; set; } = new Dictionary<string, string>();
BuildIdentity.cs (1)
37public IDictionary<string, string> Attributes { get; set; } = new Dictionary<string, string>();
MSBuildListSplitter.cs (2)
15return new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 23var values = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
VersionIdentifier.cs (1)
102Dictionary<int,string> majorMinorPatchDictionary = new Dictionary<int, string>();
Microsoft.DotNet.Build.Manifest.Tests (20)
BuildModelFactoryTests.cs (20)
111new TaskItem(bopSymbolsNupkg, new Dictionary<string, string> 118new TaskItem(bopSnupkg, new Dictionary<string, string> 127new TaskItem(zipArtifact, new Dictionary<string, string> 133new TaskItem(localPackagePath, new Dictionary<string, string>() 141new TaskItem(pdbArtifact, new Dictionary<string, string> 232new TaskItem(localPackagePath, new Dictionary<string, string>() 285new TaskItem(zipArtifact, new Dictionary<string, string> 321new TaskItem(pdbArtifact, new Dictionary<string, string> 354new TaskItem(localPackagePath, new Dictionary<string, string> 391new TaskItem(localPackagePath, new Dictionary<string, string> 445new TaskItem(bopSymbolsNupkg, new Dictionary<string, string> 452new TaskItem(bopSnupkg, new Dictionary<string, string> 461new TaskItem(zipArtifact, new Dictionary<string, string> 467new TaskItem(localPackagePath, new Dictionary<string, string>() 475new TaskItem(pdbArtifact, new Dictionary<string, string> 592new TaskItem(bopSymbolsNupkg, new Dictionary<string, string> 603new TaskItem(zipArtifact, new Dictionary<string, string> 609new TaskItem(localPackagePath, new Dictionary<string, string>() 618new TaskItem(pdbArtifact, new Dictionary<string, string> 694new TaskItem("missingKindArtifact.nupkg", new Dictionary<string, string>
Microsoft.DotNet.Build.Tasks.Feed (4)
src\common\AzureStorageUtils.cs (2)
27private static readonly Dictionary<string, string> MimeMappings = new Dictionary<string, string>() 33private static readonly Dictionary<string, string> CacheMappings = new Dictionary<string, string>()
src\common\GeneralUtils.cs (1)
197var whichCategory = new Dictionary<string, string>()
src\common\LatestLinksManager.cs (1)
25private static Dictionary<string, string> AccountsWithCdns { get; } = new()
Microsoft.DotNet.Build.Tasks.Feed.Tests (24)
DownloadFileTests.cs (5)
70Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>> 139Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>> 215Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>> 340Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>> 414Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>>
PublishToSymbolServerTest.cs (1)
193var symbolPackages = new Dictionary<string, Asset>()
PushToBuildStorageTests.cs (18)
46new TaskItem(PACKAGE_A, new Dictionary<string, string> 53new TaskItem(PACKAGE_B, new Dictionary<string, string> 59new TaskItem(BLOB_A, new Dictionary<string, string> 291new TaskItem(PDB_A, new Dictionary<string, string> 296new TaskItem(PDB_B, new Dictionary<string, string> 346new TaskItem(PDB_A, new Dictionary<string, string> 351new TaskItem(PDB_B, new Dictionary<string, string> 477new TaskItem(PACKAGE_A, new Dictionary<string, string> 482new TaskItem(PACKAGE_B, new Dictionary<string, string> 486new TaskItem(BLOB_A, new Dictionary<string, string> 492new TaskItem(PDB_A, new Dictionary<string, string> 593new TaskItem(PACKAGE_A, new Dictionary<string, string> 598new TaskItem(PACKAGE_B, new Dictionary<string, string> 602new TaskItem(BLOB_A, new Dictionary<string, string> 608new TaskItem(PDB_A, new Dictionary<string, string> 766new TaskItem(PDB_A, new Dictionary<string, string> 807new TaskItem(PDB_A, new Dictionary<string, string> 812new TaskItem(PDB_B, new Dictionary<string, string>
Microsoft.DotNet.Build.Tasks.Packaging (32)
ApplyBaseLine.cs (1)
61Dictionary<string, SortedSet<Version>> baseLineVersions = new Dictionary<string, SortedSet<Version>>();
ApplyMetaPackages.cs (2)
58var suppressMetaPackages = new Dictionary<string, HashSet<string>>(); 95Dictionary<string, HashSet<NuGetFramework>> metaPackagesToAdd = new Dictionary<string, HashSet<NuGetFramework>>();
ApplyPreReleaseSuffix.cs (1)
118_stablePackageVersions = new Dictionary<string, Version>();
GeneratePackageReport.cs (4)
87SupportedFrameworks = new Dictionary<string, string>() 198_frameworks = new Dictionary<NuGetFramework, string[]>(NuGetFramework.Comparer); 285var packageItems = new Dictionary<string, List<PackageItem>>(); 319_targetPathToPackageItem = new Dictionary<string, PackageItem>();
GenerateRuntimeDependencies.cs (1)
75Dictionary<string, string> packageAliases = new Dictionary<string, string>();
GetApplicableAssetsFromPackages.cs (2)
149_packageToPackageItems = new Dictionary<string, List<PackageItem>>(); 176_targetPathToPackageItem = new Dictionary<string, PackageItem>();
GetLastStablePackage.cs (3)
74Dictionary<string, ITaskItem> originalItems = new Dictionary<string, ITaskItem>(); 75Dictionary<string, Version> latestPackages = new Dictionary<string, Version>(); 76Dictionary<string, Version> lastStablePackages = new Dictionary<string, Version>();
GetPackageDescription.cs (2)
16private static Dictionary<string, Dictionary<string, string>> s_descriptionCache = new Dictionary<string, Dictionary<string, string>>(); 92Dictionary<string, string> descriptions = new Dictionary<string, string>();
GetPackageFromModule.cs (1)
50modulesToPackages = new Dictionary<string, string>();
HarvestPackage.cs (2)
116private Dictionary<string, string> _packageFolders = new Dictionary<string, string>(); 274var livePackageFiles = new Dictionary<string, PackageItem>(StringComparer.OrdinalIgnoreCase);
NuGetAssetResolver.cs (5)
172_packages = new Dictionary<string, ContentItemCollection>(); 192Dictionary<string, ContentItemGroup> resolvedAssets = new Dictionary<string, ContentItemGroup>(); 243Dictionary<string, ContentItemGroup> resolvedAssets = new Dictionary<string, ContentItemGroup>(); 261Dictionary<string, ContentItemGroup> resolvedAssets = new Dictionary<string, ContentItemGroup>(); 276Dictionary<string, IEnumerable<ContentItemGroup>> resolvedAssets = new Dictionary<string, IEnumerable<ContentItemGroup>>();
NugetPropertyStringProvider.cs (1)
19var propertyDictionary = new Dictionary<string, string>();
PackageIndex.cs (1)
746private Dictionary<string, string> packageToMetaPackage = new Dictionary<string, string>();
PackageReport.cs (1)
22Targets = new Dictionary<string, Target>();
SplitReferences.cs (2)
57Dictionary<string, ITaskItem> packageReferences = new Dictionary<string, ITaskItem>(); 58Dictionary<string, ITaskItem> assemblyReferences = new Dictionary<string, ITaskItem>();
ValidatePackage.cs (2)
302Dictionary<string, PackageAsset> implementationFiles = new Dictionary<string, PackageAsset>(); 455_frameworks = new Dictionary<NuGetFramework, ValidationFramework>();
ValidationTask.cs (1)
99_suppressions = new Dictionary<Suppression, HashSet<string>>();
Microsoft.DotNet.Build.Tasks.Packaging.Tests (9)
NugetPropertyStringProviderTests.cs (6)
18var expectedDictionary = new Dictionary<string, string>{ {"a", "b"} }; 26var expectedDictionary = new Dictionary<string, string> { { "a", "=b=" } }; 35var expectedDictionary = new Dictionary<string, string> { { "a", multiLineString } }; 38expectedDictionary = new Dictionary<string, string> { { multiLineString, "b" } }; 41expectedDictionary = new Dictionary<string, string> { { multiLineString, multiLineString } }; 54var expectedDictionary = new Dictionary<string, string>();
ValidateHarvestVersionIsLatestForReleaseTests.cs (3)
23Targets = new Dictionary<string, Target> 87Targets = new Dictionary<string, Target> 128Targets = new Dictionary<string, Target>
Microsoft.DotNet.Build.Tasks.TargetFramework (1)
TargetFrameworkResolver.cs (1)
19private static readonly Dictionary<string, TargetFrameworkResolver> s_targetFrameworkResolverCache = new();
Microsoft.DotNet.Build.Tasks.Templating (1)
MSBuildListSplitter.cs (1)
14Dictionary<string, string> values = new(StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (5)
Vsix\GetPkgDefAssemblyDependencyGuidTests.cs (5)
21new TaskItem("Item", new Dictionary<string, string> { { "SomeInput", "SomeValue" } }), 22new TaskItem("Item", new Dictionary<string, string> { { "SomeInput", "\U00012345" } }), 23new TaskItem("Item", new Dictionary<string, string> { { "SomeInput", "\uD800" } }), // unpaired surrogate treated as invalid character 24new TaskItem("Item", new Dictionary<string, string> { { "SomeInput", "\uD801" } }), // unpaired surrogate treated as invalid character 25new TaskItem("Item", new Dictionary<string, string> { { "SomeInput", "" } }), // empty is skipped
Microsoft.DotNet.Build.Tasks.Workloads (15)
BuildData.wix.cs (1)
26public Dictionary<string, HashSet<ReleaseVersion>> FeatureBands = new();
CreateVisualStudioWorkload.wix.cs (5)
27private Dictionary<ReleaseVersion, bool> _supportsMachineArch = new(); 140Dictionary<string, BuildData> buildData = new(); 141Dictionary<string, WorkloadPackGroupPackage> packGroupPackages = new(); 166Dictionary<string, WorkloadManifestMsi> manifestMsisByPlatform = new(); 204Dictionary<string, List<WorkloadPackPackage>> packsInWorkloadByPlatform = new();
EmbeddedTemplates.cs (2)
12private static readonly Dictionary<string, string> s_templateResources = new(); 68s_templateResources = new()
Msi\MsiBase.wix.cs (1)
118public Dictionary<string, string> NuGetPackageFiles { get; set; } = new();
Msi\MsiPayloadPackageProject.wix.cs (1)
31public Dictionary<string, string> PackageContents { get; set; } = new();
Msi\WorkloadPackGroupMsi.wix.cs (2)
36Dictionary<string, string> sourceDirectoryNamesAndValues = new(); 157public Dictionary<string, MsiDirectory> Subdirectories { get; } = new();
ProjectTemplateBase.cs (1)
57} = new();
Wix\HarvesterToolTask.cs (1)
20private static readonly Dictionary<HeatSuppressions, string> s_SuppressionArguments = new()
WorkloadPackGroupPackage.wix.cs (1)
17public Dictionary<string, List<WorkloadManifestPackage>> ManifestsPerPlatform { get; } = new();
Microsoft.DotNet.Build.Tasks.Workloads.Tests (2)
SwixComponentTests.cs (2)
105new TaskItem("Microsoft.NET.Runtime", new Dictionary<string, string> { { Metadata.Replacement, "MSFT" } }) 147new TaskItem("microsoft-net-sdk-blazorwebassembly-aot", new Dictionary<string, string> {
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\PinvokeAnalyzer.cs (1)
72Dictionary<string, string> parsedPinvokes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.GenFacades (2)
GenPartialFacadeSourceGenerator.cs (2)
66var dictionary = new Dictionary<string, string>(StringComparer.Ordinal); 145var typeTable = new Dictionary<string, IList<string>>();
Microsoft.DotNet.Helix.Client (1)
generated-code\PagedResponse.cs (1)
107var props = new Dictionary<string, string>();
Microsoft.DotNet.Helix.JobSender (3)
JobDefinition.cs (2)
31_properties = new Dictionary<string, string>(); 48public IDictionary<IPayload, string> CorrelationPayloads { get; } = new Dictionary<IPayload, string>();
JobListEntry.cs (1)
11public Dictionary<string, string> CorrelationPayloadUrisWithDestinations { get; set; } = new Dictionary<string, string>();
Microsoft.DotNet.Helix.Sdk (6)
CreateXUnitWorkItems.cs (1)
148var result = new Microsoft.Build.Utilities.TaskItem(assemblyName, new Dictionary<string, string>()
LoggerExtensions.cs (1)
39log.LogTelemetry(EventName, new Dictionary<string, string> {{CategoryKey, currentCategory}});
ProvisioningProfileProvider.cs (2)
45private static readonly IReadOnlyDictionary<ApplePlatform, string> s_targetNames = new Dictionary<ApplePlatform, string>() 59private readonly Dictionary<ApplePlatform, string> _downloadedProfiles = new();
SendHelixJob.cs (1)
504return def.WithCorrelationPayloadUris(new Dictionary<Uri, string>() { { new Uri(uri), destination } });
XharnessTaskBase.cs (1)
112return new(workItemName, new Dictionary<string, string>()
Microsoft.DotNet.Helix.Sdk.Tests (2)
FindDotNetCliPackageTests.cs (2)
86Dictionary<string, string> metadata = new Dictionary<string, string>() 137Dictionary<string, string> metadata = new Dictionary<string, string>()
Microsoft.DotNet.NuGetRepack.Tasks (2)
src\NuGetVersionUpdater.cs (1)
74var packages = new Dictionary<string, PackageInfo>();
src\ReplacePackageParts.cs (1)
96var map = new Dictionary<string, string>(partCount);
Microsoft.DotNet.Open.Api.Tools.Tests (2)
OpenApiTestBase.cs (1)
98return new Dictionary<string, Tuple<string, ContentDispositionHeaderValue>> {
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
Microsoft.DotNet.PackageTesting (6)
GetCompatiblePackageTargetFrameworks.cs (1)
17private static Dictionary<NuGetFramework, HashSet<NuGetFramework>> packageTfmMapping = new();
VerifyClosure.cs (3)
41private Dictionary<string, AssemblyInfo> assemblies = new Dictionary<string, AssemblyInfo>(); 43private Dictionary<string, Version> ignoredReferences = new Dictionary<string, Version>(StringComparer.OrdinalIgnoreCase); 261var suspectCycles = new Dictionary<AssemblyInfo, AssemblyInfo[]>();
VerifyTypes.cs (2)
33private Dictionary<string, AssemblyInfo> assemblies = new Dictionary<string, AssemblyInfo>(); 47var types = new Dictionary<string, AssemblyInfo>();
Microsoft.DotNet.RemoteExecutor (1)
RemoteInvokeOptions.cs (1)
45public IDictionary<string, object> RuntimeConfigurationOptions { get; } = new Dictionary<string, object>();
Microsoft.DotNet.SharedFramework.Sdk (6)
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (3)
41private Dictionary<string, AssemblyInfo> assemblies = new Dictionary<string, AssemblyInfo>(); 43private Dictionary<string, Version> ignoredReferences = new Dictionary<string, Version>(StringComparer.OrdinalIgnoreCase); 261var suspectCycles = new Dictionary<AssemblyInfo, AssemblyInfo[]>();
src\Microsoft.DotNet.PackageTesting\VerifyTypes.cs (2)
33private Dictionary<string, AssemblyInfo> assemblies = new Dictionary<string, AssemblyInfo>(); 47var types = new Dictionary<string, AssemblyInfo>();
src\ValidateFileVersions.cs (1)
22var fileVersions = new Dictionary<string, FileVersionData>(StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.SignCheckLibrary (9)
Verification\ArchiveVerifier.cs (1)
85Dictionary<string, string> archiveMap = new Dictionary<string, string>();
Verification\Exclusion.cs (4)
21private Dictionary<string, HashSet<string>> _fileExcludedCache = new(); 22private Dictionary<string, HashSet<string>> _fileNotExcludedCache = new(); 23private Dictionary<string, HashSet<string>> _parentExcludedCache = new(); 24private Dictionary<string, HashSet<string>> _parentNotExcludedCache = new();
Verification\Exclusions.cs (1)
18private Dictionary<string, Regex> _regexCache = new Dictionary<string, Regex>();
Verification\MsiVerifier.cs (1)
33var originalFiles = new Dictionary<string, string>();
Verification\SignatureVerificationManager.cs (1)
306_fileVerifiers = new Dictionary<string, FileVerifier>();
Verification\SignatureVerificationResult.cs (1)
29_detail = new Dictionary<string, string>();
Microsoft.DotNet.SignTool (15)
src\BatchSignUtil.cs (1)
167Dictionary<SignedFileContentKey, FileSignInfo> engines = new Dictionary<SignedFileContentKey, FileSignInfo>();
src\Configuration.cs (7)
139_zipDataMap = new Dictionary<SignedFileContentKey, ZipData>(); 140_filesByContentKey = new Dictionary<SignedFileContentKey, FileSignInfo>(); 142_additionalCertificateInformation = additionalCertificateInformation == null ? new() : additionalCertificateInformation; 143_whichPackagesTheFileIsIn = new Dictionary<SignedFileContentKey, HashSet<string>>(); 144_errors = new Dictionary<SigningToolErrorCode, HashSet<SignedFileContentKey>>(); 146_hashToCollisionIdMap = new Dictionary<SignedFileContentKey, string>(); 776var nestedParts = new Dictionary<string, ZipPart>();
src\SignTool.cs (1)
67var zipPaths = new Dictionary<string, string>();
src\SignToolTask.cs (4)
321var map = new Dictionary<string, List<AdditionalCertificateInformation>>(StringComparer.OrdinalIgnoreCase); 423var map = new Dictionary<string, List<SignInfo>>(StringComparer.OrdinalIgnoreCase); 470var map = new Dictionary<string, List<SignInfo>>(StringComparer.OrdinalIgnoreCase); 526var map = new Dictionary<ExplicitCertificateKey, string>();
src\Telemetry.cs (2)
15private static readonly Dictionary<string, string> s_properties = new Dictionary<string, string>() 27_metrics = new Dictionary<string, double>();
Microsoft.DotNet.SignTool.Tests (158)
SignToolTests.cs (158)
29private static readonly Dictionary<string, List<SignInfo>> s_fileExtensionSignInfo = new Dictionary<string, List<SignInfo>>() 53new Dictionary<string, List<SignInfo>>() 82new TaskItem(".jar", new Dictionary<string, string> { 86new TaskItem(".ps1", new Dictionary<string, string> { 90new TaskItem(".psd1", new Dictionary<string, string> { 94new TaskItem(".psm1", new Dictionary<string, string> { 98new TaskItem(".psc1", new Dictionary<string, string> { 102new TaskItem(".dylib", new Dictionary<string, string> { 106new TaskItem(".deb", new Dictionary<string, string> { 110new TaskItem(".dll", new Dictionary<string, string> { 114new TaskItem(".exe", new Dictionary<string, string> { 118new TaskItem(".zip", new Dictionary<string, string> { 122new TaskItem(".tgz", new Dictionary<string, string> { 126new TaskItem(".pkg", new Dictionary<string, string> { 130new TaskItem(".app", new Dictionary<string, string> { 134new TaskItem(".nupkg", new Dictionary<string, string> { 138new TaskItem(".vsix", new Dictionary<string, string> { 142new TaskItem(".jar", new Dictionary<string, string> { 146new TaskItem(".ps1", new Dictionary<string, string> { 150new TaskItem(".psd1", new Dictionary<string, string> { 154new TaskItem(".dll", new Dictionary<string, string> { 158new TaskItem(".nupkg", new Dictionary<string, string> { 162new TaskItem(".vsix", new Dictionary<string, string> { 521var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 523var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 584var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 590var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 619var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 625var fileSignInfo = new Dictionary<ExplicitCertificateKey, string> 652var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 658var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 673var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 679var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 697var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 703var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 721var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 727var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 749var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 755var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 757ValidateFileSignInfos(itemsToSign, strongNameSignInfo, fileSignInfo, new Dictionary<string, List<SignInfo>>(), new[] 762ValidateGeneratedProject(itemsToSign, strongNameSignInfo, fileSignInfo, new Dictionary<string, List<SignInfo>>(), new[] 782var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 788var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 824var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 830var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 864var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 870var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 892var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 899var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 904ValidateFileSignInfos(itemsToSign, strongNameSignInfo, fileSignInfo, new Dictionary<string, List<SignInfo>>(), new[] 910ValidateGeneratedProject(itemsToSign, strongNameSignInfo, fileSignInfo, new Dictionary<string, List<SignInfo>>(), new[] 930var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 935var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 952var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 957var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 977var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() { }; 978var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 999var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() { }; 1000var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 1021var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1027var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1071var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1077var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1149var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1156var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1232var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1238var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1288var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1294var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1322var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1328var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1379var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1385var additionalCertificateInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 1395var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1455var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1461var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1507var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1513var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1553var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1559var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1605var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1611var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1657var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1663var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1711var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1714var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1755var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1758var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1783var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1786var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1826var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1829var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1857var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1860var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1889var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1892var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1957var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1963var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2004var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2010var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2069var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2075var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2104var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2110var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2165var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2171var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2226var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2232var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2284var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2290var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2344var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2350var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2382var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2384var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 2406var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2409var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2428fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string> 2433fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string>{ 2447fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string> 2452fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string>{ 2455fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string> 2469fileExtensionSignInfo.Add(new TaskItem(".tar.gz", new Dictionary<string, string> 2495ValidateFileSignInfos(itemsToSign, new Dictionary<string, List<SignInfo>>(), new Dictionary<ExplicitCertificateKey, string>(), s_fileExtensionSignInfoWithCollisionId, new[] 2521new TaskItem(GetResourcePath("ContainerOne.1.0.0.nupkg"), new Dictionary<string, string> 2526new TaskItem(GetResourcePath("SignedLibrary.dll"), new Dictionary<string, string> 2534new TaskItem("ArcadeStrongTest", new Dictionary<string, string> 2545new TaskItem("ProjectOne.dll", new Dictionary<string, string> 2552new TaskItem("SignedLibrary.dll", new Dictionary<string, string> 2564new TaskItem("DualSignCertificate", new Dictionary<string, string> 2569new TaskItem("MacDeveloperHardenWithNotarization", new Dictionary<string, string> 2641var additionalCertInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2646var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2651var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2670var additionalCertInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2679var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2684var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2699var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2705var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2731var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2737var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2782var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2788var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 2811var certificatesSignInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2856var needContent = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 2878new Dictionary<string, List<SignInfo>>(), 2879new Dictionary<ExplicitCertificateKey, string>(), 2880new Dictionary<string, List<SignInfo>>(), 2881new(), 2896var needContent = new Dictionary<string, (string, string[])>(StringComparer.OrdinalIgnoreCase) 2917var extensionSignInfo = new Dictionary<string, List<SignInfo>>() 2929new Dictionary<string, List<SignInfo>>(), 2930new Dictionary<ExplicitCertificateKey, string>(), 2932new(), 2953new Dictionary<string, List<SignInfo>>(), 2954new Dictionary<ExplicitCertificateKey, 2961new Dictionary<string, List<SignInfo>>(), 2962new Dictionary<ExplicitCertificateKey, string>(),
Microsoft.DotNet.SourceBuild.Tasks (2)
src\ReadNuGetPackageInfos.cs (1)
34new Dictionary<string, string>
src\UsageReport\WriteUsageReports.cs (1)
68var prodConPackageOrigin = new Dictionary<string, string>(
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (4)
Languages\Language.cs (1)
56_languages = new Dictionary<string, Language>(StringComparer.OrdinalIgnoreCase)
Modeler\ServiceClientModelFactory.cs (2)
36private readonly Dictionary<string, EnumTypeModel> _enumTypeModels = new Dictionary<string, EnumTypeModel>(); 45private readonly Dictionary<string, TypeModel> _types = new Dictionary<string, TypeModel>();
ServiceClientCodeFactory.cs (1)
18private Dictionary<string, CodeFile> _files = new Dictionary<string, CodeFile>();
Microsoft.DotNet.XliffTasks (3)
Model\XlfDocument.cs (2)
78Dictionary<string, TranslatableNode> nodesById = new(); 262Dictionary<string, string> dictionary = new();
Tasks\TranslateSource.cs (1)
34? new Dictionary<string, string>()
Microsoft.DotNet.XliffTasks.Tests (8)
JsonDocumentTests.cs (1)
23Dictionary<string, string> translations = new()
ResxDocumentTests.cs (1)
26Dictionary<string, string> translations = new()
UnstructuredDocumentTests.cs (2)
22Dictionary<string, string> translations = new() 48Dictionary<string, string> translations = new()
VsctDocumentTests.cs (2)
36Dictionary<string, string> translations = new() 154Dictionary<string, string> translations = new()
XamlRuleDocumentTests.cs (2)
125Dictionary<string, string> translations = new() 293Dictionary<string, string> translations = new()
Microsoft.DotNet.XUnitAssert.Tests (113)
CollectionAssertsTests.cs (60)
1254 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1255 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1263 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1264 var actual = new Dictionary<string, int> { { "b", 2 }, { "c", 3 }, { "a", 1 } }; 1272 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1273 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 } }; 1289 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 } }; 1290 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1306 var expected = new Dictionary<string, int> 1315 var actual = new Dictionary<string, int> 1340 var expected = new Dictionary<string, IEnumerable<string>> 1345 var actual = new Dictionary<string, IEnumerable<string>> 1358 var expected = new Dictionary<string, IEnumerable<string>> 1363 var actual = new Dictionary<string, IEnumerable<string>> 1387 var expected = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 1388 var actual = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 1396 var expected = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 1397 var actual = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'b' } } }; 1421 var expected = new Dictionary<string, object>() 1423 ["key"] = new Dictionary<string, object>() 1427 new Dictionary<string, object>() 1434 var actual = new Dictionary<string, object>() 1436 ["key"] = new Dictionary<string, object>() 1440 new Dictionary<string, object>() 1454 var expected = new Dictionary<string, object>() 1456 ["key"] = new Dictionary<string, object>() 1460 new Dictionary<string, object>() 1467 var actual = new Dictionary<string, object>() 1469 ["key"] = new Dictionary<string, object>() 1473 new Dictionary<string, object>() 1929 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1930 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1946 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1947 var actual = new Dictionary<string, int> { { "b", 2 }, { "c", 3 }, { "a", 1 } }; 1963 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1964 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 } }; 1972 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 } }; 1973 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1981 var expected = new Dictionary<string, int> 1990 var actual = new Dictionary<string, int> 2007 var expected = new Dictionary<string, IEnumerable<string>> 2012 var actual = new Dictionary<string, IEnumerable<string>> 2033 var expected = new Dictionary<string, IEnumerable<string>> 2038 var actual = new Dictionary<string, IEnumerable<string>> 2054 var expected = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 2055 var actual = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 2071 var expected = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 2072 var actual = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'b' } } }; 2088 var expected = new Dictionary<string, object>() 2090 ["key"] = new Dictionary<string, object>() 2094 new Dictionary<string, object>() 2101 var actual = new Dictionary<string, object>() 2103 ["key"] = new Dictionary<string, object>() 2107 new Dictionary<string, object>() 2129 var expected = new Dictionary<string, object>() 2131 ["key"] = new Dictionary<string, object>() 2135 new Dictionary<string, object>() 2142 var actual = new Dictionary<string, object>() 2144 ["key"] = new Dictionary<string, object>() 2148 new Dictionary<string, object>()
DictionaryAssertsTests.cs (4)
18 var dictionary = new Dictionary<string, int>(StringComparer.InvariantCultureIgnoreCase) 36 var dictionary = new Dictionary<string, int>() 70 var dictionary = new Dictionary<string, int>() 88 var dictionary = new Dictionary<string, int>(StringComparer.InvariantCultureIgnoreCase)
EqualityAssertsTests.cs (20)
1124 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 1125 var actual = new Dictionary<string, string> { ["foo"] = "bar" }; 1135 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 1136 var actual = new Dictionary<string, string> { ["foo"] = "baz" }; 1159 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 1169 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 1192 var expected = new Dictionary<string, int?> { { "two", null } }; 1193 var actual = new Dictionary<string, int?> { { "two", null } }; 1201 var expected = new Dictionary<string, int?> { { "two", null } }; 1202 var actual = new Dictionary<string, int?> { { "two", 1 } }; 3353 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 3354 var actual = new Dictionary<string, string> { ["foo"] = "bar" }; 3377 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 3378 var actual = new Dictionary<string, string> { ["foo"] = "baz" }; 3388 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 3411 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 3421 var expected = new Dictionary<string, int?> { { "two", null } }; 3422 var actual = new Dictionary<string, int?> { { "two", null } }; 3438 var expected = new Dictionary<string, int?> { { "two", null } }; 3439 var actual = new Dictionary<string, int?> { { "two", 1 } };
EquivalenceAssertsTests.cs (28)
1158 var expected = new Dictionary<string, int> { ["Foo"] = 42 }; 1159 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 }; 1167 var expected = new Dictionary<string, int[]> { ["Foo"] = new[] { 42 } }; 1168 var actual = new Dictionary<string, int[]> { ["Foo"] = new[] { 42 }, ["Bar"] = new[] { 2112 } }; 1176 var expected = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 } }; 1177 var actual = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 }, ["Bar"] = new List<int> { 2112 } }; 1185 var expected = new { x = new Dictionary<string, int> { ["Foo"] = 42 } }; 1186 var actual = new { x = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 } }; 1194 var expected = new Dictionary<string, int> { ["Foo"] = 16 }; 1195 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 }; 1211 var expected = new Dictionary<string, int[]> { ["Foo"] = new[] { 16 } }; 1212 var actual = new Dictionary<string, int[]> { ["Foo"] = new[] { 42 }, ["Bar"] = new[] { 2112 } }; 1228 var expected = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 16 } }; 1229 var actual = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 }, ["Bar"] = new List<int> { 2112 } }; 1245 var expected = new { x = new Dictionary<string, int> { ["Foo"] = 16 } }; 1246 var actual = new { x = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 } }; 1265 var expected = new Dictionary<string, int> { ["Bar"] = 2112, ["Foo"] = 42 }; 1266 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 }; 1274 var expected = new { x = new Dictionary<string, int> { ["Bar"] = 2112, ["Foo"] = 42 } }; 1275 var actual = new { x = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 } }; 1283 var expected = new Dictionary<string, int> { ["Foo"] = 16 }; 1284 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 }; 1300 var expected = new Dictionary<string, int> { ["Bar"] = 2112, ["Foo"] = 42 }; 1301 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Biff"] = 2600, ["Bar"] = 2112 }; 1317 var expected = new { x = new Dictionary<string, int> { ["Foo"] = 16 } }; 1318 var actual = new { x = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 } }; 1334 var expected = new { x = new Dictionary<string, int> { ["Bar"] = 2112, ["Foo"] = 42 } }; 1335 var actual = new { x = new Dictionary<string, int> { ["Foo"] = 42, ["Biff"] = 2600, ["Bar"] = 2112 } };
Sdk\ArgumentFormatterTests.cs (1)
329 var value = new Dictionary<object, List<object>>
Microsoft.DotNet.XUnitExtensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTheoryDiscoverer.cs (1)
29private readonly Dictionary<IMethodInfo, string> _conditionCache = new();
Microsoft.Extensions.AI.Abstractions (6)
AdditionalPropertiesDictionary{TValue}.cs (3)
33_dictionary = new(StringComparer.OrdinalIgnoreCase); 39_dictionary = new(dictionary, StringComparer.OrdinalIgnoreCase); 46_dictionary = new(collection, StringComparer.OrdinalIgnoreCase);
Functions\AIFunctionArguments.cs (2)
85? new Dictionary<string, object?>(comparer) 88: new Dictionary<string, object?>(arguments, comparer);
Functions\AIFunctionFactory.cs (1)
638boundParameters = new(parameters.Length);
Microsoft.Extensions.AI.Abstractions.Tests (20)
AdditionalPropertiesDictionaryTests.cs (2)
18d = new(new Dictionary<string, object?> { ["key1"] = "value1" }); 21d = new((IEnumerable<KeyValuePair<string, object?>>)new Dictionary<string, object?> { ["key1"] = "value1", ["key2"] = "value2" });
ChatCompletion\ChatMessageTests.cs (1)
255new FunctionCallContent("function-id", "plugin-name-function-name", new Dictionary<string, object?> { ["parameter"] = "argument" }),
Contents\FunctionCallContentTests..cs (2)
81var sut = new FunctionCallContent("callId1", "functionName", new Dictionary<string, object?> { ["key"] = "value" }) { Exception = ex }; 104["d"] = new ReadOnlyDictionary<string, string>((new Dictionary<string, string>
Functions\AIFunctionArgumentsTests.cs (8)
28var args = new AIFunctionArguments(new Dictionary<string, object?>()); 39var args = new AIFunctionArguments(new Dictionary<string, object?> 71IReadOnlyDictionary<string, object?> args = new AIFunctionArguments(new Dictionary<string, object?> 109IDictionary<string, object?> args = new AIFunctionArguments(new Dictionary<string, object?> 208var originalArgs = new Dictionary<string, object?> 240var originalDict = new Dictionary<string, object?>(comparer) 264var originalDict = new Dictionary<string, object?>(comparer) 291var originalDict = new Dictionary<string, object?>(StringComparer.Ordinal)
test\Shared\JsonSchemaExporter\TestTypes.cs (4)
503Value: new() { Name = "name", ExtensionData = new() { ["x"] = 42 } }, 815Value: new() { ["one"] = 1, ["two"] = 2, ["three"] = 3 }, 827Value: new() 850Value: new() { ["one"] = 1, ["two"] = "two", ["three"] = 3.14 },
Utilities\AIJsonUtilitiesTests.cs (3)
1009string key5 = AIJsonUtilities.HashDataToString([new Dictionary<string, object> { ["key1"] = 1, ["key2"] = 2 }], options); 1010string key6 = AIJsonUtilities.HashDataToString([new Dictionary<string, object> { ["key2"] = 2, ["key1"] = 1 }], options); 1026Dictionary<string, object> dict = new() { ["key1"] = 1, ["key2"] = 2 };
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
386new Dictionary<string, BinaryData>
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
AzureAIInferenceChatClientTests.cs (2)
1269AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 1361AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments);
Microsoft.Extensions.AI.Evaluation (3)
EvaluationMetricExtensions.cs (2)
30metric.Context ??= new Dictionary<string, EvaluationContext>(); 117metric.Metadata ??= new Dictionary<string, string>();
EvaluationResult.cs (1)
59var metricsDictionary = new Dictionary<string, EvaluationMetric>();
Microsoft.Extensions.AI.Evaluation.Safety (10)
CodeVulnerabilityEvaluator.cs (1)
37metricNames: new Dictionary<string, string> { ["code_vulnerability"] = CodeVulnerabilityMetricName })
ContentHarmEvaluator.cs (1)
38new Dictionary<string, string>
GroundednessProEvaluator.cs (1)
38metricNames: new Dictionary<string, string> { ["generic_groundedness"] = GroundednessProMetricName })
HateAndUnfairnessEvaluator.cs (1)
25metricNames: new Dictionary<string, string> { ["hate_fairness"] = HateAndUnfairnessMetricName })
IndirectAttackEvaluator.cs (1)
48metricNames: new Dictionary<string, string> { ["xpia"] = IndirectAttackMetricName })
ProtectedMaterialEvaluator.cs (1)
33new Dictionary<string, string>
SelfHarmEvaluator.cs (1)
24: ContentHarmEvaluator(metricNames: new Dictionary<string, string> { ["self_harm"] = SelfHarmMetricName })
SexualEvaluator.cs (1)
24: ContentHarmEvaluator(metricNames: new Dictionary<string, string> { ["sexual"] = SexualMetricName })
UngroundedAttributesEvaluator.cs (1)
42new Dictionary<string, string> { ["inference_sensitive_attributes"] = UngroundedAttributesMetricName })
ViolenceEvaluator.cs (1)
24: ContentHarmEvaluator(metricNames: new Dictionary<string, string> { ["violence"] = ViolenceMetricName })
Microsoft.Extensions.AI.Integration.Tests (3)
ChatClientIntegrationTests.cs (3)
138["stream_options"] = new Dictionary<string, object> { ["include_usage"] = true, }, 426aiFuncOptions.AdditionalProperties = new Dictionary<string, object?> { ["strictJsonSchema"] = true }; 434Dictionary<string, object?> additionalProperties = new();
Microsoft.Extensions.AI.Ollama.Tests (2)
OllamaChatClientTests.cs (2)
393AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 468new(ChatRole.Assistant, [new FunctionCallContent("abcd1234", "GetPersonAge", new Dictionary<string, object?> { ["personName"] = "Alice" })]),
Microsoft.Extensions.AI.OpenAI.Tests (11)
OpenAIChatClientTests.cs (11)
175Assert.Equal(new Dictionary<string, long> 833Assert.Equal(new Dictionary<string, long> 930Assert.Equal(new Dictionary<string, long> 1028Assert.Equal(new Dictionary<string, long> 1140Assert.Equal(new Dictionary<string, long> 1153AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 1224Assert.Equal(new Dictionary<string, long> 1333AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 1340Assert.Equal(new Dictionary<string, long> 1481Assert.Equal(new Dictionary<string, long> 1596Assert.Equal(new Dictionary<string, long>
Microsoft.Extensions.AI.Tests (32)
ChatCompletion\DistributedCachingChatClientTest.cs (3)
51Contents = [new FunctionCallContent("someCallId", "functionName", new Dictionary<string, object?> 254new FunctionCallContent("someCallId", "someFn", new Dictionary<string, object?> { ["arg1"] = "value1" }), 265Contents = [new FunctionCallContent("someCallId", "someFn", new Dictionary<string, object?> { ["arg1"] = "value1" })],
ChatCompletion\FunctionInvocationContextTests.cs (1)
55FunctionCallContent callContent = new(string.Empty, string.Empty, new Dictionary<string, object?>());
ChatCompletion\FunctionInvokingChatClientTests.cs (25)
90new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 92new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]), 122new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 34 } }), 123new FunctionCallContent("callId3", "Func2", arguments: new Dictionary<string, object?> { { "i", 56 } }), 133new FunctionCallContent("callId4", "Func2", arguments: new Dictionary<string, object?> { { "i", 78 } }), 181new FunctionCallContent("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }), 182new FunctionCallContent("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }), 225new FunctionCallContent("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }), 226new FunctionCallContent("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }), 259new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 261new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]), 457arguments: new Dictionary<string, object?> { { "shouldThrow", callShouldThrow }, { "callIndex", thisCallIndex } })); 482new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 484new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]), 539new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]), 595new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]), 670new() { Contents = [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["text"] = "Input 1" })] }, 671new() { Contents = [new FunctionCallContent("callId2", "Func1", new Dictionary<string, object?> { ["text"] = "Input 2" })] } 772new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["i"] = 41 })]), 774new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func1", new Dictionary<string, object?> { ["i"] = 42 })]), 782new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "Func1", new Dictionary<string, object?> { ["i"] = 43 })]), 843new FunctionCallContent("callId2", "Search", new Dictionary<string, object?> { { "result", "birds" } }), 928new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]), 958new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["arg"] = "value1" }), 959new FunctionCallContent("callId2", "Func1", new Dictionary<string, object?> { ["arg"] = "value2" }),
Functions\AIFunctionFactoryTest.cs (3)
240IReadOnlyDictionary<string, object?> metadata = new Dictionary<string, object?> { ["a"] = "b" }; 612Context = new Dictionary<object, object?>(), 619Context = new Dictionary<object, object?>
Microsoft.Extensions.AmbientMetadata.Application.Tests (2)
ApplicationMetadataExtensionsTests.cs (2)
73.AddInMemoryCollection(new Dictionary<string, string?> 99.AddInMemoryCollection(new Dictionary<string, string?>
Microsoft.Extensions.ApiDescription.Client.Tests (14)
GetOpenApiReferenceMetadataTest.cs (13)
26var inputMetadata = new Dictionary<string, string> { { "CodeGenerator", "NSwagCSharp" } }; 81var inputMetadata = new Dictionary<string, string> 141var inputMetadata = new Dictionary<string, string> 201var inputMetadata = new Dictionary<string, string> 263var inputMetadata1 = new Dictionary<string, string> 267var inputMetadata2 = new Dictionary<string, string> 308var inputMetadata1 = new Dictionary<string, string> 313var inputMetadata2 = new Dictionary<string, string> 354var inputMetadata = new Dictionary<string, string> 418var inputMetadata = new Dictionary<string, string> 479var inputMetadata1 = new Dictionary<string, string> { { "CodeGenerator", codeGenerator13 } }; 480var inputMetadata2 = new Dictionary<string, string> { { "CodeGenerator", codeGenerator2 } }; 481var inputMetadata3 = new Dictionary<string, string> { { "CodeGenerator", codeGenerator13 } };
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
Microsoft.Extensions.AsyncState (1)
src\Shared\Pools\PooledDictionaryPolicy.cs (1)
24public override Dictionary<TKey, TValue> Create() => new(_comparer);
Microsoft.Extensions.Caching.Hybrid.Tests (2)
SerializerTests.cs (1)
189Dictionary<string, (int id, string who, DateTime when)> source = new()
TestEventListener.cs (1)
49var args = new Dictionary<string, string?>
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheWithDatabaseTest.cs (1)
36var memoryConfigurationData = new Dictionary<string, string>
Microsoft.Extensions.Compliance.Abstractions (1)
src\Shared\Pools\PooledDictionaryPolicy.cs (1)
24public override Dictionary<TKey, TValue> Create() => new(_comparer);
Microsoft.Extensions.Compliance.Abstractions.Tests (2)
Classification\DataClassificationTypeConverterTests.cs (2)
52var expected = new Dictionary<string, DataClassification> 180public IDictionary<string, DataClassification> Facts { get; set; } = new Dictionary<string, DataClassification>();
Microsoft.Extensions.Compliance.Redaction (1)
RedactorProvider.cs (1)
46var dict = new Dictionary<DataClassificationSet, Redactor>(map.Count);
Microsoft.Extensions.Compliance.Redaction.Tests (1)
HmacRedactorTest.cs (1)
21.AddInMemoryCollection(new Dictionary<string, string?>
Microsoft.Extensions.Compliance.Testing.Tests (1)
Setup.cs (1)
16.AddInMemoryCollection(new Dictionary<string, string?>
Microsoft.Extensions.Configuration (3)
ConfigurationBuilder.cs (1)
25public IDictionary<string, object> Properties { get; } = new Dictionary<string, object>();
ConfigurationManager.cs (1)
265private readonly Dictionary<string, object> _properties = new();
ConfigurationProvider.cs (1)
24Data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.CommandLine (2)
CommandLineConfigurationProvider.cs (2)
43var data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase); 140var switchMappingsCopy = new Dictionary<string, string>(switchMappings.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.EnvironmentVariables (1)
EnvironmentVariablesConfigurationProvider.cs (1)
74var data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.FileExtensions (2)
FileConfigurationProvider.cs (2)
63Data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase); 105Data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.Ini (1)
IniStreamConfigurationProvider.cs (1)
28var data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.Json (1)
JsonConfigurationFileParser.cs (1)
16private readonly Dictionary<string, string?> _data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationProvider.cs (1)
60var data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.Xml (2)
XmlStreamConfigurationProvider.cs (2)
94var children = new Dictionary<string, List<XmlConfigurationElement>>(StringComparer.OrdinalIgnoreCase); 257Dictionary<string, string?> configuration = new(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.DependencyInjection (5)
ServiceLookup\CallSiteChain.cs (1)
17_callSiteChain = new Dictionary<ServiceIdentifier, ChainItemInfo>();
ServiceLookup\CallSiteFactory.cs (2)
19private readonly Dictionary<ServiceIdentifier, ServiceDescriptorCacheItem> _descriptorLookup = new Dictionary<ServiceIdentifier, ServiceDescriptorCacheItem>(); 380keyedSlotAssignment = new Dictionary<ServiceIdentifier, int>(capacity: _descriptors.Length)
ServiceLookup\ServiceProviderEngineScope.cs (1)
25ResolvedServices = new Dictionary<ServiceCacheKey, object?>();
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.Extensions.DependencyModel (2)
DependencyContextJsonReader.cs (2)
20private readonly Dictionary<string, string> _stringPool = new Dictionary<string, string>(); 636var libraries = new Dictionary<string, LibraryStub>();
Microsoft.Extensions.Diagnostics (2)
Metrics\DefaultMeterFactory.cs (1)
14private readonly Dictionary<string, List<FactoryMeter>> _cachedMeters = new();
Metrics\ListenerSubscription.cs (1)
16private readonly Dictionary<Instrument, object?> _instruments = new();
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.Extensions.Diagnostics.ExceptionSummarization (3)
ExceptionSummarizer.cs (1)
19var exceptionTypesToProvidersBuilder = new Dictionary<Type, IExceptionSummaryProvider>();
HttpExceptionSummaryProvider.cs (2)
37var socketErrors = new Dictionary<SocketError, int>(); 52var webStatuses = new Dictionary<WebExceptionStatus, int>();
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
62var entries = new Dictionary<string, HealthReportEntry>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
HealthCheckResult.cs (1)
14private static readonly IReadOnlyDictionary<string, object> _emptyReadOnlyDictionary = new Dictionary<string, object>();
HealthReportEntry.cs (1)
15private static readonly IReadOnlyDictionary<string, object> _emptyReadOnlyDictionary = new Dictionary<string, object>();
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
src\Shared\Pools\PooledDictionaryPolicy.cs (1)
24public override Dictionary<TKey, TValue> Create() => new(_comparer);
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (2)
TelemetryHealthChecksPublisherExtensionsTests.cs (1)
73var configurationDict = new Dictionary<string, string?>
TelemetryHealthChecksPublisherTests.cs (1)
154var healthStatusRecords = new Dictionary<string, HealthReportEntry>();
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (6)
DefaultHealthCheckServiceTest.cs (4)
67var data = new Dictionary<string, object>() 170var data = new Dictionary<string, object> 700var data = new Dictionary<string, object>() 736return Task.FromResult(HealthCheckResult.Healthy(data: new Dictionary<string, object> { { "self", this } }));
HealthReportTest.cs (2)
20var result = new HealthReport(new Dictionary<string, HealthReportEntry>() 39var result = new HealthReport(new Dictionary<string, HealthReportEntry>()
Microsoft.Extensions.Diagnostics.Probes.Tests (4)
KubernetesProbesExtensionsTests.cs (1)
95.AddInMemoryCollection(new Dictionary<string, string?>
MockHealthCheckService.cs (1)
26var healthStatusRecords = new Dictionary<string, HealthReportEntry> { { "id", entry } };
TcpEndpointProbesExtensionsTests.cs (2)
105.AddInMemoryCollection(new Dictionary<string, string?> 130.AddInMemoryCollection(new Dictionary<string, string?>
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
src\Shared\Pools\PooledDictionaryPolicy.cs (1)
24public override Dictionary<TKey, TValue> Create() => new(_comparer);
Windows\Disk\WindowsDiskMetrics.cs (1)
26private readonly Dictionary<string, WindowsDiskIoRatePerfCounter> _diskIoRateCounters = new();
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (61)
Linux\AcceptanceTest.cs (5)
114.AddSingleton<IFileSystem>(new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 163.AddSingleton<IFileSystem>(new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 197var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 285var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 372var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string>
Linux\Disk\DiskStatsReaderTests.cs (3)
38var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 99var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 144var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string>
Linux\Disk\LinuxSystemDiskMetricsTests.cs (1)
52var diskStatsReader = new FakeDiskStatsReader(new Dictionary<string, List<DiskStats>>
Linux\LinuxCountersTests.cs (2)
23var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 119var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string>
Linux\LinuxNetworkUtilizationParserTests.cs (1)
34var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string>
Linux\LinuxUtilizationParserCgroupV1Tests.cs (15)
83var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 109var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 128var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 155var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 175var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 200var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 227var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 248var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 277var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 293var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 307var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 328var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 345var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 360var f1 = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 364var f2 = new HardcodedValueFileSystem(new Dictionary<FileInfo, string>
Linux\LinuxUtilizationParserCgroupV2Tests.cs (28)
87var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 111var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 128var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 146var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 161var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 177var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 188f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 204var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 230var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 248var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 273var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 290var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 308var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 323var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 349var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 364var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 390var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 404var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 420var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 439var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 460var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 477var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 494var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 512var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 528var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 545var f = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 559var f1 = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 563var f2 = new HardcodedValueFileSystem(new Dictionary<FileInfo, string>
Linux\LinuxUtilizationProviderTests.cs (4)
38var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 108var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 176var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string> 222var fileSystem = new HardcodedValueFileSystem(new Dictionary<FileInfo, string>
Linux\Resources\TestResources.cs (1)
15private static readonly Dictionary<string, string> _files = new(StringComparer.OrdinalIgnoreCase)
ResourceMonitoringExtensionsTests.cs (1)
158.AddInMemoryCollection(new Dictionary<string, string?>
Microsoft.Extensions.Diagnostics.Testing (1)
Metrics\CollectedMeasurement.cs (1)
28var d = new Dictionary<string, object?>();
Microsoft.Extensions.Diagnostics.Testing.Tests (1)
Logging\FakeLoggerExtensionsTests.cs (1)
55.AddInMemoryCollection(new Dictionary<string, string?>
Microsoft.Extensions.Features (1)
FeatureCollection.cs (1)
87_features = new Dictionary<Type, object>(_initialCapacity);
Microsoft.Extensions.FileSystemGlobbing (1)
InMemoryDirectoryInfo.cs (1)
84var dict = new Dictionary<string, List<string>>();
Microsoft.Extensions.Hosting (2)
HostApplicationBuilder.cs (1)
170hostBuilderContext = new HostBuilderContext(new Dictionary<object, object>())
HostBuilder.cs (1)
54public IDictionary<object, object> Properties { get; } = new Dictionary<object, object>();
Microsoft.Extensions.Hosting.Testing.Tests (1)
FakeHostBuilderTests.cs (1)
88IDictionary<object, object> properties = new Dictionary<object, object>();
Microsoft.Extensions.Http (3)
DependencyInjection\HttpClientMappingRegistry.cs (2)
16public Dictionary<string, Type> NamedClientRegistrations { get; } = new(); 18public Dictionary<string, HttpClientKeyedLifetime> KeyedLifetimeMap { get; } = new();
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.Extensions.Http.Diagnostics (7)
Latency\Internal\HttpRequestLatencyListener.cs (4)
78private static readonly Dictionary<string, string> _socketMap = new() 84private static readonly Dictionary<string, string> _nameResolutionMap = new() 90private static readonly Dictionary<string, string> _httpMap = new() 124return new Dictionary<string, FrozenDictionary<string, CheckpointToken>>
Logging\LoggingOptions.cs (3)
103public IDictionary<string, DataClassification> RequestHeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>(); 118public IDictionary<string, DataClassification> ResponseHeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>(); 147public IDictionary<string, DataClassification> RouteParameterDataClasses { get; set; } = new Dictionary<string, DataClassification>();
Microsoft.Extensions.Http.Diagnostics.Tests (44)
Latency\HttpClientLatencyTelemetryExtensionsTest.cs (1)
111.AddInMemoryCollection(new Dictionary<string, string?>
Logging\AcceptanceTests.cs (10)
453options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.PrivateData } }; 460options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.PrivateData } }; 489options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.PrivateData } }; 496options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.PrivateData } }; 523options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.PrivateData } }; 529options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.PrivateData } }; 535options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test3", FakeTaxonomy.PrivateData } }; 541options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test4", FakeTaxonomy.PrivateData } }; 547options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test5", FakeTaxonomy.PrivateData } }; 552options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test6", FakeTaxonomy.PrivateData } };
Logging\HttpClientLoggerTest.cs (12)
204ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData }, { "Header3", FakeTaxonomy.PrivateData } }, 205RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData }, { "Header3", FakeTaxonomy.PrivateData } }, 296ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 297RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 403ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 404RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 499ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 500RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 613ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 614RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 883ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 884RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } },
Logging\HttpHeadersReaderTest.cs (4)
52RequestHeadersDataClasses = new Dictionary<string, DataClassification> 57ResponseHeadersDataClasses = new Dictionary<string, DataClassification> 114RequestHeadersDataClasses = new Dictionary<string, DataClassification> 120ResponseHeadersDataClasses = new Dictionary<string, DataClassification>
Logging\HttpRequestReaderTest.cs (13)
61RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } }, 62ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } }, 187RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 188ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 261RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 262ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 335RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 392RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 393ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 463RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 464ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 530RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 531ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
Logging\Internal\TestConfiguration.cs (1)
19.AddInMemoryCollection(new Dictionary<string, string?>
Logging\LoggingOptionsTest.cs (3)
73var testHeaders = new Dictionary<string, DataClassification> 87var testHeaders = new Dictionary<string, DataClassification> 122var paramsToRedacts = new Dictionary<string, DataClassification>
Microsoft.Extensions.Http.Resilience (1)
src\Shared\Pools\PooledDictionaryPolicy.cs (1)
24public override Dictionary<TKey, TValue> Create() => new(_comparer);
Microsoft.Extensions.Http.Resilience.Tests (17)
Hedging\StandardHedgingTests.cs (5)
95var section = ConfigurationStubFactory.Create(new Dictionary<string, string?> 131var section = ConfigurationStubFactory.Create(new Dictionary<string, string?> 152var section = ConfigurationStubFactory.Create(new Dictionary<string, string?> 242new() 260reloadAction(new() { { "standard:Hedging:MaxHedgedAttempts", "6" } });
Helpers\ConfigurationStubFactory.cs (1)
40Data = new Dictionary<string, string?>(data, StringComparer.OrdinalIgnoreCase);
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (4)
65new Dictionary<string, string?> 75new Dictionary<string, string?> 230new() 255reloadAction(new() { { "standard:Retry:MaxRetryAttempts", "10" } });
Routing\OrderedRoutingStrategyTest.cs (3)
38new() 42new() 52routingBuilder.ConfigureOrderedGroups(GetSection(new Dictionary<string, string>
Routing\RoutingStrategyTest.cs (1)
192Data = new Dictionary<string, string?>(data, StringComparer.OrdinalIgnoreCase);
Routing\WeightedRoutingStrategyTest.cs (3)
52new() 57new() 68routingBuilder.ConfigureWeightedGroups(GetSection(new Dictionary<string, string>
Microsoft.Extensions.Identity.Core (2)
TokenOptions.cs (1)
36public Dictionary<string, TokenProviderDescriptor> ProviderMap { get; set; } = new Dictionary<string, TokenProviderDescriptor>();
UserManager.cs (1)
44new Dictionary<string, IUserTwoFactorTokenProvider<TUser>>();
Microsoft.Extensions.Logging.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.Extensions.Logging.Console (1)
ConsoleLoggerSettings.cs (1)
32public IDictionary<string, LogLevel> Switches { get; set; } = new Dictionary<string, LogLevel>();
Microsoft.Extensions.Logging.Generators (2)
LoggerMessageGenerator.Parser.cs (2)
575var methods = new Dictionary<string, int>(lc.Methods.Count); 876public readonly Dictionary<string, string> TemplateMap = new(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
25ConfigTypes = new Dictionary<string, Type>()
Microsoft.Extensions.Options (1)
StartupValidatorOptions.cs (1)
12public Dictionary<(Type, string), Action> _validators { get; } = new Dictionary<(Type, string), Action>();
Microsoft.Extensions.Options.SourceGeneration (5)
Emitter.cs (2)
61var staticValidationAttributesDict = new Dictionary<string, StaticFieldInfo>(); 62var staticValidatorsDict = new Dictionary<string, StaticFieldInfo>();
Model\ValidationAttributeInfo.cs (1)
11public Dictionary<string, string> Properties { get; } = new();
OptionsSourceGenContext.cs (1)
26internal Dictionary<string, HashSet<object>?> AttributesToGenerate { get; set; } = new Dictionary<string, HashSet<object>?>();
Parser.cs (1)
29private readonly Dictionary<ITypeSymbol, ValidatorType> _synthesizedValidators = new(SymbolEqualityComparer.Default);
Microsoft.Extensions.SecretManager.Tools.Tests (2)
SetCommandTest.cs (1)
96return new Dictionary<string, string>();
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Resolver\DnsResolver.cs (2)
241Dictionary<EncodedDomainName, EncodedDomainName> aliasMap = new(); 242Dictionary<EncodedDomainName, List<AddressResult>> aRecordMap = new();
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
DnsSrvServiceEndpointResolverTests.cs (1)
105InitialData = new Dictionary<string, string?>
Microsoft.Extensions.ServiceDiscovery.Tests (10)
ConfigurationServiceEndpointResolverTests.cs (7)
23var config = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string, string?> 58var config = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string, string?> 139var config = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string, string?> 232var data = new Dictionary<string, string?>(); 279InitialData = new Dictionary<string, string?> 342InitialData = new Dictionary<string, string?> 387InitialData = new Dictionary<string, string?>
PassThroughServiceEndpointResolverTests.cs (3)
48InitialData = new Dictionary<string, string?> 81InitialData = new Dictionary<string, string?> 115InitialData = new Dictionary<string, string?>
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
ServiceDiscoveryDestinationResolver.cs (1)
26Dictionary<string, DestinationConfig> results = new();
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (11)
YarpServiceDiscoveryTests.cs (11)
39var destinationConfigs = new Dictionary<string, DestinationConfig> 57var config = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string, string?> 70var destinationConfigs = new Dictionary<string, DestinationConfig> 88var config = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string, string?> 100var destinationConfigs = new Dictionary<string, DestinationConfig> 120var config = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string, string?> 134var destinationConfigs = new Dictionary<string, DestinationConfig> 200var config = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string, string?> 218var destinationConfigs = new Dictionary<string, DestinationConfig> 244var destinationConfigs = new Dictionary<string, DestinationConfig> 293var destinationConfigs = new Dictionary<string, DestinationConfig>
Microsoft.Extensions.Telemetry (3)
Latency\Internal\Registry.cs (1)
33var keyOrderBuilder = new Dictionary<string, int>(c);
Logging\ExtendedLoggerFactory.cs (1)
21private readonly Dictionary<string, ExtendedLogger> _loggers = new(StringComparer.Ordinal);
src\Shared\Pools\PooledDictionaryPolicy.cs (1)
24public override Dictionary<TKey, TValue> Create() => new(_comparer);
Microsoft.Extensions.Telemetry.Abstractions (1)
src\Shared\Pools\PooledDictionaryPolicy.cs (1)
24public override Dictionary<TKey, TValue> Create() => new(_comparer);
Microsoft.Extensions.Telemetry.Abstractions.Tests (4)
Logging\LoggerMessageHelperTests.cs (4)
28var d0 = new Dictionary<string, string> 34var d1 = new Dictionary<string, string> 48var d3 = new Dictionary<string, int> 56var d4 = new Dictionary<int, string>
Microsoft.Extensions.Telemetry.Tests (30)
Buffering\GlobalLogBufferingConfigureOptionsTests.cs (3)
47var configValues = new Dictionary<string, string?> 70var configValues = new Dictionary<string, string?> 100var configValues = new Dictionary<string, string?>
Http\HttpParserTests.cs (11)
21Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 38Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 57Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 77Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 123Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 155Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 226Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 280Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.PrivateData } }; 347Dictionary<string, DataClassification> parametersToRedact = new() 391Dictionary<string, DataClassification> parametersToRedact = new() 437Dictionary<string, DataClassification> parametersToRedact = new()
Http\HttpRouteFormatterTests.cs (13)
20var parametersToRedact = new Dictionary<string, DataClassification>(); 93Dictionary<string, DataClassification> parametersToRedact = new() 136Dictionary<string, DataClassification> parametersToRedact = new() 157Dictionary<string, DataClassification> parametersToRedact = new() 218Dictionary<string, DataClassification> parametersToRedact = new() 239Dictionary<string, DataClassification> parametersToRedact = new() 257Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 324Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 353Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 373Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.PrivateData } }; 415Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 435Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 451Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
Latency\Internal\TagCollectionTests.cs (1)
30Dictionary<string, int> namesNumTimes = new Dictionary<string, int>
Latency\LatencyConsoleExtensionsTests.cs (1)
70.AddInMemoryCollection(new Dictionary<string, string?>
Latency\LatencyContextExtensionTests.cs (1)
123.AddInMemoryCollection(new Dictionary<string, string?>
Microsoft.Extensions.Validation.Tests (15)
ValidatableParameterInfoTests.cs (3)
151var typeMapping = new Dictionary<Type, ValidatableTypeInfo> 191var typeMapping = new Dictionary<Type, ValidatableTypeInfo> 312ValidationOptions = new TestValidationOptions(typeMapping ?? new Dictionary<Type, ValidatableTypeInfo>())
ValidatableTypeInfoTests.cs (12)
40var validationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 141ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 193ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 258ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 309ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 340var validationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 392ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 427ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 474ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 515ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 543ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo> 565context.ValidationOptions = new TestValidationOptions(new Dictionary<Type, ValidatableTypeInfo>
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
GeneratorTests.cs (3)
57? new() { ["build_property.ComplianceReportOutputPath"] = Directory.GetCurrentDirectory() } 121var options = new Dictionary<string, string> 148var options = new Dictionary<string, string>
Microsoft.Gen.Logging (2)
Parsing\Parser.cs (1)
48var parameterSymbols = new Dictionary<LoggingMethodParameter, IParameterSymbol>();
Parsing\Parser.LogProperties.cs (1)
105var sensitivePropsFromCtor = new Dictionary<string, List<INamedTypeSymbol>>();
Microsoft.Gen.Logging.Generated.Tests (42)
LogMethodTests.cs (1)
880new Dictionary<string, int>
LogPropertiesRedactionTests.cs (6)
33var expectedState = new Dictionary<string, string?> 59var expectedState = new Dictionary<string, string?> 82var expectedState = new Dictionary<string, string?> 113var expectedState = new Dictionary<string, string?> 142var expectedState = new Dictionary<string, string?> 168var expectedState = new Dictionary<string, string?>
LogPropertiesTests.cs (14)
33P7 = new Dictionary<string, int> 231var expectedState = new Dictionary<string, string?> 305var expectedState = new Dictionary<string, string?> 325var expectedState = new Dictionary<string, string?> 345var expectedState = new Dictionary<string, string?> 368var expectedState = new Dictionary<string, string?> 392var expectedState = new Dictionary<string, string?> 422var expectedState = new Dictionary<string, string?> 451var expectedState = new Dictionary<string, string?> 477var expectedState = new Dictionary<string, string?> 504var expectedState = new Dictionary<string, string?> 528var expectedState = new Dictionary<string, string?> 553var expectedState = new Dictionary<string, string?> 579var expectedState = new Dictionary<string, string?>
TagNameTests.cs (2)
20logger.Collector.LatestRecord.StructuredState.Should().NotBeNull().And.Equal(new Dictionary<string, string?> 27logger.Collector.LatestRecord.StructuredState.Should().NotBeNull().And.Equal(new Dictionary<string, string?>
TagProviderTests.cs (15)
37var expectedState = new Dictionary<string, string?> 60var expectedState = new Dictionary<string, string?> 87var expectedState = new Dictionary<string, string?> 110var expectedState = new Dictionary<string, string?> 142var expectedState = new Dictionary<string, string?> 211var expectedState = new Dictionary<string, string?> 230var expectedState = new Dictionary<string, string?> 250var expectedState = new Dictionary<string, string?> 272var expectedState = new Dictionary<string, string?> 293var expectedState = new Dictionary<string, string?> 313var expectedState = new Dictionary<string, string?> 334var expectedState = new Dictionary<string, string?> 361var expectedState = new Dictionary<string, string?> 399var expectedState = new Dictionary<string, string?> 424var expectedState = new Dictionary<string, string?>
TransitiveTests.cs (4)
22var expectedState = new Dictionary<string, string?> 32expectedState = new Dictionary<string, string?> 49var expectedState = new Dictionary<string, string?> 60expectedState = new Dictionary<string, string?>
Microsoft.Gen.Logging.Unit.Tests (1)
SymbolLoaderTests.cs (1)
31new Dictionary<string, string>(),
Microsoft.Gen.MetadataExtractor (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
281var tagDescriptionMap = new Dictionary<string, string>();
Microsoft.Gen.MetadataExtractor.Unit.Tests (4)
GeneratorTests.cs (4)
74? new() { ["build_property.MetadataReportOutputPath"] = Directory.GetCurrentDirectory() } 125var options = new Dictionary<string, string> 146var options = new Dictionary<string, string> 176var options = new Dictionary<string, string>
Microsoft.Gen.Metrics (1)
Parser.cs (1)
281var tagDescriptionMap = new Dictionary<string, string>();
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
281var tagDescriptionMap = new Dictionary<string, string>();
Microsoft.Gen.MetricsReports.Unit.Tests (6)
EmitterTests.cs (2)
29DimensionsDescriptions = new Dictionary<string, string> 72DimensionsDescriptions = new Dictionary<string, string>
GeneratorTests.cs (4)
39? new() { ["build_property.MetricsReportOutputPath"] = Directory.GetCurrentDirectory() } 86var options = new Dictionary<string, string> 102var options = new Dictionary<string, string> 129var options = new Dictionary<string, string>
Microsoft.Interop.ComInterfaceGenerator (4)
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (1)
53var methodsOfInterest = new Dictionary<ISymbol, ImmutableArray<Func<IInvocationOperation, (ITypeSymbol, Location)?>>>(SymbolEqualityComparer.Default);
ComInterfaceContext.cs (2)
32Dictionary<string, ComInterfaceInfo> nameToInterfaceInfoMap = new(); 38Dictionary<string, DiagnosticOr<ComInterfaceContext>> nameToContextCache = new();
ComMethodContext.cs (1)
164var allMethodsCache = new Dictionary<ComInterfaceContext, ImmutableArray<Builder>>();
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\CustomMarshallerAttributeFixer.cs (2)
32Dictionary<(INamedTypeSymbol marshallerType, ITypeSymbol managedType, bool isLinearCollectionMarshaller), HashSet<string>> uniqueMarshallersToFix = new(); 55Dictionary<INamedTypeSymbol, INamedTypeSymbol> partiallyUpdatedSymbols = new(SymbolEqualityComparer.Default);
Microsoft.Interop.SourceGeneration (3)
ManualTypeMarshallingHelper.cs (1)
163Dictionary<MarshalMode, CustomTypeMarshallerData> modes = new();
Marshalling\MarshallerHelpers.cs (1)
124Dictionary<U, int> elementIndexToEdgeMapNodeId = new(elements.Count);
Marshalling\NoMarshallingInfoErrorResolver.cs (1)
41=> ImmutableDictionary.CreateRange(new Dictionary<ManagedTypeInfo, string>
Microsoft.JSInterop (2)
Infrastructure\DotNetDispatcher.cs (2)
401var result = new Dictionary<string, (MethodInfo, Type[])>(StringComparer.Ordinal); 438var result = new Dictionary<string, (MethodInfo, Type[])>(StringComparer.Ordinal);
Microsoft.JSInterop.Tests (2)
JSInProcessRuntimeTest.cs (1)
44new Dictionary<string, object>
JSRuntimeTest.cs (1)
275new Dictionary<string, object>
Microsoft.Maui (20)
Animations\Lerp.cs (1)
9 public static readonly Dictionary<Type, Lerp> Lerps = new Dictionary<Type, Lerp>()
CommandMapper.cs (1)
9 readonly Dictionary<string, Command> _mapper = new(StringComparer.Ordinal);
Extensions\EnumerableExtensions.cs (1)
39 var result = new Dictionary<TKey, List<TSource>>();
Fonts\FontRegistrar.cs (3)
13 readonly Dictionary<string, (string Filename, string? Alias, Assembly Assembly)> _embeddedFonts = new(StringComparer.Ordinal); 14 readonly Dictionary<string, (string Filename, string? Alias)> _nativeFonts = new(StringComparer.Ordinal); 15 readonly Dictionary<string, string?> _fontLookupCache = new(StringComparer.Ordinal);
Handlers\HybridWebView\FileExtensionContentTypeProvider.cs (1)
30 : this(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Handlers\HybridWebView\HybridWebViewQueryStringHelper.cs (1)
32 var result = new Dictionary<string, string>();
Hosting\ImageSources\ImageSourceToImageSourceServiceTypeMapping.cs (2)
15 private readonly Dictionary<Type, Type> _concreteTypeMapping = new(); 16 private readonly Dictionary<Type, Type> _interfaceTypeMapping = new();
Hosting\Internal\MauiServiceCollection.cs (1)
12 readonly Dictionary<Type, ServiceDescriptor> _descriptorDictionary = new Dictionary<Type, ServiceDescriptor>();
HotReload\HotReloadHelper.cs (3)
117 static Dictionary<string, Type> replacedViews = new(StringComparer.Ordinal); 118 static Dictionary<IHotReloadableView, object[]> currentViews = new Dictionary<IHotReloadableView, object[]>(); 119 static Dictionary<string, List<KeyValuePair<Type, Type>>> replacedHandlers = new(StringComparer.Ordinal);
Layouts\GridLayoutManager.cs (1)
83 readonly Dictionary<SpanKey, Span> _spans = new();
LifecycleEvents\LifecycleEventService.cs (1)
9 readonly Dictionary<string, List<Delegate>> _mapper = new(StringComparer.Ordinal);
PropertyMapper.cs (2)
20 protected readonly Dictionary<string, Action<IElementHandler, IElement>> _mapper = new(StringComparer.Ordinal); 186 var cachedMappers = new Dictionary<string, Action<IElementHandler, IElement>?>(cacheSize);
VisualDiagnostics\VisualDiagnosticsOverlay.Standard.cs (1)
7 readonly Dictionary<IScrollView, object> _scrollViews = new();
WeakEventManager.cs (1)
13 readonly Dictionary<string, List<Subscription>> _eventHandlers = new(StringComparer.Ordinal);
Microsoft.Maui.Controls (44)
AnimationExtensions.cs (2)
60 s_animations = new Dictionary<AnimatableKey, Info>(); 61 s_kinetics = new Dictionary<AnimatableKey, int>();
Application\Application.cs (1)
418 readonly Dictionary<string, WeakReference<Window>> _requestedWindows = new(StringComparer.Ordinal);
AppLinkEntry.cs (1)
15 keyValues = new(StringComparer.Ordinal);
BindableObject.cs (2)
41 internal Dictionary<TriggerBase, SetterSpecificity> _triggerSpecificity = new Dictionary<TriggerBase, SetterSpecificity>(); 42 readonly Dictionary<BindableProperty, BindablePropertyContext> _properties = new Dictionary<BindableProperty, BindablePropertyContext>(4);
BindableProperty.cs (3)
43 internal static readonly Dictionary<Type, TypeConverter> KnownTypeConverters = new Dictionary<Type, TypeConverter> 51 internal static readonly Dictionary<Type, IValueConverter> KnownIValueConverters = new Dictionary<Type, IValueConverter> 58 internal static readonly Dictionary<Type, Type[]> SimpleConvertTypes = new Dictionary<Type, Type[]>
DataTemplate.cs (2)
41 public IDictionary<BindableProperty, BindingBase> Bindings { get; } = new Dictionary<BindableProperty, BindingBase>(); 44 public IDictionary<BindableProperty, object> Values { get; } = new Dictionary<BindableProperty, object>();
DataTemplateSelector.cs (1)
10 Dictionary<Type, DataTemplate> _dataTemplates = new Dictionary<Type, DataTemplate>();
DependencyService.cs (1)
20 static readonly Dictionary<Type, DependencyData> DependencyImplementations = new Dictionary<Type, DependencyData>();
DragAndDrop\DataPackagePropertySet.cs (1)
16 _propertyBag = new(StringComparer.Ordinal);
Element\Element.cs (1)
369 Dictionary<BindableProperty, (string, SetterSpecificity)> DynamicResources => _dynamicResources ?? (_dynamicResources = new Dictionary<BindableProperty, (string, SetterSpecificity)>());
Hosting\Effects\AppHostBuilderExtensions.cs (1)
72 internal Dictionary<Type, Func<PlatformEffect>> RegisteredEffects { get; } = new Dictionary<Type, Func<PlatformEffect>>();
Internals\NameScope.cs (2)
17 readonly Dictionary<string, object> _names = new(StringComparer.Ordinal); 18 readonly Dictionary<object, string> _values = new Dictionary<object, string>();
Layout\AbsoluteLayout.cs (1)
21 readonly Dictionary<IView, AbsoluteLayoutInfo> _viewInfo = new();
Layout\FlexLayout.cs (1)
256 readonly Dictionary<IView, FlexInfo> _viewInfo = new();
Layout\Grid.cs (1)
12 readonly Dictionary<IView, GridInfo> _viewInfo = new();
LegacyLayouts\RelativeLayout.cs (1)
70 var solveTable = new Dictionary<View, bool>();
ListProxy.cs (1)
316 _items = new Dictionary<int, object>();
MessagingCenter.cs (1)
108 new Dictionary<Sender, List<Subscription>>();
OrderedDictionary.cs (1)
63 _dict = new Dictionary<TKey, TValue>(capacity, equalityComparer);
PlatformConfigurationRegistry.cs (1)
12 readonly Dictionary<Type, object> _platformSpecifics = new Dictionary<Type, object>();
Registrar.cs (4)
45 readonly Dictionary<Type, Dictionary<Type, HandlerType>> _handlers = new Dictionary<Type, Dictionary<Type, HandlerType>>(); 64 visualRenderers = new Dictionary<Type, HandlerType>(); 312 internal static Dictionary<string, EffectType> Effects { get; } = new(StringComparer.Ordinal); 359 var properties = new Dictionary<string, IList<StylePropertyAttribute>>(StringComparer.Ordinal);
ResourceDictionary.cs (1)
23 readonly Dictionary<string, object> _innerDictionary = new(StringComparer.Ordinal);
ResourcesExtensions.cs (3)
17 resources = resources ?? new(StringComparer.Ordinal); 36 resources = resources ?? new Dictionary<string, object>(8, StringComparer.Ordinal); 49 resources = resources ?? new(StringComparer.Ordinal);
Routing.cs (2)
13 static Dictionary<string, RouteFactory> s_routes = new(StringComparer.Ordinal); 14 static Dictionary<string, Page> s_implicitPageRoutes = new(StringComparer.Ordinal);
Shell\ShellNavigationQueryParameters.cs (1)
10 Dictionary<string, object> _internal = new Dictionary<string, object>();
Shell\ShellRouteParameters.cs (1)
105 Dictionary<string, string> lookupDict = new(StringComparer.Ordinal);
StyleSheets\Style.cs (2)
17 public IDictionary<string, string> Declarations { get; set; } = new Dictionary<string, string>(StringComparer.Ordinal); 18 Dictionary<KeyValuePair<string, string>, object> convertedValues = new Dictionary<KeyValuePair<string, string>, object>();
StyleSheets\StyleSheet.cs (1)
21 internal IDictionary<Selector, Style> Styles { get; set; } = new Dictionary<Selector, Style>();
TemplatedItemsList.cs (1)
1231 readonly Dictionary<TemplatedItemsList<TView, TItem>, string> _oldNames = new Dictionary<TemplatedItemsList<TView, TItem>, string>();
VisualElement\VisualElement.cs (1)
503 readonly Dictionary<Size, SizeRequest> _measureCache = new Dictionary<Size, SizeRequest>();
Visuals\VisualTypeConverter.cs (1)
28 var mappings = new Dictionary<string, IVisual>(StringComparer.OrdinalIgnoreCase);
Microsoft.Maui.Controls.Build.Tasks (16)
ILContext.cs (4)
16 Values = new Dictionary<IValueNode, object>(); 17 Variables = new Dictionary<IElementNode, VariableDefinition>(); 18 Scopes = new Dictionary<INode, Tuple<VariableDefinition, IList<string>>>(); 19 TypeExtensions = new Dictionary<INode, TypeReference>();
PerformanceProvider.cs (1)
21 readonly Dictionary<string, Statistic> _Statistics = new(StringComparer.Ordinal);
SetPropertiesVisitor.cs (3)
867 var locs = new Dictionary<TypeReference, VariableDefinition>(); 963 var locs = new Dictionary<TypeReference, VariableDefinition>(); 1096 var locs = new Dictionary<TypeReference, VariableDefinition>();
XamlCache.cs (8)
14 readonly Dictionary<ModuleDefinition, IList<XmlnsDefinitionAttribute>> _xmlnsDefinitions = new(); 15 readonly Dictionary<TypeReference, TypeDefinition> _resolvedTypes = new(); 16 readonly Dictionary<(ModuleDefinition module, string fieldRefKey), FieldReference> _fieldReferenceCache = new(); 17 readonly Dictionary<(ModuleDefinition module, string typeKey), TypeReference> _typeReferenceCache = new(); 18 readonly Dictionary<(ModuleDefinition module, string methodRefKey), MethodReference> _methodReferenceCache = new(); 19 readonly Dictionary<(ModuleDefinition module, (string assemblyName, string clrNamespace, string typeName)), TypeDefinition> _typeDefinitionCache = new(); 20 readonly Dictionary<VariableDefinition, ICollection<string>> _resourceNamesInUse = new(); 56 public Dictionary<TypeReference, Type> GetKnownCompiledTypeConverters(ModuleDefinition module) => _knownCompiledTypeConverters ??= new(TypeRefComparer.Default)
Microsoft.Maui.Controls.SourceGen (2)
CodeBehindGenerator.cs (1)
244 return new Dictionary<XmlType, string>();
src\Controls\src\Xaml\XamlNode.cs (1)
161 Properties = new Dictionary<XmlName, INode>();
Microsoft.Maui.Controls.Xaml (7)
HydrationContext.cs (2)
11 Values = new Dictionary<INode, object>(); 12 Types = new Dictionary<IElementNode, Type>();
NamescopingVisitor.cs (1)
8 readonly Dictionary<INode, NameScopeRef> _scopes = new Dictionary<INode, NameScopeRef>();
XamlLoader.cs (1)
259 static readonly Dictionary<Type, string> XamlResources = new Dictionary<Type, string>();
XamlNode.cs (1)
161 Properties = new Dictionary<XmlName, INode>();
XamlServiceProvider.cs (2)
14 readonly Dictionary<Type, object> services = new Dictionary<Type, object>(); 286 readonly Dictionary<string, string> namespaces = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.Maui.Essentials (5)
FilePicker\FilePicker.shared.cs (1)
140 fileTypes = new Dictionary<DevicePlatform, IEnumerable<string>>();
Types\Shared\WebUtils.shared.cs (1)
11 var parameters = new Dictionary<string, string>(StringComparer.Ordinal);
VersionTracking\VersionTracking.shared.cs (2)
241 versionTrail = new(StringComparer.Ordinal) 249 versionTrail = new(StringComparer.Ordinal)
WebAuthenticator\WebAuthenticatorResult.shared.cs (1)
76 public Dictionary<string, string> Properties { get; set; } = new(StringComparer.Ordinal);
Microsoft.Maui.Graphics (1)
Text\TextColors.cs (1)
9 public static Dictionary<string, string> StandardColors = new(StringComparer.OrdinalIgnoreCase)
Microsoft.Maui.Graphics.Text.Markdig (1)
Renderer\SimpleCssParser.cs (1)
13 var values = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.Maui.Resizetizer (6)
ColorTable.cs (1)
17 var colors = new Dictionary<string, SKColor>(StringComparer.OrdinalIgnoreCase);
DetectInvalidResourceOutputFilenamesTask.cs (1)
25 var tempInvalidItems = new Dictionary<ITaskItem, string>();
ResizetizeImages.cs (2)
107 var attr = new Dictionary<string, string>(StringComparer.Ordinal); 132 var imagesPairs = new Dictionary<string, ResizeImageInfo>();
TizenResourceXmlGenerator.cs (1)
10 static readonly IDictionary<string, string> resolutionMap = new Dictionary<string, string>(StringComparer.Ordinal)
TizenSplashUpdater.cs (1)
19 static public Dictionary<(string Resolution, string Orientation), string> splashDpiMap = new Dictionary<(string, string), string>();
Microsoft.ML.AutoML (22)
API\Pipeline.cs (1)
48Properties = properties ?? new Dictionary<string, object>();
ColumnInference\ColumnInformationUtil.cs (1)
147var result = new Dictionary<ColumnPurpose, int>();
EstimatorExtensions\EstimatorExtensionCatalog.cs (1)
31Dictionary<EstimatorName, Type>()
EstimatorExtensions\EstimatorExtensions.cs (2)
304var pipelineNodeProperty = new Dictionary<string, object>() 329var pipelineNodeProperty = new Dictionary<string, object>()
SweepableEstimator\MultiModelPipeline.cs (1)
22_estimators = new Dictionary<string, SweepableEstimator>();
SweepableEstimator\SweepablePipeline.cs (2)
21private readonly Dictionary<string, SweepableEstimator> _estimators = new Dictionary<string, SweepableEstimator>(); 68_estimators = new Dictionary<string, SweepableEstimator>();
Sweepers\ISweeper.cs (2)
85_parameterValues = new Dictionary<string, IParameterValue>(); 141new ParameterSet(new Dictionary<string, IParameterValue>(_parameterValues), _hash);
TrainerExtensions\BinaryTrainerExtensions.cs (1)
53additionalProperties = new Dictionary<string, object>()
TrainerExtensions\RankingTrainerExtensions.cs (1)
54var property = new Dictionary<string, object>();
TrainerExtensions\RecommendationTrainerExtensions.cs (1)
27var property = new Dictionary<string, object>();
TrainerExtensions\TrainerExtensionCatalog.cs (1)
14new Dictionary<TrainerName, Type>()
TrainerExtensions\TrainerExtensionUtil.cs (3)
107Properties = new Dictionary<string, object>() 144var props = new Dictionary<string, object>(); 166props = new Dictionary<string, object>();
Tuner\AutoZeroTuner.cs (1)
24private readonly Dictionary<int, Config> _configLookBook = new Dictionary<int, Config>();
Tuner\CostFrugalTuner.cs (2)
17private readonly Dictionary<int, SearchThread> _searchThreadPool = new Dictionary<int, SearchThread>(); 19private readonly Dictionary<int, int> _trialProposedBy = new Dictionary<int, int>();
Tuner\EciCfoTuner.cs (1)
28_tuners = new Dictionary<string, ITuner>();
Tuner\PipelineProposer.cs (1)
50_estimatorCost = new Dictionary<EstimatorType, double>()
Microsoft.ML.AutoML.Tests (9)
EstimatorExtensionTests.cs (1)
29Properties = new Dictionary<string, object> { }
TrainerExtensionsTests.cs (3)
312var props = new Dictionary<string, object>() 318Properties = new Dictionary<string, object>() 343var props = new Dictionary<string, object>()
TunerTests.cs (4)
37var tunerCandidates = new Dictionary<string, ITuner>() 243var tunerCandidates = new Dictionary<string, ITuner>() 298var tunerCandidates = new Dictionary<string, ITuner>() 347var tunerCandidates = new Dictionary<string, ITuner>()
Utils\TaskAgnosticIterationResult.cs (1)
16internal Dictionary<string, double> MetricValues = new Dictionary<string, double>();
Microsoft.ML.CodeGenerator (15)
CodeGenerator\CSharp\CodeGeneratorSettings.cs (1)
18OnnxInputMapping = new Dictionary<string, ColumnMapping>();
CodeGenerator\CSharp\TrainerGeneratorBase.cs (1)
41_arguments = new Dictionary<string, object>();
CodeGenerator\CSharp\TrainerGenerators.cs (13)
24new Dictionary<string, string>() 95new Dictionary<string, string>() 126new Dictionary<string, string>() 238new Dictionary<string, string>() 265new Dictionary<string, string>() 324new Dictionary<string, string>() 358new Dictionary<string, string>() 388new Dictionary<string, string>() 418new Dictionary<string, string>() 489new Dictionary<string, string>() 522new Dictionary<string, string>() 600new Dictionary<string, string>(); 619new Dictionary<string, string>()
Microsoft.ML.CodeGenerator.Tests (65)
ApprovalTests\ConsoleCodeGeneratorTests.cs (7)
545var hyperParam = new Dictionary<string, object>() 684new Dictionary<string, object>() 723var hyperParam = new Dictionary<string, object>() 772new Dictionary<string, object>() 851var mapping = new Dictionary<string, CodeGeneratorSettings.ColumnMapping>() 982new Dictionary<string, object>() 1019var mapping = new Dictionary<string, CodeGeneratorSettings.ColumnMapping>()
ApprovalTests\TemplateTest.cs (1)
37SampleData = new Dictionary<string, string>()
CodeGenTests.cs (6)
28var elementProperties = new Dictionary<string, object>() 48var elementProperties = new Dictionary<string, object>() 68var elementProperties = new Dictionary<string, object>(); 82var elementProperties = new Dictionary<string, object>(); 123var elementProperties = new Dictionary<string, object>() 125{"Booster", new CustomProperty(){Properties= new Dictionary<string, object>(), Name = "TreeBooster"} },
TrainerGeneratorTests.cs (40)
30var elementProperties = new Dictionary<string, object>() 58var elementProperties = new Dictionary<string, object>() 79var elementProperties = new Dictionary<string, object>() 102var elementProperties = new Dictionary<string, object>(); 119var elementProperties = new Dictionary<string, object>() 139var elementProperties = new Dictionary<string, object>(); 156var elementProperties = new Dictionary<string, object>() 176var elementProperties = new Dictionary<string, object>(); 193var elementProperties = new Dictionary<string, object>() 213var elementProperties = new Dictionary<string, object>(); 230var elementProperties = new Dictionary<string, object>() 250var elementProperties = new Dictionary<string, object>(); 267var elementProperties = new Dictionary<string, object>() 286var elementProperties = new Dictionary<string, object>(); 300var elementProperties = new Dictionary<string, object>() 327var elementProperties = new Dictionary<string, object>(); 344var elementProperties = new Dictionary<string, object>() 364var elementProperties = new Dictionary<string, object>(); 381var elementProperties = new Dictionary<string, object>() 401var elementProperties = new Dictionary<string, object>(); 418var elementProperties = new Dictionary<string, object>() 438var elementProperties = new Dictionary<string, object>(); 455var elementProperties = new Dictionary<string, object>() 475var elementProperties = new Dictionary<string, object>(); 492var elementProperties = new Dictionary<string, object>() 512var elementProperties = new Dictionary<string, object>(); 529var elementProperties = new Dictionary<string, object>() 550var elementProperties = new Dictionary<string, object>(); 567var elementProperties = new Dictionary<string, object>() 588var elementProperties = new Dictionary<string, object>(); 605var elementProperties = new Dictionary<string, object>() 626var elementProperties = new Dictionary<string, object>(); 643var elementProperties = new Dictionary<string, object>() 664var elementProperties = new Dictionary<string, object>(); 680var elementProperties = new Dictionary<string, object>() 701var elementProperties = new Dictionary<string, object>(); 718var elementProperties = new Dictionary<string, object>() 739var elementProperties = new Dictionary<string, object>(); 756var elementProperties = new Dictionary<string, object>() 774var elementProperties = new Dictionary<string, object>();
TransformGeneratorTests.cs (11)
25var elementProperties = new Dictionary<string, object>();//categorical 39var elementProperties = new Dictionary<string, object>();//categorical 53var elementProperties = new Dictionary<string, object>(); 67var elementProperties = new Dictionary<string, object>(); 81var elementProperties = new Dictionary<string, object>();//nume to num feature 2 95var elementProperties = new Dictionary<string, object>(); 109var elementProperties = new Dictionary<string, object>();//numeric feature 123var elementProperties = new Dictionary<string, object>(); 137var elementProperties = new Dictionary<string, object>(); 151var elementProperties = new Dictionary<string, object>(); 165var elementProperties = new Dictionary<string, object>();
Microsoft.ML.Core (14)
CommandLine\CmdParser.cs (1)
468var map = new Dictionary<string, Argument>();
ComponentModel\ComponentCatalog.cs (5)
77_classesByKey = new Dictionary<LoadableClassInfo.Key, LoadableClassInfo>(); 79_signatures = new Dictionary<Type, bool>(); 82_entryPointMap = new Dictionary<string, EntryPointInfo>(); 83_componentMap = new Dictionary<string, ComponentInfo>(); 86_extensionsMap = new Dictionary<(Type AttributeType, string ContractName), Type>();
Data\Repository.cs (1)
469_entries = new Dictionary<string, ZipArchiveEntry>();
Data\RoleMappedSchema.cs (2)
219var map = new Dictionary<string, List<DataViewSchema.Column>>(); 313var copy = new Dictionary<string, IReadOnlyList<DataViewSchema.Column>>(map.Count);
Data\ServerChannel.cs (1)
134_toPublish = new Dictionary<string, Delegate>();
Utilities\LruCache.cs (1)
35_cache = new Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>>(_size);
Utilities\Tree.cs (1)
88_children = new Dictionary<TKey, Tree<TKey, TValue>>();
Utilities\Utils.cs (2)
161map = new Dictionary<TKey, TValue>(); 169map = new Dictionary<TKey, TValue>();
Microsoft.ML.Core.Tests (5)
UnitTests\ColumnTypes.cs (1)
23var dict = new Dictionary<DataViewType, string>();
UnitTests\TestEntryPoints.cs (4)
3350var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 3351var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 3402var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 3403var inputMap = new Dictionary<ParameterBinding, VariableBinding>();
Microsoft.ML.CpuMath.UnitTests (2)
UnitTests.cs (2)
100_disableAvxEnvironmentVariables = new Dictionary<string, string>() 105_disableAvxAndSseEnvironmentVariables = new Dictionary<string, string>()
Microsoft.ML.Data (65)
Commands\DataCommand.cs (2)
155Dictionary<string, double> averageMetric = new Dictionary<string, double>(); 196Dictionary<string, double> newAverageMetric = new Dictionary<string, double>();
Commands\TypeInfoCommand.cs (2)
84var dstToSrcMap = new Dictionary<HashSet<InternalDataKind>, HashSet<InternalDataKind>>(comp); 85var srcToDstMap = new Dictionary<InternalDataKind, HashSet<InternalDataKind>>();
Data\Conversion.cs (8)
105_delegatesStd = new Dictionary<(Type src, Type dst), Delegate>(); 106_delegatesAll = new Dictionary<(Type src, Type dst), Delegate>(); 107_isNADelegates = new Dictionary<Type, Delegate>(); 108_hasNADelegates = new Dictionary<Type, Delegate>(); 109_isDefaultDelegates = new Dictionary<Type, Delegate>(); 110_hasZeroDelegates = new Dictionary<Type, Delegate>(); 111_getNADelegates = new Dictionary<Type, Delegate>(); 112_tryParseDelegates = new Dictionary<Type, Delegate>();
Data\DataViewTypeManager.cs (2)
39private static readonly Dictionary<TypeWithAttributes, DataViewType> _rawTypeToDataViewTypeMap = new Dictionary<TypeWithAttributes, DataViewType>(); 44private static readonly Dictionary<DataViewType, TypeWithAttributes> _dataViewTypeToRawTypeMap = new Dictionary<DataViewType, TypeWithAttributes>();
Data\SchemaDefinition.cs (1)
245AnnotationInfos = new Dictionary<string, AnnotationInfo>();
DataLoadSave\Binary\BinaryLoader.cs (1)
330var map = new Dictionary<string, MetadataTableOfContentsEntry>();
DataLoadSave\Binary\CodecFactory.cs (2)
45_loadNameToCodecCreator = new Dictionary<string, GetCodecFromStreamDelegate>(); 46_simpleCodecTypeMap = new Dictionary<Type, IValueCodec>();
DataLoadSave\Binary\UnsafeTypeOps.cs (1)
32_type2ops = new Dictionary<Type, object>();
DataLoadSave\Database\DatabaseLoader.cs (1)
481var nameToInfoIndex = new Dictionary<string, int>(Infos.Length);
DataLoadSave\Text\TextLoader.cs (2)
757var nameToInfoIndex = new Dictionary<string, int>(Infos.Length); 927var nameToInfoIndex = new Dictionary<string, int>(Infos.Length);
DataLoadSave\Text\TextLoaderParser.cs (2)
693var mapOne = new Dictionary<InternalDataKind, Func<RowSet, ColumnPipe>>(); 694var mapVec = new Dictionary<InternalDataKind, Func<RowSet, ColumnPipe>>();
DataView\ArrayDataViewBuilder.cs (2)
43_getSlotNames = new Dictionary<string, ValueGetter<VBuffer<ReadOnlyMemory<char>>>>(); 44_getKeyValues = new Dictionary<string, ValueGetter<VBuffer<ReadOnlyMemory<char>>>>();
DataView\InternalSchemaDefinition.cs (1)
76Annotations = metadataInfos == null ? new Dictionary<string, AnnotationInfo>()
DataView\Transposer.cs (2)
107_nameToICol = new Dictionary<string, int>(); 753var nameToCol = new Dictionary<string, int>();
Deprecated\Instances\HeaderSchema.cs (2)
212var dict = new Dictionary<int, string>(); 280var lookup = new Dictionary<string, int>();
EntryPoints\EntryPointNode.cs (7)
273_vars = new Dictionary<string, EntryPointVariable>(); 487_inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 488_inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 510_outputMap = new Dictionary<string, string>(); 603var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 604var inputParamBindingMap = new Dictionary<ParameterBinding, VariableBinding>(); 748var toModify = new Dictionary<string, string>();
EntryPoints\InputBuilder.cs (3)
382result.Add(attr.Input.Name ?? field.Name, builder.GetJsonObject(instanceVal, new Dictionary<string, List<ParameterBinding>>(), 383new Dictionary<ParameterBinding, VariableBinding>())); 593var dict = new Dictionary<string, T>();
Evaluators\AnomalyDetectionEvaluator.cs (1)
204var result = new Dictionary<string, IDataView>();
Evaluators\BinaryClassifierEvaluator.cs (1)
369var result = new Dictionary<string, IDataView>();
Evaluators\ClusteringEvaluator.cs (1)
214var result = new Dictionary<string, IDataView>
Evaluators\EvaluatorBase.cs (1)
410_dict = new Dictionary<TStrat, TAgg>();
Evaluators\EvaluatorUtils.cs (7)
39var tmp = new Dictionary<string, Func<IHostEnvironment, IMamlEvaluator>> 466var slotNames = new Dictionary<string, int>(); 611var keyNames = new Dictionary<ReadOnlyMemory<char>, int>(); 679var keyNames = new Dictionary<ReadOnlyMemory<char>, int>(); 813var vectorSizes = new Dictionary<string, int>(); 814var firstDvSlotNames = new Dictionary<string, VBuffer<ReadOnlyMemory<char>>>(); 817var firstDvKeyNoNamesColumns = new Dictionary<string, ulong>();
Evaluators\MulticlassClassificationEvaluator.cs (1)
246var result = new Dictionary<string, IDataView>
Evaluators\MultiOutputRegressionEvaluator.cs (1)
160var result = new Dictionary<string, IDataView>();
Evaluators\RankingEvaluator.cs (1)
238var result = new Dictionary<string, IDataView>();
Evaluators\RegressionEvaluatorBase.cs (1)
108var result = new Dictionary<string, IDataView>();
Model\Pfa\BoundPfaContext.cs (1)
53_nameToVarName = new Dictionary<string, string>();
Transforms\ColumnBindingsBase.cs (1)
311_nameToInfoIndex = new Dictionary<string, int>(names.Length);
Transforms\ColumnSelecting.cs (1)
566var columnDict = new Dictionary<string, List<int>>();
Transforms\InvertHashUtils.cs (1)
182_slotToValueSet = new Dictionary<int, HashSet<Pair>>();
Transforms\NAFilter.cs (2)
102_srcIndexToInfoIndex = new Dictionary<int, int>(_infos.Length); 139_srcIndexToInfoIndex = new Dictionary<int, int>(_infos.Length);
Transforms\OneToOneTransformerBase.cs (1)
101ColMapNewToOld = new Dictionary<int, int>();
Transforms\ValueMapping.cs (2)
319Dictionary<TValue, uint> keyTypeValueMapping = new Dictionary<TValue, uint>(); 844return new Dictionary<TKey, TValue>();
Microsoft.ML.DataView (2)
DataViewSchema.cs (2)
431var nameMap = new Dictionary<string, int>(); 453_nameMap = new Dictionary<string, int>();
Microsoft.ML.EntryPoints (41)
CrossValidationMacro.cs (13)
179var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 180var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 185var outputMap = new Dictionary<string, string>(); 208var mapping = new Dictionary<string, string>(); 239inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 240inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 247outputMap = new Dictionary<string, string>(); 255inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 256inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 266outputMap = new Dictionary<string, string>(); 318var combineInputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 319var combineInputMap = new Dictionary<ParameterBinding, VariableBinding>(); 337var combineOutputMap = new Dictionary<string, string>();
MacroUtils.cs (6)
124var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 125var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 135var outputMap = new Dictionary<string, string>(); 147var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 148var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 158var outputMap = new Dictionary<string, string>();
OneVersusAllMacro.cs (7)
60var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 61var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 66var outputMap = new Dictionary<string, string>(); 78var mapping = new Dictionary<string, string>(); 172var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 173var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 182var outputMap = new Dictionary<string, string>();
TrainTestMacro.cs (15)
168inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 169inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 179outputMap = new Dictionary<string, string>(); 191inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 192inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 203outputMap = new Dictionary<string, string>(); 225inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 226inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 237outputMap = new Dictionary<string, string>(); 248inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 249inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 255outputMap = new Dictionary<string, string>(); 270inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 271inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 277outputMap = new Dictionary<string, string>();
Microsoft.ML.Fairlearn (4)
Metrics\FairlearnMetricCatalog.cs (4)
118Dictionary<string, double> metricsDict = new Dictionary<string, double> 187var groupMetric = new Dictionary<object, RegressionMetrics>(); 244Dictionary<string, double> diffDict = new Dictionary<string, double>(); 259Dictionary<string, double> metricsDict = new Dictionary<string, double>
Microsoft.ML.FastTree (12)
Dataset\Dataset.cs (4)
338Dictionary<string, DatasetSkeletonQueryDocData> newAuxData = new Dictionary<string, DatasetSkeletonQueryDocData>(); 455AuxiliaryData = new Dictionary<string, DatasetSkeletonQueryDocData>(); 487AuxiliaryData = new Dictionary<string, DatasetSkeletonQueryDocData>(); 806Dictionary<string, bool> auxNames = new Dictionary<string, bool>();
Dataset\DatasetUtils.cs (1)
48Dictionary<uint, int> uvalToOrder = new Dictionary<uint, int>();
FastTree.cs (1)
3301var keyValues = new Dictionary<string, object>();
GamModelParameters.cs (2)
104_inputFeatureToShapeFunctionMap = new Dictionary<int, int>(_shapeToInputMap.Length); 148_inputFeatureToShapeFunctionMap = new Dictionary<int, int>(len);
Training\ScoreTracker.cs (2)
144private static readonly Dictionary<int, Dictionary<int, double>> _treeMultiplierMap = new Dictionary<int, Dictionary<int, double>>(); 154_treeMultiplierMap[t] = new Dictionary<int, double>();
TreeEnsemble\InternalRegressionTree.cs (1)
1174Dictionary<int, int> categoricalSplitNodeToId = new Dictionary<int, int>();
TreeEnsemble\InternalTreeEnsemble.cs (1)
119Dictionary<int, int> featureToID = new Dictionary<int, int>(); //Mapping from feature to ini input id
Microsoft.ML.GenAI.Core (4)
Extension\ModuleExtension.cs (4)
33return new(); 37var dict = new Dictionary<string, long>(); 176var deviceMap = new Dictionary<string, string>(); 219var deviceMap = new Dictionary<string, string>();
Microsoft.ML.GenAI.Core.Tests (2)
QuantizedLinearTests.cs (2)
84model.load_state_dict(new Dictionary<string, Tensor> 112model.load_state_dict(new Dictionary<string, Tensor>
Microsoft.ML.GenAI.LLaMA (2)
LlamaTextCompletionService.cs (1)
27public IReadOnlyDictionary<string, object?> Attributes => new Dictionary<string, object?>()
LlamaTokenizerHelper.cs (1)
27private static readonly Dictionary<string, int> _specialTokens = new()
Microsoft.ML.GenAI.Mistral (2)
Mistral_7B_0_3ChatTemplateBuilder.cs (1)
171var propertiesSchemas = new Dictionary<string, JsonSchema>();
MistralTokenizerHelper.cs (1)
63var specialTokens = new Dictionary<string, int>
Microsoft.ML.GenAI.Phi (3)
Phi2\Phi2ForCasualLM.cs (1)
62var loadedParameters = new Dictionary<string, bool>();
Phi3\Phi3CausalLMTextGenerationService.cs (1)
23public IReadOnlyDictionary<string, object?> Attributes => new Dictionary<string, object?>()
Phi3\Phi3TokenizerHelper.cs (1)
40specialTokens: new Dictionary<string, int>
Microsoft.ML.GenAI.Samples (1)
Mistral\Mistral_7B_Instruct.cs (1)
135functionMap: new Dictionary<string, Func<string, Task<string>>>
Microsoft.ML.ImageAnalytics (1)
MLImage.cs (1)
427private static readonly Dictionary<string, SKEncodedImageFormat> _extensionToEncodingFormat = new Dictionary<string, SKEncodedImageFormat>(StringComparer.OrdinalIgnoreCase)
Microsoft.ML.IntegrationTests (2)
Common.cs (2)
29var types = new Dictionary<string, Type>(); 30var counts = new Dictionary<string, int>();
Microsoft.ML.InternalCodeAnalyzer (1)
BestFriendAnalyzer.cs (1)
63var assemblyHasAttrMap = new Dictionary<IAssemblySymbol, bool>(SymbolEqualityComparer.Default);
Microsoft.ML.LightGbm (6)
LightGbmArguments.cs (1)
37private protected static Dictionary<string, string> NameMapping = new Dictionary<string, string>()
LightGbmTrainerBase.cs (3)
54private protected static Dictionary<string, string> NameMapping = new Dictionary<string, string>() 284Dictionary<string, object> res = new Dictionary<string, object>(); 891Dictionary<int, float> ivPair = new Dictionary<int, float>();
WrappedLightGbmBooster.cs (2)
203Dictionary<string, string> parameters = new Dictionary<string, string>(); 233Dictionary<string, string> kvPairs = new Dictionary<string, string>();
Microsoft.ML.NugetPackageVersionUpdater (1)
Program.cs (1)
27Dictionary<string, string> packageVersions = new Dictionary<string, string>();
Microsoft.ML.OnnxConverter (1)
OnnxContextImpl.cs (1)
52_columnNameMap = new Dictionary<string, string>();
Microsoft.ML.OnnxTransformer (7)
OnnxTransform.cs (2)
247var shapeDictionary = new Dictionary<string, int[]>(); 671Outputs = new Dictionary<string, DisposableNamedOnnxValue>();
OnnxUtils.cs (5)
262var inputTypePool = new Dictionary<string, DataViewType>(); 266var initializerTypePool = new Dictionary<string, DataViewType>(); 270var outputTypePool = new Dictionary<string, DataViewType>(); 272var casterPool = new Dictionary<string, Func<NamedOnnxValue, object>>(); 511new Dictionary<Type, InternalDataKind>
Microsoft.ML.OnnxTransformerTest (9)
OnnxTransformTests.cs (9)
843var inputDict0 = new Dictionary<int, float> { { 0, 94.17f }, { 1, 17.36f } }; 844var inputDict1 = new Dictionary<int, float> { { 0, 12.28f }, { 1, 75.12f } }; 853output.Output = new Dictionary<int, float>(); 898var shapeDictionary = new Dictionary<string, int[]>() { { nameof(InputWithCustomShape.input), new int[] { 3, 3 } } }; 983var shapeDictionary = new Dictionary<string, int[]>() { 998shapeDictionary = new Dictionary<string, int[]>() { 1014shapeDictionary = new Dictionary<string, int[]>() { 1029shapeDictionary = new Dictionary<string, int[]>() { 1068var shapeDictionary = new Dictionary<string, int[]>() { { nameof(InputWithCustomShape.input), new int[] { 3, 3 } } };
Microsoft.ML.ResultProcessor (11)
ResultProcessor.cs (11)
62public static Dictionary<string, Dictionary<string, string>> MapDefaultSettingToLearner = new Dictionary<string, Dictionary<string, string>>(); 70SameHeaderValues = new Dictionary<string, object>(); 162return new Dictionary<string, string>(); 169return new Dictionary<string, string>(0); 531predictorSettings = new Dictionary<string, string>(0); 792Dictionary<string, ResultMetric> runResults = new Dictionary<string, ResultMetric>(); 890Dictionary<string, ResultMetric> perFoldMetrics = new Dictionary<string, ResultMetric>(); 892Dictionary<int, Dictionary<string, float>> foldResults = new Dictionary<int, Dictionary<string, float>>(); 927var metricToFoldValuesDict = new Dictionary<string, Dictionary<int, float>>(); 938metricDict = new Dictionary<int, float>(); 985Dictionary<string, float> valuesDict = new Dictionary<string, float>();
Microsoft.ML.Samples (27)
Dynamic\Transforms\Conversion\MapValue.cs (3)
31var timeframeMap = new Dictionary<string, string>(); 40var timeframeKeyMap = new Dictionary<string, uint>(); 48var scoreMap = new Dictionary<int, string>();
Dynamic\Transforms\Conversion\MapValueToArray.cs (1)
35var timeframeMap = new Dictionary<string, int[]>();
Dynamic\Transforms\TimeSeries\LocalizeRootCause.cs (10)
42Dictionary<string, Object> dic1 = new Dictionary<string, Object>(); 48Dictionary<string, Object> dic2 = new Dictionary<string, Object>(); 54Dictionary<string, Object> dic3 = new Dictionary<string, Object>(); 60Dictionary<string, Object> dic4 = new Dictionary<string, Object>(); 66Dictionary<string, Object> dic5 = new Dictionary<string, Object>(); 72Dictionary<string, Object> dic6 = new Dictionary<string, Object>(); 78Dictionary<string, Object> dic7 = new Dictionary<string, Object>(); 84Dictionary<string, Object> dic8 = new Dictionary<string, Object>(); 90Dictionary<string, Object> dic9 = new Dictionary<string, Object>(); 101Dictionary<string, Object> dim = new Dictionary<string, Object>();
Dynamic\Transforms\TimeSeries\LocalizeRootCauseMultidimension.cs (13)
48Dictionary<string, Object> dic1 = new Dictionary<string, Object> 56Dictionary<string, Object> dic2 = new Dictionary<string, Object>(); 62Dictionary<string, Object> dic3 = new Dictionary<string, Object>(); 68Dictionary<string, Object> dic4 = new Dictionary<string, Object>(); 74Dictionary<string, Object> dic5 = new Dictionary<string, Object>(); 80Dictionary<string, Object> dic6 = new Dictionary<string, Object>(); 86Dictionary<string, Object> dic7 = new Dictionary<string, Object>(); 92Dictionary<string, Object> dic8 = new Dictionary<string, Object>(); 98Dictionary<string, Object> dic9 = new Dictionary<string, Object>(); 104Dictionary<string, Object> dic10 = new Dictionary<string, Object>(); 110Dictionary<string, Object> dic11 = new Dictionary<string, Object>(); 116Dictionary<string, Object> dic12 = new Dictionary<string, Object>(); 127Dictionary<string, Object> dim = new Dictionary<string, Object>();
Microsoft.ML.SearchSpace (5)
Option\NestOption.cs (1)
18private readonly Dictionary<string, OptionBase> _options = new Dictionary<string, OptionBase>();
Parameter.cs (1)
221var parameter = new Parameter(new Dictionary<string, Parameter>(), ParameterType.Object);
SearchSpace.cs (3)
51_options = new Dictionary<string, OptionBase>(); 196var res = new Dictionary<string, OptionBase>(); 243var res = new Dictionary<string, OptionBase>();
Microsoft.ML.StandardTrainers (1)
Standard\LogisticRegression\LogisticRegression.cs (1)
289weightIndicesInvMap = new Dictionary<int, int>(numParams);
Microsoft.ML.Sweeper (4)
Algorithms\KdoSweeper.cs (2)
356Dictionary<string, int> labelToIndex = new Dictionary<string, int>(); 399Dictionary<string, int> labelToIndex = new Dictionary<string, int>();
ISweeper.cs (2)
114_parameterValues = new Dictionary<string, IParameterValue>(); 170new ParameterSet(new Dictionary<string, IParameterValue>(_parameterValues), _hash);
Microsoft.ML.TensorFlow (1)
TensorflowTransform.cs (1)
683Outputs = new Dictionary<string, Tensor>();
Microsoft.ML.Tests (94)
OnnxConversionTest.cs (92)
1247pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, int> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); 1248pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, long> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); 1249pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, short> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); 1250pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, uint> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); 1251pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, ushort> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); 1252pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, ulong> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); 1253pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, string> { { 3, "True" }, { 23, "False" } }, "Keys", treatValuesAsKeyType)); 1254pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, float> { { 3, 6 }, { 23, 46 } }, "Keys", treatValuesAsKeyType)); 1255pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, double> { { 3, 698 }, { 23, 7908 } }, "Keys", treatValuesAsKeyType)); 1256pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<float, bool> { { 3, false }, { 23, true } }, "Keys", treatValuesAsKeyType)); 1260pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<double, int> { { 3, 6 }, { 23, 46 } }, "Keys")); 1261pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<double, uint> { { 3, 6 }, { 23, 46 } }, "Keys")); 1262pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<double, ushort> { { 3, 6 }, { 23, 46 } }, "Keys")); 1263pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<double, ulong> { { 3, 6 }, { 23, 46 } }, "Keys")); 1264pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<double, string> { { 3, "True" }, { 23, "False" } }, "Keys")); 1265pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<double, float> { { 3, 6 }, { 23, 46 } }, "Keys")); 1266pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<double, long> { { 3, 698 }, { 23, 7908 } }, "Keys")); 1267pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<double, double> { { 3, 698 }, { 23, 7908 } }, "Keys")); 1268pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<double, bool> { { 3, true }, { 23, false } }, "Keys")); 1272pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, int> { { true, 6 }, { false, 46 } }, "Keys")); 1273pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, short> { { true, 6 }, { false, 46 } }, "Keys")); 1274pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, uint> { { true, 6 }, { false, 46 } }, "Keys")); 1275pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, ushort> { { true, 6 }, { false, 46 } }, "Keys")); 1276pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, ulong> { { true, 6 }, { false, 46 } }, "Keys")); 1277pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, string> { { true, "True" }, { false, "False" } }, "Keys")); 1278pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, float> { { true, 6 }, { false, 46 } }, "Keys")); 1279pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, long> { { true, 698 }, { false, 7908 } }, "Keys")); 1280pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, double> { { true, 698 }, { false, 7908 } }, "Keys")); 1281pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<bool, bool> { { false, true }, { true, false } }, "Keys")); 1285pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<string, int> { { "3", 3 }, { "23", 23 } }, "Keys")); 1286pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<string, short> { { "3", 3 }, { "23", 23 } }, "Keys")); 1287pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<string, uint> { { "3", 6 }, { "23", 46 } }, "Keys")); 1288pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<string, ushort> { { "3", 6 }, { "23", 46 } }, "Keys")); 1289pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<string, ulong> { { "3", 6 }, { "23", 46 } }, "Keys")); 1290pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<string, float> { { "3", 6 }, { "23", 23 } }, "Keys")); 1291pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<string, double> { { "3", 6 }, { "23", 23 } }, "Keys")); 1292pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<string, long> { { "3", 3 }, { "23", 23 } }, "Keys")); 1293pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<string, bool> { { "3", true }, { "23", false } }, "Keys")); 1297pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<int, short> { { 3, 6 }, { 23, 46 } }, "Keys")); 1298pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<int, int> { { 3, 6 }, { 23, 46 } }, "Keys")); 1299pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<int, long> { { 3, 6 }, { 23, 46 } }, "Keys")); 1300pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<int, ushort> { { 3, 6 }, { 23, 46 } }, "Keys")); 1301pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<int, uint> { { 3, 6 }, { 23, 46 } }, "Keys")); 1302pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<int, ulong> { { 3, 6 }, { 23, 46 } }, "Keys")); 1303pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<int, string> { { 3, "True" }, { 23, "False" } }, "Keys")); 1304pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<int, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1305pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<int, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1309pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<short, short> { { 3, 6 }, { 23, 46 } }, "Keys")); 1310pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<short, int> { { 3, 6 }, { 23, 46 } }, "Keys")); 1311pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<short, long> { { 3, 6 }, { 23, 46 } }, "Keys")); 1312pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<short, ushort> { { 3, 6 }, { 23, 46 } }, "Keys")); 1313pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<short, uint> { { 3, 6 }, { 23, 46 } }, "Keys")); 1314pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<short, ulong> { { 3, 6 }, { 23, 46 } }, "Keys")); 1315pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<short, string> { { 3, "True" }, { 23, "False" } }, "Keys")); 1316pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<short, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1317pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<short, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1321pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<long, short> { { 3, 6 }, { 23, 46 } }, "Keys")); 1322pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<long, int> { { 3, 6 }, { 23, 46 } }, "Keys")); 1323pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<long, long> { { 3, 6 }, { 23, 46 } }, "Keys")); 1324pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<long, ushort> { { 3, 6 }, { 23, 46 } }, "Keys")); 1325pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<long, uint> { { 3, 6 }, { 23, 46 } }, "Keys")); 1326pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<long, ulong> { { 3, 6 }, { 23, 46 } }, "Keys")); 1327pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<long, string> { { 3, "True" }, { 23, "False" } }, "Keys")); 1328pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<long, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1329pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<long, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1333pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<uint, short> { { 3, 6 }, { 23, 46 } }, "Keys")); 1334pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<uint, int> { { 3, 6 }, { 23, 46 } }, "Keys")); 1335pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<uint, long> { { 3, 6 }, { 23, 46 } }, "Keys")); 1336pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<uint, ushort> { { 3, 6 }, { 23, 46 } }, "Keys")); 1337pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<uint, uint> { { 3, 6 }, { 23, 46 } }, "Keys")); 1338pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<uint, ulong> { { 3, 6 }, { 23, 46 } }, "Keys")); 1339pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<uint, string> { { 3, "True" }, { 23, "False" } }, "Keys")); 1340pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<uint, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1341pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<uint, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1345pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ushort, short> { { 3, 6 }, { 23, 46 } }, "Keys")); 1346pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ushort, int> { { 3, 6 }, { 23, 46 } }, "Keys")); 1347pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ushort, long> { { 3, 6 }, { 23, 46 } }, "Keys")); 1348pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ushort, ushort> { { 3, 6 }, { 23, 46 } }, "Keys")); 1349pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ushort, uint> { { 3, 6 }, { 23, 46 } }, "Keys")); 1350pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ushort, ulong> { { 3, 6 }, { 23, 46 } }, "Keys")); 1351pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ushort, string> { { 3, "True" }, { 23, "False" } }, "Keys")); 1352pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ushort, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1353pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ushort, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1357pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ulong, short> { { 3, 6 }, { 23, 46 } }, "Keys")); 1358pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ulong, int> { { 3, 6 }, { 23, 46 } }, "Keys")); 1359pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ulong, long> { { 3, 6 }, { 23, 46 } }, "Keys")); 1360pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ulong, ushort> { { 3, 6 }, { 23, 46 } }, "Keys")); 1361pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ulong, uint> { { 3, 6 }, { 23, 46 } }, "Keys")); 1362pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ulong, ulong> { { 3, 6 }, { 23, 46 } }, "Keys")); 1363pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ulong, string> { { 3, "True" }, { 23, "False" } }, "Keys")); 1364pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ulong, float> { { 3, 6.435f }, { 23, 23.534f } }, "Keys")); 1365pipelines.Add(mlContext.Transforms.Conversion.MapValue("Value", new Dictionary<ulong, double> { { 3, 6.435f }, { 23, 23.534f } }, "Keys"));
TextLoaderTests.cs (2)
735var irisFirstRow = new Dictionary<string, float>(); 844var irisFirstRow = new Dictionary<string, float>();
Microsoft.ML.TimeSeries (12)
PolynomialUtils.cs (1)
285var hash = new Dictionary<Complex, FactorMultiplicity>();
RootCauseAnalyzer.cs (9)
99Dictionary<Dictionary<string, object>, TimeSeriesPoint> dimPointMapping = new Dictionary<Dictionary<string, object>, TimeSeriesPoint>(dc); 130return new Dictionary<string, object>(keyList.Select(dim => new KeyValuePair<string, object>(dim, dimension[dim])).ToDictionary(kvp => kvp.Key, kvp => kvp.Value)); 202Dictionary<string, int> pointDistribution = new Dictionary<string, int>(); 251Dictionary<BestDimension, double> entroyGainRatioMap = new Dictionary<BestDimension, double>(); 293Dictionary<BestDimension, double> entropyRatioMap = new Dictionary<BestDimension, double>(); 639Dictionary<string, Object> newDim = new Dictionary<string, Object>(dimension); 762ChildrenNodes = new Dictionary<string, List<TimeSeriesPoint>>(); 776AnomalyDis = new Dictionary<string, int>(); 777PointDis = new Dictionary<string, int>();
STL\InnerStl.cs (1)
285_xValuesPool = new Dictionary<int, List<double>>();
STL\Loess.cs (1)
58_neighbors = new Dictionary<int, LocalRegression>();
Microsoft.ML.TimeSeries.Tests (30)
TimeSeriesDirectApi.cs (30)
970Dictionary<string, Object> expectedDim = new Dictionary<string, Object>(); 999Dictionary<string, Object> expectedDim = new Dictionary<string, Object>(); 1015expectedDim = new Dictionary<string, Object>(); 1047Dictionary<string, object> expectedDim = new Dictionary<string, object> 1087Dictionary<string, Object> dic1 = new Dictionary<string, Object>(); 1093Dictionary<string, Object> dic2 = new Dictionary<string, Object>(); 1099Dictionary<string, Object> dic3 = new Dictionary<string, Object>(); 1105Dictionary<string, Object> dic4 = new Dictionary<string, Object>(); 1111Dictionary<string, Object> dic5 = new Dictionary<string, Object>(); 1117Dictionary<string, Object> dic6 = new Dictionary<string, Object>(); 1123Dictionary<string, Object> dic7 = new Dictionary<string, Object>(); 1129Dictionary<string, Object> dic8 = new Dictionary<string, Object>(); 1135Dictionary<string, Object> dic9 = new Dictionary<string, Object>(); 1141Dictionary<string, Object> dic10 = new Dictionary<string, Object>(); 1147Dictionary<string, Object> dic11 = new Dictionary<string, Object>(); 1153Dictionary<string, Object> dic12 = new Dictionary<string, Object>(); 1164Dictionary<string, Object> dim = new Dictionary<string, Object>(); 1197Dictionary<string, int> expectedDim = new Dictionary<string, int> 1231Dictionary<string, object> dic1 = new Dictionary<string, object>(); 1237Dictionary<string, object> dic2 = new Dictionary<string, object>(); 1243Dictionary<string, object> dic3 = new Dictionary<string, object>(); 1249Dictionary<string, object> dic4 = new Dictionary<string, object>(); 1255Dictionary<string, object> dic5 = new Dictionary<string, object>(); 1261Dictionary<string, object> dic6 = new Dictionary<string, object>(); 1267Dictionary<string, object> dic7 = new Dictionary<string, object>(); 1273Dictionary<string, object> dic8 = new Dictionary<string, object>(); 1279Dictionary<string, object> dic9 = new Dictionary<string, object>(); 1285Dictionary<string, object> dic10 = new Dictionary<string, object>(); 1291Dictionary<string, object> dic11 = new Dictionary<string, object>(); 1297Dictionary<string, object> dic12 = new Dictionary<string, object>();
Microsoft.ML.Tokenizers (32)
Model\BPETokenizer.cs (4)
147Dictionary<StringSpanOrdinalKey, int> vocab = new Dictionary<StringSpanOrdinalKey, int>(1000); 314_vocab = vocab ?? new Dictionary<StringSpanOrdinalKey, int>(); 358Merges = new(); 1171private readonly Dictionary<char, string> _charToString = new Dictionary<char, string>();
Model\Cache.cs (1)
21_map = new Dictionary<TKey, TValue>(capacity);
Model\CodeGenTokenizer.cs (2)
1704internal static readonly Dictionary<string, int> CodeGenSpecialTokens = new() 1769var mergeRanks = new Dictionary<StringSpanOrdinalKeyPair, int>();
Model\EnglishRobertaTokenizer.cs (3)
239var vocab = new Dictionary<string, int>(); 1113_idToIndex = new Dictionary<int, int>(); 1115_stringSymbolToIndexMapping = new Dictionary<string, int>();
Model\SentencePieceBaseModel.cs (2)
41InternalSpecialTokens = new Dictionary<StringSpanOrdinalKey, int>(); 42SpecialTokensReverse = new Dictionary<int, string>();
Model\SentencePieceBpeModel.cs (4)
22private readonly Dictionary<StringSpanOrdinalKey, (int Id, float Score, byte Type)> _vocab = new(); 23private readonly Dictionary<int, string> _vocabReverse = new(); 51var vocab = new Dictionary<string, int>(); 1210revMerge ??= new();
Model\TiktokenTokenizer.cs (11)
182encoder = new Dictionary<ReadOnlyMemory<byte>, int>(suggestedCapacity, ReadOnlyMemoryByteComparer.Instance); 183vocab = new Dictionary<StringSpanOrdinalKey, (int Id, string Token)>(suggestedCapacity); 184decoder = new Dictionary<int, ReadOnlyMemory<byte>>(suggestedCapacity); 1043new Dictionary<string, ModelEncoding>(StringComparer.OrdinalIgnoreCase) 1138new Dictionary<string, int> { { EndOfText, 100257 }, { FimPrefix, 100258 }, { FimMiddle, 100259 }, { FimSuffix, 100260 }, { EndOfPrompt, 100276 }, { IMStart, 100264 }, 1141new Dictionary<string, int> { { EndOfText, 100257 }, { FimPrefix, 100258 }, { FimMiddle, 100259 }, { FimSuffix, 100260 }, { EndOfPrompt, 100276 } }, 1145return (new Dictionary<string, int> { { EndOfText, 50256 }, }, P50kBaseRegex(), GPT2File, Type.GetType(Gpt2TypeName), Gpt2PackageName); 1148return (new Dictionary<string, int> { { EndOfText, 199999 }, { EndOfPrompt, 200018 } }, O200kBaseRegex(), O200kBaseFile, Type.GetType(O200kBaseTypeName), O200kBasePackageName); 1151return (new Dictionary<string, int> { { EndOfText, 50256 } }, P50kBaseRegex(), P50RanksFile, Type.GetType(P50kBaseTypeName), P50kBasePackageName); 1154return (new Dictionary<string, int> 1158return (new Dictionary<string, int> { { EndOfText, 50256 } }, P50kBaseRegex(), R50RanksFile, Type.GetType(R50kBaseTypeName), R50kBasePackageName);
Model\WordPieceTokenizer.cs (2)
99Dictionary<StringSpanOrdinalKey, int> vocab = new Dictionary<StringSpanOrdinalKey, int>(); 100Dictionary<int, string> vocabReverse = new Dictionary<int, string>();
Utils\LruCache.cs (1)
17private readonly Dictionary<StringSpanOrdinalKey, LinkedListNode<KeyValuePair<string, TValue>>> _cache = new();
Utils\StringSpanOrdinalKey.cs (1)
86_map = new Dictionary<StringSpanOrdinalKey, TValue>(capacity);
Utils\TokenizerExtensions.cs (1)
37Dictionary<TValue, TKey> dictionary = new Dictionary<TValue, TKey>();
Microsoft.ML.Tokenizers.Tests (18)
BertTokenizerTests.cs (1)
26Dictionary<string, int> specialTokens = new() {
BpeTests.cs (13)
27new Dictionary<string, int>() { { UnknownToken, 0 }, { "!", 5 }, { ",", 6 }, { ".", 7 }, { "B", 8 }, { "H", 9 }, { "T", 10 }, { "W", 11 }, { "a", 12 }, { "b", 13 }, { "c", 14 }, { "d", 15 }, { "e", 16 }, 53new Dictionary<string, int>() { { "a", 1 }, { "b", 2 }, { UnknownToken, 3} }, 68new Dictionary<string, int>() { { "a", 1 }, { "b", 2 } }, 83new Dictionary<string, int>() { { "a", 1 }, { "b", 2 } }, 98new Dictionary<string, int>() { { "a", 1 }, { "b", 2 }, { UnknownToken, 3} }, 113new Dictionary<string, int>() { { "a", 1 }, { "b", 2 }, { UnknownToken, 3} }, 128new Dictionary<string, int>() { { "a", 1 }, { "b", 2 }, { "ab", 3 }, { UnknownToken, 4} }, 143new Dictionary<string, int>() { { "a", 1 }, { "b", 2 }, { "c", 3 }, { "ab", 4 }, { "abc", 5 } }, 158new Dictionary<string, int>(){ { UnknownToken, 0} }, 173new Dictionary<string, int>(){ { UnknownToken, 0} }, 188new Dictionary<string, int>() { { UnknownToken, 0}, { "H", 1 }, { "e", 2 }, { "l", 3 }, { "o", 4 }, { "!", 5 }, { "He", 6 }, { "lo", 7}, { "llo", 8 }, 512IReadOnlyDictionary<string, int> specialTokens = new Dictionary<string, int>() 1004Dictionary<string, int> specialTokens = new Dictionary<string, int>();
LlamaTests.cs (1)
48specialTokens: new Dictionary<string, int>
TiktokenTests.cs (1)
26private static readonly Dictionary<string, int> _specialTokens = new Dictionary<string, int>
UnigramTests.cs (1)
60new Dictionary<string, int>
WordPieceTests.cs (1)
184Dictionary<string, int> specialTokens = new Dictionary<string, int>
Microsoft.ML.TorchSharp (10)
AutoFormerV2\Attention.cs (1)
73var attentionOffsets = new Dictionary<Tuple<int, int>, int>();
AutoFormerV2\ObjectDetectionMetrics.cs (2)
99Dictionary<string, List<Tuple<float, float>>> iouDic = new(); 100Dictionary<string, int> groundTruthBoxes = new();
NasBert\Models\NasBertEncoder.cs (1)
207new Dictionary<string, object> { { PositionalEmbedding.PositionKey, positions } });
NasBert\Modules\IncrementalState.cs (1)
51private static Dictionary<string, torch.Tensor> EmptyIncrementalState => new Dictionary<string, torch.Tensor>();
NasBert\Modules\MultiHeadAttention.cs (1)
316return GetIncrementalState(this, incrementalState, AttentionStateKey) ?? new Dictionary<string, torch.Tensor>();
NasBert\Modules\TransformerCell.cs (2)
65return (Operations[arch] as Layer)!.forward(x, new Dictionary<string, object> 130return Operation.forward(x, new Dictionary<string, object>
Roberta\QATrainer.cs (1)
443var mapping = new Dictionary<int, int>();
Utils\DefaultDictionary.cs (1)
27_dictionary = new Dictionary<TKey, TValue>();
Microsoft.ML.Transforms (18)
Dracula\CMCountTable.cs (3)
232_tables[iLabel][iDepth] = new Dictionary<int, double>(); 249_tables[iLabel][iDepth] = new Dictionary<int, double>(); 271tables[iLabel][iDepth] = new Dictionary<int, float>();
Dracula\DictCountTable.cs (4)
77Tables[iTable] = new Dictionary<long, float>(); 176_tables[i] = new Dictionary<long, double>(); 187_tables[i] = new Dictionary<long, double>(); 204singleTables[iTable] = new Dictionary<long, float>();
Expression\KeyWordTable.cs (2)
37_mpnstrtidWord = new Dictionary<NormStr, KeyWordKind>(); 38_mpnstrtidPunc = new Dictionary<NormStr, TokKind>();
Expression\LambdaParser.cs (1)
243_mapTidStr = new Dictionary<TokKind, string>();
Expression\MethodGenerator.cs (1)
172_locals = new Dictionary<LocalKey, List<LocalBuilder>>();
MissingValueReplacingUtils.cs (1)
382_valueCounts = new Dictionary<TType, int>();
PermutationFeatureImportanceExtensions.cs (1)
708var output = new Dictionary<string, TResult>();
Text\StopWordsRemovingTransformer.cs (1)
364_colMapNewToOld = new Dictionary<int, int>();
Text\TextNormalizing.cs (1)
311var combinedDiacriticsMap = new Dictionary<char, char>();
Text\WordEmbeddingsExtractor.cs (3)
95private static readonly Dictionary<string, WeakReference<Model>> _vocab = new Dictionary<string, WeakReference<Model>>(); 605private static readonly Dictionary<WordEmbeddingEstimator.PretrainedModelKind, string> _modelsMetaData = new Dictionary<WordEmbeddingEstimator.PretrainedModelKind, string>() 619private static readonly Dictionary<WordEmbeddingEstimator.PretrainedModelKind, int> _linesToSkipInModels = new Dictionary<WordEmbeddingEstimator.PretrainedModelKind, int>()
Microsoft.ML.Vision (4)
DnnRetrainTransform.cs (2)
539_idvToTfMapping = new Dictionary<string, string>(); 852Outputs = new Dictionary<string, Tensor>();
ImageClassificationTrainer.cs (2)
101internal static IReadOnlyDictionary<Architecture, string> ModelFileName = new Dictionary<Architecture, string> 113new Dictionary<Architecture, Tuple<int, int>>
Microsoft.NET.StringTools (1)
WeakStringCacheInterner.cs (1)
126_internCallCountsByString = new Dictionary<string, int>();
Microsoft.NET.StringTools.net35 (3)
WeakStringCache.Locking.cs (2)
19_weakHandlesByHashCode = new Dictionary<int, StringWeakHandle>(_initialCapacity); 22_stringsByHashCode = new Dictionary<int, StringWeakHandle>();
WeakStringCacheInterner.cs (1)
126_internCallCountsByString = new Dictionary<string, int>();
Microsoft.VisualBasic.Core (4)
Microsoft\VisualBasic\Collection.vb (2)
340m_KeyedNodesHash = New Generic.Dictionary(Of String, Node)(StartingHashCapacity, StringComparer.Create(CultureInfo, ignoreCase:=True)) 342m_KeyedNodesHash = New Generic.Dictionary(Of String, Node)(StringComparer.Create(CultureInfo, ignoreCase:=True))
Microsoft\VisualBasic\CompilerServices\CacheDict.vb (1)
19_dict = New Dictionary(Of TKey, KeyInfo)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (1)
1568Private ReadOnly _dict As New Dictionary(Of T, LinkedListNode(Of T))
Microsoft.VisualStudio.LanguageServices (12)
ChangeSignature\ChangeSignatureDialogViewModel.cs (1)
109var parameterNameOverlapMap = new Dictionary<string, List<ParameterViewModel>>();
Implementation\VsRefactorNotifyService.cs (1)
171var hierarchyToItemIDsMap = new Dictionary<IVsHierarchy, List<uint>>();
Interactive\VsInteractiveWindowProvider.cs (1)
164var interactiveCommandMap = new Dictionary<string, int>();
Library\ObjectBrowser\AbstractListItemFactory.cs (1)
595var visitedAssemblies = new Dictionary<string, AssemblyIdentity>();
Options\VisualStudioOptionStorage.cs (1)
103public static readonly IReadOnlyDictionary<string, VisualStudioOptionStorage> Storages = new Dictionary<string, VisualStudioOptionStorage>()
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (1)
59private readonly Dictionary<string, (DateTime lastWriteTime, AssemblyMetadata metadata)> _metadataCache = new(StringComparer.OrdinalIgnoreCase);
ProjectSystem\RuleSets\RuleSetEventHandler.cs (1)
87var ruleSetRenames = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ProjectSystem\RuleSets\VisualStudioRuleSetManager.RuleSetFile.cs (1)
127var specificDiagnosticOptions = new Dictionary<string, ReportDiagnostic>();
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
40_cache = new Dictionary<K, CacheValue>(capacity);
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
470var latestDocumentDiagnosticsMap = filterStaleDiagnostics ? new Dictionary<DocumentId, ImmutableHashSet<DiagnosticData>>() : null;
Telemetry\CodeMarkerLogger.cs (2)
19= new Dictionary<FunctionId, List<Tuple<CodeMarkerId, CodeMarkerId>>>() 114= new Dictionary<FunctionId, List<CodeMarkerId>>()
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (2)
71ruleSetSpecificDiagnosticOptions = new Dictionary<string, ReportDiagnostic>(); 90var diagnosticOptions = new Dictionary<string, ReportDiagnostic>(ruleSetSpecificDiagnosticOptions);
Microsoft.VisualStudio.LanguageServices.DevKit (1)
Logging\VSCodeTelemetryLogger.cs (1)
151var kvp = new Dictionary<string, string>
Microsoft.VisualStudio.LanguageServices.Xaml (2)
Implementation\LanguageServer\Handler\Completion\CompletionHandler.cs (1)
74var commitCharactersCache = new Dictionary<XamlCompletionKind, ImmutableArray<VSInternalCommitCharacter>>();
Implementation\LanguageServer\Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
71var documentToPreviousResultId = new Dictionary<Document, string?>();
MinimalSample (2)
Program.cs (2)
79var extensions = new Dictionary<string, object?>() { { "traceId", "traceId123" } }; 81var errors = new Dictionary<string, string[]>() { { "Title", new[] { "The Title field is required." } } };
Mvc.RoutingWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
45routeValues = new Dictionary<string, object>(_actionContext.RouteData.Values),
OpenIdConnectSample (1)
Startup.cs (1)
253var pairs = new Dictionary<string, string>()
PresentationBuildTasks (20)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (2)
177Dictionary<string, ITaskItem[]> targetOutputs = new Dictionary<string, ITaskItem[]>(); 292Dictionary<string, ITaskItem[]> targetOutputs = new Dictionary<string, ITaskItem[]>();
src\Microsoft.DotNet.Wpf\src\Common\src\System\LocalAppContext.cs (1)
16private static readonly Dictionary<string, bool> s_switchMap = new();
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (2)
702_masterBracketCharacterCache = new Dictionary<Type, Dictionary<string, SpecialBracketCharacters>>(); 842Dictionary<string, SpecialBracketCharacters> cache = new Dictionary<string, SpecialBracketCharacters>(StringComparer.OrdinalIgnoreCase);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
4163private Dictionary<string, string> _piReverseTable = new Dictionary<string, string>();
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (2)
61_compatTable = new Dictionary<string,string>(); 62_compatTableReverse = new Dictionary<string,string>();
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (2)
60_cachedMetadataLoadContextAssemblies = new Dictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase); 61_cachedMetadataLoadContextAssembliesByNameNoExtension = new Dictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (10)
882_subsumingNamespaces = new Dictionary<string, object>(); 909_knownNamespaces = new Dictionary<string, object>(); 1835_ignorables = new Dictionary<string, object>(); 1845_processContents = new Dictionary<string, ProcessContentSet>(); 1862_preserveElements = new Dictionary<string, PreserveItemSet>(); 1879_preserveAttributes = new Dictionary<string, PreserveItemSet>(); 2050_names = new Dictionary<string, string>(); 2064private Dictionary<string, string> _namespaceMap = new Dictionary<string, string>(); 2066private Dictionary<string, HandleElementCallback> _elementHandler = new Dictionary<string, HandleElementCallback>(); 2067private Dictionary<string, HandleAttributeCallback> _attributeHandler = new Dictionary<string, HandleAttributeCallback>();
PresentationCore (53)
MS\Internal\Automation\EventMap.cs (1)
132_eventsTable = new Dictionary<int, EventInfo>(20);
MS\Internal\DeferredElementTreeState.cs (2)
122private Dictionary<DependencyObject, DependencyObject> _oldCoreParents = new Dictionary<DependencyObject, DependencyObject>(); 123private Dictionary<DependencyObject, DependencyObject> _oldLogicalParents = new Dictionary<DependencyObject, DependencyObject>();
MS\Internal\FontCache\FamilyCollection.cs (1)
473Dictionary<string, Text.TextInterface.Font> faces = new Dictionary<string, Text.TextInterface.Font>(StringComparer.OrdinalIgnoreCase);
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
595_cmap = new Dictionary<int, ushort>();
MS\Internal\FontCache\FontResourceCache.cs (2)
82folderResourceMap = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase); 146= new Dictionary<Assembly, Dictionary<string, List<string>>>(1);
MS\Internal\FontFace\CompositeFontInfo.cs (3)
34_familyNames = new LanguageSpecificStringDictionary(new Dictionary<XmlLanguage,string>(InitialCultureCount)); 55_familyMapRangesByLanguage = new Dictionary<XmlLanguage, ushort[]>(InitialCultureCount); 146Dictionary<XmlLanguage, ushort[]> table = new Dictionary<XmlLanguage, ushort[]>(_familyMapRangesByLanguage.Count);
MS\Internal\FontFace\FontDifferentiator.cs (1)
31Dictionary<XmlLanguage, string> faceNames = new Dictionary<XmlLanguage, string>(1);
MS\Internal\FontFace\PhysicalFontFamily.cs (1)
41Dictionary<XmlLanguage, string> convertedDictionary = new Dictionary<XmlLanguage, string>();
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (1)
1675new System.Collections.Generic.Dictionary<Stroke, StrokeLookupEntry>(_coreStrokes.Count);
MS\Internal\Ink\Renderer.cs (2)
186_visuals = new Dictionary<Stroke, StrokeVisual>(); 657_highlighters = new Dictionary<Color, HighlighterContainerVisual>();
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (1)
250Dictionary<Edge, EdgeInfo> adjInformation = new Dictionary<Edge, EdgeInfo>();
MS\Internal\Shaping\TypefaceMap.cs (1)
38private IDictionary<CultureInfo, IntMap> _intMaps = new Dictionary<CultureInfo, IntMap>();
src\Microsoft.DotNet.Wpf\src\Common\src\System\LocalAppContext.cs (1)
16private static readonly Dictionary<string, bool> s_switchMap = new();
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
155private static readonly Dictionary<string, ContentType> _fileExtensionToMimeType = new Dictionary<string, ContentType>(4);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
135_assemblies = new Dictionary<object, AssemblyName>();
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SizeLimitedCache.cs (1)
49_nodeLookup = new Dictionary<K, Node>();
System\Windows\Ink\StrokeCollection2.cs (1)
353Dictionary<Color, List<Stroke>> highLighters = new Dictionary<Color, List<Stroke>>();
System\Windows\Input\ManipulationDevice.cs (1)
83_manipulationDevices = new Dictionary<UIElement, ManipulationDevice>(2);
System\Windows\Input\ManipulationLogic.cs (2)
702private Dictionary<int, Manipulator2D> _currentManipulators = new Dictionary<int, Manipulator2D>(2); 705private Dictionary<int, Manipulator2D> _removedManipulators = new Dictionary<int, Manipulator2D>(2);
System\Windows\Input\Stylus\Common\StylusLogic.cs (1)
172private readonly Dictionary<DpiScale2, Matrix> _transformToDeviceMatrices = new Dictionary<DpiScale2, Matrix>();
System\Windows\Input\Stylus\Common\StylusPointPropertyId.cs (3)
195private static Dictionary<HidUsagePage, Dictionary<HidUsage, Guid>> _hidToGuidMap = new Dictionary<HidUsagePage, Dictionary<HidUsage, Guid>>() 198new Dictionary<HidUsage, Guid>() 206new Dictionary<HidUsage, Guid>()
System\Windows\Input\Stylus\Common\StylusPointPropertyUnit.cs (1)
63private static Dictionary<uint, StylusPointPropertyUnit> _pointerUnitMap = new Dictionary<uint, StylusPointPropertyUnit>()
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (1)
112} = new Dictionary<PresentationSource, PointerStylusPlugInManager>();
System\Windows\Input\Stylus\Pointer\PointerStylusPointPropertyInfoHelper.cs (1)
27private static Dictionary<byte, short> _hidExponentMap = new Dictionary<byte, short>()
System\Windows\Input\Stylus\Pointer\PointerTabletDevice.cs (1)
29private Dictionary<uint, PointerStylusDevice> _stylusDeviceMap = new Dictionary<uint, PointerStylusDevice>();
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceCollection.cs (2)
21private Dictionary<IntPtr, PointerTabletDevice> _tabletDeviceMap = new Dictionary<IntPtr, PointerTabletDevice>(); 77_tabletDeviceMap = new Dictionary<IntPtr, PointerTabletDevice>();
System\Windows\Input\Stylus\Wisp\WispLogic.cs (4)
3707private Dictionary<object, PenContexts> __penContextsMap = new Dictionary<object, PenContexts>(2); 3710private Dictionary<int, StylusDevice> __stylusDeviceMap = new Dictionary<int, StylusDevice>(2); 3733private Dictionary<StylusDeviceBase, RawStylusInputReport> _lastMovesQueued = new Dictionary<StylusDeviceBase, RawStylusInputReport>(); 3737private Dictionary<StylusDeviceBase, RawStylusInputReport> _coalescedMoves = new Dictionary<StylusDeviceBase, RawStylusInputReport>();
System\Windows\Media\FontEmbeddingManager.cs (2)
24_collectedGlyphTypefaces = new Dictionary<Uri, Dictionary<ushort, bool>>(_uriComparer); 52glyphSet = _collectedGlyphTypefaces[glyphTypeface] = new Dictionary<ushort, bool>();
System\Windows\Media\GlyphTypeface.cs (1)
386IDictionary<XmlLanguage, string> adjustedLanguageFaceNames = new Dictionary<XmlLanguage, string>(adjustedFaceNames.Count);
System\Windows\Media\HostVisual.cs (1)
557private Dictionary<DUCE.Channel, Dispatcher> _connectedChannels = new Dictionary<DUCE.Channel, Dispatcher>();
System\Windows\Media\Knowncolors.cs (1)
833private static Dictionary<uint, SolidColorBrush> s_solidColorBrushCache = new Dictionary<uint, SolidColorBrush>();
System\Windows\Media\SolidColorBrush.cs (2)
251fwdDictionary = new Dictionary<TKey, TValue>(keyComparer); 252revDictionary = new Dictionary<TValue, List<TKey>>(valueComparer);
System\Windows\Media\textformatting\TextFormatterContext.cs (1)
404Dictionary<char,bool> dict = new Dictionary<char,bool>();
System\Windows\Media\UniqueEventHelper.cs (3)
24ueh._delegates = new Dictionary<EventHandler<TEventArgs>, int>(_delegates); 55ueh._delegates = new Dictionary<EventHandler, int>(_delegates); 99_delegates = new Dictionary<TEventHandler, int>() { { handler, 1 } };
System\Windows\Media\Visual.cs (2)
825channelsToCyclicBrushMap = new Dictionary<DUCE.Channel, int>(); 856cyclicBrushToChannelsMap = new Dictionary<ICyclicBrush, int>();
System\Windows\Media3D\Visual3DCollection.cs (1)
540Dictionary<Visual3D, string> duplicates = new Dictionary<Visual3D, string>();
PresentationFramework (109)
MS\Internal\Annotations\AnnotationMap.cs (1)
105private Dictionary<Guid, List<IAttachedAnnotation>> _annotationIdToAttachedAnnotations = new Dictionary<Guid, List<IAttachedAnnotation>>();
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (2)
553private static readonly Dictionary<Type, int> s_ZLevel = new(); 558private static readonly Dictionary<int, ZRange> s_ZRanges = new();
MS\Internal\Annotations\Component\AnnotationComponentManager.cs (1)
288private Dictionary<IAttachedAnnotation, IList<IAnnotationComponent>> _attachedAnnotations = new Dictionary<IAttachedAnnotation, IList<IAnnotationComponent>>();
MS\Internal\Annotations\ObservableDictionary.cs (1)
40_nameValues = new Dictionary<string, string>();
MS\Internal\Annotations\Storage\StoreAnnotationsMap.cs (3)
108Dictionary<Guid, Annotation> annotations = new Dictionary<Guid, Annotation>(); 169Dictionary<Guid, Annotation> annotations = new Dictionary<Guid, Annotation>(); 282private Dictionary<Guid, CachedAnnotation> _currentAnnotations = new Dictionary<Guid, CachedAnnotation>();
MS\Internal\Annotations\XmlElementCollection.cs (1)
39_xmlDocsRefCounts = new Dictionary<XmlDocument, int>();
MS\Internal\AppModel\MimeObjectFactory.cs (2)
74private static readonly Dictionary<ContentType, StreamToObjectFactoryDelegate> _objectConverters = new Dictionary<ContentType, StreamToObjectFactoryDelegate>(9, new ContentType.WeakComparer()); 75private static readonly Dictionary<ContentType, StreamToObjectFactoryDelegateCore> _objectConvertersCore = new Dictionary<ContentType, StreamToObjectFactoryDelegateCore>(9, new ContentType.WeakComparer());
MS\Internal\AppModel\ResourceContainer.cs (1)
322private static readonly Dictionary<string, ResourceManagerWrapper> s_registeredResourceManagers = new(StringComparer.Ordinal);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (2)
67s_xmlTokeFullNames = new Dictionary<XmlToken, string>(); 84_cachedXmlElements = new Dictionary<XmlToken, object>();
MS\Internal\Data\AccessorTable.cs (1)
167private readonly Dictionary<AccessorTableKey, AccessorInfo> _table = new Dictionary<AccessorTableKey, AccessorInfo>();
MS\Internal\Data\CollectionViewGroupInternal.cs (1)
519_nameToGroupMap ??= new Dictionary<object, WeakReference>();
MS\Internal\Data\DataBindEngine.cs (1)
696private Dictionary<ValueConverterTableKey, IValueConverter> _valueConverterTable = new Dictionary<ValueConverterTableKey, IValueConverter>();
MS\Internal\Globalization\BamlResourceDeserializer.cs (1)
389private readonly Dictionary<string, Stack<ILocalizabilityInheritable>> _propertyInheritanceTreeStack = new(8);
MS\Internal\Globalization\BamlTreeMap.cs (4)
104_keyToBamlNodeIndexMap = new Dictionary<BamlLocalizableResourceKey, int>(_tree.Size); 105_uidToBamlNodeIndexMap = new Dictionary<string, int>(_tree.Size / 2); 338_classAttributeTable = new Dictionary<string, ElementLocalizability>(8); 339_propertyAttributeTable = new Dictionary<string, LocalizabilityAttribute>(8);
MS\Internal\Globalization\BamlTreeUpdater.cs (3)
690_uidToNewBamlNodeIndexMap = new Dictionary<string, int>(8); 691_keyToNewBamlNodeIndexMap = new Dictionary<BamlLocalizableResourceKey, int>(8); 813_contentPropertyTable ??= new Dictionary<string, string>(8);
MS\Internal\Ink\ClipboardProcessor.cs (2)
57_preferredClipboardData = new Dictionary<InkCanvasClipboardFormat, ClipboardData>(); 263Dictionary<InkCanvasClipboardFormat, ClipboardData> preferredData = new Dictionary<InkCanvasClipboardFormat, ClipboardData>();
MS\Internal\Interop\InternalDispatchObject.cs (1)
60_dispId2MethodMap = new Dictionary<int, MethodInfo>(methods.Length);
MS\Internal\IO\Packaging\XamlFilter.cs (1)
102_lcidDictionary = new Dictionary<string, uint>(StringComparer.OrdinalIgnoreCase);
MS\Internal\WindowsRuntime\Generated\WinRT.cs (1)
101private static Dictionary<string, DllModule> _cache = new System.Collections.Generic.Dictionary<string, DllModule>();
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (4)
12private static readonly Dictionary<Type, Type> CustomTypeToHelperTypeMappings = new Dictionary<Type, Type>(); 13private static readonly Dictionary<Type, Type> CustomAbiTypeToTypeMappings = new Dictionary<Type, Type>(); 14private static readonly Dictionary<string, Type> CustomAbiTypeNameToTypeMappings = new Dictionary<string, Type>(); 15private static readonly Dictionary<Type, string> CustomTypeToAbiTypeNameMappings = new Dictionary<Type, string>();
src\Microsoft.DotNet.Wpf\src\Common\src\System\LocalAppContext.cs (1)
16private static readonly Dictionary<string, bool> s_switchMap = new();
System\Windows\Annotations\Storage\XmlStreamStore.cs (1)
47_predefinedNamespaces = new Dictionary<Uri, IList<Uri>>(6);
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (3)
110Dictionary<DateTimeCalendarModePair, DateTimeAutomationPeer> newChildren = new Dictionary<DateTimeCalendarModePair,DateTimeAutomationPeer>(); 654private Dictionary<DateTimeCalendarModePair, DateTimeAutomationPeer> _dataChildren = new Dictionary<DateTimeCalendarModePair, DateTimeAutomationPeer>(); 655private Dictionary<DateTimeCalendarModePair, WeakReference> _weakRefElementProxyStorage = new Dictionary<DateTimeCalendarModePair, WeakReference>();
System\Windows\Controls\DataGrid.cs (2)
8229Dictionary<string, StringBuilder> dataGridStringBuilders = new Dictionary<string, StringBuilder>(formats.Count); 8624= new Dictionary<DataGridColumn, CellAutomationValueHolder>(); // Holds the content of edited cells. Required for raising Automation events.
System\Windows\Controls\DataGridColumnCollection.cs (2)
471Dictionary<int, int> assignedDisplayIndexMap = new Dictionary<int, int>(); // <DisplayIndex, ColumnIndex> 1465_originalWidthsForResize = new Dictionary<DataGridColumn, DataGridLength>();
System\Windows\Controls\DataGridHelper.cs (1)
436propertyTransferEnabledForObject = new Dictionary<DependencyProperty, bool>();
System\Windows\Controls\DataGridItemAttachedStorage.cs (2)
57_itemStorageMap = new Dictionary<object, Dictionary<DependencyProperty, object>>(); 68map = new Dictionary<DependencyProperty, object>();
System\Windows\Controls\DatePicker.cs (1)
876_isHandlerSuspended = new Dictionary<DependencyProperty, bool>(2);
System\Windows\Controls\Primitives\Selector.cs (3)
2669_set = new Dictionary<ItemInfo, ItemInfo>(capacity, equalityComparer); 2680_set = new Dictionary<ItemInfo, ItemInfo>(collection._set, _equalityComparer); 2851_set = new Dictionary<ItemInfo, ItemInfo>(_list.Count);
System\Windows\Data\BindingGroup.cs (1)
1538private Dictionary<WeakReference, List<ValidationError>> _notifyDataErrors = new Dictionary<WeakReference, List<ValidationError>>();
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (2)
206_dictionariesFromUri = new Dictionary<Uri, List<WeakReference<ResourceDictionary>>>(); 434_resultCache = new Dictionary<WeakReferenceKey<StaticResourceExtension>, WeakReference<ResourceDictionary>>();
System\Windows\Documents\DocumentSequence.cs (1)
654_asyncOps = new Dictionary<Object,GetPageAsyncRequest>();
System\Windows\Documents\FixedDocument.cs (2)
828_highlights = new Dictionary<FixedPage, ArrayList>(); 829_asyncOps = new Dictionary<Object, GetPageAsyncRequest>();
System\Windows\Documents\FixedDSBuilder.cs (1)
39_nameHashTable = new Dictionary<String, NameHashFixedNode>();
System\Windows\Documents\FixedSchema.cs (1)
330private static readonly Dictionary<ContentType, XpsSchema> _schemas = new Dictionary<ContentType, XpsSchema>(new ContentType.StrongComparer());
System\Windows\Documents\FixedTextView.cs (1)
236Dictionary<FixedPage, ArrayList> highlights = new Dictionary<FixedPage,ArrayList>();
System\Windows\Documents\MsSpellCheckLib\SpellChecker\SpellChecker.cs (1)
640private static readonly Dictionary<bool, List<Type>> SuppressedExceptions = new Dictionary<bool, List<Type>>
System\Windows\Documents\MsSpellCheckLib\SpellCheckerFactory\SpellCheckerCreationHelper.cs (1)
38new Dictionary<string, SpellCheckerCreationHelper>();
System\Windows\Documents\MsSpellCheckLib\SpellCheckerFactory\SpellCheckerFactory.cs (1)
52private static Dictionary<bool, List<Type>> SuppressedExceptions = new Dictionary<bool, List<Type>>
System\Windows\Documents\Speller.cs (1)
422_uriMap = new Dictionary<Uri, DictionaryInfo>();
System\Windows\Documents\Tracing\SpellerCOMActionTraceLogger.cs (3)
85private static readonly Dictionary<Actions, long> _timeLimits100Ns = new Dictionary<Actions, long> 153CumulativeCallTime100Ns = new Dictionary<Actions, long>(), 154NumCallsMeasured = new Dictionary<Actions, long>()
System\Windows\Documents\WinRTSpellerInterop.cs (2)
51_spellCheckers = new Dictionary<CultureInfo, Tuple<WordsSegmenter, SpellChecker>>(); 52_customDictionaryFiles = new Dictionary<string, List<string>>();
System\Windows\FrameworkTemplate.cs (1)
1515private Dictionary<int, Type> _childTypeFromChildIndex = new Dictionary<int, Type>();
System\Windows\Markup\Baml2006\Baml2006Reader.cs (3)
33private Dictionary<int, TypeConverter> _typeConverterMap = new Dictionary<int, TypeConverter>(); 34private Dictionary<Type, TypeConverter> _enumTypeConverterMap = new Dictionary<Type, TypeConverter>(); 2737_freezeCache = new Dictionary<string, Freezable>();
System\Windows\Markup\Baml2006\Baml2006ReaderFrame.cs (2)
24_namespaces = new Dictionary<string, string>(source._namespaces); 44_namespaces = new Dictionary<string, string>();
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
658private readonly Dictionary<string, short[]> _bamlXmlnsMappings = new Dictionary<string, short[]>();
System\Windows\Markup\Baml2006\WpfKnownType.cs (1)
321_constructors = new Dictionary<int, Baml6ConstructorInfo>();
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (1)
56_masterTypeTable = new Dictionary<Type, XamlType>(256);
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (1)
59private Dictionary<Type, XamlType> _masterTypeTable = new Dictionary<Type, XamlType>();
System\Windows\Markup\BamlReader.cs (1)
177_reverseXmlnsTable = new Dictionary<String, List<String>>();
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (1)
140_dictionary = new Dictionary<BamlLocalizableResourceKey, BamlLocalizableResource>();
System\Windows\Markup\ParserContext.cs (3)
702_masterBracketCharacterCache = new Dictionary<Type, Dictionary<string, SpecialBracketCharacters>>(); 789_freezeCache = new Dictionary<string, Freezable>(); 842Dictionary<string, SpecialBracketCharacters> cache = new Dictionary<string, SpecialBracketCharacters>(StringComparer.OrdinalIgnoreCase);
System\Windows\Markup\Primitives\ElementMarkupObject.cs (2)
85constructorArguments = new Dictionary<string, string>(); 688_keyTypeMap = new Dictionary<Type, Type>();
System\Windows\Markup\Primitives\MarkupWriter.cs (6)
490Dictionary<string, string> writtenAttributes = new Dictionary<string, string>(); 1390_uriToPrefix = new Dictionary<string, string>(); 1392_prefixToUri = new Dictionary<string, string>(); 1550private static Dictionary<Assembly, Dictionary<string, string>> XmlnsDefinitions = new Dictionary<Assembly, Dictionary<string, string>>(); 1551private static Dictionary<string, string> DefaultPrefixes = new Dictionary<string, string>(); 1564namespaceToUri = new Dictionary<string, string>();
System\Windows\Markup\RoutedEventValueSerializer.cs (1)
38private static Dictionary<Type, Type> initializedTypes = new Dictionary<Type, Type>();
System\Windows\Markup\XamlTypeMapper.cs (2)
310Dictionary<string, string> newDict = new Dictionary<string, string>(); 4163private Dictionary<string, string> _piReverseTable = new Dictionary<string, string>();
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (4)
38_nsDefinitions = new Dictionary<string, FrugalObjectList<string>>(); 55_piNamespaces = new Dictionary<string, string>(typeMapper.PITable.Count); 201_piNamespaces = new Dictionary<string, string>(); 311_allowedInternalTypes = new Dictionary<Type, XamlType>();
System\Windows\Markup\XmlnsCache.cs (2)
130_compatTable = new Dictionary<string, string>(); 131_compatTableReverse = new Dictionary<string, string>();
System\Windows\ResourceDictionary.cs (1)
1810this._weakDeferredResourceReferencesMap ??= new();
System\Windows\Shell\JumpList.cs (1)
252private static readonly Dictionary<Application, JumpList> s_applicationMap = new Dictionary<Application, JumpList>();
System\Windows\Standard\MessageWindow.cs (1)
23private static readonly Dictionary<IntPtr, MessageWindow> s_windowLookup = new Dictionary<IntPtr, MessageWindow>();
System\Windows\SystemResources.cs (3)
464_dictionaries = new Dictionary<Assembly, ResourceDictionaries>(1); 1027_hwndNotify = new Dictionary<DpiUtil.HwndDpiInfo, HwndWrapper>(); 1028_hwndNotifyHook = new Dictionary<DpiUtil.HwndDpiInfo, HwndWrapperHook>();
System\Windows\TemplateContent.cs (1)
1545_namedTypes = new Dictionary<string, XamlType>();
System\Windows\VisualStateManager.cs (2)
667Dictionary<TimelineDataToken, Timeline> result = new Dictionary<TimelineDataToken, Timeline>(); 676Dictionary<TimelineDataToken, Timeline> result = new Dictionary<TimelineDataToken, Timeline>();
PresentationUI (9)
MS\Internal\Documents\Application\TransactionalPackage.cs (1)
573new Dictionary<Uri, WriteableOnDemandPackagePart>();
MS\Internal\Documents\DigitalSignatureProvider.cs (2)
335new Dictionary<X509Certificate2, CertificatePriorityStatus>(); 391new Dictionary<Guid, XpsSignatureDefinition>();
MS\Internal\Documents\DocumentSignatureManager.cs (2)
42_digSigSigResources = new Dictionary<SignatureResources, DigitalSignature>(); 213new Dictionary<X509Certificate2, CertificatePriorityStatus>();
MS\Internal\Documents\RightsManagementManager.cs (1)
48_userMap = new Dictionary<string, RightsManagementUser>();
MS\Internal\Documents\RightsManagementProvider.cs (3)
502new Dictionary<RightsManagementUser, IList<ContentGrant>>(); 546new Dictionary<RightsManagementUser, RightsManagementLicense>( 682new Dictionary<RightsManagementUser, RightsManagementLicense>();
Publishers.AppHost (1)
Program.cs (1)
11builder.Configuration.AddCommandLine(args, new Dictionary<string, string> { ["--target"] = "Deployment:Target" });
RazorBuildWebSite (1)
UpdateableFileProvider.cs (1)
15private readonly Dictionary<string, TestFileInfo> _content = new Dictionary<string, TestFileInfo>()
ReachFramework (87)
MS\Internal\Printing\MostFrequentlyUsedCache.cs (1)
15this._dictionary = new Dictionary<K, Entry>(maxEntries);
packaging\XpsDigitalSignature.cs (5)
65Dictionary<Uri, Uri> dependentList = new Dictionary<Uri,Uri>(); 315Dictionary<Uri, Uri> hashTable = new Dictionary<Uri, Uri>(); 364Dictionary<Uri, Dictionary<string, int>> uriHashTable = new Dictionary<Uri, Dictionary<string, int>>(); 380relHash = new Dictionary<string, int>(); 422_optionalSignedTypes = new Dictionary<string, string>();
Packaging\XpsDocument.cs (1)
854Dictionary<Uri,Uri> dependentList = new Dictionary<Uri,Uri> ();
Packaging\XpsFixedPageReaderWriter.cs (6)
469_fontCache = new Dictionary<Uri, XpsFont>(MS.Internal.UriComparer.Default); 470_colorContextCache = new Dictionary<Uri, XpsColorContext>(); 471_resourceDictionaryCache = new Dictionary<Uri, XpsResourceDictionary>(); 472_imageCache = new Dictionary<Uri, XpsImage>(); 473_resourceCache = new Dictionary<Uri, XpsResource>(); 1517Dictionary<Uri,PackageRelationship> restictedFontRels = new Dictionary<Uri,PackageRelationship>(MS.Internal.UriComparer.Default);
Packaging\XpsManager.cs (5)
53_contentTypes = new Dictionary<string, int>(11); 54_cachedParts = new Dictionary<Uri, PackagePart>(11); 171_packageCache = new Dictionary<Uri,int>(); 983_contentTypes = new Dictionary<string, int>(11); 984_cachedParts = new Dictionary<Uri, PackagePart>(11);
Packaging\XpsResourcePolicy.cs (1)
310Dictionary<Type, object> _objDict = new Dictionary<Type, object>();
PrintConfig\PrintSchemaShim.cs (11)
519private static readonly IDictionary<DevModeCollate, Collation> dmCollateToQResolution = new Dictionary<DevModeCollate, Collation>(2) { 544private static readonly IDictionary<DevModeColor, OutputColor> dmColorToOutputColor = new Dictionary<DevModeColor, OutputColor>(2) { 577private static readonly IDictionary<DevModeDuplex, Duplexing> dmDuplexToDuplexing = new Dictionary<DevModeDuplex, Duplexing>(3) { 674private static readonly IDictionary<short, InputBin> dmPaperSourceToInputBin = new Dictionary<short, InputBin>(4) { 681private static IDictionary<short, PaperSourceOption> paperSourceOptions = new Dictionary<short, PaperSourceOption>() { 781private static readonly IDictionary<short, PageMediaSizeName> dmPaperSizeToPageMediaSize = new Dictionary<short, PageMediaSizeName>(101) { 910private static readonly IDictionary<uint, PageMediaType> dmMediaTypeToMediaType = new Dictionary<uint, PageMediaType>(3) { 916private static IDictionary<uint, MediaTypeOption> mediaTypeOptions = new Dictionary<uint, MediaTypeOption>() { 960private static readonly IDictionary<DevModeOrientation, PageOrientation> dmOrientationToOrientation = new Dictionary<DevModeOrientation, PageOrientation>(2) { 1028private static readonly IDictionary<short, PageQualitativeResolution> dmResToQResolution = new Dictionary<short, PageQualitativeResolution>(4) { 1035private static IDictionary<short, OutputQualityOption> outputQualityOptions = new Dictionary<short, OutputQualityOption>() {
PrintConfig\PrtTicket_Public_Simple.cs (2)
250_setterCache = new Dictionary<CapabilityName, object>(); 274_setterCache = new Dictionary<CapabilityName, object>();
Serialization\Manager\ReachDocumentPageSerializer.cs (4)
45((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 50((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageColorContextTable = new Dictionary<int, Uri>(); 69((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 74((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageColorContextTable = new Dictionary<int, Uri>();
Serialization\Manager\ReachDocumentPageSerializerAsync.cs (2)
51((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 137((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>();
Serialization\Manager\ReachFixedDocumentSerializer.cs (6)
61((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 63((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageUriHashTable = new Dictionary<int,Uri>(); 68((XpsSerializationManager)SerializationManager).ResourcePolicy.ColorContextTable = new Dictionary<int, Uri>(); 98((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 100((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageUriHashTable = new Dictionary<int,Uri>(); 105((XpsSerializationManager)SerializationManager).ResourcePolicy.ColorContextTable = new Dictionary<int, Uri>();
Serialization\Manager\ReachFixedDocumentSerializerAsync.cs (6)
90((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 92((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageUriHashTable = new Dictionary<int,Uri>(); 97((XpsSerializationManagerAsync)SerializationManager).ResourcePolicy.ColorContextTable = new Dictionary<int, Uri>(); 127((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 129((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageUriHashTable = new Dictionary<int,Uri>(); 134((XpsSerializationManagerAsync)SerializationManager).ResourcePolicy.ColorContextTable = new Dictionary<int, Uri>();
Serialization\Manager\ReachFixedPageSerializer.cs (6)
69((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 74((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageColorContextTable = new Dictionary<int, Uri>(); 79((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageResourceDictionaryTable = new Dictionary<int, Uri>(); 109((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 114((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageColorContextTable = new Dictionary<int, Uri>(); 119((XpsSerializationManager)SerializationManager).ResourcePolicy.CurrentPageResourceDictionaryTable = new Dictionary<int, Uri>();
Serialization\Manager\ReachFixedPageSerializerAsync.cs (4)
106((XpsSerializationManagerAsync)SerializationManager).ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 111((XpsSerializationManagerAsync)SerializationManager).ResourcePolicy.CurrentPageColorContextTable = new Dictionary<int, Uri>(); 141((XpsSerializationManagerAsync)SerializationManager).ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 146((XpsSerializationManagerAsync)SerializationManager).ResourcePolicy.CurrentPageColorContextTable = new Dictionary<int, Uri>();
Serialization\Manager\ReachIDocumentPaginatorSerializer.cs (3)
42((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 44((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageUriHashTable = new Dictionary<int,Uri>(); 49((XpsSerializationManager)SerializationManager).ResourcePolicy.ColorContextTable = new Dictionary<int, Uri>();
Serialization\Manager\ReachIDocumentPaginatorSerializerAsync.cs (2)
79((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 81((XpsSerializationManager)SerializationManager).ResourcePolicy.ImageUriHashTable = new Dictionary<int,Uri>();
Serialization\Manager\ReachSerializationUtils.cs (5)
467_serializationManager.ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 469_serializationManager.ResourcePolicy.ImageUriHashTable = new Dictionary<int, Uri>(); 474_serializationManager.ResourcePolicy.ColorContextTable = new Dictionary<int, Uri>(); 554_serializationManager.ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 558_serializationManager.ResourcePolicy.CurrentPageColorContextTable = new Dictionary<int, Uri>();
Serialization\Manager\XpsOMDocumentPageSerializer.cs (2)
68_xpsOMSerializationManager.ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 73_xpsOMSerializationManager.ResourcePolicy.CurrentPageColorContextTable = new Dictionary<int, Uri>();
Serialization\Manager\XpsOMDocumentPaginatorSerializer.cs (3)
51_xpsOMSerializationManager.ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 53_xpsOMSerializationManager.ResourcePolicy.ImageUriHashTable = new Dictionary<int, Uri>(); 58_xpsOMSerializationManager.ResourcePolicy.ColorContextTable = new Dictionary<int, Uri>();
Serialization\Manager\XpsOMFixedDocumentSerializer.cs (3)
68_xpsOMSerializationManager.ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 70_xpsOMSerializationManager.ResourcePolicy.ImageUriHashTable = new Dictionary<int, Uri>(); 75_xpsOMSerializationManager.ResourcePolicy.ColorContextTable = new Dictionary<int, Uri>();
Serialization\Manager\XpsOMFixedPageSerializer.cs (3)
77_xpsOMSerializationManager.ResourcePolicy.CurrentPageImageTable = new Dictionary<int, Uri>(); 82_xpsOMSerializationManager.ResourcePolicy.CurrentPageColorContextTable = new Dictionary<int, Uri>(); 87_xpsOMSerializationManager.ResourcePolicy.CurrentPageResourceDictionaryTable = new Dictionary<int, Uri>();
Serialization\Manager\XpsOMHierarchySimulator.cs (3)
75_xpsOMSerializationManager.ResourcePolicy.ImageCrcTable = new Dictionary<UInt32, Uri>(); 77_xpsOMSerializationManager.ResourcePolicy.ImageUriHashTable = new Dictionary<int, Uri>(); 82_xpsOMSerializationManager.ResourcePolicy.ColorContextTable = new Dictionary<int, Uri>();
Serialization\TreeWalkProgress.cs (1)
43private IDictionary<ICyclicBrush, EmptyStruct> _cyclicBrushes = new Dictionary<ICyclicBrush, EmptyStruct>();
Serialization\VisualTreeFlattener.cs (1)
499_nameList = new Dictionary<String, int>();
Serialization\XpsFontSubsetter.cs (1)
104_fontEmbeddingManagerCache = new Dictionary<Uri, FEMCacheItem>(3, MS.Internal.UriComparer.Default);
Roslyn.Compilers.Extension (1)
CompilerPackage.cs (1)
68var filesToWrite = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Roslyn.Diagnostics.Analyzers (38)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (10)
39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
19new Dictionary<BinaryOperatorKind, BinaryOperatorKind>
Roslyn.Diagnostics.CSharp.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
15private static readonly Dictionary<SyntaxKind, int> s_kindPrecedenceMap = new(SyntaxFacts.EqualityComparer) 36private static readonly Dictionary<SyntaxKind, int> s_operatorPrecedenceMap = new(SyntaxFacts.EqualityComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
664var result = new Dictionary<ITypeParameterSymbol, ITypeSymbol>();
Roslyn.Test.PdbUtilities (1)
Reader\Token2SourceLineExporter.cs (1)
1195var tokenToSourceMapping = new Dictionary<uint, PdbTokenLine>();
Roslyn.VisualStudio.DiagnosticsWindow (1)
PerfMargin\DataModel.cs (1)
27var features = new Dictionary<string, ActivityLevel>();
Roslyn.VisualStudio.Next.UnitTests (13)
Services\AssetProviderTests.cs (1)
55var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), new Dictionary<Checksum, object>() { { checksum, data } });
Services\PerformanceTrackerServiceTests.cs (1)
189var matrix = new Dictionary<string, double[]>();
Services\SolutionServiceTests.cs (11)
554var map = new Dictionary<Checksum, object>(); 595var map = new Dictionary<Checksum, object>(); 637var map = new Dictionary<Checksum, object>(); 670var map = new Dictionary<Checksum, object>(); 712var map = new Dictionary<Checksum, object>(); 752var map = new Dictionary<Checksum, object>(); 790var map = new Dictionary<Checksum, object>(); 823var map = new Dictionary<Checksum, object>(); 878var map = new Dictionary<Checksum, object>(); 947var map = new Dictionary<Checksum, object>(); 1282var map = new Dictionary<Checksum, object>();
RulesetToEditorconfigConverter (1)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
RunTests (2)
ProcessTestExecutor.cs (1)
130var environmentVariables = new Dictionary<string, string>();
TestHistoryManager.cs (1)
82Dictionary<string, TimeSpan> testInfos = new();
Sample (3)
Endpoints\MapSchemasEndpoints.cs (2)
28schemas.MapGet("/dictionary-of-ints", () => new Dictionary<string, int> { { "one", 1 }, { "two", 2 } }); 29schemas.MapGet("/frozen-dictionary-of-ints", () => ImmutableDictionary.CreateRange(new Dictionary<string, int> { { "one", 1 }, { "two", 2 } }));
Transformers\AddBearerSecuritySchemeTransformer.cs (1)
16var requirements = new Dictionary<string, IOpenApiSecurityScheme>
ScenarioTests.Common.Tests (1)
ScenarioTestTypes.cs (1)
600_headers = new Dictionary<string, string>();
Shared (6)
JsonSchemaExporter\JsonSchemaExporter.cs (2)
486private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new(); 579private static readonly Dictionary<Type, Func<JsonNumberHandling, JsonSchema>> _simpleTypeSchemaFactories = new()
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
157Dictionary<ParameterLookupKey, ParameterInfo> dict = new(parameters.Length);
JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (2)
28private readonly Dictionary<Module, NotAnnotatedStatus> _publicOnlyModules = new(); 29private readonly Dictionary<MemberInfo, NullabilityState> _context = new();
Pools\PooledDictionaryPolicy.cs (1)
24public override Dictionary<TKey, TValue> Create() => new(_comparer);
Shared.Tests (5)
EmptyCollections\EmptyCollectionExtensionsTests.cs (1)
49var dictionary = new Dictionary<T, T>();
JsonSchemaExporter\TestTypes.cs (4)
503Value: new() { Name = "name", ExtensionData = new() { ["x"] = 42 } }, 815Value: new() { ["one"] = 1, ["two"] = 2, ["three"] = 3 }, 827Value: new() 850Value: new() { ["one"] = 1, ["two"] = "two", ["three"] = 3.14 },
SimpleWebSite (1)
Controllers\HomeController.cs (1)
10return new Dictionary<string, string> {
SocialSample (1)
Startup.cs (1)
322var pairs = new Dictionary<string, string>()
SocialWeather (2)
FormatterResolver.cs (2)
11= new Dictionary<string, Dictionary<Type, Type>>(); 24typeFormatters = _formatters[formatType] = new Dictionary<Type, Type>();
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (1)
49public static Dictionary<string, Func<ListenOptions>> ConnectionMiddlewareData { get; } = new Dictionary<string, Func<ListenOptions>>
Swaggatherer (2)
SwaggathererApplication.cs (1)
82var routesByPrecedence = new Dictionary<decimal, List<RouteEntry>>();
Template.cs (1)
15var templatesVisited = new Dictionary<string, (int ControllerIndex, int ActionIndex)>(
System.CodeDom (4)
System\CodeDom\CodeNamespaceImportCollection.cs (1)
12private readonly Dictionary<string, CodeNamespaceImport> _keys = new Dictionary<string, CodeNamespaceImport>(StringComparer.OrdinalIgnoreCase);
System\CodeDom\Compiler\CodeDomProvider.cs (2)
16private static readonly Dictionary<string, CompilerInfo> s_compilerLanguages = new Dictionary<string, CompilerInfo>(StringComparer.OrdinalIgnoreCase); 17private static readonly Dictionary<string, CompilerInfo> s_compilerExtensions = new Dictionary<string, CompilerInfo>(StringComparer.OrdinalIgnoreCase);
System\CodeDom\Compiler\CompilerInfo.cs (1)
12internal readonly IDictionary<string, string> _providerOptions = new Dictionary<string, string>();
System.Collections.Immutable (4)
System\Collections\Frozen\FrozenDictionary.cs (2)
54Dictionary<TKey, TValue> d = new(source.Length, comparer); 134newDictionary = new Dictionary<TKey, TValue>(comparer);
System\Linq\ImmutableArrayExtensions.cs (2)
578var result = new Dictionary<TKey, T>(immutableArray.Length, comparer); 603var result = new Dictionary<TKey, TElement>(immutableArray.Length, comparer);
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\UIHintAttribute.cs (1)
164var controlParameters = new Dictionary<string, object?>();
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
213var propertyStoreItems = new Dictionary<string, PropertyStoreItem>();
System\ComponentModel\DataAnnotations\ValidationContext.cs (4)
97_items = items != null ? new Dictionary<object, object?>(items) : new Dictionary<object, object?>(); 133_items = items != null ? new Dictionary<object, object?>(items) : new Dictionary<object, object?>();
System.ComponentModel.Composition (28)
System\ComponentModel\Composition\AttributedModelServices.cs (1)
120var metadata = new Dictionary<string, object?>();
System\ComponentModel\Composition\ContractNameServices.cs (1)
35return typeIdentityCache ??= new Dictionary<Type, string>();
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (1)
39private readonly Dictionary<ComposablePartDefinition, CatalogPart> _activatedParts = new Dictionary<ComposablePartDefinition, CatalogPart>();
System\ComponentModel\Composition\Hosting\CompositionServices.cs (4)
187var dictionary = new Dictionary<string, object?>(StringComparers.MetadataKeyNames); 259dictionary = new Dictionary<string, object?>(); 502metadata = new Dictionary<string, object?>(); 518metadata ??= new Dictionary<string, object?>();
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (1)
756_assemblyCatalogs = new Dictionary<string, AssemblyCatalog>();
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependenciesTraversal.cs (1)
36_exportersIndex = new Dictionary<string, List<ComposablePartDefinition>>();
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependentsTraversal.cs (1)
42_importersIndex = new Dictionary<string, List<ComposablePartDefinition>>();
System\ComponentModel\Composition\Hosting\ImportEngine.PartManager.cs (2)
105_importCache ??= new Dictionary<ImportDefinition, Export[]?>(); 174_importedDisposableExports ??= new Dictionary<ImportDefinition, List<IDisposable>>();
System\ComponentModel\Composition\Hosting\ImportEngine.RecompositionManager.cs (1)
22private readonly Dictionary<string, WeakReferenceCollection<PartManager>> _partManagerIndex = new Dictionary<string, WeakReferenceCollection<PartManager>>();
System\ComponentModel\Composition\Hosting\ImportSourceImportDefinitionHelpers.cs (1)
53reply = new Dictionary<string, object?>(_sourceDefinition.Metadata);
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (1)
318Dictionary<string, List<ComposablePartDefinition>> index = new Dictionary<string, List<ComposablePartDefinition>>(StringComparers.ContractName);
System\ComponentModel\Composition\MetadataServices.cs (1)
12public static readonly IDictionary<string, object?> EmptyMetadata = new ReadOnlyDictionary<string, object?>(new Dictionary<string, object?>(0));
System\ComponentModel\Composition\MetadataViewGenerator.cs (1)
69private static readonly Dictionary<Type, MetadataViewFactory> _metadataViewFactories = new Dictionary<Type, MetadataViewFactory>();
System\ComponentModel\Composition\ReflectionModel\GenericSpecializationPartCreationInfo.cs (6)
100var originalMetadata = new Dictionary<string, object?>(_originalPartCreationInfo.GetMetadata()!, StringComparers.MetadataKeyNames); 175Dictionary<LazyMemberInfo, MemberInfo[]> membersTable = new Dictionary<LazyMemberInfo, MemberInfo[]>(); 176Dictionary<int, MemberInfo> specializedPartMembers = new Dictionary<int, MemberInfo>(); 240Dictionary<Lazy<ParameterInfo>, ParameterInfo> parametersTable = new Dictionary<Lazy<ParameterInfo>, ParameterInfo>(); 437Dictionary<string, object?> metadata = new Dictionary<string, object?>(originalImport.Metadata, StringComparers.MetadataKeyNames); 454Dictionary<string, object?> metadata = new Dictionary<string, object?>(originalExport.Metadata, StringComparers.MetadataKeyNames);
System\ComponentModel\Composition\ReflectionModel\ImportType.cs (1)
31return _castSingleValueCache ??= new Dictionary<Type, Func<Export, object>?>();
System\ComponentModel\Composition\ReflectionModel\PartCreatorExportDefinition.cs (1)
35var metadata = new Dictionary<string, object?>(_productDefinition.Metadata);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (3)
72value = new Dictionary<ImportDefinition, object?>(); 93value = new Dictionary<ImportDefinition, ImportingItem>(); 570_exportsCache ??= new Dictionary<int, ExportingMember>();
System.ComponentModel.Composition.Registration (3)
System\ComponentModel\Composition\Registration\PartBuilderOfT.cs (1)
123_importBuilders ??= new Dictionary<ParameterInfo, Action<ImportBuilder>>();
System\ComponentModel\Composition\Registration\RegistrationBuilder.cs (2)
26private readonly Dictionary<MemberInfo, List<Attribute>> _memberInfos = new Dictionary<MemberInfo, List<Attribute>>(); 27private readonly Dictionary<ParameterInfo, List<Attribute>> _parameters = new Dictionary<ParameterInfo, List<Attribute>>();
System.ComponentModel.TypeConverter (10)
src\libraries\Common\src\System\Drawing\ColorTable.cs (1)
16var colors = new Dictionary<string, Color>(StringComparer.OrdinalIgnoreCase);
System\ComponentModel\AttributeCollection.cs (1)
249s_defaultAttributes ??= new Dictionary<Type, Attribute?>();
System\ComponentModel\ComponentResourceManager.cs (1)
109_resourceSets = new Dictionary<CultureInfo, SortedList<string, object?>?>();
System\ComponentModel\CultureInfoConverter.cs (1)
273var result = new Dictionary<string, string>(Count)
System\ComponentModel\Design\Serialization\MemberRelationshipService.cs (1)
29private readonly Dictionary<RelationshipEntry, RelationshipEntry> _relationships = new Dictionary<RelationshipEntry, RelationshipEntry>();
System\ComponentModel\LicenseManager.LicenseInteropHelper.cs (1)
65private readonly Dictionary<string, string> _savedLicenseKeys = new Dictionary<string, string>();
System\ComponentModel\MemberDescriptor.cs (1)
345var map = new Dictionary<object, int>();
System\ComponentModel\ReflectTypeDescriptionProvider.cs (1)
149return LazyInitializer.EnsureInitialized(ref s_intrinsicTypeConverters, () => new Dictionary<object, IntrinsicTypeConverterData>(32)
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (2)
444Dictionary<string, EventDescriptor> eventList = new Dictionary<string, EventDescriptor>(16); 479Dictionary<string, PropertyDescriptor> propertyList = new Dictionary<string, PropertyDescriptor>(10);
System.Composition.Convention (3)
System\Composition\Convention\ConventionBuilder.cs (2)
19private readonly Dictionary<MemberInfo, List<Attribute>> _memberInfos = new Dictionary<MemberInfo, List<Attribute>>(); 20private readonly Dictionary<ParameterInfo, List<Attribute>> _parameters = new Dictionary<ParameterInfo, List<Attribute>>();
System\Composition\Convention\PartConventionBuilderOfT.cs (1)
181_importBuilders ??= new Dictionary<ParameterInfo, Action<ImportConventionBuilder>>();
System.Composition.Hosting (4)
System\Composition\Hosting\Core\ExportDescriptorProvider.cs (1)
26protected static readonly IDictionary<string, object> NoMetadata = new ReadOnlyDictionary<string, object>(new Dictionary<string, object>());
System\Composition\Hosting\Core\ExportDescriptorRegistry.cs (2)
13private volatile Dictionary<CompositionContract, ExportDescriptor[]> _partDefinitions = new Dictionary<CompositionContract, ExportDescriptor[]>(); 29var updatedDefinitions = new Dictionary<CompositionContract, ExportDescriptor[]>(_partDefinitions);
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
15private readonly Dictionary<CompositionContract, UpdateResult> _updateResults = new Dictionary<CompositionContract, UpdateResult>();
System.Composition.Runtime (2)
System\Composition\CompositionContext.cs (1)
181new Dictionary<string, object> { { ImportManyImportMetadataConstraintName, true } });
System\Composition\Hosting\Core\CompositionContract.cs (1)
164var remainingConstraints = new Dictionary<string, object>(_metadataConstraints);
System.Composition.TypedParts (10)
System\Composition\Hosting\SinglePartExportDescriptorProvider.cs (1)
19Metadata = metadata ?? new Dictionary<string, object>();
System\Composition\TypedParts\ContractHelpers.cs (3)
50importMetadata ??= new Dictionary<string, object>(); 60importMetadata ??= new Dictionary<string, object>(); 75importMetadata ??= new Dictionary<string, object>();
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (2)
36private static readonly IDictionary<string, object> s_noMetadata = new Dictionary<string, object>(); 210var partMetadata = new Dictionary<string, object>();
System\Composition\TypedParts\Discovery\TypeInspector.cs (3)
16private static readonly IDictionary<string, object> s_noMetadata = new Dictionary<string, object>(); 57IDictionary<string, object> metadata = new Dictionary<string, object>(); 83IDictionary<string, object> metadata = new Dictionary<string, object>();
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (1)
16private readonly Dictionary<CompositionContract, ICollection<DiscoveredExport>> _discoveredParts = new Dictionary<CompositionContract, ICollection<DiscoveredExport>>();
System.Configuration.ConfigurationManager (2)
System\Configuration\BaseConfigurationRecord.cs (1)
417indirectLocationInputs ??= new Dictionary<string, List<SectionInput>>(1);
System\Configuration\ConfigurationElement.cs (1)
793s_perTypeValidators ??= new Dictionary<Type, ConfigurationValidatorBase>();
System.Console (2)
System\TerminalFormatStrings.cs (1)
54public readonly Dictionary<string, ConsoleKeyInfo> KeyFormatToConsoleKey = new(StringComparer.Ordinal);
System\TermInfo.Database.cs (1)
254var extendedStrings = new Dictionary<string, string>(extendedStringCount);
System.Data.Common (12)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
434var parsetable = new Dictionary<string, string>();
System\Data\Common\AdapterUtil.Common.cs (1)
782Dictionary<string, int> hash = new Dictionary<string, int>(columnNameArray.Length);
System\Data\Common\DbConnectionOptions.cs (1)
39_parsetable = new Dictionary<string, string?>();
System\Data\Common\DbConnectionStringBuilder.cs (1)
65values = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
System\Data\Common\ObjectStorage.cs (2)
610new Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>( 620cache = new Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>(
System\Data\DataColumnCollection.cs (1)
41_columnFromName = new Dictionary<string, DataColumn?>();
System\Data\DataView.cs (4)
74private Dictionary<DataRow, DataRowView> _rowViewCache = new Dictionary<DataRow, DataRowView>(DataRowReferenceComparer.s_default); 79private readonly Dictionary<DataRow, DataRowView> _rowViewBuffer = new Dictionary<DataRow, DataRowView>(DataRowReferenceComparer.s_default); 911_findIndexes ??= new Dictionary<string, Index>(); 1451Dictionary<DataRow, DataRowView> rvc = new Dictionary<DataRow, DataRowView>(CountFromIndex, DataRowReferenceComparer.s_default);
System\Data\XMLSchema.cs (1)
690_tableDictionary = new Dictionary<DataTable, List<DataTable>>();
System.Data.Odbc (8)
Common\System\Data\Common\DbConnectionOptions.cs (1)
47_parsetable = new Dictionary<string, string?>();
Common\System\Data\Common\DBConnectionString.cs (1)
92_parsetable = new Dictionary<string, string?>(_parsetable);
src\libraries\Common\src\System\Data\Common\BasicFieldNameLookup.cs (1)
130Dictionary<string, int> hash = new Dictionary<string, int>(length);
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
434var parsetable = new Dictionary<string, string>();
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionFactory.cs (3)
31_connectionPoolGroups = new Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup>(); 221Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> newConnectionPoolGroups = new Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup>(1 + connectionPoolGroups.Count); 303Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> newConnectionPoolGroups = new Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup>(connectionPoolGroups.Count);
System\Data\Odbc\OdbcConnectionStringbuilder.cs (1)
28private static readonly Dictionary<string, Keywords> s_keywords = new Dictionary<string, Keywords>(2, StringComparer.OrdinalIgnoreCase)
System.Diagnostics.DiagnosticSource (5)
System\Diagnostics\Activity.cs (1)
1136Interlocked.CompareExchange(ref _customProperties, new Dictionary<string, object>(), null);
System\Diagnostics\DsesActivitySourceListener.cs (1)
73var specs = _specsBySourceNameAndActivityName ??= new(SpecLookupKeyComparer.Instance);
System\Diagnostics\Metrics\AggregationManager.cs (1)
27private Dictionary<Instrument, bool> _instruments = new();
System\Diagnostics\Metrics\Meter.cs (1)
20private Dictionary<string, List<Instrument>> _nonObservableInstrumentsCache = new();
System\Diagnostics\Metrics\MeterListener.cs (1)
271callbacksArguments = new Dictionary<Instrument, object?>();
System.Diagnostics.Process (3)
System\Diagnostics\ProcessStartInfo.cs (1)
99_environmentVariables = new DictionaryWrapper(new Dictionary<string, string?>(
System\Diagnostics\ProcessWaitState.Unix.cs (2)
87new Dictionary<int, ProcessWaitState>(); 93new Dictionary<int, ProcessWaitState>();
System.Drawing.Common.Tests (1)
System\Drawing\Printing\MarginsConverterTests.cs (1)
49IDictionary values = new Dictionary<string, int>
System.Drawing.Primitives (2)
src\libraries\Common\src\System\Drawing\ColorTable.cs (1)
16var colors = new Dictionary<string, Color>(StringComparer.OrdinalIgnoreCase);
System\Drawing\ColorTranslator.cs (1)
402s_htmlSysColorTable = new Dictionary<string, Color>(27)
System.Formats.Nrbf (2)
System\Formats\Nrbf\ClassInfo.cs (1)
55Dictionary<string, int> memberNames = new(StringComparer.Ordinal);
System\Formats\Nrbf\RecordMap.cs (1)
14private readonly Dictionary<SerializationRecordId, SerializationRecord> _map = new();
System.Formats.Tar (4)
System\Formats\Tar\TarHeader.cs (2)
78internal Dictionary<string, string> ExtendedAttributes => _ea ??= new Dictionary<string, string>(); 131_ea ??= new Dictionary<string, string>();
System\Formats\Tar\TarWriter.Unix.cs (2)
15private readonly Dictionary<uint, string> _userIdentifiers = new Dictionary<uint, string>(); 16private readonly Dictionary<uint, string> _groupIdentifiers = new Dictionary<uint, string>();
System.IO.Compression (1)
System\IO\Compression\ZipArchive.cs (1)
190_entriesDictionary = new Dictionary<string, ZipArchiveEntry>();
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
281private readonly Dictionary<int, WatchedDirectory> _wdToPathMap = new Dictionary<int, WatchedDirectory>();
System.IO.Packaging (18)
System\IO\Packaging\ContentType.cs (2)
144(_parameterDictionary ??= new Dictionary<string, string>()).GetEnumerator(); 335(_parameterDictionary ??= new Dictionary<string, string>()).Add(
System\IO\Packaging\OrderedDictionary.cs (1)
22_dictionary = new Dictionary<TKey, LinkedListNode<TValue>>(initialCapacity);
System\IO\Packaging\Package.cs (1)
417Dictionary<string, KeyValuePair<PackUriHelper.ValidatedPartUri, PackagePart>> partDictionary = new(parts.Length);
System\IO\Packaging\PartBasedPackageProperties.cs (1)
838private readonly Dictionary<PackageXmlEnum, object> _propertyDictionary = new Dictionary<PackageXmlEnum, object>(NumCoreProperties);
System\IO\Packaging\XmlCompatibilityReader.cs (9)
820_subsumingNamespaces ??= new Dictionary<string, object?>(); 846_knownNamespaces ??= new Dictionary<string, object?>(); 1647_ignorables ??= new Dictionary<string, object?>(); 1653_processContents ??= new Dictionary<string, ProcessContentSet>(); 1665_preserveElements ??= new Dictionary<string, PreserveItemSet>(); 1677_preserveAttributes ??= new Dictionary<string, PreserveItemSet>(); 1833private readonly Dictionary<string, string> _namespaceMap = new Dictionary<string, string>(); 1835private readonly Dictionary<string, HandleElementCallback> _elementHandler = new Dictionary<string, HandleElementCallback>(); 1836private readonly Dictionary<string, HandleAttributeCallback> _attributeHandler = new Dictionary<string, HandleAttributeCallback>();
System\IO\Packaging\ZipPackage.cs (4)
776_defaultDictionary = new Dictionary<string, ContentType>(DefaultDictionaryInitialSize, s_extensionEqualityComparer); 950_overrideDictionary ??= new Dictionary<PackUriHelper.ValidatedPartUri, ContentType>(OverrideDictionaryInitialSize); 1370_extensionDictionary = new Dictionary<string, List<string>>(_dictionaryInitialSize, s_extensionEqualityComparer); 1371_ignoredItemDictionary = new Dictionary<string, List<string>>(_dictionaryInitialSize, StringComparer.Ordinal);
System.IO.Pipes (1)
System\IO\Pipes\NamedPipeServerStream.Unix.cs (1)
236private static readonly Dictionary<string, SharedServer> s_servers = new Dictionary<string, SharedServer>();
System.Linq (10)
System\Linq\AggregateBy.cs (2)
119Dictionary<TKey, TAccumulate> dict = new(keyComparer); 151Dictionary<TKey, TAccumulate> dict = new(keyComparer);
System\Linq\CountBy.cs (1)
56Dictionary<TKey, int> countsBy = new(keyComparer);
System\Linq\ToCollection.cs (7)
105return new(source, comparer); 155return new Dictionary<TKey, TSource>(comparer); 170Dictionary<TKey, TSource> d = new Dictionary<TKey, TSource>(capacity, comparer); 181Dictionary<TKey, TSource> d = new Dictionary<TKey, TSource>(source.Length, comparer); 213return new Dictionary<TKey, TElement>(comparer); 228Dictionary<TKey, TElement> d = new Dictionary<TKey, TElement>(capacity, comparer); 239Dictionary<TKey, TElement> d = new Dictionary<TKey, TElement>(source.Length, comparer);
System.Linq.AsyncEnumerable (11)
System\Linq\AggregateBy.cs (4)
64Dictionary<TKey, TAccumulate> dict = new(keyComparer); 135Dictionary<TKey, TAccumulate> dict = new(keyComparer); 202Dictionary<TKey, TAccumulate> dict = new(keyComparer); 271Dictionary<TKey, TAccumulate> dict = new(keyComparer);
System\Linq\CountBy.cs (2)
42Dictionary<TKey, int> countsBy = new(keyComparer); 93Dictionary<TKey, int> countsBy = new(keyComparer);
System\Linq\ToDictionaryAsync.cs (5)
37Dictionary<TKey, TValue> d = new Dictionary<TKey, TValue>(comparer); 92Dictionary<TKey, TSource> d = new(comparer); 132Dictionary<TKey, TSource> d = new(comparer); 177Dictionary<TKey, TElement> d = new(comparer); 224Dictionary<TKey, TElement> d = new(comparer);
System.Linq.Expressions (28)
System\Dynamic\ExpandoClass.cs (1)
92_transitions ??= new Dictionary<int, List<WeakReference>>();
System\Linq\Expressions\Compiler\AnalyzedTree.cs (2)
10internal readonly Dictionary<object, CompilerScope> Scopes = new Dictionary<object, CompilerScope>(); 11internal readonly Dictionary<LambdaExpression, BoundConstants> Constants = new Dictionary<LambdaExpression, BoundConstants>();
System\Linq\Expressions\Compiler\BoundConstants.cs (3)
60private readonly Dictionary<object, int> _indexes = new Dictionary<object, int>(ReferenceEqualityComparer.Instance); 65private readonly Dictionary<TypedConstant, int> _references = new Dictionary<TypedConstant, int>(); 70private readonly Dictionary<TypedConstant, LocalBuilder> _cache = new Dictionary<TypedConstant, LocalBuilder>();
System\Linq\Expressions\Compiler\CompilerScope.cs (3)
64internal readonly Dictionary<ParameterExpression, VariableStorageKind> Definitions = new Dictionary<ParameterExpression, VariableStorageKind>(); 94private readonly Dictionary<ParameterExpression, Storage> _locals = new Dictionary<ParameterExpression, Storage>(); 102Definitions = new Dictionary<ParameterExpression, VariableStorageKind>(variables.Count);
System\Linq\Expressions\Compiler\DelegateHelpers.Generated.cs (1)
72curTypeInfo.TypeChain ??= new Dictionary<Type, TypeInfo>();
System\Linq\Expressions\Compiler\HoistedLocals.cs (1)
69Dictionary<Expression, int> indexes = new Dictionary<Expression, int>(vars.Count);
System\Linq\Expressions\Compiler\KeyedStack.cs (1)
14private readonly Dictionary<TKey, Stack<TValue>> _data = new Dictionary<TKey, Stack<TValue>>();
System\Linq\Expressions\Compiler\LabelInfo.cs (1)
384_labels ??= new Dictionary<LabelTarget, LabelInfo>();
System\Linq\Expressions\Compiler\LambdaCompiler.cs (1)
49private readonly Dictionary<LabelTarget, LabelInfo> _labelInfo = new Dictionary<LabelTarget, LabelInfo>();
System\Linq\Expressions\Compiler\VariableBinder.cs (1)
222referenceScope.ReferenceCount ??= new Dictionary<ParameterExpression, int>();
System\Linq\Expressions\DebugViewWriter.cs (1)
80ids = new Dictionary<T, int>();
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
38_ids ??= new Dictionary<object, int>();
System\Linq\Expressions\Interpreter\InstructionList.cs (1)
851private static readonly Dictionary<FieldInfo, Instruction> s_loadFields = new Dictionary<FieldInfo, Instruction>();
System\Linq\Expressions\Interpreter\LightCompiler.cs (4)
1634var caseDict = new Dictionary<T, int>(); 1676var caseDict = new Dictionary<string, int>(); 2775var mapping = new Dictionary<ParameterExpression, LocalVariable>(); 2788private readonly Dictionary<ParameterExpression, int> _definedParameters = new Dictionary<ParameterExpression, int>();
System\Linq\Expressions\Interpreter\LightLambda.cs (3)
39private readonly Dictionary<int, int> _tryStart = new Dictionary<int, int>(); 40private readonly Dictionary<int, string> _handlerEnter = new Dictionary<int, string>(); 41private readonly Dictionary<int, int> _handlerExit = new Dictionary<int, int>();
System\Linq\Expressions\Interpreter\LocalVariables.cs (1)
160_closureVariables ??= new Dictionary<ParameterExpression, LocalVariable>();
System\Linq\Expressions\Interpreter\Utilities.cs (1)
321_dict = new Dictionary<TKey, TValue>();
System\Runtime\CompilerServices\CallSiteBinder.cs (1)
207Interlocked.CompareExchange(ref Cache, new Dictionary<Type, object>(), null);
System.Linq.Parallel (7)
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (1)
284new Dictionary<Wrapper<TInputOutput>, Pair<TInputOutput, TLeftKey>>(
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (1)
270_hashLookup = new Dictionary<Wrapper<TInputOutput>, Pair<TInputOutput, TLeftKey>>(_comparer);
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (1)
342new Dictionary<Wrapper<TInputOutput>, Pair<TInputOutput, ConcatKey<TLeftKey, TRightKey>>>(wrapperComparer);
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (1)
214_hashLookup = new Dictionary<Wrapper<TInputOutput>, TKey>(
System\Linq\Parallel\Utils\Lookup.cs (1)
46_dict = new Dictionary<TKey, IGrouping<TKey, TElement>>(_comparer);
System\Linq\ParallelEnumerable.cs (2)
4965Dictionary<TKey, TSource> result = new Dictionary<TKey, TSource>(comparer); 5063Dictionary<TKey, TElement> result = new Dictionary<TKey, TElement>(comparer);
System.Linq.Queryable (2)
System\Linq\EnumerableRewriter.cs (2)
152_equivalentTypeCache ??= new Dictionary<Type, Type> 422_targetCache = new Dictionary<LabelTarget, LabelTarget>();
System.Net.Http (11)
src\libraries\Common\src\System\Collections\Generic\BidirectionalDictionary.cs (2)
18_forward = new Dictionary<T1, T2>(capacity); 19_backward = new Dictionary<T2, T1>(capacity);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\H3StaticTable.Http3.cs (1)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int>
System\Net\Http\Headers\HttpHeaders.cs (1)
1553var dictionary = new Dictionary<HeaderDescriptor, object>(ArrayThreshold);
System\Net\Http\HttpRequestOptions.cs (1)
17private Dictionary<string, object?> Options { get; } = new Dictionary<string, object?>();
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (1)
238internal readonly Dictionary<string, string> Parameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
827altSvcBlocklist = new Dictionary<HttpAuthority, Exception?>();
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
143_httpStreams = new Dictionary<int, Http2Stream>();
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (1)
29private readonly Dictionary<QuicStream, Http3RequestStream> _activeRequests = new Dictionary<QuicStream, Http3RequestStream>();
System\Net\Http\SocketsHttpHandler\PreAuthCredentialCache.cs (1)
25_cache ??= new Dictionary<CredentialCacheKey, NetworkCredential>();
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (1)
432_settings._properties ??= new Dictionary<string, object?>();
System.Net.HttpListener (7)
System\Net\Managed\HttpEndPointListener.cs (3)
72_prefixes = new Dictionary<ListenerPrefix, HttpListener>(); 356p2 = new Dictionary<ListenerPrefix, HttpListener>(prefs); 399p2 = new Dictionary<ListenerPrefix, HttpListener>(prefs);
System\Net\Managed\HttpEndPointManager.cs (2)
40private static readonly Dictionary<IPAddress, Dictionary<int, HttpEndPointListener>> s_ipEndPoints = new Dictionary<IPAddress, Dictionary<int, HttpEndPointListener>>(); 144p = new Dictionary<int, HttpEndPointListener>();
System\Net\Managed\HttpListener.Managed.cs (2)
15private readonly Dictionary<HttpListenerContext, HttpListenerContext> _listenerContexts = new Dictionary<HttpListenerContext, HttpListenerContext>(); 18private readonly Dictionary<HttpConnection, HttpConnection> _connections = new Dictionary<HttpConnection, HttpConnection>();
System.Net.Mail (8)
System\Net\Mail\MailHeaderInfo.cs (1)
74var headers = new Dictionary<string, int>((int)MailHeaderID.ZMaxEnumValue + 1, StringComparer.OrdinalIgnoreCase);
System\Net\Mail\SmtpLoginAuthenticationModule.cs (1)
11private readonly Dictionary<object, NetworkCredential> _sessions = new Dictionary<object, NetworkCredential>();
System\Net\Mail\SmtpNegotiateAuthenticationModule.cs (1)
15private readonly Dictionary<object, NegotiateAuthentication> _sessions = new Dictionary<object, NegotiateAuthentication>();
System\Net\Mail\SmtpNtlmAuthenticationModule.cs (1)
12private readonly Dictionary<object, NegotiateAuthentication> _sessions = new Dictionary<object, NegotiateAuthentication>();
System\Net\Mime\ContentDisposition.cs (1)
43new Dictionary<string, TrackingValidationObjectDictionary.ValidateAndParseValue>() {
System\Net\Mime\SmtpDateTime.cs (1)
62internal static readonly Dictionary<string, TimeSpan> s_timeZoneOffsetLookup = new Dictionary<string, TimeSpan>()
System\Net\TrackingValidationObjectDictionary.cs (2)
66_internalObjects ??= new Dictionary<string, object>(); 136_internalObjects ??= new Dictionary<string, object>();
System.Net.NameResolution (1)
System\Net\Dns.cs (1)
712private static readonly Dictionary<object, Task> s_tasks = new Dictionary<object, Task>();
System.Net.NetworkInformation (5)
System\Net\NetworkInformation\LinuxNetworkInterface.cs (1)
93Dictionary<int, LinuxNetworkInterface> interfacesByIndex = new Dictionary<int, LinuxNetworkInterface>(interfaceCount);
System\Net\NetworkInformation\NetworkAddressChange.cs (2)
14new Dictionary<NetworkAddressChangedEventHandler, ExecutionContext?>(); 18new Dictionary<NetworkAvailabilityChangedEventHandler, ExecutionContext?>();
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (2)
270addressChangedSubscribers = new Dictionary<NetworkAddressChangedEventHandler, ExecutionContext?>(s_addressChangedSubscribers); 306new Dictionary<NetworkAvailabilityChangedEventHandler, ExecutionContext?>(
System.Net.Ping (2)
src\libraries\Common\src\System\Net\Sockets\SocketErrorPal.Unix.cs (2)
34private static readonly Dictionary<Interop.Error, SocketError> s_nativeErrorToSocketError = new Dictionary<Interop.Error, SocketError>(NativeErrorToSocketErrorCount) 80private static readonly Dictionary<SocketError, Interop.Error> s_socketErrorToNativeError = new Dictionary<SocketError, Interop.Error>(SocketErrorToNativeErrorCount)
System.Net.Primitives (4)
src\libraries\Common\src\System\Net\Sockets\SocketErrorPal.Unix.cs (2)
34private static readonly Dictionary<Interop.Error, SocketError> s_nativeErrorToSocketError = new Dictionary<Interop.Error, SocketError>(NativeErrorToSocketErrorCount) 80private static readonly Dictionary<SocketError, Interop.Error> s_socketErrorToNativeError = new Dictionary<SocketError, Interop.Error>(SocketErrorToNativeErrorCount)
System\Net\CredentialCache.cs (2)
44_cache ??= new Dictionary<CredentialCacheKey, NetworkCredential>(); 70_cacheForHosts ??= new Dictionary<CredentialHostKey, NetworkCredential>();
System.Net.Security (1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (1)
161_sslSessions = new Dictionary<string, IntPtr>();
System.Net.Sockets (2)
src\libraries\Common\src\System\Net\Sockets\SocketErrorPal.Unix.cs (2)
34private static readonly Dictionary<Interop.Error, SocketError> s_nativeErrorToSocketError = new Dictionary<Interop.Error, SocketError>(NativeErrorToSocketErrorCount) 80private static readonly Dictionary<SocketError, Interop.Error> s_socketErrorToNativeError = new Dictionary<SocketError, Interop.Error>(SocketErrorToNativeErrorCount)
System.ObjectModel (1)
System\Collections\ObjectModel\KeyedCollection.cs (1)
260dict = new Dictionary<TKey, TItem>(comparer);
System.Private.CoreLib (70)
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (2)
24private static readonly Dictionary<string, IsolatedComponentLoadContext> s_assemblyLoadContexts = new Dictionary<string, IsolatedComponentLoadContext>(StringComparer.InvariantCulture); 25private static readonly Dictionary<IntPtr, Delegate> s_delegates = new Dictionary<IntPtr, Delegate>();
src\libraries\System.Private.CoreLib\src\System\AppContext.cs (3)
64Interlocked.CompareExchange(ref s_dataStore, new Dictionary<string, object?>(), null); 156Interlocked.CompareExchange(ref s_switches, new Dictionary<string, bool>(), null); 179s_dataStore = new Dictionary<string, object?>(count);
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (1)
34public static ReadOnlyDictionary<TKey, TValue> Empty { get; } = new ReadOnlyDictionary<TKey, TValue>(new Dictionary<TKey, TValue>());
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\DiagnosticCounter.cs (1)
72_metadata ??= new Dictionary<string, string?>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
36private readonly Dictionary<EventListener, EventListenerSubscription> m_subscriptions = new Dictionary<EventListener, EventListenerSubscription>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
1327args = new Dictionary<string, string?>(4);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (18)
2678commandArgs.Arguments ??= new Dictionary<string, string?>(); 2898Dictionary<int, bool> eventEnabled = new Dictionary<int, bool>(m_eventData.Count); 3163eventData = new Dictionary<int, EventMetadata>(); 3576enabledDict = new Dictionary<int, bool>(m_eventData.Count); 3655eventsByName ??= new Dictionary<string, string>(); 3905private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>(); 3907private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>(); 4515Dictionary<EventListener, bool> allListeners = new Dictionary<EventListener, bool>(); 5329opcodeTab = new Dictionary<int, string>(); 5330stringTab = new Dictionary<string, string>(); 5332perEventByteArrayArgIndices = new Dictionary<string, List<int>>(); 5368taskTab ??= new Dictionary<int, string>(); 5391keywordTab ??= new Dictionary<ulong, string>(); 5416channelTab ??= new Dictionary<int, ChannelInfo>(4); 5535mapsTab ??= new Dictionary<string, Type>(); 5583channelTab ??= new Dictionary<int, ChannelInfo>(4); 5909channelTab ??= new Dictionary<int, ChannelInfo>(4); 5933taskTab ??= new Dictionary<int, string>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingTypeInfo.cs (1)
143Dictionary<Type, TraceLoggingTypeInfo> cache = threadCache ??= new Dictionary<Type, TraceLoggingTypeInfo>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\XplatEventLogger.cs (1)
51private static readonly Dictionary<char, string> seq_mapping = new Dictionary<char, string>()
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (1)
961private static readonly Dictionary<string, IntPtr> s_sortNameToSortHandleCache = new Dictionary<string, IntPtr>();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (3)
152new Dictionary<string, string>(255, StringComparer.OrdinalIgnoreCase) 446tempHashTable = new Dictionary<string, CultureData>(); 691tempHashTable = new Dictionary<string, CultureData>();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (2)
1127cache = new Dictionary<string, CultureInfo>(); 1142cache = new Dictionary<int, CultureInfo>();
src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (1)
945var dictionary = new Dictionary<ulong, char>(tableData.Length / (sizeof(ulong) + sizeof(char)));
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
19private static readonly Dictionary<string, Assembly> s_loadfile = new Dictionary<string, Assembly>();
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (2)
22private readonly Dictionary<Module, NotAnnotatedStatus> _publicOnlyModules = new(); 23private readonly Dictionary<MemberInfo, NullabilityState> _context = new();
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (1)
286new Dictionary<string, ResourceLocator>(FastResourceComparer.Default),
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (3)
179_resourceSets = new Dictionary<string, ResourceSet>(); 246_resourceSets = new Dictionary<string, ResourceSet>(); 294_resourceSets = new Dictionary<string, ResourceSet>();
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (2)
100_resCache = new Dictionary<string, ResourceLocator>(FastResourceComparer.Default); 132_resCache = new Dictionary<string, ResourceLocator>(FastResourceComparer.Default);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (2)
30_table = new Dictionary<object, object?>(); 217caseTable = new Dictionary<string, object?>(copyOfTable.Count, StringComparer.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (2)
186_resCache = new Dictionary<string, ResourceLocator>(FastResourceComparer.Default); 317caseInsensitiveTable = new Dictionary<string, ResourceLocator>(StringComparer.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\PosixSignalRegistration.Unix.cs (1)
23return new Dictionary<int, List<Token>>();
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\TypeMapLazyDictionary.cs (2)
313private readonly Dictionary<int, DelayedType> _lazyData = new(); 367private readonly Dictionary<int, DelayedTypeCollection> _lazyData = new();
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (1)
96_assemblyPaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (1)
39Interlocked.CompareExchange(ref s_allContexts, new Dictionary<long, WeakReference<AssemblyLoadContext>>(), null) ??
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (1)
43_nameToIndex = new Dictionary<string, int>();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (1)
74_children = new Dictionary<char, int>();
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyBucketizer.cs (1)
86Dictionary<int, int> prefixToBucket = new(bucketCount);
src\libraries\System.Private.CoreLib\src\System\Text\EncodingProvider.cs (1)
102Dictionary<int, EncodingInfo> result = new Dictionary<int, EncodingInfo>();
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (1)
189Interlocked.CompareExchange(ref s_currentActiveTasks, new Dictionary<int, Task>(), null) ??
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
682nameToSlotMap = new Dictionary<string, LocalDataStoreSlot>();
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (1)
618private readonly Dictionary<int, bool> _usedIdToTracksAllValuesMap = new Dictionary<int, bool>();
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (2)
2041cachedData._timeZonesUsingAlternativeIds ??= new Dictionary<string, TimeZoneInfo>(StringComparer.OrdinalIgnoreCase); 2131cachedData._systemTimeZones ??= new Dictionary<string, TimeZoneInfo>(StringComparer.OrdinalIgnoreCase)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (1)
291cachedData._systemTimeZones ??= new Dictionary<string, TimeZoneInfo>(StringComparer.OrdinalIgnoreCase)
src\System\Attribute.CoreCLR.cs (2)
35Dictionary<Type, AttributeUsageAttribute> types = new Dictionary<Type, AttributeUsageAttribute>(11); 141Dictionary<Type, AttributeUsageAttribute> types = new Dictionary<Type, AttributeUsageAttribute>(11);
src\System\GC.CoreCLR.cs (1)
918Configurations = new Dictionary<string, object>()
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (1)
71_typeBuilderDict = new Dictionary<string, Type>();
src\System\RuntimeType.CoreCLR.cs (2)
1118new Dictionary<string, RuntimeEventInfo>(); 1223new Dictionary<string, List<RuntimePropertyInfo>>();
System.Private.CoreLib.Generators (4)
NativeRuntimeEventSourceGenerator.cs (4)
239var templateDict = new Dictionary<string, XElement>(); 390private static readonly Dictionary<string, string> manifestsToGenerate = new() 395private static readonly Dictionary<string, string> providerNameToClassNameMap = new() 400private static readonly Dictionary<string, string> manifestTypeToCSharpTypeMap = new()
System.Private.DataContractSerialization (37)
System\Runtime\Serialization\ClassDataContract.cs (4)
804Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>(); 1222_knownDataContracts ??= new DataContractDictionary(); 1363boundContracts ??= new Dictionary<DataContract, DataContract>(); 1421Dictionary<string, DataMember> membersDictionary = new Dictionary<string, DataMember>(Members.Count);
System\Runtime\Serialization\CollectionDataContract.cs (2)
708_knownDataContracts ??= new DataContractDictionary(); 1401boundContracts ??= new Dictionary<DataContract, DataContract>();
System\Runtime\Serialization\DataContract.cs (6)
596s_nameToBuiltInContract ??= new Dictionary<XmlQualifiedName, DataContract?>(); 619s_typeNameToBuiltInContract ??= new Dictionary<string, DataContract?>(); 903s_clrTypeStrings = new Dictionary<string, XmlDictionaryString>(); 1935Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 2028knownDataContracts ??= new DataContractDictionary(); 2054nameToDataContractTable = new DataContractDictionary();
System\Runtime\Serialization\DataContractSet.cs (4)
59_contracts ??= new DataContractDictionary(); 62_processedContracts ??= new Dictionary<DataContract, object>(); 318_referencedTypesDictionary = new Dictionary<XmlQualifiedName, object>(); 342_referencedCollectionTypesDictionary = new Dictionary<XmlQualifiedName, object>();
System\Runtime\Serialization\EnumDataContract.cs (3)
78private static readonly Dictionary<Type, XmlQualifiedName> s_typeToName = new Dictionary<Type, XmlQualifiedName>(); 79private static readonly Dictionary<XmlQualifiedName, Type> s_nameToType = new Dictionary<XmlQualifiedName, Type>(); 219Dictionary<string, DataMember> memberValuesTable = new Dictionary<string, DataMember>();
System\Runtime\Serialization\HybridObjectCache.cs (2)
22_objectDictionary ??= new Dictionary<string, object?>(); 36_referencedObjectDictionary ??= new Dictionary<string, object?>();
System\Runtime\Serialization\Json\JsonClassDataContract.cs (1)
158Dictionary<string, object?> memberTable = new Dictionary<string, object?>(memberCount);
System\Runtime\Serialization\Json\JsonDataContract.cs (2)
291_knownDataContracts ??= new DataContractDictionary(); 317private static readonly Dictionary<DataContract, JsonReadWriteDelegates> s_jsonDelegates = new Dictionary<DataContract, JsonReadWriteDelegates>();
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
219Dictionary<object, object?> genericDictionaryObj = new Dictionary<object, object?>(dictionaryObj.Count);
System\Runtime\Serialization\ObjectReferenceStack.cs (1)
36_objectDictionary ??= new Dictionary<object, object?>();
System\Runtime\Serialization\ReflectionReader.cs (1)
503object newGenericDict = new Dictionary<object, object>();
System\Runtime\Serialization\SchemaImporter.cs (3)
187Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>(); 225DataContractDictionary knownDataContracts = new DataContractDictionary(); 243SchemaObjectDictionary schemaObjects = new SchemaObjectDictionary();
System\Runtime\Serialization\XmlDataContract.cs (1)
198_knownDataContracts ??= new DataContractDictionary();
System\Runtime\Serialization\XmlObjectSerializerContext.cs (2)
193DataContractDictionary dataContracts = new DataContractDictionary(); 194Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>();
System\Xml\XmlBinaryReaderSession.cs (1)
35_stringDict ??= new Dictionary<int, XmlDictionaryString>();
System\Xml\XmlBinaryWriterSession.cs (1)
183_dictionary = new Dictionary<K, V>();
System\Xml\XmlDictionary.cs (2)
27_lookup = new Dictionary<string, XmlDictionaryString>(); 34_lookup = new Dictionary<string, XmlDictionaryString>(capacity);
System.Private.Windows.Core (2)
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (1)
33s_knownTypes ??= new(60, TypeNameComparer.FullNameMatch)
System\Private\Windows\Ole\DataStore.cs (1)
12private readonly Dictionary<string, DataStoreEntry> _mappedData = new(BackCompatibleStringComparer.Default);
System.Private.Windows.Core.Tests (7)
System\Reflection\Metadata\TypeNameComparerTests.cs (7)
26Dictionary<TypeName, Type> types = new(TypeNameComparer.FullyQualifiedMatch) 53Dictionary<TypeName, Type> types = new(TypeNameComparer.FullyQualifiedMatch) 67Dictionary<TypeName, Type> types = new(TypeNameComparer.FullyQualifiedMatch) 119var types = new Dictionary<TypeName, Type>(TypeNameComparer.FullNameMatch) 145var types = new Dictionary<TypeName, Type>(TypeNameComparer.FullNameMatch) 169var types = new Dictionary<TypeName, Type>(TypeNameComparer.FullNameAndAssemblyNameMatch) 200var types = new Dictionary<TypeName, Type>(TypeNameComparer.FullNameAndAssemblyNameMatch)
System.Private.Xml (90)
System\Xml\BinaryXml\XmlBinaryReader.cs (2)
347_namespaces = new Dictionary<string, NamespaceDecl>(); 1815Dictionary<string, string> nstable = new Dictionary<string, string>();
System\Xml\Core\QueryOutputWriter.cs (1)
59_lookupCDataElems = new Dictionary<XmlQualifiedName, int>();
System\Xml\Core\QueryOutputWriterV1.cs (1)
73_lookupCDataElems = new Dictionary<XmlQualifiedName, XmlQualifiedName?>();
System\Xml\Core\XmlSubtreeReader.cs (1)
1218return new Dictionary<string, string>();
System\Xml\Core\XmlTextWriter.cs (1)
1537_nsHashtable = new Dictionary<string, int>();
System\Xml\Core\XmlWellFormedWriter.cs (2)
1768_nsHashtable = new Dictionary<string, int>(); 2122_attrHashTable ??= new Dictionary<string, int>();
System\Xml\Dom\XmlNodeReader.cs (1)
987Dictionary<string, string> dict = new Dictionary<string, string>();
System\Xml\Resolvers\XmlPreloadedResolver.cs (1)
174_mappings = new Dictionary<Uri, PreloadedData>(16, uriComparer);
System\Xml\Schema\ContentValidator.cs (4)
50_names = new Dictionary<XmlQualifiedName, int>(); 117_wildcards ??= new Dictionary<string, int>(); 1445Dictionary<BitSet, int> stateTable = new(); 2120_elements = new Dictionary<XmlQualifiedName, int>(size);
System\Xml\Schema\DtdParser.cs (1)
1352_undeclaredNotations ??= new Dictionary<string, UndeclaredNotation>();
System\Xml\Schema\SchemaElementDecl.cs (2)
13private readonly Dictionary<XmlQualifiedName, SchemaAttDef> _attdefs = new Dictionary<XmlQualifiedName, SchemaAttDef>(); 22private readonly Dictionary<XmlQualifiedName, XmlQualifiedName> _prohibitedAttributes = new Dictionary<XmlQualifiedName, XmlQualifiedName>();
System\Xml\Schema\SchemaInfo.cs (8)
27private readonly Dictionary<XmlQualifiedName, SchemaElementDecl> _elementDecls = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 28private readonly Dictionary<XmlQualifiedName, SchemaElementDecl> _undeclaredElementDecls = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 38private readonly Dictionary<string, bool> _targetNamespaces = new Dictionary<string, bool>(); 39private readonly Dictionary<XmlQualifiedName, SchemaAttDef> _attributeDecls = new Dictionary<XmlQualifiedName, SchemaAttDef>(); 42private readonly Dictionary<XmlQualifiedName, SchemaElementDecl> _elementDeclsByType = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 74_generalEntities ??= new Dictionary<XmlQualifiedName, SchemaEntity>(); 77_parameterEntities ??= new Dictionary<XmlQualifiedName, SchemaEntity>(); 101_notations ??= new Dictionary<string, SchemaNotation>();
System\Xml\Schema\XmlAtomicValue.cs (1)
71Dictionary<string, string> dict = new Dictionary<string, string>(1);
System\Xml\Schema\XmlSchemaObjectTable.cs (1)
12private readonly Dictionary<XmlQualifiedName, XmlSchemaObject> _table = new Dictionary<XmlQualifiedName, XmlSchemaObject>();
System\Xml\Serialization\CodeGenerator.cs (4)
93_freeLocals = new Dictionary<(Type, string), Queue<LocalBuilder>>(); 94_argList = new Dictionary<string, ArgBuilder>(); 149private readonly Dictionary<Type, LocalBuilder> _tmpLocals = new Dictionary<Type, LocalBuilder>(); 1535_locals = new Dictionary<string, LocalBuilder>();
System\Xml\Serialization\Compilation.cs (6)
442var scopeTable = new Dictionary<TypeScope, XmlMapping>(); 513var serializers = new Dictionary<string, string>(); 693private Dictionary<TempAssemblyCacheKey, TempAssembly> _fastCache = new Dictionary<TempAssemblyCacheKey, TempAssembly>(); 727? new Dictionary<TempAssemblyCacheKey, TempAssembly>(c) 728: new Dictionary<TempAssemblyCacheKey, TempAssembly>(); 734cache = new Dictionary<TempAssemblyCacheKey, TempAssembly>(_fastCache); // Clone
System\Xml\Serialization\Models.cs (2)
21private readonly Dictionary<Type, TypeModel> _models = new Dictionary<Type, TypeModel>(); 22private readonly Dictionary<Type, TypeModel> _arrayModels = new Dictionary<Type, TypeModel>();
System\Xml\Serialization\NameTable.cs (1)
41private readonly Dictionary<NameKey, object?> _table = new Dictionary<NameKey, object?>();
System\Xml\Serialization\Types.cs (1)
1154replaceList ??= new Dictionary<string, MemberInfo>();
System\Xml\Serialization\XmlAttributeOverrides.cs (2)
19private readonly Dictionary<Type, Dictionary<string, XmlAttributes?>> _types = new Dictionary<Type, Dictionary<string, XmlAttributes?>>(); 37members = new Dictionary<string, XmlAttributes?>();
System\Xml\Serialization\XmlSerializationILGen.cs (4)
19private readonly Dictionary<TypeMapping, string> _methodNames = new Dictionary<TypeMapping, string>(); 21private readonly Dictionary<string, MethodBuilderInfo> _methodBuilders = new Dictionary<string, MethodBuilderInfo>(); 23internal Dictionary<string, Type> CreatedTypes = new Dictionary<string, Type>(); 25internal Dictionary<string, MemberInfo> memberInfos = new Dictionary<string, MemberInfo>();
System\Xml\Serialization\XmlSerializationReaderILGen.cs (3)
23private readonly Dictionary<string, string> _idNames = new Dictionary<string, string>(); 25private readonly Dictionary<string, FieldBuilder> _idNameFields = new Dictionary<string, FieldBuilder>(); 29internal Dictionary<string, EnumMapping> Enums => _enums ??= new Dictionary<string, EnumMapping>();
System\Xml\Serialization\XmlSerializer.cs (2)
711typedMappingTable = s_xmlSerializerTable.GetOrCreateValue(type, _ => new Dictionary<XmlSerializerMappingKey, XmlSerializer>()); 715var pendingKeys = new Dictionary<XmlSerializerMappingKey, int>();
System\Xml\Serialization\XmlSerializerNamespaces.cs (4)
35_namespaces = new Dictionary<string, XmlQualifiedName>(namespaces.NamespacesInternal); 43_namespaces = new Dictionary<string, XmlQualifiedName>(namespaces.Length); 54_namespaces = new Dictionary<string, XmlQualifiedName>(namespaces.Count); 103private Dictionary<string, XmlQualifiedName> NamespacesInternal => _namespaces ??= new Dictionary<string, XmlQualifiedName>();
System\Xml\XmlNamespacemanager.cs (3)
178_hashTable = new Dictionary<string, int>(_lastDecl); 210Dictionary<string, string> prefixes = new Dictionary<string, string>(_lastDecl + 1); 248Dictionary<string, string> dict = new Dictionary<string, string>(_lastDecl - i + 1);
System\Xml\XPath\Internal\XPathParser.cs (2)
814Dictionary<string, ParamInfo> table = new Dictionary<string, ParamInfo>(36); 848Dictionary<string, Axis.AxisType> table = new Dictionary<string, Axis.AxisType>(13);
System\Xml\XPath\XPathDocument.cs (2)
387_mapNmsp ??= new Dictionary<XPathNodeRef, XPathNodeRef>(); 417_idValueMap ??= new Dictionary<string, XPathNodeRef>();
System\Xml\XPath\XPathNavigator.cs (1)
481Dictionary<string, string> dict = new Dictionary<string, string>();
System\Xml\Xsl\IlGen\GenerateHelper.cs (1)
440public static readonly Dictionary<Type, XmlILStorageMethods> StorageMethods = new Dictionary<Type, XmlILStorageMethods>(13)
System\Xml\Xsl\IlGen\StaticDataManager.cs (1)
20private readonly Dictionary<T, int> _lookup = new Dictionary<T, int>();
System\Xml\Xsl\QIL\QilVisitor.cs (1)
439private readonly Dictionary<QilNode, bool> _visitedRef = new Dictionary<QilNode, bool>();
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (1)
26_table = new Dictionary<XmlExtensionFunction, XmlExtensionFunction>();
System\Xml\Xsl\Runtime\XmlILIndex.cs (1)
24_table = new Dictionary<string, XmlQueryNodeSequence>();
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (2)
55private readonly Dictionary<string, string> _usedPrefixes = new Dictionary<string, string>(); //The prefies that used in the current scope 1401_conflictPrefixes ??= new Dictionary<string, string>(16);
System\Xml\Xsl\Runtime\XsltLibrary.cs (1)
165_decimalFormats ??= new Dictionary<XmlQualifiedName, DecimalFormat>();
System\Xml\Xsl\XPath\XPathBuilder.cs (1)
790Dictionary<string, FunctionInfo> table = new Dictionary<string, FunctionInfo>(36);
System\Xml\Xsl\Xslt\Compiler.cs (5)
54public Dictionary<QilName, VarPar> AllGlobalVarPars = new Dictionary<QilName, VarPar>(); 55public Dictionary<QilName, Template> NamedTemplates = new Dictionary<QilName, Template>(); 56public Dictionary<QilName, AttributeSet> AttributeSets = new Dictionary<QilName, AttributeSet>(); 57public Dictionary<string, NsAlias> NsAliases = new Dictionary<string, NsAlias>(); 59private readonly Dictionary<string, int> _moduleOrder = new Dictionary<string, int>();
System\Xml\Xsl\Xslt\MatcherBuilder.cs (1)
261public Dictionary<QilName, List<Pattern>> FixedNamePatterns = new Dictionary<QilName, List<Pattern>>();
System\Xml\Xsl\Xslt\QilGenerator.cs (2)
575paramToTemplate = new Dictionary<VarPar, Template>(); 576paramToFunction = new Dictionary<VarPar, QilFunction>();
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (1)
303Dictionary<string, FunctionInfo> table = new Dictionary<string, FunctionInfo>(16);
System\Xml\Xsl\Xslt\Scripts.cs (1)
51private readonly Dictionary<string, Type?> _backingDictionary = new Dictionary<string, Type?>();
System\Xml\Xsl\Xslt\Stylesheet.cs (4)
21public Dictionary<QilName, XslFlags> ModeFlags = new Dictionary<QilName, XslFlags>(); 23public Dictionary<QilName, List<QilFunction>> ApplyFunctions = new Dictionary<QilName, List<QilFunction>>(); 33public Dictionary<QilName, AttributeSet>? AttributeSets = new Dictionary<QilName, AttributeSet>(); 47public Dictionary<QilName, List<TemplateMatch>> TemplateMatches = new Dictionary<QilName, List<TemplateMatch>>();
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (3)
40private Dictionary<Template, Stylesheet>? _fwdApplyImportsGraph = new Dictionary<Template, Stylesheet>(); 41private Dictionary<QilName, List<ProtoTemplate>>? _revApplyTemplatesGraph = new Dictionary<QilName, List<ProtoTemplate>>(); 47private readonly Dictionary<ModeName, VarPar> _applyTemplatesParams = new Dictionary<ModeName, VarPar>();
System.Reflection.DispatchProxy (4)
System\Reflection\DispatchProxyGenerator.cs (4)
109private readonly Dictionary<Type, Dictionary<Type, GeneratedTypeInfo>> _baseTypeAndInterfaceToGeneratedProxyType = new Dictionary<Type, Dictionary<Type, GeneratedTypeInfo>>(); 153interfaceToProxy = new Dictionary<Type, GeneratedTypeInfo>(); 322var propertyMap = new Dictionary<MethodInfo, PropertyAccessorInfo>(); 332var eventMap = new Dictionary<MethodInfo, EventAccessorInfo>();
System.Reflection.Emit (8)
System\Reflection\Emit\ILGeneratorImpl.cs (2)
31private Dictionary<Label, LabelInfo> _labelTable = new(2); 35private Dictionary<SymbolDocumentWriter, List<SequencePoint>> _documentToSequencePoints = new();
System\Reflection\Emit\ModuleBuilderImpl.cs (5)
22private readonly Dictionary<Assembly, AssemblyReferenceHandle> _assemblyReferences = new(); 23private readonly Dictionary<Type, EntityHandle> _typeReferences = new(); 24private readonly Dictionary<object, EntityHandle> _memberReferences = new(); 29private Dictionary<SymbolDocumentWriter, DocumentHandle> _docHandles = new(); 668_moduleReferences ??= new Dictionary<string, ModuleReferenceHandle>();
System\Reflection\Emit\TypeBuilderImpl.cs (1)
312_methodOverrides ??= new();
System.Reflection.Metadata (10)
System\Reflection\Metadata\Ecma335\BlobDictionary.cs (1)
101_dictionary = new(capacity);
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (3)
35private readonly Dictionary<string, UserStringHandle> _userStrings = new Dictionary<string, UserStringHandle>(256); 40private readonly Dictionary<string, StringHandle> _strings = new Dictionary<string, StringHandle>(256); 50private readonly Dictionary<Guid, GuidHandle> _guids = new Dictionary<Guid, GuidHandle>();
System\Reflection\Metadata\Internal\NamespaceCache.cs (3)
114var namespaceBuilderTable = new Dictionary<NamespaceDefinitionHandle, NamespaceDataBuilder>(); 140var namespaceTable = new Dictionary<NamespaceDefinitionHandle, NamespaceData>(); 169var namespaces = new Dictionary<string, NamespaceDataBuilder>();
System\Reflection\Metadata\Internal\VirtualHeap.cs (1)
43_blobs = new Dictionary<uint, PinnedBlob>();
System\Reflection\Metadata\MetadataReader.cs (2)
1439var groupedNestedTypes = new Dictionary<TypeDefinitionHandle, ImmutableArray<TypeDefinitionHandle>.Builder>(); 1469var nestedTypesMap = new Dictionary<TypeDefinitionHandle, ImmutableArray<TypeDefinitionHandle>>();
System.Reflection.MetadataLoadContext (1)
System\Reflection\PathAssemblyResolver.cs (1)
25private readonly Dictionary<string, List<string>> _fileToPaths = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
System.Resources.Extensions (8)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (3)
55_caseInsensitiveDups = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 74_caseInsensitiveDups = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 181_preserializedData ??= new Dictionary<string, PrecannedResource>(FastResourceComparer.Default);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (2)
100_resCache = new Dictionary<string, ResourceLocator>(FastResourceComparer.Default); 132_resCache = new Dictionary<string, ResourceLocator>(FastResourceComparer.Default);
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (2)
200_resCache = new Dictionary<string, ResourceLocator>(FastResourceComparer.Default); 317caseInsensitiveTable = new Dictionary<string, ResourceLocator>(StringComparer.OrdinalIgnoreCase);
System\Resources\Extensions\PreserializedResourceWriter.cs (1)
39private static readonly Dictionary<string, Type> s_primitiveTypes = new Dictionary<string, Type>(16, TypeNameComparer.Instance)
System.Resources.Writer (3)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (3)
55_caseInsensitiveDups = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 74_caseInsensitiveDups = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 181_preserializedData ??= new Dictionary<string, PrecannedResource>(FastResourceComparer.Default);
System.Runtime.Caching (3)
System\Runtime\Caching\MemoryCache.cs (2)
497Dictionary<string, object> h = new Dictionary<string, object>(); 794values ??= new Dictionary<string, object>();
System\Runtime\Caching\MemoryCacheEntry.cs (1)
167_fields._dependents ??= new Dictionary<MemoryCacheEntryChangeMonitor, MemoryCacheEntryChangeMonitor>();
System.Runtime.Serialization.Formatters (1)
System\Runtime\Serialization\SerializationObjectManager.cs (1)
21_objectSeenTable = new Dictionary<object, object>();
System.Runtime.Serialization.Schema (8)
System\Runtime\Serialization\Schema\CodeExporter.cs (7)
47_namespaces = new Dictionary<string, string>(); 48_clrNamespaces = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase); 226ExportClassDataContractHierarchy(dataContract.XmlName, dataContract, contractCodeDomInfo, new Dictionary<XmlQualifiedName, object?>()); 927return GetKnownTypeContracts(dataContract, new Dictionary<DataContract, object?>()); 987DataContractDictionary? knownContractDictionary = GetKnownTypeContracts(classDataContract, new Dictionary<DataContract, object?>()); 1519Dictionary<string, object?> fragments = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 1612Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>();
System\Runtime\Serialization\Schema\ImportOptions.cs (1)
60public IDictionary<string, string> Namespaces => _namespaces ??= new Dictionary<string, string>();
System.Security.Claims (3)
System\Security\Claims\Claim.cs (3)
265_properties = new Dictionary<string, string>(); 300_properties = new Dictionary<string, string>(other._properties); 344public IDictionary<string, string> Properties => _properties ??= new Dictionary<string, string>();
System.Security.Cryptography (17)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
23var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\ECDomainParameters.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (1)
27var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLDsaPrivateKeyAsn.xml.cs (1)
21var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyAsn.xml.cs (1)
21var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
23var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\CryptoConfig.cs (2)
54Dictionary<string, string> ht = new Dictionary<string, string>(capacity, StringComparer.OrdinalIgnoreCase); 118Dictionary<string, object> ht = new Dictionary<string, object>(capacity: capacity, comparer: StringComparer.OrdinalIgnoreCase);
System\Security\Cryptography\OidLookup.cs (3)
99new Dictionary<string, string>(FriendlyNameToOidCount, StringComparer.OrdinalIgnoreCase); 102new Dictionary<string, string>(OidToFriendlyNameCount, StringComparer.Ordinal); 105new Dictionary<string, string>
System\Security\Cryptography\X509Certificates\Asn1\DistributionPointNameAsn.xml.cs (1)
21var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\X509Certificates\Asn1\TimeAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\X509Certificates\FindPal.cs (1)
16new Dictionary<string, X509KeyUsageFlags>(NamedKeyUsageFlagsCount, StringComparer.OrdinalIgnoreCase)
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (1)
594Dictionary<string, EncodingRules> lookup = new(LookupDictionarySize, StringComparer.Ordinal)
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
18private readonly Dictionary<CoseHeaderLabel, CoseHeaderValue> _headerParameters = new Dictionary<CoseHeaderLabel, CoseHeaderValue>();
System.Security.Cryptography.Pkcs (11)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
23var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (1)
27var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
23var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\KeyAgreeRecipientIdentifierAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\OriginatorIdentifierOrKeyAsn.xml.cs (1)
21var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\RecipientIdentifierAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\RecipientInfoAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\SignedAttributesSet.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\CmsSignature.cs (1)
17new Dictionary<string, CmsSignature>();
System.ServiceModel.NetFramingBase (5)
System\ServiceModel\Channels\ConnectionPool.cs (3)
31_endpointPools = new Dictionary<TKey, EndpointConnectionPool>(); 682readonly Dictionary<Uri, string> _forwardTable = new Dictionary<Uri, string>(); 683readonly Dictionary<string, ICollection<Uri>> _reverseTable = new Dictionary<string, ICollection<Uri>>();
System\ServiceModel\Channels\ConnectionPoolRegistry.cs (1)
17_registry = new Dictionary<string, List<ConnectionPool>>();
System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
106_connectionMapping = new Dictionary<TItem, IdlingConnectionSettings>();
System.ServiceModel.Primitives.Tests (2)
ServiceModel\MessageContractTest.4.4.0.cs (2)
146Dictionary<string, string> properties = new Dictionary<string, string>(); 147Dictionary<string, List<string>> headers = new Dictionary<string, List<string>>();
System.ServiceModel.Syndication (4)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (1)
555attrs ??= new Dictionary<XmlQualifiedName, string>();
System\ServiceModel\Syndication\ExtensibleSyndicationObject.cs (2)
19_attributeExtensions = new Dictionary<XmlQualifiedName, string>(); 41get => _attributeExtensions ??= new Dictionary<XmlQualifiedName, string>();
System\ServiceModel\Syndication\SyndicationContent.cs (1)
23get => _attributeExtensions ??= new Dictionary<XmlQualifiedName, string>();
System.Text.Encoding.CodePages (5)
System\Text\CodePagesEncodingProvider.cs (1)
14private readonly Dictionary<int, Encoding> _encodings = new Dictionary<int, Encoding>();
System\Text\EncodingTable.cs (4)
12private static readonly Dictionary<string, int> s_nameToCodePageCache = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); 13private static readonly Dictionary<int, string> s_codePageToWebNameCache = new Dictionary<int, string>(); 14private static readonly Dictionary<int, string> s_codePageToEnglishNameCache = new Dictionary<int, string>(); 15private static readonly Dictionary<int, (ushort FamilyCodePage, byte CodePageFlags)> s_codePageToItemCache = new Dictionary<int, (ushort FamilyCodePage, byte CodePageFlags)>();
System.Text.Json (19)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
114var nodeIndex = new Dictionary<T, int>(comparer) { [entryNode] = 0 }; // the node-to-integer mapping
System\Text\Json\Document\JsonElement.cs (1)
1367Dictionary<string, ValueQueue<JsonElement>> properties2 = new(capacity: remainingProps, StringComparer.Ordinal);
System\Text\Json\JsonHelpers.cs (1)
271return new Dictionary<TKey, TValue>(collection: collection, comparer);
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
401private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new();
System\Text\Json\Serialization\Converters\Collection\IDictionaryConverter.cs (1)
112jsonTypeInfo.CreateObject = () => new Dictionary<string, object?>();
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (1)
60jsonTypeInfo.CreateObject = () => new Dictionary<TKey, TValue>();
System\Text\Json\Serialization\Converters\Collection\ImmutableDictionaryOfTKeyTValueConverter.cs (1)
37state.Current.ReturnValue = new Dictionary<TKey, TValue>();
System\Text\Json\Serialization\Converters\Collection\IReadOnlyDictionaryOfTKeyTValueConverter.cs (1)
41state.Current.ReturnValue = new Dictionary<TKey, TValue>();
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (2)
63_enumFieldInfoIndex = new(StringComparer.OrdinalIgnoreCase); 530(enumMemberAttributes ??= new(StringComparer.Ordinal)).Add(field.Name, attribute.Name);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
44var converters = new Dictionary<Type, JsonConverter>(NumberOfSimpleConverters);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (5)
1051public Dictionary<string, (JsonPropertyInfo, int index)> AddedProperties = new(options.PropertyNameCaseInsensitive ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal); 1074Dictionary<string, JsonPropertyInfo> propertyIndex = new(properties.Count, comparer); 1152Dictionary<ParameterLookupKey, JsonParameterInfoValues> parameterIndex = new(parameterInfoValues.Length); 1190Dictionary<ParameterLookupKey, JsonParameterInfo> parameterIndex = new(ParameterCount); 1439(state.IgnoredProperties ??= new())[memberName] = jsonPropertyInfo;
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
55if (!(_discriminatorIdtoType ??= new()).TryAdd(typeDiscriminator, derivedTypeInfoHolder))
System\Text\Json\Serialization\PreserveReferenceResolver.cs (2)
23_objectToReferenceIdMap = new Dictionary<object, string>(ReferenceEqualityComparer.Instance); 27_referenceIdToObjectMap = new Dictionary<string, object>();
System.Text.Json.SourceGeneration (6)
JsonSourceGenerator.Emitter.cs (2)
81private readonly Dictionary<TypeRef, TypeGenerationSpec> _typeIndex = new(); 88private readonly Dictionary<string, string> _propertyNames = new();
JsonSourceGenerator.Parser.cs (3)
47private readonly Dictionary<ITypeSymbol, TypeGenerationSpec> _generatedTypes = new(SymbolEqualityComparer.Default); 1035public Dictionary<string, (PropertyGenerationSpec, ISymbol, int index)> AddedProperties = new(options?.PropertyNameCaseInsensitive == true ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal); 1096(state.IgnoredMembers ??= new())[memberName] = memberInfo;
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
114var nodeIndex = new Dictionary<T, int>(comparer) { [entryNode] = 0 }; // the node-to-integer mapping
System.Text.RegularExpressions (16)
System\Text\RegularExpressions\RegexCharClass.cs (1)
116private static readonly Dictionary<string, string> s_definedCategories = new Dictionary<string, string>(DefinedCategoriesCapacity)
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
714var combined = new Dictionary<int, (RegexCharClass Set, int Count)>();
System\Text\RegularExpressions\RegexWriter.cs (1)
41_stringTable = new Dictionary<string, int>();
System\Text\RegularExpressions\Symbolic\BDD.cs (1)
202var idmap = new Dictionary<BDD, long>
System\Text\RegularExpressions\Symbolic\BDDRangeConverter.cs (1)
17private readonly Dictionary<BDD, (uint, uint)[]> _rangeCache = new Dictionary<BDD, (uint, uint)[]>();
System\Text\RegularExpressions\Symbolic\CharSetSolver.cs (3)
33private readonly Dictionary<(int ordinal, BDD? one, BDD? zero), BDD> _bddCache = new(); 39private readonly Dictionary<(int op, BDD a, BDD? b), BDD> _operationCache = new(); // op is BooleanOperation; using int to reuse generic instantiation with _bddCache 367return ReplaceTrueImpl(bdd, leaf, new Dictionary<BDD, BDD>());
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (1)
335_setBddCache ??= new Dictionary<string, BDD>();
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (5)
57private readonly Dictionary<TSet, SymbolicRegexNode<TSet>> _singletonCache = new(); 64internal readonly Dictionary<NodeCacheKey, SymbolicRegexNode<TSet>> _nodeCache = new(); 112internal readonly Dictionary<(SymbolicRegexNode<TSet>, TSet elem, uint context), SymbolicRegexNode<TSet>> _derivativeCache = new(); 120internal readonly Dictionary<(SymbolicRegexNode<TSet>, uint), SymbolicRegexNode<TSet>> _pruneLowerPriorityThanNullabilityCache = new(); 128internal readonly Dictionary<(SymbolicRegexNode<TSet>, SymbolicRegexNode<TSet>), bool> _subsumptionCache = new();
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Dgml.cs (1)
146Dictionary<(int Source, int Target), (TSet Rule, List<int> NfaTargets)> result = new();
System\Text\RegularExpressions\Symbolic\UnicodeCategoryRangesGenerator.cs (1)
41var catMap = new Dictionary<UnicodeCategory, Ranges>();
System.Text.RegularExpressions.Generator (7)
RegexGenerator.cs (3)
104Dictionary<string, string[]> requiredHelpers = new(); 165var emittedExpressions = new Dictionary<(string Pattern, RegexOptions Options, int? Timeout), RegexMethod>(); 171Dictionary<string, string[]> requiredHelpers = new();
RegexGenerator.Emitter.cs (2)
1479Dictionary<string, int> usedNames = new(); 1492Dictionary<string, string[]> additionalLocalFunctions = new();
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (1)
116private static readonly Dictionary<string, string> s_definedCategories = new Dictionary<string, string>(DefinedCategoriesCapacity)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
714var combined = new Dictionary<int, (RegexCharClass Set, int Count)>();
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (1)
45_limiters = new Dictionary<TKey, Lazy<RateLimiter>>(equalityComparer);
System.Threading.Tasks.Dataflow (4)
Internal\QueuedMap.cs (2)
162_mapKeyToIndex = new Dictionary<TKey, int>(); 170_mapKeyToIndex = new Dictionary<TKey, int>(capacity);
Internal\ReorderingBuffer.cs (1)
44private readonly Dictionary<long, KeyValuePair<bool, TOutput>> _reorderingBuffer = new Dictionary<long, KeyValuePair<bool, TOutput>>();
Internal\TargetRegistry.cs (1)
77_targetInformation = new Dictionary<ITargetBlock<T>, LinkedTargetInfo>();
System.Windows.Controls.Ribbon (8)
Microsoft\Windows\Controls\Generated\PropertyHelper.cs (1)
124propertyTransferEnabledForObject = new Dictionary<DependencyProperty, bool>();
Microsoft\Windows\Controls\KeyTipService.cs (3)
269Dictionary<DependencyObject, bool> processedElements = new Dictionary<DependencyObject, bool>(); 341elementToScopeMap = new Dictionary<DependencyObject, DependencyObject>(); 921Current._cultureCache = cultureCache = new Dictionary<XmlLanguage, CultureInfo>();
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupItemsPanel.cs (1)
468private Dictionary<int, int> _childIndexToStarLayoutIndexMap = new Dictionary<int, int>();
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabHeadersPanel.cs (1)
181Dictionary<object, List<RibbonTabHeaderAndIndex>> contextualTabHeaders = new Dictionary<object, List<RibbonTabHeaderAndIndex>>();
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (2)
62private Dictionary<int, int> _tabIndexToDisplayIndexMap = new Dictionary<int, int>(); // A map from collection index to display index of tab items. 63private Dictionary<int, int> _tabDisplayIndexToIndexMap = new Dictionary<int, int>(); // A map from display index to collection index of tab items.
System.Windows.Forms (12)
System\Windows\Forms\Accessibility\AccessibleRoleControlTypeMap.cs (1)
13private static readonly Dictionary<AccessibleRole, UIA_CONTROLTYPE_ID> s_map = new()
System\Windows\Forms\Control.cs (1)
1941_dpiFonts ??= new Dictionary<int, Font>
System\Windows\Forms\Control.Ime.cs (1)
1063get => s_imeModeConversionBits ??= new(7)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
417_converters = new(8);
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (3)
40_professionalRGB ??= new Dictionary<KnownColors, Color>((int)KnownColors.lastKnownColor); 49_professionalRGB ??= new Dictionary<KnownColors, Color>((int)KnownColors.lastKnownColor); 58_professionalRGB ??= new Dictionary<KnownColors, Color>((int)KnownColors.lastKnownColor);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
1650_shortcuts ??= new Dictionary<Keys, ToolStripMenuItem>(1);
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
473Dictionary<Control, string> controlError = new(bindingsCount);
System\Windows\Forms\Input\KeysConverter.cs (1)
38Dictionary<string, Keys> localizedNames = new(34);
System\Windows\Forms\Nrbf\WinFormsNrbfSerializer.cs (1)
29s_knownTypes ??= new(3, TypeNameComparer.FullNameAndAssemblyNameMatch)
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
843t_themeHandles ??= new(NumberOfPossibleClasses);
System.Windows.Forms.Analyzers.CSharp.Tests (7)
ProjectFileReaderTests.cs (7)
44Dictionary<string, string> properties = new() 70Dictionary<string, string> properties = new() 108Dictionary<string, string> properties = new() 145Dictionary<string, string> properties = new() 167Dictionary<string, string> properties = new() 187Dictionary<string, string> properties = new() 205Dictionary<string, string> properties = new()
System.Windows.Forms.Design (18)
System\ComponentModel\Design\MenuCommandService.cs (1)
259Dictionary<string, int> buildVerbs = new(verbCount, StringComparer.OrdinalIgnoreCase);
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
38_fallbackFonts = new(2);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (1)
97_objectState = new(objectState);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (2)
136Dictionary<string, CodeDomComponentSerializationState> state = new(_objects.Count); 172Dictionary<Assembly, AssemblyName> assemblies = new(_objects.Count);
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
418Dictionary<string, int> docMemberHash = new(docDeclaration.Members.Count, caseInsensitive
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (4)
781_instancesByName ??= new(StringComparer.CurrentCulture); 782_namesByInstance ??= new(new ReferenceComparer()); 925_instancesByName = new(StringComparer.CurrentCulture); 926_namesByInstance = new(new ReferenceComparer());
System\ComponentModel\Design\Serialization\ExpressionTable.cs (1)
19_expressions ??= new(new ReferenceComparer());
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (2)
86_statementTable = new Dictionary<string, OrderedCodeStatementCollection>(count); 87Dictionary<string, string> names = new(count);
System\Resources\Tools\StronglyTypedResourceBuilder.cs (3)
165Dictionary<string, ResourceData> resourceTypes = new(StringComparer.InvariantCultureIgnoreCase); 271Dictionary<string, ResourceData> resourceList = new(StringComparer.InvariantCultureIgnoreCase); 865reverseFixupTable = new(0, StringComparer.InvariantCultureIgnoreCase);
System\Windows\Forms\Design\OleDragDropHandler.CfCodeToolboxItem.cs (1)
90defaultValues ??= new Dictionary<string, object>();
System\Windows\Forms\Design\SelectionUIService.cs (1)
397Dictionary<object, SelectionUIItem> newSelection = new(selection.Count);
System.Windows.Forms.Design.Tests (54)
ButtonBaseDesignerTests.cs (1)
21new Dictionary<string, object>()
ControlDesignerTests.cs (2)
336Dictionary<string, object> defaultValues = new() 356Dictionary<string, object> defaultValues = new()
System\ComponentModel\Design\ComponentDesignerTests.cs (45)
74Dictionary<string, PropertyDescriptor> properties = new() 2254yield return new object[] { new Dictionary<int, int>() }; 2299yield return new object[] { new Dictionary<string, object>() }; 2300yield return new object[] { new Dictionary<string, object> { { "SettingsKey", new object() } } }; 2301yield return new object[] { new Dictionary<string, object> { { "SettingsKey", null } } }; 2309Dictionary<string, PropertyDescriptor> properties = new() 2329Dictionary<string, PropertyDescriptor> properties = new() 2362Dictionary<string, PropertyDescriptor> properties = new() 2383yield return new object[] { null, new Dictionary<Type, object>(), null }; 2385yield return new object[] { InheritanceAttribute.Default, new Dictionary<Type, object>(), null }; 2387yield return new object[] { InheritanceAttribute.Inherited, new Dictionary<Type, object>(), InheritanceAttribute.Inherited }; 2389yield return new object[] { InheritanceAttribute.InheritedReadOnly, new Dictionary<Type, object>(), InheritanceAttribute.InheritedReadOnly }; 2391yield return new object[] { InheritanceAttribute.NotInherited, new Dictionary<Type, object>(), null }; 2406yield return new object[] { new Dictionary<Type, object>(), InheritanceAttribute.Default }; 2407yield return new object[] { new Dictionary<Type, object> { { typeof(InheritanceAttribute), null } }, InheritanceAttribute.Default }; 2408yield return new object[] { new Dictionary<Type, object> { { typeof(InheritanceAttribute), new object() } }, InheritanceAttribute.Default }; 2410yield return new object[] { new Dictionary<Type, object> { { typeof(InheritanceAttribute), attribute } }, attribute }; 2436Dictionary<object, object> events = new() { { "key1", descriptor }, { "Key2", null } }; 2445Assert.Equal(new Dictionary<object, object> { { "key1", descriptor }, { "Key2", null }, { "Event", result } }, events); 2449Assert.Equal(new Dictionary<object, object> { { "key1", descriptor }, { "Key2", null } }, events); 2456yield return new object[] { null, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2457yield return new object[] { InheritanceAttribute.Default, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2458yield return new object[] { InheritanceAttribute.Default, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2460yield return new object[] { InheritanceAttribute.Inherited, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2462yield return new object[] { InheritanceAttribute.InheritedReadOnly, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2464yield return new object[] { InheritanceAttribute.NotInherited, new Dictionary<string, object>(), new Dictionary<string, object>() }; 2480Assert.Throws<ArrayTypeMismatchException>(() => designer.PostFilterEvents(new Dictionary<object, object> { { "key", new object() } })); 2713filter.PreFilterAttributes(new Dictionary<string, object>()); 2728filter.PreFilterEvents(new Dictionary<string, object>()); 2739Dictionary<string, PropertyDescriptor> properties = new() 2760Dictionary<string, PropertyDescriptor> properties = new() 2795Dictionary<string, PropertyDescriptor> properties = new() 2826filter.PreFilterProperties(new Dictionary<string, object>()); 2865filter.PostFilterAttributes(new Dictionary<string, object>()); 2875Dictionary<object, object> events = new() { { "key1", descriptor }, { "Key2", null } }; 2885Assert.Equal(new Dictionary<object, object> { { "key1", descriptor }, { "Key2", null }, { "Event", result } }, events); 2889Assert.Equal(new Dictionary<object, object> { { "key1", descriptor }, { "Key2", null } }, events); 2908Assert.Throws<ArrayTypeMismatchException>(() => filter.PostFilterEvents(new Dictionary<object, object> { { "key", new object() } })); 2925filter.PostFilterEvents(new Dictionary<string, object>());
System\Windows\Forms\Design\DataGridViewDesignerTests.cs (1)
145Dictionary<string, PropertyDescriptor> properties = new()
System\Windows\Forms\Design\ListBoxDesignerTests.cs (1)
137designer.InitializeNewComponent(new Dictionary<int, int>());
System\Windows\Forms\Design\ParentControlDesignerTests.cs (1)
122Dictionary<string, object> defaultValues = new()
System\Windows\Forms\Design\RichTextBoxDesignerTests.cs (1)
27_designer.InitializeNewComponent(new Dictionary<string, string>());
System\Windows\Forms\Design\TableLayoutPanelDesignerTests.cs (1)
167Dictionary<string, object> defaultValues = new();
ToolStripMenuItemDesignerTest.cs (1)
116Dictionary<string, PropertyDescriptor> property = new()
System.Windows.Forms.Primitives (1)
Windows\Win32\System\Ole\ClassPropertyDispatchAdapter.cs (1)
25private readonly Dictionary<string, int> _reverseLookup = new(StringComparer.OrdinalIgnoreCase);
System.Windows.Forms.Primitives.TestUtilities (2)
Extensions\AssertExtensions.cs (1)
427var actualItemCountMapping = new Dictionary<T, ItemCount>(comparer);
SystemCOLORs.cs (1)
10private static readonly Dictionary<SYS_COLOR_INDEX, string> s_names = new()
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (1)
203var semanticModelCache = new Dictionary<SyntaxTree, SemanticModel>();
System.Windows.Forms.Tests (44)
misc\CollectionHelperTests.cs (4)
58Dictionary<string, string> source = new() 71Dictionary<string, string> source = new() 94Dictionary<string, string> source = new() 117Dictionary<string, string> source = new()
System\Resources\ResXResourceWriterTests.cs (1)
34var dictionary = new Dictionary<object, object>();
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (1)
1355var typeDefaultValues = new Dictionary<Type, string>
System\Windows\Forms\ApplicationTests.cs (2)
393Dictionary<object, int> formClosingProcessed = new(mainMDIFormCount); 394Dictionary<object, int> formClosedProcessed = new(mainMDIFormCount);
System\Windows\Forms\LinkAreaConverterTests.cs (7)
120null, new Dictionary<string, object> 139new Dictionary<string, object> 147new Dictionary<string, object> 155new Dictionary<string, object> 163new Dictionary<string, object> 171new Dictionary<string, object> 179new Dictionary<string, object>
System\Windows\Forms\ListBindingHelperTests.cs (1)
135yield return new object[] { new Dictionary<int, string> { { 1, "string" } }, typeof(KeyValuePair<int, string>) };
System\Windows\Forms\MonthCalendar.SelectionRangeConverterTests.cs (1)
24private static IDictionary CreatePropertyValues(object start, object end) => new Dictionary<string, object>
System\Windows\Forms\PaddingConverterTests.cs (18)
148mockContext.Object, new Dictionary<string, object> 165null, new Dictionary<string, object> 187new Dictionary<string, object> 198new Dictionary<string, object> 209new Dictionary<string, object> 220new Dictionary<string, object> 231new Dictionary<string, object> 242new Dictionary<string, object> 253new Dictionary<string, object> 264new Dictionary<string, object> 275new Dictionary<string, object> 286new Dictionary<string, object> 297new Dictionary<string, object> 308new Dictionary<string, object> 319new Dictionary<string, object> 330new Dictionary<string, object> 341new Dictionary<string, object> 379var propertyValues = new Dictionary<string, object>
System\Windows\Forms\TableLayoutPanelCellPositionTests.cs (9)
210TableLayoutPanelCellPosition position = Assert.IsType<TableLayoutPanelCellPosition>(converter.CreateInstance(null, new Dictionary<string, object> 229new Dictionary<string, object> 237new Dictionary<string, object> 245new Dictionary<string, object> 253new Dictionary<string, object> 261new Dictionary<string, object> 269new Dictionary<string, object> 288Assert.Throws<ArgumentOutOfRangeException>("column", () => converter.CreateInstance(null, new Dictionary<string, object> 299Assert.Throws<ArgumentOutOfRangeException>("row", () => converter.CreateInstance(null, new Dictionary<string, object>
System.Windows.Input.Manipulations (1)
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
604this.manipulatorStates = new Dictionary<int, ManipulatorState>();
System.Xaml (51)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
135_assemblies = new Dictionary<object, AssemblyName>();
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (10)
882_subsumingNamespaces = new Dictionary<string, object>(); 909_knownNamespaces = new Dictionary<string, object>(); 1835_ignorables = new Dictionary<string, object>(); 1845_processContents = new Dictionary<string, ProcessContentSet>(); 1862_preserveElements = new Dictionary<string, PreserveItemSet>(); 1879_preserveAttributes = new Dictionary<string, PreserveItemSet>(); 2050_names = new Dictionary<string, string>(); 2064private Dictionary<string, string> _namespaceMap = new Dictionary<string, string>(); 2066private Dictionary<string, HandleElementCallback> _elementHandler = new Dictionary<string, HandleElementCallback>(); 2067private Dictionary<string, HandleAttributeCallback> _attributeHandler = new Dictionary<string, HandleAttributeCallback>();
System\Xaml\AttachablePropertyServices.cs (1)
183instanceProperties = new Dictionary<AttachableMemberIdentifier, object>();
System\Xaml\Context\NameFixupGraph.cs (3)
42_dependenciesByChildObject = new Dictionary<object, NameFixupToken>(referenceComparer); 43_dependenciesByName = new Dictionary<string, FrugalObjectList<NameFixupToken>>(StringComparer.Ordinal); 44_dependenciesByParentObject = new Dictionary<object, FrugalObjectList<NameFixupToken>>(referenceComparer);
System\Xaml\Context\ObjectWriterFrame.cs (2)
31_preconstructionPropertyValues = new Dictionary<XamlMember, object>(source.PreconstructionPropertyValues); 170_preconstructionPropertyValues = new Dictionary<XamlMember, object>();
System\Xaml\Context\XamlCommonFrame.cs (1)
19_namespaces = new Dictionary<string, string>();
System\Xaml\Context\XamlParserContext.cs (2)
25_prescopeNamespaces = new Dictionary<string, string>(); 150_prescopeNamespaces = new Dictionary<string, string>();
System\Xaml\InfosetObjects\XamlObjectWriter.cs (2)
218_pendingCollectionAdds = new Dictionary<object, List<PendingCollectionAdd>>(); 228_pendingKeyConversionContexts = new Dictionary<object, ObjectWriterContext>();
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
210xmlnsDictionary = new Dictionary<string, string>();
System\Xaml\InfosetObjects\XamlXmlReaderSettings.cs (1)
28_xmlnsDictionary = new Dictionary<string, string>(settings._xmlnsDictionary);
System\Xaml\MS\Impl\XmlNsInfo.cs (3)
304Dictionary<string, string> result = new Dictionary<string, string>(StringComparer.Ordinal); 357Dictionary<string, string> result = new Dictionary<string, string>(StringComparer.Ordinal); 458_subsumeCount = new Dictionary<string, int>(nsInfo.OldToNewNs.Count);
System\Xaml\Runtime\DynamicMethodRuntime.cs (5)
69_propertyGetDelegates = new Dictionary<MethodInfo, PropertyGetDelegate>(); 82_propertySetDelegates = new Dictionary<MethodInfo, PropertySetDelegate>(); 95_factoryDelegates = new Dictionary<MethodBase, FactoryDelegate>(); 108_converterInstances = new Dictionary<Type, object>(); 121_delegateCreators = new Dictionary<Type, DelegateCreator>();
System\Xaml\Schema\Reflector.cs (2)
151Dictionary<char, char> bracketCharacterAttributeList = new Dictionary<char, char>(); 427Dictionary<char, char> bracketCharacterList = new Dictionary<char, char>();
System\Xaml\Schema\TypeReflector.cs (5)
488Dictionary<string, PropertyInfo> result = new Dictionary<string, PropertyInfo>(propList.Length); 550Dictionary<string, EventInfo> result = new Dictionary<string, EventInfo>(eventList.Length); 738getters = new Dictionary<string, List<MethodInfo>>(); 739setters = new Dictionary<string, List<MethodInfo>>(); 740adders = new Dictionary<string, List<MethodInfo>>();
System\Xaml\Schema\XamlTypeInvoker.cs (1)
165Dictionary<XamlType, MethodInfo> addMethods = new Dictionary<XamlType, MethodInfo>();
System\Xaml\XamlObjectReader.cs (4)
2438objectGraphTable = new Dictionary<object, ObjectMarkupInfo>(new ObjectReferenceEqualityComparer()); 2450serviceProviderTable = new Dictionary<object, string>(new ObjectReferenceEqualityComparer()); 2498namespaceToPrefixMap = new Dictionary<string, string>(); 2499prefixToNamespaceMap = new Dictionary<string, string>();
System\Xaml\XamlSchemaContext.cs (1)
589Dictionary<string, SpecialBracketCharacters> map = new Dictionary<string, SpecialBracketCharacters>(StringComparer.OrdinalIgnoreCase);
System\Xaml\XamlType.cs (2)
1687Dictionary<int, IList<XamlType>> result = new Dictionary<int, IList<XamlType>>(); 1694Dictionary<int, IList<XamlType>> ctorDict = new Dictionary<int, IList<XamlType>>();
System\Xaml\XamlXmlWriter.cs (4)
106prefixAssignmentHistory = new Dictionary<string, string>() { {"xml", XamlLanguage.Xml1998Namespace} }; 678private Dictionary<string, string> namespaceMap = new Dictionary<string, string>(); // namespace to prefix map 679private Dictionary<string, string> prefixMap = new Dictionary<string, string>(); // prefix to namespace map 2189private Dictionary<XamlMember, bool> dictionary = new Dictionary<XamlMember, bool>();
System.Xaml.Tests (15)
System\Xaml\Schema\XamlTypeInvokerTests.cs (2)
117var instance = new Dictionary<int, string>(); 554public Dictionary<object, object> Dictionary { get; } = new Dictionary<object, object>();
System\Xaml\XamlMemberTests.cs (3)
1284yield return new object?[] { new SubXamlMember(typeof(DataClass).GetProperty(nameof(DataClass.Property))!, new XamlSchemaContext()), new Dictionary<char, char>() }; 1296new Dictionary<char, char> { { 'a', 'b' } } 1325new Dictionary<char, char> { { 'a', 'b' }, { 'c', 'd' } }
System\Xaml\XamlSchemaContextTests.cs (6)
142GetCustomAttributesMap = new Dictionary<Type, object?[]?> 163GetCustomAttributesMap = new Dictionary<Type, object?[]?> 338GetCustomAttributesMap = new Dictionary<Type, object?[]?> 352GetCustomAttributesMap = new Dictionary<Type, object?[]?> 366GetCustomAttributesMap = new Dictionary<Type, object?[]?> 380GetCustomAttributesMap = new Dictionary<Type, object?[]?>
System\Xaml\XamlTypeTests.cs (4)
368GetCustomAttributesMap = new Dictionary<Type, object?[]?> 384GetCustomAttributesMap = new Dictionary<Type, object?[]?> 400GetCustomAttributesMap = new Dictionary<Type, object?[]?> 416GetCustomAttributesMap = new Dictionary<Type, object?[]?>
TagHelpersWebSite (4)
Components\CopyrightViewComponent.cs (1)
12var dict = new Dictionary<string, object>
TagHelpers\DictionaryPrefixTestTagHelper.cs (1)
14public IDictionary<string, ModelExpression> PrefixValues { get; set; } = new Dictionary<string, ModelExpression>();
TagHelpers\PrettyTagHelper.cs (1)
14new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
TagHelpers\TagCloudViewComponentTagHelper.cs (1)
58new Dictionary<string, object>(),
TaskUsageLogger (5)
TaskUsageLogger.cs (5)
73_targetIdsToNames = new Dictionary<int, string>(); 76_toolsVersionsByProjectContextId = new Dictionary<int, string>(); 77_defaultTasksByToolset = new Dictionary<string, HashSet<UsingTaskData>>(); 78_tasksByProjectContextId = new Dictionary<int, HashSet<UsingTaskData>>(); 79_assemblyLocationsByName = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Templates.Blazor.Tests (5)
BlazorTemplateTest.cs (1)
146var result = await cdpSession.SendAsync("WebAuthn.addVirtualAuthenticator", new Dictionary<string, object>
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (3)
76environmentVariables ??= new Dictionary<string, string>(); 198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
Templates.Blazor.WebAssembly.Auth.Tests (4)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (3)
76environmentVariables ??= new Dictionary<string, string>(); 198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
Templates.Blazor.WebAssembly.Tests (4)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (3)
76environmentVariables ??= new Dictionary<string, string>(); 198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
Templates.Mvc.Tests (4)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (3)
76environmentVariables ??= new Dictionary<string, string>(); 198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
Templates.Tests (5)
IdentityUIPackageTest.cs (1)
104var packageOptions = new Dictionary<string, string>();
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (3)
76environmentVariables ??= new Dictionary<string, string>(); 198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
Test.Utilities (25)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
Text.Analyzers (38)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (1)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new();
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (3)
231_dictionary = new Dictionary<K, ValueSet>(); 236_dictionary = new Dictionary<K, ValueSet>(comparer); 248_dictionary = new Dictionary<K, ValueSet>(capacity, comparer);
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
34_dictionary = new Dictionary<K, SetWithInsertionOrder<V>>();
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 559return new Dictionary<K, ImmutableArray<T>>(comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (5)
403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (1)
75new(() => new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase), 20);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (1)
243var spilloverEdges = new Dictionary<int, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (2)
17var dictionary = new Dictionary<K, V>(builders.Count); 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\LiteralSpecialValues.cs (10)
39public static readonly IEnumerable<KeyValuePair<sbyte, string>> SByteSpecialValues = new Dictionary<sbyte, string>() 45public static readonly IEnumerable<KeyValuePair<short, string>> Int16SpecialValues = new Dictionary<short, string>() 51public static readonly IEnumerable<KeyValuePair<ushort, string>> UInt16SpecialValues = new Dictionary<ushort, string>() 56public static readonly IEnumerable<KeyValuePair<int, string>> Int32SpecialValues = new Dictionary<int, string>() 62public static readonly IEnumerable<KeyValuePair<uint, string>> UInt32SpecialValues = new Dictionary<uint, string>() 67public static readonly IEnumerable<KeyValuePair<long, string>> Int64SpecialValues = new Dictionary<long, string>() 73public static readonly IEnumerable<KeyValuePair<ulong, string>> UInt64SpecialValues = new Dictionary<ulong, string>() 78public static readonly IEnumerable<KeyValuePair<float, string>> SingleSpecialValues = new Dictionary<float, string>() 88public static readonly IEnumerable<KeyValuePair<double, string>> DoubleSpecialValues = new Dictionary<double, string>() 98public static readonly IEnumerable<KeyValuePair<decimal, string>> DecimalSpecialValues = new Dictionary<decimal, string>()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
19new Dictionary<BinaryOperatorKind, BinaryOperatorKind>
UnitTests.Common (1)
TestTypes.cs (1)
644_headers = new Dictionary<string, string>();
VBCSCompiler.UnitTests (30)
CompilerServerTests.cs (30)
129var resetVariables = new Dictionary<string, string>(); 329var files = new Dictionary<string, string> { { "hello.cs", "♕" } }; 471var files = new Dictionary<string, string> { { "c.cs", "class C {}" } }; 486var files = new Dictionary<string, string> { { "c.vb", "Class C\nEnd Class" } }; 544new Dictionary<string, string> { 572new Dictionary<string, string> { 638new Dictionary<string, string> { 680new Dictionary<string, string> { 710new Dictionary<string, string> { 740new Dictionary<string, string> { 761files = new Dictionary<string, string> { 780files = new Dictionary<string, string> { 798new Dictionary<string, string> { 818files = new Dictionary<string, string> { 860new Dictionary<string, string> { 876files = new Dictionary<string, string> { 896files = new Dictionary<string, string> { 913new Dictionary<string, string> { 932files = new Dictionary<string, string> { 1000var filesInDirectory = new Dictionary<string, string>() 1051new Dictionary<string, string> { 1072files = new Dictionary<string, string> { 1081additionalEnvironmentVars: new Dictionary<string, string>() { { "LIB", libDirectory.Path } }); 1100new Dictionary<string, string> { 1123files = new Dictionary<string, string> { 1133additionalEnvironmentVars: new Dictionary<string, string>() { { "LIB", libDirectory.Path } }); 1251new Dictionary<string, string> { 1274files = new Dictionary<string, string> { 1403additionalEnvironmentVars: new Dictionary<string, string> { { "TMP", tmp } }); 1437additionalEnvironmentVars: new Dictionary<string, string> { { "TMP", tmp } });
VersioningWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
45routeValues = new Dictionary<string, object>(_actionContext.RouteData.Values),
WindowsBase.Tests (30)
System\Windows\DependencyPropertyTests.cs (24)
64yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 116yield return new object?[] { "Register_String_Type_Type_Validate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>(), 2 }; 176yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 375yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 429yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 489yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 651yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 707yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>(), 2 }; 771yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 944yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 1002yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>(), 1 }; 1066yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() };
System\Windows\Markup\Primitives\MarkupObjectTests.cs (2)
154var instance = new Dictionary<int, string> 346var dictionary = new Dictionary<int, string>
System\Windows\Markup\Primitives\MarkupPropertyTests.cs (4)
141var instance = new Dictionary<int, string> 333var dictionary = new Dictionary<int, string> 460var instance = new Dictionary<int, string> 522var dictionary = new Dictionary<int, string>
WindowsFormsIntegration (4)
System\Windows\Integration\Convert.cs (2)
32_toSystemWindowsInputCursorDictionary = new Dictionary<SWF.Cursor, System.Windows.Input.Cursor>(); 72_toSystemWindowsFormsCursorDictionary = new Dictionary<SWI.Cursor, SWF.Cursor>();
System\Windows\Integration\PropertyMap.cs (2)
33_wrappedDictionary = new Dictionary<string, PropertyTranslator>(); 222_defaultTranslators = new Dictionary<string, PropertyTranslator>();
WinFormsControlsTest (1)
MainForm.cs (1)
54private IReadOnlyDictionary<MainFormControlsTabOrder, InitInfo> GetButtonsInitInfo() => new Dictionary<MainFormControlsTabOrder, InitInfo>
XmlFileLogger (2)
LogProcessNode.cs (1)
31_childNodes = new Dictionary<Type, List<ILogNode>>();
PropertyBag.cs (1)
27private readonly Dictionary<string, string> _properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
xunit.assert (4)
Sdk\ArgumentFormatter.cs (1)
98 static readonly Dictionary<TypeInfo, string> TypeMappings = new Dictionary<TypeInfo, string>
Sdk\AssertHelper.cs (1)
49 static readonly Dictionary<char, string> encodings = new Dictionary<char, string>
Sdk\CollectionTracker.cs (2)
597 var items = new Dictionary<int, T>(); 844 var result = new Dictionary<int, T>();
xunit.console (5)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (2)
16private readonly IDictionary<string, string> _stringPool = new Dictionary<string, string>(); 303var libraries = new Dictionary<string, LibraryStub>();
common\DictionaryExtensions.cs (1)
39var result = new Dictionary<TKey, TValue>(comparer);
common\Json.cs (1)
481var dictionary = new Dictionary<string, JsonValue>();
Utility\TransformFactory.cs (1)
18readonly Dictionary<string, Transform> availableTransforms = new Dictionary<string, Transform>(StringComparer.OrdinalIgnoreCase);
Xunit.NetCore.Extensions (4)
AssemblyFixtureSupport\XunitTestAssemblyRunnerWithAssemblyFixture.cs (1)
18private readonly Dictionary<Type, object> assemblyFixtureMappings = new Dictionary<Type, object>();
AssemblyFixtureSupport\XunitTestClassRunnerWithAssemblyFixture.cs (1)
18private readonly Dictionary<Type, object> assemblyFixtureMappings = new Dictionary<Type, object>();
AssemblyFixtureSupport\XunitTestCollectionRunnerWithAssemblyFixture.cs (1)
41var combinedFixtures = new Dictionary<Type, object>(assemblyFixtureMappings);
AssemblyFixtureSupport\XunitTestMethodRunnerWithAssemblyFixture.cs (1)
17private readonly Dictionary<Type, object> assemblyFixtureMappings = new Dictionary<Type, object>();
10680 references to Dictionary
AnalyzerRunner (5)
AnalyzerRunnerHelper.cs (1)
14var properties = new Dictionary<string, string>
DiagnosticAnalyzerRunner.cs (3)
103var projectPerformance = new Dictionary<ProjectId, double>(); 104var documentPerformance = new Dictionary<DocumentId, DocumentAnalyzerPerformance>(); 414var telemetryInfoDictionary = new Dictionary<DiagnosticAnalyzer, AnalyzerTelemetryInfo>();
Program.cs (1)
147var diagnosticStatistics = new Dictionary<string, (string description, DiagnosticSeverity severity, int count)>();
aspire (15)
Backchannel\ExtensionBackchannel.cs (1)
409var choicesByFormattedValue = choicesList.ToDictionary(choice => choiceFormatter(choice).RemoveSpectreFormatting(), choice => choice);
Commands\ConfigCommand.cs (1)
180var allConfig = await _configurationService.GetAllConfigurationAsync(cancellationToken);
Commands\ExecCommand.cs (1)
90var env = new Dictionary<string, string>();
Commands\PublishCommandBase.cs (4)
96var env = new Dictionary<string, string>(); 248var steps = new Dictionary<string, StepInfo>(); 340var tasks = currentStepProgress.Step.Tasks; 599public Dictionary<string, TaskInfo> Tasks { get; } = [];
Commands\RunCommand.cs (2)
89var env = new Dictionary<string, string>(); 325private readonly Dictionary<string, RpcResourceState> _resourceStates = new();
Configuration\ConfigurationService.cs (4)
115public async Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 117var allConfig = new Dictionary<string, string>(); 126private static async Task LoadConfigurationFromFileAsync(string filePath, Dictionary<string, string> config, CancellationToken cancellationToken) 230private static void FlattenJsonObject(JsonObject obj, Dictionary<string, string> result, string prefix)
Configuration\IConfigurationService.cs (1)
10Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default);
DotNetCliRunner.cs (1)
594var env = new Dictionary<string, string>
Aspire.Azure.Messaging.EventHubs.Tests (2)
tests\Aspire.Azure.Security.KeyVault.Tests\MockTransport.cs (2)
78private readonly Dictionary<string, List<string>> _headers = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase); 134private readonly Dictionary<string, List<string>> _headers = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
Aspire.Azure.Security.KeyVault.Tests (2)
MockTransport.cs (2)
78private readonly Dictionary<string, List<string>> _headers = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase); 134private readonly Dictionary<string, List<string>> _headers = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
Aspire.Cli.Tests (6)
Commands\PublishCommandPromptingIntegrationTests.cs (1)
555private readonly Dictionary<string, TaskCompletionSource> _promptCompletionSources = new();
DotNet\DotNetCliRunnerTests.cs (1)
248var existingEnv = new Dictionary<string, string>
Projects\ProjectLocatorTests.cs (1)
331public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default)
Utils\CliTestHelper.cs (3)
36var configurationValues = new Dictionary<string, string?>(); 109public Action<Dictionary<string, string?>> ConfigurationCallback { get; set; } = (Dictionary<string, string?> config) =>
Aspire.Confluent.Kafka (1)
MetricsService.cs (1)
15private readonly Dictionary<string, Statistics> _state = new();
Aspire.Dashboard (64)
Components\Controls\Chart\ChartBase.cs (4)
63private Dictionary<SpanKey, OtlpSpan> _currentCache = new Dictionary<SpanKey, OtlpSpan>(); 64private Dictionary<SpanKey, OtlpSpan> _newCache = new Dictionary<SpanKey, OtlpSpan>(); 127var traces = new Dictionary<int, ChartTrace> 216internal bool TryCalculateHistogramPoints(List<DimensionScope> dimensions, DateTimeOffset start, DateTimeOffset end, Dictionary<int, ChartTrace> traces, List<ChartExemplar> exemplars)
Components\Controls\Chart\MetricTable.razor.cs (1)
128var traceValuesByPercentile = traces.ToDictionary(trace => trace.Percentile!.Value, trace => trace.Values[iTmp]);
Components\Controls\Chart\PlotlyChart.razor.cs (1)
117var exemplarGroups = new Dictionary<ExemplarGroupKey, List<ChartExemplar>>();
Components\Dialogs\FilterDialog.razor.cs (1)
92var fieldValues = Content.GetFieldValues(parameterName);
Components\Dialogs\InteractionsInputDialog.razor.cs (1)
24private Dictionary<InputViewModel, FluentComponentBase?> _elementRefs = default!;
Components\Layout\AspirePageContentLayout.razor.cs (1)
55public Dictionary<string, Func<Task>> DialogCloseListeners { get; } = new();
Components\Pages\ComponentTelemetryContext.cs (2)
50internal Dictionary<string, AspireTelemetryProperty> Properties { get; } = []; 111private Dictionary<string, AspireTelemetryProperty> CreateInitializeAndDisposeProperties()
Components\Pages\Resources.razor.cs (3)
41private Dictionary<ApplicationKey, int>? _applicationUnviewedErrorCounts; 226var newApplicationUnviewedErrorCounts = TelemetryRepository.GetApplicationUnviewedErrorLogsCount(); 540private bool ApplicationErrorCountsChanged(Dictionary<ApplicationKey, int> newApplicationUnviewedErrorCounts)
Components\Pages\TraceDetail.razor.cs (2)
288var traceCache = new Dictionary<string, OtlpTrace>(StringComparer.Ordinal); 307private SpanLinkViewModel CreateLinkViewModel(string traceId, string spanId, KeyValuePair<string, string>[] attributes, Dictionary<string, OtlpTrace> traceCache)
Components\Resize\GridColumnManager.razor.cs (1)
12private Dictionary<string, GridColumn> _columnById = null!;
Components\ResourcesGridColumns\StateColumnDisplay.razor.cs (1)
18public required Dictionary<ApplicationKey, int>? UnviewedErrorCounts { get; set; }
Components\ResourcesGridColumns\UnreadLogErrorsBadge.razor.cs (1)
19public required Dictionary<ApplicationKey, int>? UnviewedErrorCounts { get; set; }
DashboardWebApplication.cs (2)
506var initialValues = new Dictionary<string, string?>(); 544static void AddEndpointConfiguration(Dictionary<string, string?> values, string endpointName, string url, HttpProtocols? protocols = null, bool requiredClientCertificate = false)
Extensions\FluentUIExtensions.cs (2)
10public static Dictionary<string, object> GetClipboardCopyAdditionalAttributes(string? text, string? precopy, string? postcopy, params (string Attribute, object Value)[] additionalAttributes) 15var attributes = new Dictionary<string, object>(StringComparers.HtmlAttribute)
Model\ConsoleLogsFilters.cs (1)
9public Dictionary<string, DateTime> FilterResourceLogsDates { get; set; } = [];
Model\FilterDialogViewModel.cs (1)
13public required Func<string, Dictionary<string, int>> GetFieldValues { get; init; }
Model\Otlp\ApplicationsSelectHelpers.cs (1)
68var replicasByApplicationName = OtlpApplication.GetReplicasByApplicationName(applications);
Model\TraceHelpers.cs (2)
48var appFirstTimes = new Dictionary<OtlpApplication, OrderedApplication>(); 70private static void ProcessSpanApp(OtlpSpan span, OtlpApplication application, Dictionary<OtlpApplication, OrderedApplication> appFirstTimes, DateTime currentMinDate)
Otlp\Model\OtlpApplication.cs (3)
33private readonly Dictionary<string, OtlpScope> _meters = new(); 34private readonly Dictionary<OtlpInstrumentKey, OtlpInstrument> _instruments = new(); 250public static Dictionary<string, List<OtlpApplication>> GetReplicasByApplicationName(IEnumerable<OtlpApplication> allApplications)
Otlp\Model\OtlpHelpers.cs (1)
448public static bool TryGetOrAddScope(Dictionary<string, OtlpScope> scopes, InstrumentationScope? scope, OtlpContext context, TelemetryType telemetryType, [NotNullWhen(true)] out OtlpScope? s)
Otlp\Model\OtlpInstrument.cs (3)
29public required Dictionary<string, List<string?>> KnownAttributeValues { get; init; } 39public Dictionary<ReadOnlyMemory<KeyValuePair<string, string>>, DimensionScope> Dimensions { get; } = new(ScopeAttributesComparer.Instance); 40public Dictionary<string, List<string?>> KnownAttributeValues { get; } = new();
Otlp\Storage\TelemetryRepository.cs (10)
43private readonly Dictionary<string, OtlpScope> _logScopes = new(); 47private readonly Dictionary<ApplicationKey, int> _applicationUnviewedErrorLogs = new(); 50private readonly Dictionary<string, OtlpScope> _traceScopes = new(); 164public Dictionary<ApplicationKey, int> GetApplicationUnviewedErrorLogsCount() 705public Dictionary<string, int> GetTraceFieldValues(string attributeName) 709var attributesValues = new Dictionary<string, int>(StringComparers.OtlpAttribute); 741public Dictionary<string, int> GetLogsFieldValues(string attributeName) 745var attributesValues = new Dictionary<string, int>(StringComparers.OtlpAttribute); 927var updatedTraces = new Dictionary<ReadOnlyMemory<byte>, OtlpTrace>(); 1276var allKnownAttributes = new Dictionary<string, List<string?>>();
ServiceClient\DashboardClient.cs (1)
45private readonly Dictionary<string, ResourceViewModel> _resourceByName = new(StringComparers.ResourceName);
Telemetry\DashboardTelemetryService.cs (10)
16internal readonly Dictionary<string, AspireTelemetryProperty> _defaultProperties; 98public OperationContext StartOperation(string eventName, Dictionary<string, AspireTelemetryProperty> startEventProperties, TelemetrySeverity severity = TelemetrySeverity.Normal, bool isOptOutFriendly = false, bool postStartEvent = true, IEnumerable<OperationContextProperty>? correlations = null) 144public OperationContext StartUserTask(string eventName, Dictionary<string, AspireTelemetryProperty> startEventProperties, TelemetrySeverity severity = TelemetrySeverity.Normal, bool isOptOutFriendly = false, bool postStartEvent = true, IEnumerable<OperationContextProperty>? correlations = null) 191public OperationContext PostOperation(string eventName, TelemetryResult result, string? resultSummary = null, Dictionary<string, AspireTelemetryProperty>? properties = null, IEnumerable<OperationContextProperty>? correlatedWith = null) 219public OperationContext PostUserTask(string eventName, TelemetryResult result, string? resultSummary = null, Dictionary<string, AspireTelemetryProperty>? properties = null, IEnumerable<OperationContextProperty>? correlatedWith = null) 247public OperationContext PostFault(string eventName, string description, FaultSeverity severity, Dictionary<string, AspireTelemetryProperty>? properties = null, IEnumerable<OperationContextProperty>? correlatedWith = null) 276public OperationContext PostAsset(string eventName, string assetId, int assetEventVersion, Dictionary<string, AspireTelemetryProperty>? additionalProperties = null, IEnumerable<OperationContextProperty>? correlatedWith = null) 339public void PostCommandLineFlags(List<string> flagPrefixes, Dictionary<string, AspireTelemetryProperty> additionalProperties) 372private Dictionary<string, AspireTelemetryProperty>? IncludeDefaultProperties(Dictionary<string, AspireTelemetryProperty>? properties)
Telemetry\TelemetryRequests.cs (5)
10public record PostOperationRequest(string EventName, TelemetryResult Result, string? ResultSummary = null, Dictionary<string, AspireTelemetryProperty>? Properties = null, TelemetryEventCorrelation[]? CorrelatedWith = null); 12public record PostFaultRequest(string EventName, string Description, FaultSeverity Severity, Dictionary<string, AspireTelemetryProperty>? Properties = null, TelemetryEventCorrelation[]? CorrelatedWith = null); 14public record PostAssetRequest(string EventName, string AssetId, int AssetEventVersion, Dictionary<string, AspireTelemetryProperty>? AdditionalProperties, TelemetryEventCorrelation[]? CorrelatedWith = null); 18public record PostCommandLineFlagsRequest(List<string> FlagPrefixes, Dictionary<string, AspireTelemetryProperty> AdditionalProperties); 21Dictionary<string, AspireTelemetryProperty> StartEventProperties,
Utils\GlobalizationHelpers.cs (3)
20public static Dictionary<string, List<CultureInfo>> ExpandedLocalizedCultures { get; } 40private static Dictionary<string, List<CultureInfo>> GetExpandedLocalizedCultures(List<CultureInfo> localizedCultures, List<CultureInfo> allCultures) 42var dict = new Dictionary<string, List<CultureInfo>>(StringComparers.CultureName);
Aspire.Dashboard.Components.Tests (1)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
17Dictionary<string, ResourcePropertyViewModel>? properties = null,
Aspire.Dashboard.Tests (29)
Integration\FrontendOpenIdConnectAuthTests.cs (1)
95private static void ConfigureOpenIdConnect(Dictionary<string, string?> config, MockOpenIdAuthority.Authority authority)
Integration\IntegrationTestHelpers.cs (3)
41Action<Dictionary<string, string?>>? additionalConfiguration = null, 53Action<Dictionary<string, string?>>? additionalConfiguration = null, 59var initialData = new Dictionary<string, string?>
Integration\Playwright\Infrastructure\DashboardServerFixture.cs (1)
16public Dictionary<string, string?> Configuration { get; }
Model\ApplicationsSelectHelpersTests.cs (1)
110var apps = new Dictionary<string, OtlpApplication>();
Model\ResourceGraphMapperTests.cs (4)
21var resources = new Dictionary<string, ResourceViewModel> 42var resources = new Dictionary<string, ResourceViewModel> 63var resources = new Dictionary<string, ResourceViewModel> 81var resources = new Dictionary<string, ResourceViewModel>
Model\ResourceSourceViewModelTests.cs (1)
18var properties = new Dictionary<string, ResourcePropertyViewModel>();
Model\ResourceStateViewModelTests.cs (1)
72var propertiesDictionary = new Dictionary<string, ResourcePropertyViewModel>();
ResourceOutgoingPeerResolverTests.cs (9)
29var resources = new Dictionary<string, ResourceViewModel> 42var resources = new Dictionary<string, ResourceViewModel> 55var resources = new Dictionary<string, ResourceViewModel> 68var resources = new Dictionary<string, ResourceViewModel> 82var resources = new Dictionary<string, ResourceViewModel> 96var resources = new Dictionary<string, ResourceViewModel> 110var resources = new Dictionary<string, ResourceViewModel> 189var resources = new Dictionary<string, ResourceViewModel> 203var resources = new Dictionary<string, ResourceViewModel>
TelemetryRepositoryTests\LogTests.cs (6)
246var unviewedCounts1 = repository.GetApplicationUnviewedErrorLogsCount(); 256var unviewedCounts2 = repository.GetApplicationUnviewedErrorLogsCount(); 265var unviewedCounts3 = repository.GetApplicationUnviewedErrorLogsCount(); 317var unviewedCounts = repository.GetApplicationUnviewedErrorLogsCount(); 369var unviewedCounts = repository.GetApplicationUnviewedErrorLogsCount(); 407var unviewedCounts = repository.GetApplicationUnviewedErrorLogsCount();
TelemetryRepositoryTests\MetricsTests.cs (1)
1244private static void AssertDimensionValues(Dictionary<ReadOnlyMemory<KeyValuePair<string, string>>, DimensionScope> dimensions, ReadOnlyMemory<KeyValuePair<string, string>> key, int valueCount)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
17Dictionary<string, ResourcePropertyViewModel>? properties = null,
Aspire.EndToEnd.Tests (5)
IntegrationServicesFixture.cs (1)
26public Dictionary<string, ProjectInfo> Projects => Project?.InfoTable ?? throw new InvalidOperationException("Project is not initialized");
tests\Shared\TemplatesTesting\AspireProject.cs (1)
35public Dictionary<string, ProjectInfo> InfoTable { get; private set; } = new(capacity: 0);
tests\Shared\TemplatesTesting\ProjectInfo.cs (2)
59public static Dictionary<string, ProjectInfo> Parse(string json) => 60JsonSerializer.Deserialize<Dictionary<string, ProjectInfo>>(json)!;
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
21public Dictionary<string, string> Environment { get; } = new Dictionary<string, string>();
Aspire.Hosting (36)
ApplicationModel\DockerfileBuildAnnotation.cs (2)
32public Dictionary<string, object?> BuildArguments { get; } = []; 37public Dictionary<string, object> BuildSecrets { get; } = [];
ApplicationModel\EnvironmentCallbackAnnotation.cs (1)
38public EnvironmentCallbackAnnotation(Action<Dictionary<string, object>> callback)
ApplicationModel\EnvironmentCallbackContext.cs (3)
15public class EnvironmentCallbackContext(DistributedApplicationExecutionContext executionContext, Dictionary<string, object>? environmentVariables = null, CancellationToken cancellationToken = default) 26public EnvironmentCallbackContext(DistributedApplicationExecutionContext executionContext, IResource resource, Dictionary<string, object>? environmentVariables = null, CancellationToken cancellationToken = default) 35public Dictionary<string, object> EnvironmentVariables { get; } = environmentVariables ?? new();
ApplicationModel\ExpressionResolver.cs (1)
18readonly Dictionary<string, HostAndPortPresence> _endpointUsage = [];
ApplicationModel\ProjectResource.cs (1)
17internal Dictionary<EndpointAnnotation, string> KestrelEndpointAnnotationHosts { get; } = new();
ApplicationModel\ResourceExtensions.cs (3)
187public static async ValueTask<Dictionary<string, string>> GetEnvironmentVariableValuesAsync(this IResourceWithEnvironment resource, 190var env = new Dictionary<string, string>(); 344var config = new Dictionary<string, object>();
ApplicationModel\ResourceLoggerService.cs (1)
335internal Dictionary<string, ResourceLoggerState> Loggers => _loggers.ToDictionary();
ApplicationModel\ResourceNotificationService.cs (1)
474var versionsSeen = new Dictionary<string, long>();
Dashboard\DashboardLifecycleHook.cs (1)
365var dashboardResourceTasks = new Dictionary<string, Task>();
Dashboard\ResourcePublisher.cs (1)
22private readonly Dictionary<string, SourceAndResourceSnapshot> _snapshot = [];
Dcp\DcpExecutor.cs (1)
271var resourceLogState = new Dictionary<string, (bool logsAvailable, bool hasSubscribers)>();
Dcp\DcpHost.cs (1)
268var loggerCache = new Dictionary<int, ILogger>();
Dcp\DcpResourceState.cs (2)
10internal sealed class DcpResourceState(Dictionary<string, IResource> applicationModel, List<AppResource> appResources) 18public Dictionary<string, IResource> ApplicationModel { get; } = applicationModel;
Dcp\Model\Schema.cs (1)
8private readonly Dictionary<Type, (string Kind, string Resource)> _byType = new();
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (1)
30Dictionary<UrlSnapshot, UrlSnapshot>? remappedUrls = null;
DistributedApplicationBuilder.cs (2)
499var switchMappings = new Dictionary<string, string>() 516var switchMappings = new Dictionary<string, string>()
Health\ResourceHealthCheckService.cs (2)
16private readonly Dictionary<string, ResourceMonitorState> _resourceMonitoringStates = new(); 221var healthCheckNameToStatus = latestHealthReportSnapshots.ToDictionary(p => p.Name);
LaunchProfile.cs (1)
53public Dictionary<string, string> EnvironmentVariables { get; set; } = [];
LaunchSettings.cs (1)
17public Dictionary<string, LaunchProfile> Profiles { get; set; } = [];
Orchestrator\RelationshipEvaluator.cs (2)
61var childToParentLookup = relationships.ToDictionary(x => x.Child, x => x.Parent); 70static void ValidateNoCircularDependencies(Dictionary<IResource, IResource> childToParentLookup, IResource child, Stack<IResource> visited)
OtlpConfigurationExtensions.cs (1)
94static void SetOtelEndpointAndProtocol(Dictionary<string, object> environmentVariables, string url, string protocol)
ProjectResourceBuilderExtensions.cs (1)
432Dictionary<string, int> endpointCountByScheme = [];
Publishing\ManifestPublishingContext.cs (2)
44private readonly Dictionary<string, IResource> _referencedResources = []; 488var env = new Dictionary<string, (object, string)>();
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
50var profiles = projectResource.GetLaunchSettings()?.Profiles;
src\Shared\SecretsStore.cs (2)
20private readonly Dictionary<string, string?> _secrets; 87private static Dictionary<string, string?> Load(string secretsFilePath)
Aspire.Hosting.Azure (16)
AzureBicepResource.cs (3)
43public Dictionary<string, object?> Parameters { get; } = []; 50public Dictionary<string, object?> Outputs { get; } = []; 55public Dictionary<string, string?> SecretOutputs { get; } = [];
AzureProvisioningResource.cs (1)
157var distinctInfrastructureParametersLookup = distinctInfrastructureParameters.ToDictionary(p => p.BicepIdentifier);
AzurePublishingContext.cs (4)
49public Dictionary<ParameterResource, ProvisioningParameter> ParameterLookup { get; } = []; 58public Dictionary<BicepOutputReference, ProvisioningOutput> OutputLookup { get; } = []; 139var moduleMap = new Dictionary<AzureBicepResource, ModuleImport>(); 274var outputs = new Dictionary<string, BicepOutputReference>();
AzureResourcePreparer.cs (8)
106var globalRoleAssignments = new Dictionary<AzureProvisioningResource, HashSet<RoleDefinition>>(); 187var roleAssignments = GetAllRoleAssignments(resource); 244private static Dictionary<AzureProvisioningResource, IEnumerable<RoleDefinition>> GetAllRoleAssignments(IResource resource) 246var result = new Dictionary<AzureProvisioningResource, IEnumerable<RoleDefinition>>(); 260Dictionary<AzureProvisioningResource, IEnumerable<RoleDefinition>> roleAssignments, 292Dictionary<AzureProvisioningResource, IEnumerable<RoleDefinition>> roleAssignments, 465private static void AppendGlobalRoleAssignments(Dictionary<AzureProvisioningResource, HashSet<RoleDefinition>> globalRoleAssignments, AzureProvisioningResource azureResource, IEnumerable<RoleDefinition> newRoles) 476private void CreateGlobalRoleAssignments(DistributedApplicationModel appModel, Dictionary<AzureProvisioningResource, HashSet<RoleDefinition>> globalRoleAssignments, AzureProvisioningOptions provisioningOptions)
Aspire.Hosting.Azure.AppContainers (7)
AzureContainerAppEnvironmentResource.cs (1)
58internal Dictionary<string, (IResource resource, ContainerMountAnnotation volume, int index, BicepOutputReference outputReference)> VolumeNames { get; } = [];
AzureContainerAppExtensions.cs (1)
168var managedStorages = new Dictionary<string, ContainerAppManagedEnvironmentStorage>();
ContainerAppContext.cs (4)
30private readonly Dictionary<string, EndpointMapping> _endpointMapping = []; 37public Dictionary<string, object> EnvironmentVariables { get; } = []; 39public Dictionary<string, (ContainerMountAnnotation, BicepOutputReference)> Volumes { get; } = []; 239var endpointIndexMap = new Dictionary<string, int>();
ContainerAppEnvironmentContext.cs (1)
21private readonly Dictionary<IResource, ContainerAppContext> _containerApps = new(new ResourceNameComparer());
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceEnvironmentContext.cs (1)
21private readonly Dictionary<IResource, AzureAppServiceWebsiteContext> _appServices = new(new ResourceNameComparer());
AzureAppServiceWebsiteContext.cs (2)
22private readonly Dictionary<string, EndpointMapping> _endpointMapping = []; 27public Dictionary<string, object> EnvironmentVariables { get; } = [];
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
50var profiles = projectResource.GetLaunchSettings()?.Profiles;
Aspire.Hosting.Azure.PostgreSQL (3)
AzurePostgresExtensions.cs (2)
217var azureDatabases = builder.ApplicationBuilder.Resources 254private static void RemoveAzureResources(IDistributedApplicationBuilder appBuilder, AzurePostgresFlexibleServerResource azureResource, Dictionary<string, AzurePostgresFlexibleServerDatabaseResource> azureDatabases)
AzurePostgresFlexibleServerResource.cs (1)
22private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusCorrelationFilter.cs (1)
21public Dictionary<string, object> Properties { get; set; } = [];
Aspire.Hosting.Azure.Sql (3)
AzureSqlExtensions.cs (2)
177var azureDatabases = builder.ApplicationBuilder.Resources 204private static void RemoveAzureResources(IDistributedApplicationBuilder appBuilder, AzureSqlServerResource azureResource, Dictionary<string, AzureSqlDatabaseResource> azureDatabases)
AzureSqlServerResource.cs (1)
20private readonly Dictionary<string, AzureSqlDatabaseResource> _databases = new Dictionary<string, AzureSqlDatabaseResource>(StringComparers.ResourceName);
Aspire.Hosting.Azure.Tests (32)
AzureApplicationInsightsExtensionsTests.cs (1)
95var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(serviceA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
AzureCosmosDBExtensionsTests.cs (4)
70var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(cosmos.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 151var target = new Dictionary<string, object>(); 339var secrets = new Dictionary<string, string> 443var secrets = new Dictionary<string, string>
AzureEventHubsExtensionsTests.cs (1)
560var target = new Dictionary<string, object>();
AzureInfrastructureExtensionsTests.cs (2)
56var infrastructureParametersLookup = infrastructureParameters.ToDictionary(p => p.BicepIdentifier); 95var infrastructureParametersLookup = infrastructureParameters.ToDictionary(p => p.BicepIdentifier);
AzureKeyVaultTests.cs (2)
68var runEnv = await containerBuilder.Resource.GetEnvironmentVariableValuesAsync(DistributedApplicationOperation.Run); 69var publishEnv = await containerBuilder.Resource.GetEnvironmentVariableValuesAsync(DistributedApplicationOperation.Publish);
AzureServiceBusExtensionsTests.cs (1)
660var target = new Dictionary<string, object>();
ResourceWithAzureFunctionsConfigTests.cs (21)
110var target = new Dictionary<string, object>(); 128var target = new Dictionary<string, object>(); 149var target = new Dictionary<string, object>(); 166var target = new Dictionary<string, object>(); 183var target = new Dictionary<string, object>(); 199var target = new Dictionary<string, object>(); 215var target = new Dictionary<string, object>(); 231var target = new Dictionary<string, object>(); 248var target = new Dictionary<string, object>(); 273var target = new Dictionary<string, object>(); 301var target = new Dictionary<string, object>(); 323var target = new Dictionary<string, object>(); 343var target = new Dictionary<string, object>(); 363var target = new Dictionary<string, object>(); 383var target = new Dictionary<string, object>(); 400var target = new Dictionary<string, object>(); 419var target = new Dictionary<string, object>(); 439var target = new Dictionary<string, object>(); 458var target = new Dictionary<string, object>(); 479var target = new Dictionary<string, object>(); 501var target = new Dictionary<string, object>();
Aspire.Hosting.Azure.WebPubSub (1)
AzureWebPubSubResource.cs (1)
18internal Dictionary<string, AzureWebPubSubHubResource> Hubs { get; } = new(StringComparer.OrdinalIgnoreCase);
Aspire.Hosting.Docker (31)
DockerComposeEnvironmentContext.cs (1)
130private static void RemoveHttpsServiceDiscoveryVariables(Dictionary<string, object> environmentVariables)
DockerComposeEnvironmentResource.cs (2)
51internal Dictionary<string, (string? Description, string? DefaultValue, object? Source)> CapturedEnvironmentVariables { get; } = []; 53internal Dictionary<IResource, DockerComposeServiceResource> ResourceMapping { get; } = new(new ResourceNameComparer());
DockerComposeServiceResource.cs (3)
52internal Dictionary<string, object> EnvironmentVariables { get; } = []; 67internal Dictionary<string, EndpointMapping> EndpointMappings { get; } = []; 163var env = new Dictionary<string, string>();
Resources\ComposeFile.cs (6)
54public Dictionary<string, Service> Services { get; set; } = []; 64public Dictionary<string, Network> Networks { get; set; } = []; 75public Dictionary<string, Volume> Volumes { get; set; } = []; 88public Dictionary<string, Secret> Secrets { get; set; } = []; 96public Dictionary<string, Config> Configs { get; set; } = []; 107public Dictionary<string, object> Extensions { get; set; } = [];
Resources\ComposeNodes\Config.cs (1)
51public Dictionary<string, string> Labels { get; set; } = [];
Resources\ComposeNodes\Network.cs (2)
34public Dictionary<string, string> DriverOpts { get; set; } = []; 50public Dictionary<string, string> Labels { get; set; } = [];
Resources\ComposeNodes\Secret.cs (1)
46public Dictionary<string, string> Labels { get; set; } = [];
Resources\ComposeNodes\Service.cs (6)
78public Dictionary<string, string> Environment { get; set; } = []; 132public Dictionary<string, ServiceDependency> DependsOn { get; set; } = []; 191public Dictionary<string, string> Labels { get; set; } = []; 298public Dictionary<string, string> ExtraHosts { get; set; } = []; 412public Dictionary<string, string> Sysctls { get; set; } = []; 442public Dictionary<string, Ulimit> Ulimits { get; set; } = [];
Resources\ServiceNodes\Build.cs (2)
39public Dictionary<string, string> Args { get; set; } = []; 63public Dictionary<string, string> Labels { get; set; } = [];
Resources\ServiceNodes\Ipam.cs (2)
33public List<Dictionary<string, string>> Config { get; set; } = []; 45public Dictionary<string, string> Options { get; set; } = [];
Resources\ServiceNodes\Logging.cs (1)
32public Dictionary<string, string> Options { get; set; } = [];
Resources\ServiceNodes\Swarm\LabelSpecs.cs (1)
21public Dictionary<string, string> AdditionalLabels { get; set; } = [];
Resources\ServiceNodes\Swarm\Placement.cs (1)
31public List<Dictionary<string, string>>? Preferences { get; set; }
Resources\ServiceNodes\Volume.cs (2)
63public Dictionary<string, string> DriverOpts { get; set; } = []; 80public Dictionary<string, string> Labels { get; set; } = [];
Aspire.Hosting.Docker.Tests (1)
DockerComposePublisherTests.cs (1)
508public Dictionary<string, LaunchProfile>? Profiles { get; set; } = [];
Aspire.Hosting.Kafka.Tests (2)
AddKafkaTests.cs (2)
121var config = await kafka.Resource.GetEnvironmentVariableValuesAsync(); 139var config = await kafka.Resource.GetEnvironmentVariableValuesAsync();
Aspire.Hosting.Kubernetes (28)
KubernetesEnvironmentContext.cs (1)
11private readonly Dictionary<IResource, KubernetesResource> _kubernetesComponents = [];
KubernetesPublishingContext.cs (5)
23private readonly Dictionary<string, Dictionary<string, object>> _helmValues = new() 100Dictionary<string, KubernetesResource.HelmExpressionWithValue> contextItems, 103if (contextItems.Count <= 0 || _helmValues[helmKey] is not Dictionary<string, object> helmSection) 108var paramValues = new Dictionary<string, string>();
KubernetesResource.cs (5)
20internal Dictionary<string, EndpointMapping> EndpointMappings { get; } = []; 21internal Dictionary<string, HelmExpressionWithValue> EnvironmentVariables { get; } = []; 22internal Dictionary<string, HelmExpressionWithValue> Secrets { get; } = []; 23internal Dictionary<string, HelmExpressionWithValue> Parameters { get; } = []; 24internal Dictionary<string, string> Labels { get; private set; } = [];
Resources\ConfigMapV1.cs (2)
30public Dictionary<string, string> BinaryData { get; } = []; 43public Dictionary<string, string> Data { get; } = [];
Resources\HelmChart.cs (1)
136public Dictionary<string, string> Annotations { get; set; } = [];
Resources\LabelSelectorV1.cs (2)
34public Dictionary<string, string> MatchLabels { get; set; } = []; 58public LabelSelectorV1(Dictionary<string, string> matchLabels)
Resources\ObjectMetaV1.cs (2)
131public Dictionary<string, string> Annotations { get; } = []; 169public Dictionary<string, string> Labels { get; set; } = [];
Resources\PersistentVolumeSpecV1.cs (1)
93public Dictionary<string, string> Capacity { get; set; } = [];
Resources\PodSpecV1.cs (2)
51public Dictionary<string, string> Overhead { get; } = []; 157public Dictionary<string, string> NodeSelector { get; } = [];
Resources\ResourceRequirementsV1.cs (2)
32public Dictionary<string, string> Limits { get; } = []; 43public Dictionary<string, string> Requests { get; } = [];
Resources\SecretV1.cs (2)
32public Dictionary<string, string> Data { get; } = []; 43public Dictionary<string, string> StringData { get; } = [];
Resources\ServiceSpecV1.cs (1)
93public Dictionary<string, string> Selector { get; set; } = [];
Resources\VolumeResourceRequirementsV1.cs (2)
25public Dictionary<string, string> Limits { get; } = []; 33public Dictionary<string, string> Requests { get; } = [];
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
45private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.Milvus.Tests (2)
AddMilvusTests.cs (2)
106var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 117var containerConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(container1.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.MongoDB (1)
MongoDBServerResource.cs (1)
81private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.MongoDB.Tests (1)
AddMongoDBTests.cs (1)
149var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(mongoExpress, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.MySql (1)
MySqlServerResource.cs (1)
13private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.MySql.Tests (3)
AddMySqlTests.cs (3)
63var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 102var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 246var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(myAdmin, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
43private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.Oracle.Tests (3)
AddOracleTests.cs (3)
62var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 101var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 183var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.Orleans (4)
OrleansService.cs (4)
67public Dictionary<string, IProviderConfiguration> GrainStorage { get; } = []; 72public Dictionary<string, IProviderConfiguration> GrainDirectory { get; } = []; 77public Dictionary<string, IProviderConfiguration> BroadcastChannel { get; } = []; 82public Dictionary<string, IProviderConfiguration> Streaming { get; } = [];
Aspire.Hosting.PostgreSQL (1)
PostgresServerResource.cs (1)
84private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.PostgreSQL.Tests (3)
AddPostgresTests.cs (3)
72var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 126var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 217var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
126var environmentVariables = await pyproj.Resource.GetEnvironmentVariableValuesAsync(DistributedApplicationOperation.Run);
Aspire.Hosting.Qdrant.Tests (4)
AddQdrantTests.cs (4)
67var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 139var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 180var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 192var containerConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(container1.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.Redis.Tests (4)
AddRedisTests.cs (4)
304var envs = await redisInsight.GetEnvironmentVariableValuesAsync(); 495var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 519var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(commander); 540var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
71private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.SqlServer.Tests (1)
AddSqlServerTests.cs (1)
63var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.Testing (3)
DistributedApplicationFactory.cs (3)
201var additionalConfig = new Dictionary<string, string?>(); 266var additionalConfig = new Dictionary<string, string?>(); 276var launchProfiles = appHostLaunchSettings.Profiles;
Aspire.Hosting.Tests (75)
Dashboard\DashboardLifecycleHookTests.cs (1)
172var envVars = new Dictionary<string, object>();
Dashboard\DashboardResourceTests.cs (5)
218var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 255var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 289var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 330var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 369var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout();
DistributedApplicationTests.cs (1)
482Dictionary<int, bool> pids = [];
ExpressionResolverTests.cs (5)
110var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(source.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance, "ContainerHostName").DefaultTimeout(); 144var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(test.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance, "ContainerHostName").DefaultTimeout(); 163var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(test.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance, "ContainerHostName").DefaultTimeout(); 184var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dep.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance, "ContainerHostName").DefaultTimeout(); 216Dictionary<string, ReferenceExpression> Expressions { get; }
ExternalServiceTests.cs (4)
110var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 126var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 144var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 166var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.Services).DefaultTimeout();
KestrelConfigTests.cs (3)
41var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 79var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 144var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout();
Orchestrator\ApplicationOrchestratorTests.cs (1)
525Dictionary<string, string> kvConnectionString,
ProjectResourceTests.cs (9)
81var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 192var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 323var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 366var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 388var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 413var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 440var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 630var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 675protected Dictionary<string, LaunchProfile>? Profiles { get; set; } = new();
ResourceExtensionsTests.cs (3)
180var env = await container.Resource.GetEnvironmentVariableValuesAsync().DefaultTimeout(); 213var env = await container.Resource.GetEnvironmentVariableValuesAsync().DefaultTimeout(); 246var env = await container.Resource.GetEnvironmentVariableValuesAsync(DistributedApplicationOperation.Publish).DefaultTimeout();
SecretsStoreTests.cs (3)
31var userSecrets = GetUserSecrets(userSecretsId); 55var userSecrets = GetUserSecrets(userSecretsId); 62private static Dictionary<string, string?> GetUserSecrets(string userSecretsId)
UserSecretsParameterDefaultTests.cs (2)
30var userSecrets = GetUserSecrets(userSecretsId); 84private static Dictionary<string, string?> GetUserSecrets(string userSecretsId)
Utils\EnvironmentVariableEvaluator.cs (2)
11public static async ValueTask<Dictionary<string, string>> GetEnvironmentVariablesAsync(IResource resource, 20var environmentVariables = new Dictionary<string, string>();
Utils\Grpc\TestServerCallContext.cs (1)
14private readonly Dictionary<object, object> _userState;
WithEndpointTests.cs (1)
215var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout();
WithEnvironmentTests.cs (19)
32var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 55var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 76var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 92var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 108var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 125var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 148var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, 190var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 214var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 241var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerB.Resource).DefaultTimeout(); 242var manifestConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerB.Resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 313var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerB.Resource).DefaultTimeout(); 337var runConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(targetBuilder.Resource, DistributedApplicationOperation.Run).DefaultTimeout(); 343var publishConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(targetBuilder.Resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 367var runtimeConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 375var manifestConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 401var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 448var runtimeConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 456var manifestConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(
WithReferenceTests.cs (15)
29var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 60var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 85var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 108var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 137var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 177var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 196var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 215var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 231var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 247var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 266var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 290var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 336var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 358var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 390var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout();
Aspire.Hosting.Yarp (3)
ConfigurationBuilder\YarpRoute.cs (1)
163var transform = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
YarpEnvConfigGenerator.cs (2)
15public static void PopulateEnvVariables(Dictionary<string, object> environmentVariables, List<YarpRoute> routes, List<YarpCluster> clusters) 35private static void FlattenToEnvVars(Dictionary<string, object> environmentVariables, object obj, string prefix)
Aspire.Hosting.Yarp.Tests (3)
AddYarpTests.cs (2)
32var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(yarp.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 49var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(yarp.Resource, DistributedApplicationOperation.Publish, TestServiceProvider.Instance);
YarpConfigGeneratorTests.cs (1)
229var variables = new Dictionary<string, object>();
Aspire.Playground.Tests (4)
AppHostTests.cs (3)
37var resourceEndpoints = testEndpoints.ResourceEndpoints!; 281Dictionary<string, List<string>> resourceEndpoints, 295public Dictionary<string, List<string>>? ResourceEndpoints { get; set; }
Infrastructure\DistributedApplicationExtensions.cs (1)
58var renamedVolumes = new Dictionary<string, string>();
Aspire.Templates.Tests (5)
TemplateTestsBase.cs (1)
182var expectedRowsTable = expectedResources.ToDictionary(r => r.Name);
tests\Shared\TemplatesTesting\AspireProject.cs (1)
35public Dictionary<string, ProjectInfo> InfoTable { get; private set; } = new(capacity: 0);
tests\Shared\TemplatesTesting\ProjectInfo.cs (2)
59public static Dictionary<string, ProjectInfo> Parse(string json) => 60JsonSerializer.Deserialize<Dictionary<string, ProjectInfo>>(json)!;
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
21public Dictionary<string, string> Environment { get; } = new Dictionary<string, string>();
BasicTestApp (2)
InteropTest\JavaScriptInterop.cs (2)
390public static Dictionary<string, DotNetObjectReference<TestDTO>> ReturnDotNetObjectByRef() 399public static async Task<Dictionary<string, DotNetObjectReference<TestDTO>>> ReturnDotNetObjectByRefAsync()
BasicWebSite (2)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
30var values = query
ValueProviders\CustomValueProviderFactory.cs (1)
19private static readonly Dictionary<string, Func<ValueProviderFactoryContext, StringValues>> Values = new()
Binding.Http.IntegrationTests (3)
BasicHttpBindingTests.4.0.0.cs (3)
218Dictionary<string, string> requestHeaders = serviceProxy.GetRequestHttpHeaders(); 258Dictionary<string, string> requestHeaders; 302Dictionary<string, string> requestHeaders;
blazor-devserver (1)
Server\Program.cs (1)
34var inMemoryConfiguration = new Dictionary<string, string?>
BoundTreeGenerator (1)
BoundNodeClassWriter.cs (1)
32private readonly Dictionary<string, string> _typeMap;
BuildBoss (8)
CompilerNuGetCheckerUtil.cs (1)
237var partMap = partList.ToDictionary(x => x.RelativeName);
ProjectCheckerUtil.cs (2)
18private readonly Dictionary<ProjectKey, ProjectData> _solutionMap; 24internal ProjectCheckerUtil(ProjectData data, Dictionary<ProjectKey, ProjectData> solutionMap, bool isPrimarySolution)
SolutionCheckerUtil.cs (5)
43allGood &= CheckDuplicate(textWriter, out var map); 51private bool CheckProjects(TextWriter textWriter, Dictionary<ProjectKey, SolutionProjectData> map) 53var solutionMap = new Dictionary<ProjectKey, ProjectData>(); 79private bool CheckDuplicate(TextWriter textWriter, out Dictionary<ProjectKey, SolutionProjectData> map) 144private bool CheckSameDirectory(TextWriter textWriter, Dictionary<ProjectKey, SolutionProjectData> map)
BuildValidator (9)
LocalReferenceResolver.cs (5)
26private readonly Dictionary<Guid, AssemblyInfo> _mvidMap = new(); 32private readonly Dictionary<string, List<string>> _nameToLocationsMap = new(); 39private readonly Dictionary<string, List<AssemblyInfo>> _nameMap = new(FileNameEqualityComparer.StringComparer); 43private LocalReferenceResolver(Dictionary<string, List<string>> nameToLocationsMap, ILogger logger) 65var nameToLocationsMap = new Dictionary<string, List<string>>();
PEReaderExtensions.cs (1)
16private readonly Dictionary<string, int> _namedExportRva;
Program.cs (3)
182var map = new Dictionary<Guid, AssemblyInfo>(); 373var documents = JsonConvert.DeserializeAnonymousType(Encoding.UTF8.GetString(sourceLinkUtf8), new { documents = (Dictionary<string, string>?)null })?.documents
Client.ClientBase.IntegrationTests (5)
ClientBaseTestHelpers.cs (1)
16public static string GetHeader(string customHeaderName, string customHeaderNamespace, Dictionary<string, string> messageHeaders)
ClientBaseTests.4.0.0.cs (2)
786Dictionary<string, string> incomingMessageHeaders = serviceProxy.GetIncomingMessageHeaders(); 795Dictionary<string, string> outofScopeIncomingMessageHeaders = serviceProxy.GetIncomingMessageHeaders();
MessageInspectorTestHelpers.cs (1)
35public Dictionary<string, string> ValidateHeaders()
MessageInspectorTests.4.4.0.cs (1)
90Dictionary<string, string> headers = mi_ClientBase_ClientAuth.ValidateHeaders();
CodeGenerator (1)
src\Shared\runtime\Http3\QPack\H3StaticTable.Http3.cs (1)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int>
ConfigurationSchemaGenerator (8)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (2)
26private readonly Dictionary<ITypeSymbol, TypeSpec> _createdTypeSpecs = new(SymbolEqualityComparer.Default); 661Dictionary<string, PropertySpec>? properties = null;
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (1)
80public static void RegisterCacheEntry<TKey, TValue, TEntry>(this Dictionary<TKey, TValue> cache, TKey key, TEntry entry)
RuntimeSource\Configuration.Binder\Parser\KnownTypeSymbols.cs (1)
105Dictionary = compilation.GetBestTypeByMetadataName(typeof(Dictionary<,>));
RuntimeSource\Configuration.Binder\Specs\BindingHelperInfo.cs (2)
27private readonly Dictionary<TypeRef, bool> _seenTransitiveTypes = new(); 32private readonly Dictionary<MethodsToGen_CoreBindingHelper, HashSet<TypeSpec>> _typesForGen = new();
RuntimeSource\Configuration.Binder\Specs\InterceptorInfo.cs (1)
134private readonly Dictionary<ComplexTypeSpec, TypedInterceptorInvocationInfo.Builder> _invocationInfoBuilderCache = new();
RuntimeSource\Configuration.Binder\Specs\TypeIndex.cs (1)
14private readonly Dictionary<TypeRef, TypeSpec> _index = typeSpecs.ToDictionary(spec => spec.TypeRef);
CSharpSyntaxGenerator (3)
Grammar\GrammarGenerator.cs (2)
24var rules = types.ToDictionary(n => n.Name, _ => new List<Production>()); 122private static void AddLexicalRules(Dictionary<string, List<Production>> rules)
SignatureWriter.cs (1)
18private readonly Dictionary<string, string> _typeMap;
dotnet-openapi (3)
Commands\BaseCommand.cs (3)
174var metadata = new Dictionary<string, string>(); 465var packageVersionsDictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 489var result = new Dictionary<string, string>();
dotnet-svcutil.xmlserializer (10)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (1)
88private Dictionary<string, IList<string>> _contents;
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (9)
34private Dictionary<string, Type> _excludedTypes; 36private Dictionary<string, string> _namespaceMappings; 47internal Dictionary<string, string> NamespaceMappings { get { return _namespaceMappings; } } 339Dictionary<string, Type> foundCollectionTypes = AddSpecifiedTypesToDictionary(collectionTypesArgs, Options.Cmd.CollectionType); 382private Dictionary<string, Type> AddSpecifiedTypesToDictionary(IList<string> typeArgs, string cmd) 384Dictionary<string, Type> specifiedTypes = new Dictionary<string, Type>(typeArgs.Count); 394private void AddReferencedTypesFromAssembly(Assembly assembly, Dictionary<string, Type> foundCollectionTypes) 406private void AddMscorlib(Dictionary<string, Type> foundCollectionTypes) 477internal static bool IsTypeSpecified(Type type, Dictionary<string, Type> specifiedTypes, string cmd)
dotnet-svcutil-lib (370)
AppInsightsTelemetryClient.cs (2)
196public void TrackEvent(string eventName, Dictionary<string, string> properties) 214var properties = new Dictionary<string, string>();
CmdCredentialsProvider.cs (2)
139private Dictionary<string, X509Certificate> _validatedClientCerts = new Dictionary<string, X509Certificate>(); 219private Dictionary<string, bool> _validatedServerCerts = new Dictionary<string, bool>();
CodeDomFixup\ArrayOfXElementTypeHelper.cs (1)
67Dictionary<string, CodeTypeDeclaration> nameTable = new Dictionary<string, CodeTypeDeclaration>();
CodeDomFixup\CodeDomVisitors\CodeTypeNameScope.cs (1)
13private Dictionary<string, CodeTypeMember> _nameTable = new Dictionary<string, CodeTypeMember>();
CodeDomFixup\CodeDomVisitors\CreateCallbackImpl.cs (5)
55Dictionary<string, string> methodNames = GenerateEventAsyncMethods(nameScope, _eventBasedDuplexClass, callbackInterface, _eventArgsList); 212private static Dictionary<string, string> GenerateEventAsyncMethods(CodeTypeNameScope nameScope, CodeTypeDeclaration parent, CodeTypeDeclaration callbackInterface, List<CodeTypeDeclaration> eventArgsList) 214Dictionary<string, string> methodNames = new Dictionary<string, string>(); 393private static CodeTypeDeclaration CreateCallbackImplClass(CodeTypeNameScope nameScope, CodeTypeDeclaration parent, CodeTypeDeclaration callbackInterface, Dictionary<string, string> methodNames) 448private static void AddMethods(CodeTypeDeclaration callbackImpl, CodeTypeDeclaration callbackInterface, Dictionary<string, string> methodNames)
CodeDomFixup\CodeDomVisitors\EnsureAdditionalAssemblyReference.cs (1)
14private Dictionary<string, string> _namespacesToMatch = new Dictionary<string, string>() { { "System.ServiceModel.XmlSerializerFormatAttribute", "System.Xml.Serialization" }, { "System.Xml.Linq", "System.Xml.Linq" }, { "System.ServiceModel.Duplex", "System.ServiceModel.Extensions" } };
CodeDomFixup\CodeDomVisitors\MakeOldAsyncMethodsPrivate.cs (1)
12private Dictionary<string, PrivateInterfaceMethod> _privateIfaceMethods;
CodeDomFixup\CodeDomVisitors\NamespaceFixer.cs (2)
18private Dictionary<string, Type> _xmlTypes = new Dictionary<string, Type>(); 19private Dictionary<string, Type> _codeDomTypes = new Dictionary<string, Type>();
CodeDomFixup\CodeDomVisitors\PropertyFieldNameScope.cs (1)
13private Dictionary<string, MemberInfo> _nameTable = new Dictionary<string, MemberInfo>();
CodeDomFixup\CodeDomVisitors\SpecialIXmlSerializableRemapper.cs (1)
13private Dictionary<string, CodeTypeDeclaration> _specialIXmlSerializableTypes = new Dictionary<string, CodeTypeDeclaration>();
CodeDomFixup\CodeDomVisitors\TypeDeclCollection.cs (2)
14internal Dictionary<string, CodeTypeDeclaration> AllTypeDecls = new Dictionary<string, CodeTypeDeclaration>(); 15internal Dictionary<string, string> TypeNamespaceMappings = new Dictionary<string, string>();
CommandProcessorOptions.cs (10)
806var foundCollectionTypes = AddSpecifiedTypesToDictionary(this.CollectionTypes, Switches.CollectionType.Name); 807var excludedTypes = AddSpecifiedTypesToDictionary(this.ExcludeTypes, Switches.ExcludeType.Name); 859private static Dictionary<string, Type> AddSpecifiedTypesToDictionary(IList<string> typeArgs, string cmd) 861Dictionary<string, Type> specifiedTypes = new Dictionary<string, Type>(typeArgs.Count); 873private void AddReferencedTypesFromAssembly(Assembly assembly, Dictionary<string, Type> foundCollectionTypes, Dictionary<string, Type> excludedTypes) 893private void AddStdLibraries(Dictionary<string, Type> foundCollectionTypes, Dictionary<string, Type> excludedTypes) 912private static bool IsTypeSpecified(Type type, Dictionary<string, Type> specifiedTypes, string cmd) 946private void AddReferencedCollectionTypes(IList<string> collectionTypesArgs, Dictionary<string, Type> foundCollectionTypes)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (2)
324private Dictionary<String, NamespaceDecl> _namespaces; 1826Dictionary<String, String> nstable = new Dictionary<String, String>();
FrameworkFork\Microsoft.Xml\Xml\Core\QueryOutputWriter.cs (1)
27private Dictionary<XmlQualifiedName, int> _lookupCDataElems;
FrameworkFork\Microsoft.Xml\Xml\Core\QueryOutputWriterV1.cs (1)
31private Dictionary<XmlQualifiedName, XmlQualifiedName> _lookupCDataElems;
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (1)
274private Dictionary<IDtdEntityInfo, IDtdEntityInfo> _currentEntities;
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextWriter.cs (1)
169private Dictionary<string, int> _nsHashtable;
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWellformedWriter.cs (2)
39private Dictionary<string, int> _nsHashtable; 49private Dictionary<string, int> _attrHashTable;
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNodeReader.cs (1)
996Dictionary<string, string> dict = new Dictionary<string, string>();
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolver.cs (1)
129private Dictionary<Uri, PreloadedData> _mappings;
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (1)
204private Dictionary<string, UndeclaredNotation> _undeclaredNotations = null;
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaElementDecl.cs (4)
14private Dictionary<XmlQualifiedName, SchemaAttDef> _attdefs = new Dictionary<XmlQualifiedName, SchemaAttDef>(); 23private Dictionary<XmlQualifiedName, XmlQualifiedName> _prohibitedAttributes = new Dictionary<XmlQualifiedName, XmlQualifiedName>(); 225internal Dictionary<XmlQualifiedName, SchemaAttDef> AttDefs 230internal Dictionary<XmlQualifiedName, XmlQualifiedName> ProhibitedAttributes
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaInfo.cs (17)
32private Dictionary<XmlQualifiedName, SchemaElementDecl> _elementDecls = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 33private Dictionary<XmlQualifiedName, SchemaElementDecl> _undeclaredElementDecls = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 35private Dictionary<XmlQualifiedName, SchemaEntity> _generalEntities; 36private Dictionary<XmlQualifiedName, SchemaEntity> _parameterEntities; 43private Dictionary<string, bool> _targetNamespaces = new Dictionary<string, bool>(); 44private Dictionary<XmlQualifiedName, SchemaAttDef> _attributeDecls = new Dictionary<XmlQualifiedName, SchemaAttDef>(); 47private Dictionary<XmlQualifiedName, SchemaElementDecl> _elementDeclsByType = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 48private Dictionary<string, SchemaNotation> _notations; 68internal Dictionary<XmlQualifiedName, SchemaElementDecl> ElementDecls 73internal Dictionary<XmlQualifiedName, SchemaElementDecl> UndeclaredElementDecls 78internal Dictionary<XmlQualifiedName, SchemaEntity> GeneralEntities 90internal Dictionary<XmlQualifiedName, SchemaEntity> ParameterEntities 108internal Dictionary<string, bool> TargetNamespaces 113internal Dictionary<XmlQualifiedName, SchemaElementDecl> ElementDeclsByType 118internal Dictionary<XmlQualifiedName, SchemaAttDef> AttributeDecls 123internal Dictionary<string, SchemaNotation> Notations 391Dictionary<XmlQualifiedName, SchemaElementDecl> elements = _elementDecls;
FrameworkFork\Microsoft.Xml\Xml\schema\XmlAtomicValue.cs (1)
70Dictionary<string, string> dict = new Dictionary<string, string>(1);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaObjectTable.cs (1)
18private Dictionary<XmlQualifiedName, XmlSchemaObject> _table = new Dictionary<XmlQualifiedName, XmlSchemaObject>();
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (1)
2131Dictionary<XmlQualifiedName, SchemaAttDef> attributeDefs = currentElementDecl.AttDefs;
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (5)
37private Dictionary<string, ArgBuilder> _argList; 41private Dictionary<Tuple<Type, string>, Queue<LocalBuilder>> _freeLocals; 155private Dictionary<Type, LocalBuilder> _tmpLocals = new Dictionary<Type, LocalBuilder>(); 2652private readonly Dictionary<string, LocalBuilder> _locals; 2706public void AddToFreeLocals(Dictionary<Tuple<Type, string>, Queue<LocalBuilder>> freeLocals)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (4)
1095internal static MemberMapping[] GetAllMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos) 1148internal static MemberMapping[] GetSettableMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos) 1155private static void PopulateMemberInfos(StructMapping structMapping, MemberMapping[] mappings, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos) 1175Dictionary<string, MemberInfo> replaceList = null;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (4)
19private Dictionary<string, MethodBuilderInfo> _methodBuilders = new Dictionary<string, MethodBuilderInfo>(); 21internal Dictionary<string, Type> CreatedTypes = new Dictionary<string, Type>(); 23internal Dictionary<string, MemberInfo> memberInfos = new Dictionary<string, MemberInfo>(); 67private static Dictionary<string, Regex> s_regexs = new Dictionary<string, Regex>();
FrameworkFork\Microsoft.Xml\Xml\XmlNamespaceManager.cs (3)
46private Dictionary<string, int> _hashTable; 221Dictionary<string, string> prefixes = new Dictionary<string, string>(_lastDecl + 1); 257Dictionary<string, string> dict = new Dictionary<string, string>(_lastDecl - i + 1);
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathDocument.cs (2)
32private Dictionary<XPathNodeRef, XPathNodeRef> _mapNmsp; 33private Dictionary<string, XPathNodeRef> _idValueMap;
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigator.cs (1)
536Dictionary<string, string> dict = new Dictionary<string, string>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (6)
16using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 216public override DataContractDictionary KnownDataContracts 365internal static void CheckAndAddMember(List<DataMember> members, DataMember memberContract, Dictionary<string, DataMember> memberNamesTable) 752private DataContractDictionary _knownDataContracts; 930Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>(); 1303internal override DataContractDictionary KnownDataContracts
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (17)
19using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 26private Dictionary<string, string> _namespaces; 27private Dictionary<string, string> _clrNamespaces; 217private Dictionary<string, string> Namespaces 222private Dictionary<string, string> ClrNamespaces 304private void ExportClassDataContractHierarchy(XmlQualifiedName typeName, ClassDataContract classContract, ContractCodeDomInfo contractCodeDomInfo, Dictionary<XmlQualifiedName, object> contractNamesInHierarchy) 909DataContractDictionary knownTypeDictionary = GetKnownTypeContracts(dataContract); 925private DataContractDictionary GetKnownTypeContracts(DataContract dataContract) 942private DataContractDictionary GetKnownTypeContracts(ClassDataContract dataContract, Dictionary<DataContract, object> handledContracts) 978private void AddKnownTypeContracts(ClassDataContract dataContract, DataContractDictionary knownContracts) 995DataContractDictionary knownContractDictionary = GetKnownTypeContracts(dataContract, new Dictionary<DataContract, object>()); 1314Dictionary<string, object> baseMemberNames = baseContractCodeDomInfo.GetMemberNames(); 1315Dictionary<string, object> memberNames = contractCodeDomInfo.GetMemberNames(); 1427Dictionary<string, object> fragments = new Dictionary<string, object>(StringComparer.Ordinal); 1458private static void AddToNamespace(StringBuilder builder, string fragment, Dictionary<string, object> fragments) 1492int fragmentLength, Dictionary<string, object> fragments)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (1)
164private Dictionary<LocalBuilder, string> _localNames = new Dictionary<LocalBuilder, string>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (4)
16using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 444public override DataContractDictionary KnownDataContracts 580private DataContractDictionary _knownDataContracts; 832internal override DataContractDictionary KnownDataContracts
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ContractCodeDomInfo.cs (2)
20private Dictionary<string, object> _memberNames; 34internal Dictionary<string, object> GetMemberNames()
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (17)
14using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 381public virtual DataContractDictionary KnownDataContracts 499internal virtual DataContract BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract> boundContracts) 526private static Dictionary<TypeHandleRef, IntRef> s_typeToIDCache; 529private static Dictionary<Type, DataContract> s_typeToBuiltInContract; 530private static Dictionary<XmlQualifiedName, DataContract> s_nameToBuiltInContract; 531private static Dictionary<string, string> s_namespaces; 532private static Dictionary<string, XmlDictionaryString> s_clrTypeStrings; 1181internal virtual DataContractDictionary KnownDataContracts 2060internal static DataContractDictionary ImportKnownTypeAttributes(Type type) 2062DataContractDictionary knownDataContracts = null; 2063Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 2068private static void ImportKnownTypeAttributes(Type type, Dictionary<Type, Type> typesChecked, ref DataContractDictionary knownDataContracts) 2168internal static void CheckAndAdd(Type type, Dictionary<Type, Type> typesChecked, ref DataContractDictionary nameToDataContractTable) 2196internal virtual bool Equals(object other, Dictionary<DataContractPairKey, object> checkedContracts)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSerializer.cs (3)
18using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 32internal DataContractDictionary knownDataContracts; 163internal override DataContractDictionary KnownDataContracts
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (14)
13using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 17private Dictionary<XmlQualifiedName, DataContract> _contracts; 18private Dictionary<DataContract, object> _processedContracts; 21private DataContractDictionary _knownTypesForObject; 24private Dictionary<XmlQualifiedName, object> _referencedTypesDictionary; 25private Dictionary<XmlQualifiedName, object> _referencedCollectionTypesDictionary; 57private Dictionary<XmlQualifiedName, DataContract> Contracts 69private Dictionary<DataContract, object> ProcessedContracts 91internal DataContractDictionary KnownTypesForObject 208private void AddKnownDataContracts(DataContractDictionary knownDataContracts) 348private Dictionary<XmlQualifiedName, object> GetReferencedTypes() 370private Dictionary<XmlQualifiedName, object> GetReferencedCollectionTypes() 391private void AddReferencedType(Dictionary<XmlQualifiedName, object> referencedTypes, Type type) 451Dictionary<XmlQualifiedName, object> referencedTypes = useReferencedCollectionTypes ? GetReferencedCollectionTypes() : GetReferencedTypes();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\EnumDataContract.cs (3)
147private static Dictionary<Type, XmlQualifiedName> s_typeToName; 148private static Dictionary<XmlQualifiedName, Type> s_nameToType; 275Dictionary<string, DataMember> memberValuesTable = new Dictionary<string, DataMember>();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (18)
71public static Dictionary<string, string> EssentialExceptionFields 77public override Dictionary<XmlQualifiedName, DataContract> KnownDataContracts //inherited as internal 113private Dictionary<XmlQualifiedName, DataContract> _knownDataContracts; 114private static readonly Dictionary<string, string> s_essentialExceptionFields; //Contains the essential fields to serialize an Exception. Not all fields are serialized in an Exception. Some private fields 201public static Dictionary<string, string> EssentialExceptionFields 206internal override Dictionary<XmlQualifiedName, DataContract> KnownDataContracts // inherited as internal 269Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>(); 308Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>(); 393Dictionary<string, object> exceptionFields = GetExceptionFieldValues((Exception)value); 448private static void CheckAndAddMember(List<DataMember> members, DataMember memberContract, Dictionary<string, DataMember> memberNamesTable) 467private Dictionary<string, object> GetExceptionFieldValues(Exception value) 487Dictionary<string, object> fieldToValueDictionary = new Dictionary<string, object>(); 597private static Dictionary<string, string> ReverseDictionary(Dictionary<string, string> inDict) 599Dictionary<string, string> mapDict = new Dictionary<string, string>(); 623private Dictionary<string, string> _elementNamesToMap; 626private ExceptionXmlParser(Dictionary<string, string> dictMap, string exceptionNamespace) 647public static string ParseExceptionXmlForClassDataContract(Dictionary<string, string> dictMap, string exceptionNamespace, string stringToParse)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExtensionDataReader.cs (2)
49private static Dictionary<string, string> s_nsToPrefixTable; 52private static Dictionary<string, string> s_prefixToNsTable;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\GenericParameterDataContract.cs (1)
55internal override DataContract BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract> boundContracts)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (1)
873s_typeOfDictionaryGeneric = typeof(Dictionary<,>);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\HybridObjectCache.cs (2)
14private Dictionary<string, object> _objectDictionary; 15private Dictionary<string, object> _referencedObjectDictionary;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ObjectReferenceStack.cs (1)
20private Dictionary<object, object> _objectDictionary;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaHelper.cs (4)
12using SchemaObjectDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, SchemaObjectInfo>; 40internal static XmlSchemaType GetSchemaType(SchemaObjectDictionary schemaInfo, XmlQualifiedName typeName) 50internal static XmlSchema GetSchemaWithType(SchemaObjectDictionary schemaInfo, XmlSchemaSet schemas, XmlQualifiedName typeName) 70internal static XmlSchemaElement GetSchemaElement(SchemaObjectDictionary schemaInfo, XmlQualifiedName elementName)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (9)
17using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 18using SchemaObjectDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, SchemaObjectInfo>; 28private SchemaObjectDictionary _schemaObjects; 152private SchemaObjectDictionary SchemaObjects 188Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>(); 224DataContractDictionary knownDataContracts = new DataContractDictionary(); 241internal SchemaObjectDictionary CreateSchemaObjects() 243SchemaObjectDictionary schemaObjects = new SchemaObjectDictionary(); 925DataContractDictionary knownDataContracts = ancestorDataContract.KnownDataContracts;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ScopedKnownTypes.cs (6)
9using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 13internal DataContractDictionary[] dataContractDictionaries; 15internal void Push(DataContractDictionary dataContractDictionary) 18dataContractDictionaries = new DataContractDictionary[4]; 20Array.Resize<DataContractDictionary>(ref dataContractDictionaries, dataContractDictionaries.Length * 2); 33DataContractDictionary dataContractDictionary = dataContractDictionaries[i];
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlDataContract.cs (4)
12using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 54public override DataContractDictionary KnownDataContracts 218private DataContractDictionary _knownDataContracts; 275internal override DataContractDictionary KnownDataContracts
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializer.cs (2)
15using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 84internal virtual DataContractDictionary KnownDataContracts
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerContext.cs (8)
13using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 24protected DataContractDictionary serializerKnownDataContracts; 177internal virtual DataContractDictionary SerializerKnownDataContracts 193DataContractDictionary serializerKnownDataContracts = this.SerializerKnownDataContracts; 200internal static DataContractDictionary GetDataContractsForKnownTypes(IList<Type> knownTypeList) 203DataContractDictionary dataContracts = new DataContractDictionary(); 204Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 216internal bool IsKnownType(DataContract dataContract, DataContractDictionary knownDataContracts, Type declaredType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
15using DataContractDictionary = System.Collections.Generic.Dictionary<Microsoft.Xml.XmlQualifiedName, DataContract>; 190private bool ReplaceScopedKnownTypesTop(DataContractDictionary knownDataContracts, bool knownTypesAddedInCurrentScope)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryReaderSession.cs (1)
19private Dictionary<int, XmlDictionaryString> _stringDict;
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriterSession.cs (1)
107private Dictionary<K, V> _dictionary;
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionary.cs (1)
20private Dictionary<string, XmlDictionaryString> _lookup;
FrameworkFork\System.ServiceModel\Internals\System\Runtime\MruCache.cs (1)
14private Dictionary<TKey, CacheEntry> _items;
FrameworkFork\System.ServiceModel\System\IdentityModel\CryptoHelper.cs (1)
16private static Dictionary<string, Func<object>> s_algorithmDelegateDictionary = new Dictionary<string, Func<object>>();
FrameworkFork\System.ServiceModel\System\IdentityModel\IdentityModelDictionary.cs (2)
17private Dictionary<string, int> _dictionary; 45Dictionary<string, int> dictionary = new Dictionary<string, int>(_count);
FrameworkFork\System.ServiceModel\System\IdentityModel\Policy\DefaultEvaluationContext.cs (1)
16private Dictionary<string, object> _properties;
FrameworkFork\System.ServiceModel\System\IdentityModel\SecurityUtils.cs (1)
406Dictionary<string, object> properties = new Dictionary<string, object>();
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenRequirement.cs (1)
29private Dictionary<string, object> _properties;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeaderCollection.cs (3)
119Dictionary<string, int> myHeaders = new Dictionary<string, int>(); 122Dictionary<string, int> otherHeaders = new Dictionary<string, int>(); 145internal void PopulateHeaderDictionary(StringBuilder builder, Dictionary<string, int> headers)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPool.cs (1)
21private Dictionary<TKey, EndpointConnectionPool> _endpointPools;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPoolRegistry.cs (1)
11private Dictionary<string, List<ConnectionPool>> _registry;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
113private Dictionary<TItem, IdlingConnectionSettings> _connectionMapping;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestReplyCorrelator.cs (1)
15private Dictionary<Key, object> _states;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityBindingElement.cs (2)
40private Dictionary<string, SupportingTokenParameters> _operationSupportingTokenParameters; 41private Dictionary<string, SupportingTokenParameters> _optionalOperationSupportingTokenParameters;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelFactory.cs (1)
200Dictionary<Type, byte> supportedChannels = new Dictionary<Type, byte>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransactionFlowBindingElement.cs (4)
97private bool IsFlowEnabled(Dictionary<DirectionalAction, TransactionFlowOption> dictionary) 200private Dictionary<DirectionalAction, TransactionFlowOption> GetDictionary(BindingContext context) 202Dictionary<DirectionalAction, TransactionFlowOption> dictionary = 203context.BindingParameters.Find<Dictionary<DirectionalAction, TransactionFlowOption>>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportBindingElementImporter.cs (2)
193private static Dictionary<XmlQualifiedName, XmlQualifiedName> GetGeneratedTransportBindingElements(MetadataImporter importer) 201return (Dictionary<XmlQualifiedName, XmlQualifiedName>)retValue;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportSecurityHelpers.cs (2)
324private static Dictionary<string, int> s_targetNameCounter = new Dictionary<string, int>(); 339private static Dictionary<HttpRequestMessage, string> s_serverCertMap = new Dictionary<HttpRequestMessage, string>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DataContractSerializerOperationGenerator.cs (7)
18private Dictionary<OperationDescription, DataContractFormatAttribute> _operationAttributes = new Dictionary<OperationDescription, DataContractFormatAttribute>(); 20private Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> _knownTypes; 21private Dictionary<MessagePartDescription, bool> _isNonNillableReferenceTypes; 49internal Dictionary<OperationDescription, DataContractFormatAttribute> OperationAttributes 54internal Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> KnownTypes 86Dictionary<CodeTypeReference, object> operationKnownTypes = new Dictionary<CodeTypeReference, object>(new CodeTypeReferenceComparer()); 100private void AddKnownTypesForPart(OperationContractGenerationContext context, MessagePartDescription part, Dictionary<CodeTypeReference, object> operationKnownTypes)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ImportedPolicyConversionContext.cs (23)
32private readonly Dictionary<OperationDescription, PolicyAssertionCollection> _operationBindingAssertions = new Dictionary<OperationDescription, PolicyAssertionCollection>(); 33private readonly Dictionary<MessageDescription, PolicyAssertionCollection> _messageBindingAssertions = new Dictionary<MessageDescription, PolicyAssertionCollection>(); 34private readonly Dictionary<FaultDescription, PolicyAssertionCollection> _faultBindingAssertions = new Dictionary<FaultDescription, PolicyAssertionCollection>(); 37Dictionary<OperationDescription, IEnumerable<XmlElement>> operationBindingAssertions, 38Dictionary<MessageDescription, IEnumerable<XmlElement>> messageBindingAssertions, 39Dictionary<FaultDescription, IEnumerable<XmlElement>> faultBindingAssertions, 117IEnumerable<Dictionary<MessageDescription, IEnumerable<XmlElement>>> messageAssertionEnumerator; 118IEnumerable<Dictionary<FaultDescription, IEnumerable<XmlElement>>> faultAssertionEnumerator; 119IEnumerable<Dictionary<OperationDescription, IEnumerable<XmlElement>>> operationAssertionEnumerator; 124foreach (Dictionary<FaultDescription, IEnumerable<XmlElement>> faultAssertionsSelection in faultAssertionEnumerator) 126foreach (Dictionary<MessageDescription, IEnumerable<XmlElement>> messageAssertionsSelection in messageAssertionEnumerator) 128foreach (Dictionary<OperationDescription, IEnumerable<XmlElement>> operationAssertionsSelection in operationAssertionEnumerator) 240internal static IEnumerable<Dictionary<K, V>> GetCartesianProduct<K, V>(Dictionary<K, IEnumerable<V>> sets) 242Dictionary<K, V> counterValue = new Dictionary<K, V>(sets.Count); 249yield return (Dictionary<K, V>)counterValue; 253private static KeyValuePair<K, IEnumerator<V>>[] InitializeCounter<K, V>(Dictionary<K, IEnumerable<V>> sets, Dictionary<K, V> counterValue) 274private static bool IncrementCounter<K, V>(KeyValuePair<K, IEnumerator<V>>[] digits, Dictionary<K, IEnumerable<V>> sets, Dictionary<K, V> counterValue) 310public Dictionary<OperationDescription, IEnumerable<IEnumerable<XmlElement>>> OperationBindingAlternatives; 311public Dictionary<MessageDescription, IEnumerable<IEnumerable<XmlElement>>> MessageBindingAlternatives; 312public Dictionary<FaultDescription, IEnumerable<IEnumerable<XmlElement>>> FaultBindingAlternatives;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (3)
38private Dictionary<WsdlNS.Message, IList<string>> _bodyPartsTable; 40private Dictionary<WsdlNS.Message, IList<string>> BodyPartsTable 850Dictionary<string, object> prefixesUsed = new Dictionary<string, object>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (1)
453private Dictionary<MetadataRetriever, MetadataRetriever> _usedRetrievers; // to prevent looping when chasing MetadataReferences
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExporter.cs (5)
17private readonly Dictionary<object, object> _state = new Dictionary<object, object>(); 42public Dictionary<object, object> State 81private Dictionary<OperationDescription, PolicyAssertionCollection> _operationBindingAssertions; 82private Dictionary<MessageDescription, PolicyAssertionCollection> _messageBindingAssertions; 83private Dictionary<FaultDescription, PolicyAssertionCollection> _faultBindingAssertions;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataImporter.cs (4)
18private readonly Dictionary<XmlQualifiedName, ContractDescription> _knownContracts = new Dictionary<XmlQualifiedName, ContractDescription>(); 20private readonly Dictionary<object, object> _state = new Dictionary<object, object>(); 60public Dictionary<object, object> State 65public Dictionary<XmlQualifiedName, ContractDescription> KnownContracts
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (9)
28private Dictionary<MessagePartDescription, CodeTypeReference> _parameterTypes; 29private Dictionary<MessagePartDescription, CodeAttributeDeclarationCollection> _parameterAttributes; 30private Dictionary<MessagePartDescription, string> _specialPartName; 36internal Dictionary<MessagePartDescription, CodeAttributeDeclarationCollection> ParameterAttributes 46internal Dictionary<MessagePartDescription, CodeTypeReference> ParameterTypes 56internal Dictionary<MessagePartDescription, string> SpecialPartName 66internal void GenerateOperation(OperationContractGenerationContext context, ref OperationFormatStyle style, bool isEncoded, IWrappedBodyTypeGenerator wrappedBodyTypeGenerator, Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> knownTypes) 99private readonly Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> _knownTypes; 122internal MethodSignatureGenerator(OperationGenerator parent, OperationContractGenerationContext context, OperationFormatStyle style, bool isEncoded, IWrappedBodyTypeGenerator wrappedBodyTypeGenerator, Dictionary<MessagePartDescription, ICollection<CodeTypeReference>> knownTypes)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceContractGenerator.cs (9)
28private Dictionary<ContractDescription, Type> _referencedTypes; 29private Dictionary<ContractDescription, ServiceContractGenerationContext> _generatedTypes; 30private Dictionary<OperationDescription, OperationContractGenerationContext> _generatedOperations; 31private Dictionary<MessageDescription, CodeTypeReference> _generatedTypedMessages; 85public Dictionary<ContractDescription, Type> ReferencedTypes 95public Dictionary<string, string> NamespaceMappings 184internal Dictionary<MessageDescription, CodeTypeReference> GeneratedTypedMessages 695private Dictionary<string, string> _namespaceMappings; 702public Dictionary<string, string> NamespaceMappings
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\SoapHelper.cs (3)
169((Dictionary<WsdlNS.Binding, EnvelopeVersion>)versions)[wsdlBinding] = version; 178if (versions != null && ((Dictionary<WsdlNS.Binding, EnvelopeVersion>)versions).ContainsKey(wsdlBinding)) 180return ((Dictionary<WsdlNS.Binding, EnvelopeVersion>)versions)[wsdlBinding];
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TransactionFlowAttribute.cs (5)
37Dictionary<DirectionalAction, TransactionFlowOption> dictionary = EnsureDictionary(parameters); 50private static Dictionary<DirectionalAction, TransactionFlowOption> EnsureDictionary(BindingParameterCollection parameters) 52Dictionary<DirectionalAction, TransactionFlowOption> dictionary = 53parameters.Find<Dictionary<DirectionalAction, TransactionFlowOption>>(); 64Dictionary<DirectionalAction, TransactionFlowOption> dictionary = EnsureDictionary(parameters);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (2)
45private readonly Dictionary<Type, ContractDescription> _contracts; 46private readonly Dictionary<Type, MessageDescriptionItems> _messages;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlContractConversionContext.cs (7)
25private readonly Dictionary<OperationDescription, WsdlNS.Operation> _wsdlOperations; 26private readonly Dictionary<WsdlNS.Operation, OperationDescription> _operationDescriptions; 27private readonly Dictionary<MessageDescription, WsdlNS.OperationMessage> _wsdlOperationMessages; 28private readonly Dictionary<FaultDescription, WsdlNS.OperationFault> _wsdlOperationFaults; 29private readonly Dictionary<WsdlNS.OperationMessage, MessageDescription> _messageDescriptions; 30private readonly Dictionary<WsdlNS.OperationFault, FaultDescription> _faultDescriptions; 31private readonly Dictionary<WsdlNS.Operation, Collection<WsdlNS.OperationBinding>> _operationBindings;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlEndpointConversionContext.cs (6)
21private readonly Dictionary<OperationDescription, WsdlNS.OperationBinding> _wsdlOperationBindings; 22private readonly Dictionary<WsdlNS.OperationBinding, OperationDescription> _operationDescriptionBindings; 23private readonly Dictionary<MessageDescription, WsdlNS.MessageBinding> _wsdlMessageBindings; 24private readonly Dictionary<FaultDescription, WsdlNS.FaultBinding> _wsdlFaultBindings; 25private readonly Dictionary<WsdlNS.MessageBinding, MessageDescription> _messageDescriptionBindings; 26private readonly Dictionary<WsdlNS.FaultBinding, FaultDescription> _faultDescriptionBindings;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (4)
28private Dictionary<ContractDescription, WsdlContractConversionContext> _exportedContracts 30private Dictionary<BindingDictionaryKey, WsdlEndpointConversionContext> _exportedBindings = new Dictionary<BindingDictionaryKey, WsdlEndpointConversionContext>(); 31private Dictionary<EndpointDictionaryKey, ServiceEndpoint> _exportedEndpoints = new Dictionary<EndpointDictionaryKey, ServiceEndpoint>(); 952private readonly Dictionary<string, string> _lookup = new Dictionary<string, string>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (15)
23private readonly Dictionary<WsdlNS.NamedItem, WsdlImportException> _importErrors = new Dictionary<WsdlNS.NamedItem, WsdlImportException>(); 26private readonly Dictionary<XmlQualifiedName, WsdlContractConversionContext> _importedPortTypes = new Dictionary<XmlQualifiedName, WsdlContractConversionContext>(); 27private readonly Dictionary<XmlQualifiedName, WsdlEndpointConversionContext> _importedBindings = new Dictionary<XmlQualifiedName, WsdlEndpointConversionContext>(); 28private readonly Dictionary<WsdlNS.Port, ServiceEndpoint> _importedPorts = new Dictionary<WsdlNS.Port, ServiceEndpoint>(); 34private readonly Dictionary<string, XmlElement> _policyDocuments = new Dictionary<string, XmlElement>(); 35private readonly Dictionary<string, string> _warnings = new Dictionary<string, string>(); 1688Dictionary<XmlElement, XmlElement> unique = new Dictionary<XmlElement, XmlElement>(); 2287private readonly Dictionary<WsdlNS.ServiceDescription, Dictionary<string, XmlElement>> _embeddedPolicyDictionary = new Dictionary<WsdlNS.ServiceDescription, Dictionary<string, XmlElement>>(); 2288private readonly Dictionary<string, XmlElement> _externalPolicyDictionary = new Dictionary<string, XmlElement>(); 2289private readonly Dictionary<XmlElement, WsdlNS.ServiceDescription> _policySourceTable = new Dictionary<XmlElement, WsdlNS.ServiceDescription>(); 2291internal Dictionary<XmlElement, WsdlNS.ServiceDescription> PolicySourceTable 2331Dictionary<string, XmlElement> wsdlPolicyDictionary; 2410Dictionary<string, XmlElement> wsdlPolicyDictionary;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (2)
542private Dictionary<string, XmlMembersMapping> _xmlMappings; 562private Dictionary<string, XmlMembersMapping> XmlMappings
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationGenerator.cs (5)
22private Dictionary<MessagePartDescription, PartInfo> _partInfoTable; 23private Dictionary<OperationDescription, XmlSerializerFormatAttribute> _operationAttributes = new Dictionary<OperationDescription, XmlSerializerFormatAttribute>(); 97internal Dictionary<OperationDescription, XmlSerializerFormatAttribute> OperationAttributes 123Dictionary<XmlMembersMapping, XmlMembersMapping> alreadyExported = new Dictionary<XmlMembersMapping, XmlMembersMapping>(); 180private void GeneratePartType(Dictionary<XmlMembersMapping, XmlMembersMapping> alreadyExported, MessagePartDescription part, string partNamespace)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (1)
20private Dictionary<string, ProxyOperationRuntime> _operations;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationSelectorBehavior.cs (1)
35private Dictionary<object, string> _operationMap;
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageHeaderT.cs (1)
81private static Dictionary<Type, TypedHeaderManager> s_cache = new Dictionary<Type, TypedHeaderManager>();
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ScopedMessagePartSpecification.cs (2)
14private Dictionary<string, MessagePartSpecification> _actionParts; 15private Dictionary<string, MessagePartSpecification> _readOnlyNormalizedActionParts;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (3)
89private Dictionary<string, ICollection<SupportingTokenAuthenticatorSpecification>> _scopedSupportingTokenAuthenticatorSpecification; 90private Dictionary<string, MergedSupportingTokenAuthenticatorSpecification> _mergedSupportingTokenAuthenticatorsMap; 480public Dictionary<string, ICollection<SupportingTokenAuthenticatorSpecification>> ScopedSupportingTokenAuthenticatorSpecification
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (2)
20private Dictionary<Uri, X509Certificate2> _scopedCertificates; 59public Dictionary<Uri, X509Certificate2> ScopedCertificates
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceModelDictionary.cs (2)
17private Dictionary<string, int> _dictionary; 45Dictionary<string, int> dictionary = new Dictionary<string, int>(_count);
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedKeyedCollection.cs (1)
17private Dictionary<K, T> _dictionary;
ImportModule.cs (3)
376private readonly Dictionary<Binding, ContractDescription> _bindingContractMapping = new Dictionary<Binding, ContractDescription>(); 377private readonly Dictionary<Binding, XmlQualifiedName> _bindingWsdlMapping = new Dictionary<Binding, XmlQualifiedName>(); 378private readonly Dictionary<XmlQualifiedName, WsdlNS.Port> _bindingPortMapping = new Dictionary<XmlQualifiedName, WsdlNS.Port>();
Metadata\ServiceDescriptorFactory.cs (1)
23private Dictionary<int, ServiceDescriptor> _cache = new Dictionary<int, ServiceDescriptor>();
Shared\MSBuildProj.cs (1)
34public Dictionary<string, string> GlobalProperties { get; } = new Dictionary<string, string>();
Shared\ProjectPropertyResolver.cs (2)
23public async Task<Dictionary<string, string>> EvaluateProjectPropertiesAsync(string projectPath, string targetFramework, IEnumerable<string> propertyNames, IDictionary<string, string> globalProperties, ILogger logger, CancellationToken cancellationToken) 25var propertyTable = new Dictionary<string, string>();
Shared\Utilities\ProcessRunner.cs (1)
49var emptyVars = new Dictionary<string, string>();
Tool.cs (1)
177var properties = new Dictionary<string, string>()
dotnet-svcutil-lib.Tests (1)
ProjectUtils.cs (1)
89var envVars = new Dictionary<string, string> { { AppInsightsTelemetryClient.OptOutVariable, (!AppInsightsTelemetryClient.IsUserOptedIn).ToString() } };
dotnet-user-jwts (3)
Commands\CreateCommand.cs (1)
208var claims = new Dictionary<string, string>();
Helpers\DevJwtCliHelpers.cs (1)
216public static bool TryParseClaims(List<string> input, out Dictionary<string, string> claims)
Helpers\JwtCreatorOptions.cs (1)
15Dictionary<string, string> Claims);
FilesWebSite (1)
Controllers\UploadFilesController.cs (1)
32var files = new Dictionary<string, List<string>>();
FormatterWebSite (2)
Controllers\JsonOutputFormatterController.cs (1)
38public ActionResult<Dictionary<string, string>> DictionaryResult() =>
Controllers\XmlSerializerController.cs (1)
40public Dictionary<string, string> GetDictionary()
GenerateDocumentationAndConfigFiles (140)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Microsoft.CodeAnalysis.Analyzers\Core\MetaAnalyzers\ReleaseTrackingHelper.cs (1)
51var releaseTrackingDataByRulesBuilder = new Dictionary<string, ReleaseTrackingDataForRuleBuilder>();
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (2)
94using var collisionMapPool = (isCaseSensitive ? SharedPools.Default<Dictionary<string, bool>>() : SharedPools.StringIgnoreCaseDictionary<bool>()).GetPooledObject(); 95var collisionMap = collisionMapPool.Object;
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
30var values = query
GetDocument.Insider (1)
Commands\GetDocumentCommand.cs (1)
65var packagedAssemblies = Directory
HealthChecksSample (2)
GCInfoHealthCheck.cs (1)
58var data = new Dictionary<string, object>()
Program.cs (1)
8private static readonly Dictionary<string, Type> _scenarios;
HelixTestRunner (1)
TestRunner.cs (1)
21public Dictionary<string, string> EnvironmentVariables { get; set; }
HtmlGenerationWebSite (1)
ProductsService.cs (1)
13private readonly Dictionary<string, Product[]> _products = new Dictionary<string, Product[]>
http2cat (4)
Program.cs (2)
46var decodedHeaders = h2Connection.DecodeHeaders(headersFrame); 70var decodedTrailers = h2Connection.DecodeHeaders(trailersFrame);
src\Shared\Http2cat\Http2Utilities.cs (2)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 231internal Dictionary<string, string> DecodeHeaders(Http2FrameWithPayload frame, bool endHeaders = false)
Identity.DefaultUI.WebSite (2)
src\Identity\test\InMemory.Test\InMemoryUserStore.cs (2)
24private readonly Dictionary<string, TUser> _logins = new Dictionary<string, TUser>(); 26private readonly Dictionary<string, TUser> _users = new Dictionary<string, TUser>();
IdentitySample.PasskeyConformance (1)
InMemoryUserStore.cs (1)
15private readonly Dictionary<string, TUser> _users = [];
IdentitySample.PasskeyUI (1)
InMemoryUserStore.cs (1)
15private readonly Dictionary<string, TUser> _users = [];
IIS.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
192public static IEnumerable<object[]> ToTheoryData<T>(this Dictionary<string, T> dictionary)
src\Shared\Http2cat\Http2Utilities.cs (2)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 231internal Dictionary<string, string> DecodeHeaders(Http2FrameWithPayload frame, bool endHeaders = false)
IIS.LongTests (12)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
192public static IEnumerable<object[]> ToTheoryData<T>(this Dictionary<string, T> dictionary)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
548private static Dictionary<string, (string, Action<XElement>)> InvalidConfigTransformations = InitInvalidConfigTransformations(); 572public static Dictionary<string, (string, Action<XElement>)> InitInvalidConfigTransformations() 574var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 593private static Dictionary<string, Func<IISDeploymentParameters, string>> PortableConfigTransformations = InitPortableWebConfigTransformations(); 607public static Dictionary<string, Func<IISDeploymentParameters, string>> InitPortableWebConfigTransformations() 609var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 662private static Dictionary<string, Func<IISDeploymentParameters, string>> StandaloneConfigTransformations = InitStandaloneConfigTransformations(); 678public static Dictionary<string, Func<IISDeploymentParameters, string>> InitStandaloneConfigTransformations() 680var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>();
src\Shared\Http2cat\Http2Utilities.cs (2)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 231internal Dictionary<string, string> DecodeHeaders(Http2FrameWithPayload frame, bool endHeaders = false)
IIS.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
IIS.NewHandler.FunctionalTests (12)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
192public static IEnumerable<object[]> ToTheoryData<T>(this Dictionary<string, T> dictionary)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
548private static Dictionary<string, (string, Action<XElement>)> InvalidConfigTransformations = InitInvalidConfigTransformations(); 572public static Dictionary<string, (string, Action<XElement>)> InitInvalidConfigTransformations() 574var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 593private static Dictionary<string, Func<IISDeploymentParameters, string>> PortableConfigTransformations = InitPortableWebConfigTransformations(); 607public static Dictionary<string, Func<IISDeploymentParameters, string>> InitPortableWebConfigTransformations() 609var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 662private static Dictionary<string, Func<IISDeploymentParameters, string>> StandaloneConfigTransformations = InitStandaloneConfigTransformations(); 678public static Dictionary<string, Func<IISDeploymentParameters, string>> InitStandaloneConfigTransformations() 680var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>();
src\Shared\Http2cat\Http2Utilities.cs (2)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 231internal Dictionary<string, string> DecodeHeaders(Http2FrameWithPayload frame, bool endHeaders = false)
IIS.NewShim.FunctionalTests (12)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
192public static IEnumerable<object[]> ToTheoryData<T>(this Dictionary<string, T> dictionary)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
548private static Dictionary<string, (string, Action<XElement>)> InvalidConfigTransformations = InitInvalidConfigTransformations(); 572public static Dictionary<string, (string, Action<XElement>)> InitInvalidConfigTransformations() 574var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 593private static Dictionary<string, Func<IISDeploymentParameters, string>> PortableConfigTransformations = InitPortableWebConfigTransformations(); 607public static Dictionary<string, Func<IISDeploymentParameters, string>> InitPortableWebConfigTransformations() 609var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 662private static Dictionary<string, Func<IISDeploymentParameters, string>> StandaloneConfigTransformations = InitStandaloneConfigTransformations(); 678public static Dictionary<string, Func<IISDeploymentParameters, string>> InitStandaloneConfigTransformations() 680var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>();
src\Shared\Http2cat\Http2Utilities.cs (2)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 231internal Dictionary<string, string> DecodeHeaders(Http2FrameWithPayload frame, bool endHeaders = false)
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
192public static IEnumerable<object[]> ToTheoryData<T>(this Dictionary<string, T> dictionary)
IISExpress.FunctionalTests (12)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
192public static IEnumerable<object[]> ToTheoryData<T>(this Dictionary<string, T> dictionary)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (9)
548private static Dictionary<string, (string, Action<XElement>)> InvalidConfigTransformations = InitInvalidConfigTransformations(); 572public static Dictionary<string, (string, Action<XElement>)> InitInvalidConfigTransformations() 574var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 593private static Dictionary<string, Func<IISDeploymentParameters, string>> PortableConfigTransformations = InitPortableWebConfigTransformations(); 607public static Dictionary<string, Func<IISDeploymentParameters, string>> InitPortableWebConfigTransformations() 609var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 662private static Dictionary<string, Func<IISDeploymentParameters, string>> StandaloneConfigTransformations = InitStandaloneConfigTransformations(); 678public static Dictionary<string, Func<IISDeploymentParameters, string>> InitStandaloneConfigTransformations() 680var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>();
src\Shared\Http2cat\Http2Utilities.cs (2)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 231internal Dictionary<string, string> DecodeHeaders(Http2FrameWithPayload frame, bool endHeaders = false)
illink (96)
ILLink.RoslynAnalyzer (24)
DataFlowAnalyzerContext.cs (3)
13private readonly Dictionary<RequiresAnalyzerBase, ImmutableArray<ISymbol>> _enabledAnalyzers; 31Dictionary<RequiresAnalyzerBase, ImmutableArray<ISymbol>> enabledAnalyzers, 42var enabledAnalyzers = new Dictionary<RequiresAnalyzerBase, ImmutableArray<ISymbol>>();
DynamicallyAccessedMembersAnalyzer.cs (5)
207(Location[]? sourceLocation, Dictionary<string, string?>? DAMArgs) = (!attributableSymbolLocation.IsInSource 231(Location[]? sourceLocation, Dictionary<string, string?>? DAMArgs) = (!attributableSymbolLocation.IsInSource 257(Location[]? sourceLocation, Dictionary<string, string?>? DAMArgs) = (!attributableSymbolLocation.IsInSource 347private static (Location[]?, Dictionary<string, string?>?) CreateArguments(Location attributableSymbolLocation, DynamicallyAccessedMemberTypes mismatchedArgument) 349Dictionary<string, string?>? DAMArgument = new();
src\tools\illink\src\ILLink.Shared\DataFlow\DefaultValueDictionary.cs (3)
24private Dictionary<TKey, TValue>? Dictionary; 29private DefaultValueDictionary(TValue defaultValue, Dictionary<TKey, TValue> dictionary) => (Dictionary, DefaultValue) = (dictionary, defaultValue); 101var dict = new Dictionary<TKey, TValue>();
src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (4)
33private readonly Dictionary<IControlFlowGraph<TBlock, TRegion>.ControlFlowBranch, TState> branchInput; 43private readonly Dictionary<TRegion, Box<TValue>> exceptionState; 51private readonly Dictionary<IControlFlowGraph<TBlock, TRegion>.ControlFlowBranch, TValue> exceptionFinallyState; 56private readonly Dictionary<TRegion, TValue> finallyInputState;
TrimAnalysis\ArrayValue.cs (1)
12public readonly Dictionary<int, MultiValue> IndexValues;
TrimAnalysis\DiagnosticContext.cs (1)
64Dictionary<string, string?>? DAMArgument = new Dictionary<string, string?>();
TrimAnalysis\TrimAnalysisPatternStore.cs (7)
15private readonly Dictionary<IOperation, TrimAnalysisAssignmentPattern> AssignmentPatterns; 16private readonly Dictionary<IOperation, TrimAnalysisFieldAccessPattern> FieldAccessPatterns; 17private readonly Dictionary<IOperation, TrimAnalysisBackingFieldAccessPattern> BackingFieldAccessPatterns; 18private readonly Dictionary<IOperation, TrimAnalysisGenericInstantiationPattern> GenericInstantiationPatterns; 19private readonly Dictionary<IOperation, TrimAnalysisMethodCallPattern> MethodCallPatterns; 20private readonly Dictionary<IOperation, TrimAnalysisReflectionAccessPattern> ReflectionAccessPatterns; 21private readonly Dictionary<IOperation, FeatureCheckReturnValuePattern> FeatureCheckReturnValuePatterns;
ILLink.Tasks (7)
CreateRuntimeRootDescriptorFile.cs (7)
94readonly Dictionary<string, string> namespaceDictionary = new Dictionary<string, string>(); 95readonly Dictionary<string, string> classIdsToClassNames = new Dictionary<string, string>(); 96readonly Dictionary<string, ClassMembers> classNamesToClassMembers = new Dictionary<string, ClassMembers>(); 97readonly Dictionary<FeatureSwitchMembers, Dictionary<string, ClassMembers>> featureSwitchMembers = new(); 351foreach ((var fs, var members) in featureSwitchMembers.Select(kv => (kv.Key, kv.Value))) 465Dictionary<string, ClassMembers> currentFeatureSwitchMembers = featureSwitchMembers[featureSwitch.Value];
Infrastructure.Common (9)
artifacts\bin\Infrastructure.Common\Debug\_ServiceModel.TestProperties.Generated.cs (1)
40static partial void Initialize(Dictionary<string, string> properties)
ConditionalWcfTest.cs (1)
18private static Dictionary<string, bool> s_evaluatedConditions = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
JsonSerializer.cs (2)
30internal static Dictionary<string, string> DeserializeDictionary(string data) 32Dictionary<string, string> dictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
TestEventListener.cs (1)
15private Dictionary<string, bool> _targetSourceName = new Dictionary<string, bool>();
TestProperties.cs (4)
19private static Lazy<Dictionary<String, String>> s_properties = new Lazy<Dictionary<String, String>>(() => 21Dictionary<String, String> properties = new Dictionary<String, String>(StringComparer.OrdinalIgnoreCase); 27static partial void Initialize(Dictionary<string, string> properties);
InMemory.FunctionalTests (96)
BadHttpRequestTests.cs (1)
57public static Dictionary<string, (string header, string errorMessage)> BadHeaderData => new Dictionary<string, (string, string)>
EventSourceTests.cs (1)
505public Dictionary<string, string> Payload { get; }
Http2\Http2ConnectionTests.cs (1)
2432public readonly Dictionary<string, StringValues> Headers = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
Http2\Http2TestBase.cs (5)
129protected readonly Dictionary<string, string> _receivedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 130protected readonly Dictionary<string, string> _receivedTrailers = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 131protected readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 164internal Dictionary<string, object> ConnectionTags => _metricsTagsFeature.Tags.ToDictionary(t => t.Key, t => t.Value); 983var dictionary = headers
Http3\Http3ConnectionTests.cs (6)
109var headers = await requestStream.ExpectHeadersAsync(); 156var responseHeaders = await requestStream.ExpectHeadersAsync(); 398var incomingSettings = await inboundControlStream.ExpectSettingsAsync(); 612var responseHeaders = await requestStream.ExpectHeadersAsync(); 614var data = await requestStream.ExpectTrailersAsync(); 755var responseHeaders = await requestStream.ExpectHeadersAsync();
Http3\Http3StreamTests.cs (68)
38var responseHeaders = await requestStream.ExpectHeadersAsync(); 62var responseHeaders = await requestStream.ExpectHeadersAsync(); 117var responseHeaders = await requestStream.ExpectHeadersAsync(); 154var responseHeaders = await requestStream.ExpectHeadersAsync(); 171var responseHeaders = await requestStream.ExpectHeadersAsync(); 190var responseHeaders = await requestStream.ExpectHeadersAsync(); 216var responseHeaders = await requestStream.ExpectHeadersAsync(); 250var responseHeaders = await requestStream.ExpectHeadersAsync(); 309var responseHeaders = await requestStream.ExpectHeadersAsync(); 348var responseHeaders = await requestStream.ExpectHeadersAsync(); 368var responseHeaders = await requestStream.ExpectHeadersAsync(); 389var responseHeaders = await requestStream.ExpectHeadersAsync(); 412var responseHeaders = await requestStream.ExpectHeadersAsync(); 435var responseHeaders = await requestStream.ExpectHeadersAsync(); 458var responseHeaders = await requestStream.ExpectHeadersAsync(); 568var responseHeaders = await requestStream.ExpectHeadersAsync(); 604var responseHeaders = await requestStream.ExpectHeadersAsync(); 639var responseHeaders = await requestStream.ExpectHeadersAsync(); 671var responseHeaders = await requestStream.ExpectHeadersAsync(); 840var responseHeaders = await requestStream.ExpectHeadersAsync(); 842var responseTrailers = await requestStream.ExpectHeadersAsync(); 871var responseHeaders = await requestStream.ExpectHeadersAsync(); 905var responseHeaders = await requestStream.ExpectHeadersAsync(); 964var responseHeaders = await requestStream.ExpectHeadersAsync(); 968var responseTrailers = await requestStream.ExpectHeadersAsync(); 996var responseHeaders = await requestStream.ExpectHeadersAsync(); 1023var responseHeaders = await requestStream.ExpectHeadersAsync(); 1054var responseHeaders = await requestStream.ExpectHeadersAsync(); 1058var responseTrailers = await requestStream.ExpectHeadersAsync(); 1088var responseHeaders = await requestStream.ExpectHeadersAsync(); 1158var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1207var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1208var decodedTrailers = await requestStream.ExpectHeadersAsync(); 1259var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1308var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1360var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1412var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1454var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1509var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1517var decodedTrailers = await requestStream.ExpectHeadersAsync(); 1564var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1572var decodedTrailers = await requestStream.ExpectHeadersAsync(); 1621var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1679var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1738var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1746var decodedTrailers = await requestStream.ExpectHeadersAsync(); 1802var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1810var decodedTrailers = await requestStream.ExpectHeadersAsync(); 1863var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1871var decodedTrailers = await requestStream.ExpectHeadersAsync(); 1931var decodedHeaders = await requestStream.ExpectHeadersAsync(); 1939var decodedTrailers = await requestStream.ExpectHeadersAsync(); 2335var receivedHeaders = await requestStream.ExpectHeadersAsync(); 2408var receivedHeaders = await requestStream.ExpectHeadersAsync(); 2532var receivedHeaders = await requestStream.ExpectHeadersAsync(); 2568var receivedHeaders = await requestStream.ExpectHeadersAsync(); 2605var receivedHeaders = await requestStream.ExpectHeadersAsync(); 2642var receivedHeaders = await requestStream.ExpectHeadersAsync(); 2697var receivedHeaders = await requestStream.ExpectHeadersAsync(); 2744var receivedHeaders = await requestStream.ExpectHeadersAsync(); 2876var decodedHeaders = await requestStream.ExpectHeadersAsync(); 2924var responseHeaders = await requestStream.ExpectHeadersAsync(); 2964var responseHeaders = await requestStream.ExpectHeadersAsync(); 2967var responseTrailers = await requestStream.ExpectHeadersAsync(); 2992var responseHeaders = await requestStream.ExpectHeadersAsync(expectEnd: true); 3099var responseHeaders = await requestStream.ExpectHeadersAsync(); 3204var responseHeaders = await stream.ExpectHeadersAsync(); 3314var responseHeaders = await requestStream.ExpectHeadersAsync();
Http3\WebTransport\WebTransportHandshakeTests.cs (3)
60var response1 = await controlStream2.ExpectSettingsAsync(); 77var response2 = await requestStream.ExpectHeadersAsync(); 126var response1 = await controlStream2.ExpectSettingsAsync();
Http3\WebTransport\WebTransportTestUtilities.cs (1)
57var response1 = await controlStream2.ExpectSettingsAsync();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (7)
95internal Dictionary<string, object> ConnectionTags => MultiplexedConnectionContext.Tags.ToDictionary(t => t.Key, t => t.Value); 660public readonly Dictionary<string, string> DecodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 714var dictionary = headers 736internal async ValueTask<Dictionary<string, string>> ExpectHeadersAsync(bool expectEnd = false) 753internal async ValueTask<Dictionary<string, string>> ExpectTrailersAsync() 838internal async ValueTask<Dictionary<long, long>> ExpectSettingsAsync() 845var settings = new Dictionary<long, long>();
src\Servers\Kestrel\shared\test\RevocationResponder.cs (2)
19private readonly Dictionary<string, CertificateAuthority> _aiaPaths = 22private readonly Dictionary<string, CertificateAuthority> _crlPaths
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\shared\WebSockets\TestStartup.cs (1)
17var delegates = new Dictionary<string, RequestDelegate>();
installer.tasks (1)
GenerateFileVersionProps.cs (1)
44var fileVersions = new Dictionary<string, FileVersionData>(StringComparer.OrdinalIgnoreCase);
Interop.FunctionalTests (5)
H2SpecTests.cs (1)
65var toSkip = new Dictionary<string, string>();
Http3\Http3RequestTests.cs (4)
889var requestHeaders = new List<Dictionary<string, StringValues>>(); 918var request1Headers = requestHeaders.Single(i => i["id"] == "1"); 931var request2Headers = requestHeaders.Single(i => i["id"] == "2"); 947var request3Headers = requestHeaders.Single(i => i["id"] == "3");
IOperationGenerator (2)
IOperationClassWriter.cs (2)
28private readonly Dictionary<string, AbstractNode?> _typeMap; 313Dictionary<int, IEnumerable<(OperationKindEntry, AbstractNode)>> explicitKinds = _tree.Types.OfType<AbstractNode>()
KeyManagementSimulator (1)
Program.cs (1)
315private readonly Dictionary<Guid, DateTimeOffset> _missingSinceMap = new();
Metrics (135)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Metrics.Legacy (135)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Microsoft.Analyzers.Extra (12)
CallAnalysis\Arrays.cs (1)
31private static readonly Dictionary<string, string[]> _collectionFactories = new()
CallAnalysis\CallAnalyzer.Registrar.cs (4)
52var dict = new Dictionary<string, string[]> 66public void RegisterMethods(Dictionary<string, string[]> methods, Action<OperationAnalysisContext, IInvocationOperation> action) 144public void RegisterProperties(Dictionary<string, string[]> props, Action<OperationAnalysisContext, IPropertyReferenceOperation> action) 200public void RegisterInterfaceMethods(Dictionary<string, string[]> methods, Action<OperationAnalysisContext, IInvocationOperation> action)
CallAnalysis\CallAnalyzer.State.cs (5)
16public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IInvocationOperation>>> Methods = new(SymbolEqualityComparer.Default); 17public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IObjectCreationOperation>>> Ctors = new(SymbolEqualityComparer.Default); 18public readonly Dictionary<IPropertySymbol, List<Action<OperationAnalysisContext, IPropertyReferenceOperation>>> Props = new(SymbolEqualityComparer.Default); 19public readonly Dictionary<ITypeSymbol, List<Action<OperationAnalysisContext, IThrowOperation>>> ExceptionTypes = new(SymbolEqualityComparer.Default); 20public readonly Dictionary<ITypeSymbol, List<MethodHandlers>> Interfaces = new(SymbolEqualityComparer.Default);
CallAnalysis\StaticTime.cs (2)
16private static readonly Dictionary<string, string[]> _timeMethods = new() 29private static readonly Dictionary<string, string[]> _timeProperties = new()
Microsoft.Analyzers.Local (11)
ApiLifecycle\AssemblyAnalysis.cs (2)
17public Dictionary<ISymbol, List<string>> MissingConstraints { get; } = new(SymbolEqualityComparer.Default); 18public Dictionary<ISymbol, List<string>> MissingBaseTypes { get; } = new(SymbolEqualityComparer.Default);
CallAnalysis\CallAnalyzer.Registrar.cs (4)
52var dict = new Dictionary<string, string[]> 66public void RegisterMethods(Dictionary<string, string[]> methods, Action<OperationAnalysisContext, IInvocationOperation> action) 144public void RegisterProperties(Dictionary<string, string[]> props, Action<OperationAnalysisContext, IPropertyReferenceOperation> action) 200public void RegisterInterfaceMethods(Dictionary<string, string[]> methods, Action<OperationAnalysisContext, IInvocationOperation> action)
CallAnalysis\CallAnalyzer.State.cs (5)
16public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IInvocationOperation>>> Methods = new(SymbolEqualityComparer.Default); 17public readonly Dictionary<IMethodSymbol, List<Action<OperationAnalysisContext, IObjectCreationOperation>>> Ctors = new(SymbolEqualityComparer.Default); 18public readonly Dictionary<IPropertySymbol, List<Action<OperationAnalysisContext, IPropertyReferenceOperation>>> Props = new(SymbolEqualityComparer.Default); 19public readonly Dictionary<ITypeSymbol, List<Action<OperationAnalysisContext, IThrowOperation>>> ExceptionTypes = new(SymbolEqualityComparer.Default); 20public readonly Dictionary<ITypeSymbol, List<MethodHandlers>> Interfaces = new(SymbolEqualityComparer.Default);
Microsoft.Arcade.Test.Common (5)
FakeHttpClient.cs (3)
20public static HttpClient WithResponsesGivenUris(Dictionary<string, IEnumerable<HttpResponseMessage>> FakeHttpMessageHandler) 52private readonly Dictionary<string, IEnumerator<HttpResponseMessage>> _responseEnumerators; 54public FakeHttpMessageHandler(Dictionary<string, IEnumerable<HttpResponseMessage>> responses)
MockFileSystem.cs (2)
18public Dictionary<string, string> Files { get; } 27Dictionary<string, string>? files = null,
Microsoft.AspNetCore.Analyzer.Testing (1)
DiagnosticProject.cs (1)
29private static readonly Dictionary<Assembly, Solution> _solutionCache = new Dictionary<Assembly, Solution>();
Microsoft.AspNetCore.Analyzers (1)
StartupAnalysisBuilder.cs (1)
12private readonly Dictionary<INamedTypeSymbol, List<object>> _analysesByType;
Microsoft.AspNetCore.Analyzers.Test (1)
StartupFactsTest.cs (1)
101private static readonly Dictionary<string, string> TestSources = new Dictionary<string, string>
Microsoft.AspNetCore.App.Analyzers (2)
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
77internal static readonly Dictionary<string, string> PropertyMapping = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
RouteEmbeddedLanguage\Infrastructure\EmbeddedLanguageCommentOptions.cs (1)
24private static readonly Dictionary<string, TOptions> s_nameToOption =
Microsoft.AspNetCore.App.Analyzers.Test (2)
Http\HeaderDictionaryIndexerAnalyzerTests.cs (1)
172var propertyMapping = new Dictionary<string, string>(HeaderDictionaryIndexerAnalyzer.PropertyMapping);
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (1)
56var tempSpans = new Dictionary<string, List<TextSpan>>();
Microsoft.AspNetCore.App.CodeFixes (3)
Dependencies\AddPackageFixer.cs (1)
44var wellKnownExtensionMethodCache = ExtensionMethodsCache.ConstructFromWellKnownTypes(wellKnownTypes);
Dependencies\ExtensionMethodsCache.cs (1)
10public static Dictionary<ThisAndExtensionMethod, PackageSourceAndNamespace> ConstructFromWellKnownTypes(WellKnownTypes wellKnownTypes)
Dependencies\ExtensionMethodsCompletionProvider.cs (1)
54var wellKnownExtensionMethodCache = ExtensionMethodsCache.ConstructFromWellKnownTypes(wellKnownTypes);
Microsoft.AspNetCore.Authentication (1)
PropertiesSerializer.cs (1)
71var extra = new Dictionary<string, string?>(count);
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationHandlerProvider.cs (1)
29private readonly Dictionary<string, IAuthenticationHandler> _handlerMap = new Dictionary<string, IAuthenticationHandler>(StringComparer.Ordinal);
Microsoft.AspNetCore.Authentication.Core.Test (7)
AuthenticationPropertiesTests.cs (5)
14var items = new Dictionary<string, string?> 19var parameters = new Dictionary<string, object?> 49var items = new Dictionary<string, string?> 61var items = new Dictionary<string, string?> 65var parameters = new Dictionary<string, object?>
AuthenticationTicketTests.cs (2)
13var items = new Dictionary<string, string?> 18var parameters = new Dictionary<string, object?>
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
72var queryStrings = QueryHelpers.ParseQuery(new Uri(base.BuildChallengeUrl(properties, redirectUri)).Query);
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (3)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
UserJwtsTests.cs (2)
173var deserialized = JsonSerializer.Deserialize<Dictionary<string, Jwt>>(output);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (3)
MicrosoftAccountHandler.cs (3)
64var queryStrings = new Dictionary<string, string> 102Dictionary<string, string> queryStrings, 129Dictionary<string, string> queryStrings,
Microsoft.AspNetCore.Authentication.OAuth (2)
OAuthHandler.cs (2)
200var tokenRequestParameters = new Dictionary<string, string>() 305var parameters = new Dictionary<string, string>
Microsoft.AspNetCore.Authentication.Test (27)
CookieTests.cs (1)
154public readonly Dictionary<string, AuthenticationTicket> Store = new Dictionary<string, AuthenticationTicket>();
FacebookTests.cs (2)
395var entries = form.ReadForm(); 438var queryParams = QueryHelpers.ParseQuery(locationUri.Query);
GoogleTests.cs (6)
60var queryParams = QueryHelpers.ParseQuery(location.Query); 190var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query); 242var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query); 298var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query); 1034var entries = form.ReadForm(); 1071var queryParams = QueryHelpers.ParseQuery(locationUri.Query);
MicrosoftAccountTests.cs (3)
270var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query); 301var entries = form.ReadForm(); 338var queryParams = QueryHelpers.ParseQuery(locationUri.Query);
OpenIdConnect\OpenIdConnectTests.cs (2)
242var query = transaction.Response.Headers.Location.Query.Substring(1).Split('&') 273var query = transaction.Response.Headers.Location.Query.Substring(1).Split('&')
OpenIdConnect\TestSettings.cs (1)
139var queryDict = string.IsNullOrEmpty(redirectUri.Query) ?
TwitterTests.cs (2)
400var content = new Dictionary<string, string>() 469var content = new Dictionary<string, string>()
WsFederation\WsFederationTest.cs (5)
77var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 93var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 109var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 124var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 175var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query);
WsFederation\WsFederationTest_Handler.cs (5)
75var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 91var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 107var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 122var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 173var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query);
Microsoft.AspNetCore.Authentication.Twitter (4)
TwitterHandler.cs (4)
183private async Task<HttpResponseMessage> ExecuteRequestAsync(string url, HttpMethod httpMethod, RequestToken? accessToken = null, Dictionary<string, string>? extraOAuthPairs = null, Dictionary<string, string>? queryParameters = null, Dictionary<string, string>? formData = null) 298var formPost = new Dictionary<string, string> { { "oauth_verifier", verifier } };
Microsoft.AspNetCore.Authorization (1)
AuthorizationOptions.cs (1)
18private Dictionary<string, Task<AuthorizationPolicy?>> PolicyMap { get; } = new Dictionary<string, Task<AuthorizationPolicy?>>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.BrowserTesting (7)
BrowserManager.cs (1)
19private readonly Dictionary<string, IBrowser> _launchBrowsers = new(StringComparer.Ordinal);
BrowserManagerConfiguration.cs (6)
205Env = configuration.GetValue<Dictionary<string, string>>(nameof(BrowserTypeLaunchOptions.Env)), 216private static T BindMultiValueMap<T>(IConfigurationSection processArgsMap, Func<Dictionary<string, HashSet<string>>, T> mapper) 235var argsMap = new Dictionary<string, HashSet<string>>(); 249foreach (var (value, enabled) in arg.Get<Dictionary<string, bool>>()) 284static HashSet<string> InitializeMapValue(Dictionary<string, HashSet<string>> argsMap, string argName) 299true => configuration.Get<Dictionary<string, bool>>().Where(kvp => kvp.Value == true).Select(kvp => kvp.Key).ToArray()
Microsoft.AspNetCore.Components (47)
NavigationManagerExtensions.cs (4)
26private static readonly Dictionary<Type, QueryParameterFormatter<object>> _queryParameterFormatters = new() 575var parameterSources = CreateParameterSourceDictionary(parameters); 703private static Dictionary<ReadOnlyMemory<char>, QueryParameterSource> CreateParameterSourceDictionary( 706var parameterSources = new Dictionary<ReadOnlyMemory<char>, QueryParameterSource>(QueryParameterNameComparer.Instance);
ParameterAttribute.cs (1)
29/// such as <see cref="Dictionary{String, Object}"/>.
ParameterView.cs (1)
108var result = new Dictionary<string, object?>();
PersistentState\ComponentStatePersistenceManager.cs (1)
19private readonly Dictionary<string, byte[]> _currentState = new(StringComparer.Ordinal);
PersistentState\PersistentServicesRegistry.cs (1)
159private readonly Dictionary<string, (PropertySetter, PropertyGetter)> _underlyingAccessors;
PersistentStateValueProvider.cs (2)
24private readonly Dictionary<ComponentState, PersistingComponentStateSubscription> _subscriptions = []; 28internal Dictionary<ComponentState, PersistingComponentStateSubscription> Subscriptions => _subscriptions;
Reflection\ComponentProperties.cs (4)
92Dictionary<string, object>? unmatched = null; 229private static void ThrowForCaptureUnmatchedValuesConflict(Type targetType, string parameterName, Dictionary<string, object> unmatched) 270private readonly Dictionary<string, PropertySetter> _underlyingWriters; 342if (!propertyInfo.PropertyType.IsAssignableFrom(typeof(Dictionary<string, object>)))
Reflection\MemberAssignment.cs (1)
17var dictionary = new Dictionary<string, object>(StringComparer.Ordinal);
Rendering\RenderBatchBuilder.cs (3)
36public Dictionary<string, int> AttributeDiffSet { get; } = new Dictionary<string, int>(); 40internal StackObjectPool<Dictionary<object, KeyedItemInfo>> KeyedItemInfoDictionaryPool { get; } 41= new StackObjectPool<Dictionary<object, KeyedItemInfo>>(maxPreservedItems: 10, () => new Dictionary<object, KeyedItemInfo>());
Rendering\RenderTreeBuilder.cs (3)
29private Dictionary<string, int>? _seenAttributeNames; 808var seenAttributeNames = (_seenAttributeNames ??= new Dictionary<string, int>(SimplifiedStringHashComparer.Instance)); 880var seenAttributeNames = (_seenAttributeNames ??= new Dictionary<string, int>(SimplifiedStringHashComparer.Instance));
RenderTree\Renderer.cs (5)
34private readonly Dictionary<int, ComponentState> _componentStateById = new Dictionary<int, ComponentState>(); 35private readonly Dictionary<IComponent, ComponentState> _componentStateByComponent = new Dictionary<IComponent, ComponentState>(); 37private readonly Dictionary<ulong, (int RenderedByComponentId, EventCallback Callback, string? attributeName)> _eventBindings = new(); 38private readonly Dictionary<ulong, ulong> _eventHandlerIdReplacements = new Dictionary<ulong, ulong>(); 46private Dictionary<int, ParameterView>? _rootComponentsLatestParameters;
RenderTree\RenderTreeDiffBuilder.cs (5)
66Dictionary<object, KeyedItemInfo> keyedItemInfos = null; 325private static Dictionary<object, KeyedItemInfo> BuildKeyToInfoLookup(DiffContext diffContext, int oldStartIndex, int oldEndIndexExcl, int newStartIndex, int newEndIndexExcl) 327var result = diffContext.KeyedItemInfoDictionaryPool.Get(); 1051public readonly Dictionary<string, int> AttributeDiffSet; 1052public readonly StackObjectPool<Dictionary<object, KeyedItemInfo>> KeyedItemInfoDictionaryPool;
ResourceAssetCollection.cs (1)
29var mappings = new Dictionary<string, ResourceAsset>(StringComparer.OrdinalIgnoreCase);
Routing\QueryParameterValueSupplier.cs (1)
11private readonly Dictionary<ReadOnlyMemory<char>, StringSegmentAccumulator> _queryParameterValuesByName = new(QueryParameterNameComparer.Instance);
Routing\RouteTableFactory.cs (2)
88var templatesByHandler = new Dictionary<Type, string[]>(); 116internal static RouteTable Create(Dictionary<Type, string[]> templatesByHandler, IServiceProvider serviceProvider)
Sections\SectionRegistry.cs (2)
8private readonly Dictionary<object, SectionOutlet> _subscribersByIdentifier = new(); 9private readonly Dictionary<object, List<SectionContent>> _providersByIdentifier = new();
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (2)
443Dictionary<string, List<RoutePatternParameterPolicyReference>>? parameterPolicyReferences, 458Dictionary<string, object?>? updatedDefaults = null;
src\Http\Routing\src\RouteConstraintBuilder.cs (2)
27private readonly Dictionary<string, List<IRouteConstraint>> _constraints; 54var constraints = new Dictionary<string, IRouteConstraint>(StringComparer.OrdinalIgnoreCase);
src\Http\Routing\src\RouteOptions.cs (2)
104var defaults = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 173private static void AddConstraint<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TConstraint>(Dictionary<string, Type> constraintMap, string text) where TConstraint : IRouteConstraint
src\Http\Routing\src\Tree\TreeRouteBuilder.cs (1)
268var trees = new Dictionary<int, UrlMatchingTree>();
src\Http\Routing\src\Tree\UrlMatchingNode.cs (1)
55public Dictionary<string, UrlMatchingNode> Literals { get; }
src\Shared\Components\ComponentsActivityLinkStore.cs (2)
29private readonly Dictionary<string, CategoryLink> _store; 35: (Dictionary<string, CategoryLink>)GetActivityLinksStore(instance);
Microsoft.AspNetCore.Components.Authorization.Tests (4)
src\Components\Shared\test\IComponentExtensions.cs (1)
10Dictionary<string, object> parameters)
src\Components\Shared\test\TestServiceProvider.cs (3)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 14private Dictionary<(Type, object?), Func<object?>>? _keyedFactories; 16private Dictionary<(Type, object?), Func<object?>> KeyedFactories
Microsoft.AspNetCore.Components.Endpoints (36)
Assets\ImportMapDefinition.cs (4)
20private Dictionary<string, string>? _imports; 21private Dictionary<string, IReadOnlyDictionary<string, string>>? _scopes; 22private Dictionary<string, string>? _integrity; 141((Dictionary<string, string>)importMap._scopes[key])[scopeKey] = scopeValue;
Builder\ResourcePreloadCollection.cs (1)
10private readonly Dictionary<string, List<PreloadAsset>> _storage = new();
DependencyInjection\WebAssemblySettingsEmitter.cs (2)
9internal record WebAssemblySettings(string EnvironmentName, Dictionary<string, string> EnvironmentVariables); 32var environmentVariables = new Dictionary<string, string>();
Discovery\ComponentCollectionBuilder.cs (1)
12private readonly Dictionary<string, IReadOnlyList<ComponentBuilder>> _components = new();
Discovery\PageCollectionBuilder.cs (1)
11private readonly Dictionary<string, IReadOnlyList<PageComponentBuilder>> _pages = new();
FormMapping\Converters\DictionaryAdapters\ReadOnlyDictionaryBufferAdapter.cs (8)
9: IDictionaryBufferAdapter<ReadOnlyDictionary<TKey, TValue>, Dictionary<TKey, TValue>, TKey, TValue> 12public static Dictionary<TKey, TValue> Add(ref Dictionary<TKey, TValue> buffer, TKey key, TValue value) 18public static Dictionary<TKey, TValue> CreateBuffer() => 21public static ReadOnlyDictionary<TKey, TValue> ToResult(Dictionary<TKey, TValue> buffer) => 31Dictionary<TKey, TValue>, 34Dictionary<TKey, TValue>, 43Dictionary<TKey, TValue>,
FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (7)
55var _ when type == (typeof(Dictionary<TKey, TValue>)) => true, 96Dictionary<TKey, TValue>, 97DictionaryBufferAdapter<Dictionary<TKey, TValue>, TKey, TValue>, 98Dictionary<TKey, TValue>, 101Dictionary<TKey, TValue>, TKey, TValue>(valueTypeConverter), 138var _ when type == (typeof(Dictionary<TKey, TValue>)) => 139ConcreteTypeDictionaryConverterFactory<Dictionary<TKey, TValue>, TKey, TValue>.Instance.CreateConverter(type, options),
FormMapping\FormDataReader.cs (1)
127var result = new Dictionary<FormKey, HashSet<FormKey>>();
FormMapping\HttpContextFormValueMapper.cs (1)
125var dictionary = new Dictionary<FormKey, StringValues>();
FormMapping\Metadata\FormDataMetadataFactory.cs (1)
315public Dictionary<Type, FormDataTypeMetadata> TypeMetadata { get; set; } = new();
FormMapping\WellKnownConverters.cs (1)
19var converters = new Dictionary<Type, FormDataConverter>
Rendering\EndpointHtmlRenderer.EventDispatch.cs (3)
22private readonly Dictionary<(int ComponentId, int FrameIndex), string> _namedSubmitEventsByLocation = new(); 23private readonly Dictionary<string, HashSet<(int ComponentId, int FrameIndex)>> _namedSubmitEventsByScopeQualifiedName = new(StringComparer.Ordinal); 202private static TVal GetOrAddNewToDictionary<TKey, TVal>(Dictionary<TKey, TVal> dictionary, TKey key) where TKey: notnull where TVal: new()
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (1)
265public Dictionary<string, byte[]> Saved { get; private set; } = new();
src\Shared\Components\ComponentsActivityLinkStore.cs (2)
29private readonly Dictionary<string, CategoryLink> _store; 35: (Dictionary<string, CategoryLink>)GetActivityLinksStore(instance);
src\Shared\Components\PrerenderComponentApplicationStore.cs (2)
44public Dictionary<string, byte[]> ExistingState { get; protected set; } 76[JsonSerializable(typeof(Dictionary<string, byte[]>), GenerationMode = JsonSourceGenerationMode.Serialization)]
Microsoft.AspNetCore.Components.Endpoints.Tests (99)
Binding\FormDataMapperTests.cs (82)
26var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 46var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 66var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 78private FormDataReader CreateFormDataReader(Dictionary<string, StringValues> collection, CultureInfo invariantCulture, IFormFileCollection formFileCollection = null) 80var dictionary = new Dictionary<FormKey, StringValues>(collection.Count); 97var collection = new Dictionary<string, StringValues>() { }; 119var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues("abc") }; 136var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues("abc") }; 162var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 179var collection = new Dictionary<string, StringValues>() { }; 196var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues(value) }; 213var collection = new Dictionary<string, StringValues>() { ["value.Slug"] = new StringValues(value) }; 239var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues("(1,1)") }; 257var collection = new Dictionary<string, StringValues>() { ["value"] = new StringValues("(1,1)") }; 273var collection = new Dictionary<string, StringValues>() { }; 290var data = new Dictionary<string, StringValues>() { }; 306var data = new Dictionary<string, StringValues>() { ["[0]"] = "10" }; 322var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "10", "11" }) }; 340var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "Red", "Blue" }) }; 358var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "Red", "Blue" }) }; 376var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "10", "a" }) }; 401var data = new Dictionary<string, StringValues>() { ["values"] = new StringValues(new[] { "10", "a", "11" }) }; 431var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 462var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 508var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 569var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 609var collection = new Dictionary<string, StringValues>() 897var expected = new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }; 898CanDeserialize_Dictionary<Dictionary<int, int>, Dictionary<int, int>, int, int>(expected); 931var collection = new Dictionary<string, StringValues>() 960var expected = new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }; 961CanDeserialize_Dictionary<IDictionary<int, int>, Dictionary<int, int>, int, int>(expected); 984var expected = new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }; 985var collection = new Dictionary<string, StringValues>() 1014var expected = new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }; 1015var collection = new Dictionary<string, StringValues>() 1044var collection = new Dictionary<string, StringValues>() { }; 1066var data = new Dictionary<string, StringValues>(Enumerable.Range(0, size) 1084var result = FormDataMapper.Map<Dictionary<int, int>>(reader, options); 1105var expected = new Dictionary<int, int> 1118var collection = new Dictionary<string, StringValues>() 1141var result = FormDataMapper.Map<Dictionary<int, int>>(reader, options); 1144var dictionary = Assert.IsType<Dictionary<int, int>>(result); 1166var expected = new Dictionary<int, int> 1177var collection = new Dictionary<string, StringValues>() 1200var result = FormDataMapper.Map<Dictionary<int, int>>(reader, options); 1203var dictionary = Assert.IsType<Dictionary<int, int>>(result); 1226var collection = new Dictionary<string, StringValues>() 1254var collection = new Dictionary<string, StringValues>() 1290var data = new Dictionary<string, StringValues>() 1315var data = new Dictionary<string, StringValues>() 1356var data = new Dictionary<string, StringValues>() 1415var data = new Dictionary<string, StringValues>() 1486var data = new Dictionary<string, StringValues>() 1545var data = new Dictionary<string, StringValues>() 1590var data = new Dictionary<string, StringValues>() 1629var data = new Dictionary<string, StringValues>() 1660var data = new Dictionary<string, StringValues>() 1679var data = new Dictionary<string, StringValues>() 1698var data = new Dictionary<string, StringValues>() 1717var data = new Dictionary<string, StringValues>() 1739var data = new Dictionary<string, StringValues>() 1761var data = new Dictionary<string, StringValues>() 1787var data = new Dictionary<string, StringValues>() 1812var data = new Dictionary<string, StringValues>() 1832var data = new Dictionary<string, StringValues>() 1852var data = new Dictionary<string, StringValues>() { }; 1875var data = new Dictionary<string, StringValues>() { ["value"] = "20" }; 1906var data = new Dictionary<string, StringValues>(); 1934var data = new Dictionary<string, StringValues>(); 1967var data = new Dictionary<string, StringValues>(); 1989var data = new Dictionary<string, StringValues>(); 2012var data = new Dictionary<string, StringValues>(); 2045var data = new Dictionary<string, StringValues>(); 2080var data = new Dictionary<string, StringValues>() 2447public Dictionary<int, RecursiveDictionaryTree> Children { get; set; }
Binding\FormDataMetadataFactoryTests.cs (4)
275Assert.Equal(typeof(Dictionary<string, Warehouse>), property.PropertyMetadata.Type); 474Assert.Equal(typeof(Dictionary<string, DictionaryTree<string>>), property.PropertyMetadata.Type); 679public Dictionary<string, Warehouse> Warehouses { get; set; } 714public Dictionary<string, DictionaryTree<T>> Children { get; set; }
Builder\TestFileProvider\TestFileProvider.cs (3)
10private readonly Dictionary<string, IFileInfo> _lookup = 12private readonly Dictionary<string, IDirectoryContents> _directoryContentsLookup = 15private readonly Dictionary<string, TestFileChangeToken> _fileTriggers =
FormMapping\Converters\NullableConverterTests.cs (4)
65var dictionary = new Dictionary<FormKey, StringValues>(); 85var dictionary = new Dictionary<FormKey, StringValues>() 109var dictionary = new Dictionary<FormKey, StringValues>() 132var dictionary = new Dictionary<FormKey, StringValues>()
RazorComponentResultTest.cs (2)
35var paramsDict = new Dictionary<string, object> { { "First", 123 } }; 424var parameters = new Dictionary<string, object>
RazorComponentsServiceCollectionExtensionsTest.cs (2)
79var multiRegistrationServiceTypes = MultiRegistrationServiceTypes; 86private Dictionary<Type, Type[]> MultiRegistrationServiceTypes
WebRootComponentParametersTest.cs (2)
172private static WebRootComponentParameters CreateParameters(Dictionary<string, object> parameters) 185private static WebRootComponentParameters CreateParametersWithNonJsonElements(Dictionary<string, object> parameters)
Microsoft.AspNetCore.Components.Forms (5)
EditContext.cs (1)
20private readonly Dictionary<FieldIdentifier, FieldState> _fieldStates = new Dictionary<FieldIdentifier, FieldState>();
EditContextDataAnnotationsExtensions.cs (2)
76private readonly Dictionary<string, FieldIdentifier> _validationPathToFieldIdentifierMapping = new(); 190var validationErrors = validateContext.ValidationErrors;
EditContextProperties.cs (1)
16private Dictionary<object, object>? _contents;
ValidationMessageStore.cs (1)
14private readonly Dictionary<FieldIdentifier, List<string>> _messages = new Dictionary<FieldIdentifier, List<string>>();
Microsoft.AspNetCore.Components.Forms.Tests (4)
src\Components\Shared\test\IComponentExtensions.cs (1)
10Dictionary<string, object> parameters)
src\Components\Shared\test\TestServiceProvider.cs (3)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 14private Dictionary<(Type, object?), Func<object?>>? _keyedFactories; 16private Dictionary<(Type, object?), Func<object?>> KeyedFactories
Microsoft.AspNetCore.Components.Performance (2)
RouteTableFactoryBenchmarks.cs (1)
14private Dictionary<Type, string[]> _templatesByHandler;
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.Components.QuickGrid (1)
Infrastructure\EventCallbackSubscribable.cs (1)
14private readonly Dictionary<EventCallbackSubscriber<T>, EventCallback<T>> _callbacks = new();
Microsoft.AspNetCore.Components.Server (21)
Circuits\CircuitPersistenceManager.cs (6)
91internal ProtectedPrerenderComponentApplicationStore ToComponentApplicationStore(Dictionary<string, byte[]> applicationState) 122var persistedMarkers = TryDeserializeMarkers(rootComponents); 160static Dictionary<int, ComponentMarker> TryDeserializeMarkers(byte[] rootComponents) 169return JsonSerializer.Deserialize<Dictionary<int, ComponentMarker>>( 190var persistedComponents = new Dictionary<int, ComponentMarker>(); 228[JsonSerializable(typeof(Dictionary<int, ComponentMarker>))]
Circuits\ComponentParameterDeserializer.cs (1)
25var parametersDictionary = new Dictionary<string, object>();
Circuits\RemoteJSRuntime.cs (1)
27internal readonly Dictionary<long, RemoteJSDataStream> RemoteJSDataStreamInstances = new();
src\Components\Shared\src\RenderBatchWriter.cs (1)
37private readonly Dictionary<string, int> _deduplicatedStringIndices;
src\Components\Shared\src\WebRootComponentManager.cs (1)
33private readonly Dictionary<int, WebRootComponent> _webRootComponents = new();
src\Shared\Components\ComponentsActivityLinkStore.cs (2)
29private readonly Dictionary<string, CategoryLink> _store; 35: (Dictionary<string, CategoryLink>)GetActivityLinksStore(instance);
src\Shared\Components\PrerenderComponentApplicationStore.cs (2)
44public Dictionary<string, byte[]> ExistingState { get; protected set; } 76[JsonSerializable(typeof(Dictionary<string, byte[]>), GenerationMode = JsonSourceGenerationMode.Serialization)]
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (7)
75var headers = ReadHeaders(ref reader); 111var headers = ReadHeaders(ref reader); 141var headers = ReadHeaders(ref reader); 161var headers = ReadHeaders(ref reader); 215var headers = ReadHeaders(ref reader); 241private static Dictionary<string, string>? ReadHeaders(ref MessagePackReader reader) 246var headers = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.AspNetCore.Components.Server.Tests (20)
Circuits\CircuitHostTest.cs (9)
531Dictionary<string, object> parameters = new() 557Dictionary<string, object> parameters = new() 582Dictionary<string, object> parameters = new() 615Dictionary<string, object> parameters = new() 652Dictionary<string, object> parameters = new() 682Dictionary<string, object> parameters = new() 696private async Task AddComponentAsync<TComponent>(CircuitHost circuitHost, int ssrComponentId, Dictionary<string, object> parameters = null, string componentKey = "") 713private async Task UpdateComponentAsync<TComponent>(CircuitHost circuitHost, int ssrComponentId, Dictionary<string, object> parameters = null, string componentKey = "") 780private ComponentMarker CreateMarker(Type type, string locationHash, Dictionary<string, object> parameters = null, string componentKey = "")
Circuits\CircuitPersistenceManagerTest.cs (5)
372(int Id, ComponentMarkerKey Key, (Type ComponentType, Dictionary<string, object> Parameters))[] expected, byte[] rootComponents) 374var actual = JsonSerializer.Deserialize<Dictionary<int, ComponentMarker>>(rootComponents, SerializerOptions); 400(Type RootComponentType, Dictionary<string, object> Parameters)[] components = null, 524(Type RootComponentType, Dictionary<string, object> Parameters)[] components,
Circuits\ComponentHubTest.cs (1)
320var items = new Dictionary<object, object>();
Circuits\DefaultInMemoryCircuitPersistenceProviderTest.cs (1)
130var circuitIds = new Dictionary<string, CircuitId>
Circuits\RemoteRendererTest.cs (2)
555var parameters = new Dictionary<string, object> { ["Name"] = "value" }; 594var parameters = new Dictionary<string, object> { ["Name"] = "value" };
Circuits\ServerComponentDeserializerTest.cs (2)
446private ComponentMarker CreateMarker(Type type, Dictionary<string, object> parameters = null) 472private ComponentMarker[] CreateMarkers(params (Type, Dictionary<string, object>)[] types)
Microsoft.AspNetCore.Components.Tests (66)
CascadingParameterStateTest.cs (1)
429var supplierParams = new Dictionary<string, object>
DynamicComponentTest.cs (3)
16var parameters = new Dictionary<string, object> 70var childParameters = new Dictionary<string, object> 108var childParameters = new Dictionary<string, object>
IPersistentComponentStateSerializerTests.cs (2)
18var currentState = new Dictionary<string, byte[]>(); 48var existingState = new Dictionary<string, byte[]> { { "test-key", customBytes } };
NavigationManagerTest.cs (2)
191var unsupportedParameterValues = new Dictionary<string, object> 206var values = new Dictionary<string, object>
ParameterViewTest.Assignment.cs (2)
324var value = new Dictionary<string, object>(); 712[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> CaptureUnmatchedValuesProp1 { get; set; }
ParameterViewTest.cs (2)
242var dictionary = new Dictionary<string, object>(); 255var dictionary = new Dictionary<string, object>
PersistentState\ComponentApplicationStateTest.cs (10)
15var existingState = new Dictionary<string, byte[]> 33var existingState = new Dictionary<string, byte[]> 48var currentState = new Dictionary<string, byte[]>(); 63var existingState = new Dictionary<string, byte[]> 81var currentState = new Dictionary<string, byte[]>(); 100var currentState = new Dictionary<string, byte[]>(); 117var currentState = new Dictionary<string, byte[]>(); 136var currentState = new Dictionary<string, byte[]>(); 156var existingState = new Dictionary<string, byte[]>() { ["MyState"] = serialized }; 174var existingState = new Dictionary<string, byte[]>() { ["MyState"] = serialized };
PersistentState\ComponentStatePersistenceManagerTest.cs (13)
44var state = new Dictionary<string, byte[]> 66var state = new Dictionary<string, byte[]> 88var state = new Dictionary<string, byte[]>(); 138var state = new Dictionary<string, byte[]>(); 165var state = new Dictionary<string, byte[]>(); 187var state = new Dictionary<string, byte[]>(); 217var state = new Dictionary<string, byte[]>(); 253var state = new Dictionary<string, byte[]>(); 281var state = new Dictionary<string, byte[]>(); 309var state = new Dictionary<string, byte[]>(); 375private class TestStore(Dictionary<string, byte[]> initialState) : IPersistentComponentStateStore 392private class CompositeTestStore(Dictionary<string, byte[]> initialState) 395public Dictionary<string, byte[]> State { get; set; } = initialState;
PersistentStateValueProviderTests.cs (14)
99var state = new Dictionary<string, byte[]>(); 137var state = new Dictionary<string, byte[]>(); 175var state = new Dictionary<string, byte[]>(); 248var state = new Dictionary<string, byte[]>(); 294var state = new Dictionary<string, byte[]>(); 334var state = new Dictionary<string, byte[]>(); 367var state = new Dictionary<string, byte[]>(); 407var state = new Dictionary<string, byte[]>(); 439var state = new Dictionary<string, byte[]>(); 474var state = new Dictionary<string, byte[]>(); 509var state = new Dictionary<string, byte[]>(); 544var state = new Dictionary<string, byte[]>(); 577var dictionary = new Dictionary<string, byte[]>(); 672private class TestStore(Dictionary<string, byte[]> initialState) : IPersistentComponentStateStore
Rendering\RenderTreeBuilderTest.cs (2)
354var attributes = new Dictionary<string, object> 368var attributes = new Dictionary<string, object>
RouteViewTest.cs (4)
48var routeParams = new Dictionary<string, object> 99var routeParams = new Dictionary<string, object>(); 123var routeParams = new Dictionary<string, object>(); 146var routeParams = new Dictionary<string, object>();
Routing\RouterTest.cs (4)
186var parameters = new Dictionary<string, object> 206var parameters = new Dictionary<string, object> 232var parameters = new Dictionary<string, object> 253var parameters = new Dictionary<string, object>
Routing\RouteTableFactoryTests.cs (3)
335var expectedParameters = new Dictionary<string, object> 356var expectedParameters = new Dictionary<string, object> 1141var templatesByHandler = _routeTemplates
src\Components\Shared\test\IComponentExtensions.cs (1)
10Dictionary<string, object> parameters)
src\Components\Shared\test\TestServiceProvider.cs (3)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 14private Dictionary<(Type, object?), Func<object?>>? _keyedFactories; 16private Dictionary<(Type, object?), Func<object?>> KeyedFactories
Microsoft.AspNetCore.Components.Web (22)
Forms\InputBase.cs (4)
305if (ConvertToDictionary(AdditionalAttributes, out var additionalAttributes)) 326if (ConvertToDictionary(AdditionalAttributes, out var additionalAttributes)) 340private static bool ConvertToDictionary(IReadOnlyDictionary<string, object>? source, out Dictionary<string, object> result) 347else if (source is Dictionary<string, object> currentDictionary)
Forms\Mapping\FormMappingContext.cs (11)
13private Dictionary<string, FormMappingError>? _errors; 15private Dictionary<string, Dictionary<string, FormMappingError>>? _errorsByFormName; 43_errorsByFormName?.TryGetValue(formName, out var formErrors) == true && 55private static IEnumerable<FormMappingError> GetAllErrorsCore(Dictionary<string, FormMappingError>? errors) 72return _errorsByFormName?.TryGetValue(formName, out var formErrors) == true ? 92_errorsByFormName?.TryGetValue(formName, out var formErrors) == true && 101private static void AddErrorCore(Dictionary<string, FormMappingError> errors, string key, FormattableString error, string? attemptedValue, ref List<KeyValuePair<string, FormMappingError>>? pendingErrors) 118_errorsByFormName ??= new Dictionary<string, Dictionary<string, FormMappingError>>(); 119if (!_errorsByFormName.TryGetValue(formName, out var formErrors)) 150if (_errorsByFormName == null || !_errorsByFormName.TryGetValue(formName, out var formErrors))
JSComponents\JSComponentConfigurationStore.cs (4)
24private readonly Dictionary<string, Type> _jsComponentTypesByIdentifier = new(StringComparer.Ordinal); 25internal Dictionary<string, JSComponentParameter[]> JSComponentParametersByIdentifier { get; } = new(StringComparer.Ordinal); 26internal Dictionary<string, List<string>> JSComponentIdentifiersByInitializer { get; } = new(StringComparer.Ordinal); 30var parameterTypes = JSComponentInterop.GetComponentParameters(componentType).ParameterInfoByName;
JSComponents\JSComponentInterop.cs (1)
197public readonly Dictionary<string, ParameterInfo> ParameterInfoByName;
WebRenderer.cs (2)
188[JsonSerializable(typeof(Dictionary<string, JSComponentConfigurationStore.JSComponentParameter[]>))] 189[JsonSerializable(typeof(Dictionary<string, List<string>>))]
Microsoft.AspNetCore.Components.Web.Tests (7)
Forms\EditFormTest.cs (2)
197var editFormAttributes = editFormFrames.AsEnumerable() 238public Dictionary<string, object> AdditionalFormAttributes { get; set; }
Forms\TestInputHostComponent.cs (1)
12public Dictionary<string, object> AdditionalAttributes { get; set; }
src\Components\Shared\test\IComponentExtensions.cs (1)
10Dictionary<string, object> parameters)
src\Components\Shared\test\TestServiceProvider.cs (3)
12private readonly Dictionary<Type, Func<object?>> _factories = new(); 14private Dictionary<(Type, object?), Func<object?>>? _keyedFactories; 16private Dictionary<(Type, object?), Func<object?>> KeyedFactories
Microsoft.AspNetCore.Components.WebAssembly (4)
Prerendering\WebAssemblyComponentParameterDeserializer.cs (1)
26var parametersDictionary = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase);
src\Components\Shared\src\WebRootComponentManager.cs (1)
33private readonly Dictionary<int, WebRootComponent> _webRootComponents = new();
src\Shared\Components\PrerenderComponentApplicationStore.cs (2)
44public Dictionary<string, byte[]> ExistingState { get; protected set; } 76[JsonSerializable(typeof(Dictionary<string, byte[]>), GenerationMode = JsonSourceGenerationMode.Serialization)]
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
ContentEncodingNegotiator.cs (1)
18private static readonly Dictionary<StringSegment, string> _encodingExtensionMap = new Dictionary<StringSegment, string>(StringSegmentComparer.OrdinalIgnoreCase)
Microsoft.AspNetCore.Components.WebAssembly.Tests (14)
Hosting\WebAssemblyHostConfigurationTest.cs (14)
15var initialData = new Dictionary<string, string>() { 41var initialData = new Dictionary<string, string>() { { "color", "blue" } }; 65var initialData = new Dictionary<string, string>() { { "color", "blue" } }; 83var initialData = new Dictionary<string, string>() { 96var section = configuration.GetSection("wheels").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value); 110var initialData = new Dictionary<string, string>() { { "color", "blue" } }; 127var dic1 = new Dictionary<string, string>() 134var dic2 = new Dictionary<string, string>() 141var dic3 = new Dictionary<string, string>() 161var dict = configuration.GetSection("Mem1").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value); 167var dict2 = configuration.GetSection("Mem2").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value); 173var dict3 = configuration.GetSection("Mem3").AsEnumerable(makePathsRelative: true).ToDictionary(k => k.Key, v => v.Value); 186var dic1 = new Dictionary<string, string>() 190var dic2 = new Dictionary<string, string>()
Microsoft.AspNetCore.Components.WebView (7)
src\Components\Shared\src\RenderBatchWriter.cs (1)
37private readonly Dictionary<string, int> _deduplicatedStringIndices;
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (5)
342public Dictionary<string, StaticWebAssetNode>? Children { get; set; } 372private sealed class OSBasedCaseConverter : JsonConverter<Dictionary<string, StaticWebAssetNode>> 374public override Dictionary<string, StaticWebAssetNode> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 380var result = new Dictionary<string, StaticWebAssetNode>(StaticWebAssetManifest.PathComparer); 433public override void Write(Utf8JsonWriter writer, Dictionary<string, StaticWebAssetNode> value, JsonSerializerOptions options)
WebViewManager.cs (1)
29private readonly Dictionary<string, RootComponent> _rootComponentsBySelector = new();
Microsoft.AspNetCore.Components.WebView.Maui (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
39 private static readonly Dictionary<(string AssemblyName, string RelativePath), (string? ContentType, byte[] Content)> _updatedContent = new()
Microsoft.AspNetCore.Components.WebView.Test (4)
Infrastructure\ElementNode.cs (3)
8private readonly Dictionary<string, object> _attributes; 9private readonly Dictionary<string, object> _properties; 10private readonly Dictionary<string, ElementEventDescriptor> _events;
Infrastructure\TestDocument.cs (1)
14private readonly Dictionary<long, ComponentNode> _componentsById = new();
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
39 private static readonly Dictionary<(string AssemblyName, string RelativePath), (string? ContentType, byte[] Content)> _updatedContent = new()
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
39 private static readonly Dictionary<(string AssemblyName, string RelativePath), (string? ContentType, byte[] Content)> _updatedContent = new()
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
20private readonly Dictionary<string, Channel<double>> _counters = new Dictionary<string, Channel<double>>();
Microsoft.AspNetCore.DataProtection (5)
KeyManagement\KeyRing.cs (1)
18private readonly Dictionary<Guid, KeyHolder> _keyIdToKeyHolderMap;
KeyManagement\XmlKeyManager.cs (1)
184Dictionary<Guid, Key> keyIdToKeyMap = [];
XmlEncryption\XmlEncryptionExtensions.cs (2)
35var placeholderReplacements = new Dictionary<XElement, XElement>(); 117var placeholderReplacements = new Dictionary<XElement, EncryptedXmlInfo>();
XmlEncryption\XmlKeyDecryptionOptions.cs (1)
16private readonly Dictionary<string, List<X509Certificate2>> _certs = new Dictionary<string, List<X509Certificate2>>(StringComparer.Ordinal);
Microsoft.AspNetCore.DataProtection.Tests (15)
Internal\KeyManagementOptionsSetupTest.cs (2)
47var registryEntries = new Dictionary<string, object>() 77private static void RunTest(Dictionary<string, object> regValues, KeyManagementOptions options)
KeyManagement\XmlKeyManagerTests.cs (2)
963var keyDictWithRevocations = keyManager.GetAllKeys().ToDictionary(k => k.KeyId); 974var keyDictWithDeletions = keyManager.GetAllKeys().ToDictionary(k => k.KeyId);
RegistryPolicyResolverTests.cs (11)
21var registryEntries = new Dictionary<string, object>(); 37var registryEntries = new Dictionary<string, object>() 58var registryEntries = new Dictionary<string, object>() 75var registryEntries = new Dictionary<string, object>() 92var registryEntries = new Dictionary<string, object>() 116var registryEntries = new Dictionary<string, object>() 152var registryEntries = new Dictionary<string, object>() 174var registryEntries = new Dictionary<string, object>() 204var registryEntries = new Dictionary<string, object>() 226var registryEntries = new Dictionary<string, object>() 251private static RegistryPolicy RunTestWithRegValues(Dictionary<string, object> regValues)
Microsoft.AspNetCore.Diagnostics (1)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Logging\IncomingHttpRouteUtility.cs (1)
36var parametersToRedact = new Dictionary<string, DataClassification>();
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (14)
Buffering\PerRequestLogBufferingOptionsConfigureOptionsTests.cs (3)
48var configValues = new Dictionary<string, string?> 71var configValues = new Dictionary<string, string?> 101var configValues = new Dictionary<string, string?>
Logging\AcceptanceTests.Routing.cs (1)
57Action<Dictionary<string, string?>> validateRequestState)
Logging\HeaderReaderTests.cs (2)
42var headersToLog = new Dictionary<string, DataClassification> 50var headers = new Dictionary<string, StringValues>
Logging\IncomingHttpRouteUtilityTests.cs (7)
177var d = new Dictionary<string, DataClassification> 220var d = new Dictionary<string, DataClassification> 306var d = new Dictionary<string, DataClassification> 354var d = new Dictionary<string, DataClassification> 399var d = new Dictionary<string, DataClassification>(); 438var d = new Dictionary<string, DataClassification> 460var d = new Dictionary<string, DataClassification>
Logging\TestLogEnrichmentTagCollector.cs (1)
11private readonly Dictionary<string, object> _tags = [];
Microsoft.AspNetCore.Grpc.JsonTranscoding (24)
Internal\Binding\JsonTranscodingProviderServiceBinder.cs (1)
242var routeParameterDescriptors = ServiceDescriptorHelpers.ResolveRouteParameterDescriptors(routeAdapter.HttpRoutePattern.Variables, methodDescriptor.InputType);
Internal\CallHandlers\CallHandlerDescriptorInfo.cs (2)
18Dictionary<string, RouteParameter> routeParameterDescriptors, 35public Dictionary<string, RouteParameter> RouteParameterDescriptors { get; }
Internal\Json\JsonConverterHelper.cs (2)
23internal static readonly Dictionary<string, Type> WellKnownTypeNames = new Dictionary<string, Type> 138var repeatedFieldType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType);
Internal\Json\MessageTypeInfoResolver.cs (3)
41var mappings = CreateJsonFieldMap(fields); 160private static Dictionary<string, FieldDescriptor> CreateJsonFieldMap(IList<FieldDescriptor> fields) 162var map = new Dictionary<string, FieldDescriptor>();
Internal\JsonRequestHelpers.cs (1)
224type = typeof(Dictionary<,>).MakeGenericType(args[0], args[1]);
src\Grpc\JsonTranscoding\src\Shared\AuthContextHelpers.cs (2)
32var properties = new Dictionary<string, List<AuthProperty>>(StringComparer.Ordinal); 59static void AddProperty(Dictionary<string, List<AuthProperty>> properties, string name, string value)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (4)
374private static readonly ConcurrentDictionary<Type, Dictionary<object, string>> _dictionaries 375= new ConcurrentDictionary<Type, Dictionary<object, string>>(); 380Dictionary<object, string>? nameMapping; 395private static Dictionary<object, string> GetNameMapping(Type enumType)
src\Grpc\JsonTranscoding\src\Shared\Server\MethodOptions.cs (3)
77Dictionary<string, ICompressionProvider> compressionProviders, 116var resolvedCompressionProviders = new Dictionary<string, ICompressionProvider>(StringComparer.Ordinal); 155private static void AddCompressionProviders(Dictionary<string, ICompressionProvider> resolvedProviders, IList<ICompressionProvider>? compressionProviders)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (6)
387public static Dictionary<string, RouteParameter> ResolveRouteParameterDescriptors( 391var routeParameterDescriptors = new Dictionary<string, RouteParameter>(StringComparer.Ordinal); 474public static Dictionary<string, FieldDescriptor> ResolveQueryParameterDescriptors( 475Dictionary<string, RouteParameter> routeParameters, 504var queryParameters = new Dictionary<string, FieldDescriptor>(); 508static void RecursiveVisitMessages(Dictionary<string, FieldDescriptor> queryParameters, List<FieldDescriptor> existingParameters, MessageDescriptor messageDescriptor, List<FieldDescriptor> path)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (9)
Infrastructure\TestHelpers.cs (1)
86Dictionary<string, RouteParameter>? routeParameterDescriptors = null,
ServerStreamingServerCallHandlerTests.cs (5)
51var routeParameterDescriptors = new Dictionary<string, RouteParameter> 98var routeParameterDescriptors = new Dictionary<string, RouteParameter> 140var routeParameterDescriptors = new Dictionary<string, RouteParameter> 180var routeParameterDescriptors = new Dictionary<string, RouteParameter> 229var routeParameterDescriptors = new Dictionary<string, RouteParameter>
UnaryServerCallHandlerTests.cs (3)
55var routeParameterDescriptors = new Dictionary<string, RouteParameter> 99var routeParameterDescriptors = new Dictionary<string, RouteParameter> 133var routeParameterDescriptors = new Dictionary<string, RouteParameter>
Microsoft.AspNetCore.Grpc.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.Grpc.Swagger (13)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (3)
100var routeParameters = ServiceDescriptorHelpers.ResolveRouteParameterDescriptors(httpRoutePattern.Variables, methodDescriptor.InputType); 146var queryParameters = ServiceDescriptorHelpers.ResolveQueryParameterDescriptors(routeParameters, methodDescriptor, bodyDescriptor?.Descriptor, bodyDescriptor?.FieldDescriptor); 169private static string ResolvePath(HttpRoutePattern httpRoutePattern, Dictionary<string, RouteParameter> routeParameters)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (4)
374private static readonly ConcurrentDictionary<Type, Dictionary<object, string>> _dictionaries 375= new ConcurrentDictionary<Type, Dictionary<object, string>>(); 380Dictionary<object, string>? nameMapping; 395private static Dictionary<object, string> GetNameMapping(Type enumType)
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (6)
387public static Dictionary<string, RouteParameter> ResolveRouteParameterDescriptors( 391var routeParameterDescriptors = new Dictionary<string, RouteParameter>(StringComparer.Ordinal); 474public static Dictionary<string, FieldDescriptor> ResolveQueryParameterDescriptors( 475Dictionary<string, RouteParameter> routeParameters, 504var queryParameters = new Dictionary<string, FieldDescriptor>(); 508static void RecursiveVisitMessages(Dictionary<string, FieldDescriptor> queryParameters, List<FieldDescriptor> existingParameters, MessageDescriptor messageDescriptor, List<FieldDescriptor> path)
Microsoft.AspNetCore.HeaderParsing.Tests (2)
HeaderParsingOptionsTests.cs (2)
15var defValue = new Dictionary<string, StringValues>(); 16var maxCachedValues = new Dictionary<string, int>();
Microsoft.AspNetCore.Hosting (6)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (5)
342public Dictionary<string, StaticWebAssetNode>? Children { get; set; } 372private sealed class OSBasedCaseConverter : JsonConverter<Dictionary<string, StaticWebAssetNode>> 374public override Dictionary<string, StaticWebAssetNode> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 380var result = new Dictionary<string, StaticWebAssetNode>(StaticWebAssetManifest.PathComparer); 433public override void Write(Utf8JsonWriter writer, Dictionary<string, StaticWebAssetNode> value, JsonSerializerOptions options)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Hosting.Tests (23)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
20private readonly Dictionary<string, Channel<double>> _counters = new Dictionary<string, Channel<double>>();
WebHostBuilderTests.cs (10)
294var data = new Dictionary<string, string> 507var settings = new Dictionary<string, string> 533var settings = new Dictionary<string, string> 559var settings = new Dictionary<string, string> 568var overrideSettings = new Dictionary<string, string> 594var vals = new Dictionary<string, string> 623var vals = new Dictionary<string, string> 644var vals = new Dictionary<string, string> 1477var vals = new Dictionary<string, string> 1499var vals = new Dictionary<string, string>
WebHostConfigurationsTests.cs (3)
14var parameters = new Dictionary<string, string>() 39var parameters = new Dictionary<string, string>() { { "ENVIRONMENT", Environments.Development } }; 50var parameters = new Dictionary<string, string>() { { "detailedErrors", value } };
WebHostTests.cs (9)
52var data = new Dictionary<string, string> 71var data = new Dictionary<string, string> 90var data = new Dictionary<string, string> 122var data = new Dictionary<string, string> 196var data = new Dictionary<string, string> 235var data = new Dictionary<string, string> 271var data = new Dictionary<string, string> 813var vals = new Dictionary<string, string> 836var vals = new Dictionary<string, string>
Microsoft.AspNetCore.Http (24)
FormCollection.cs (4)
42public FormCollection(Dictionary<string, StringValues>? fields, IFormFileCollection? files = null) 58private Dictionary<string, StringValues>? Store { get; set; } 178private Dictionary<string, StringValues>.Enumerator _dictionaryEnumerator; 181internal Enumerator(Dictionary<string, StringValues>.Enumerator dictionaryEnumerator)
HeaderDictionary.cs (4)
37public HeaderDictionary(Dictionary<string, StringValues>? store) 51private Dictionary<string, StringValues>? Store { get; set; } 399private Dictionary<string, StringValues>.Enumerator _dictionaryEnumerator; 402internal Enumerator(Dictionary<string, StringValues>.Enumerator dictionaryEnumerator)
Internal\RequestCookieCollection.cs (1)
39public RequestCookieCollection(Dictionary<string, string> store)
QueryCollection.cs (4)
27private Dictionary<string, StringValues>? Store { get; } 40public QueryCollection(Dictionary<string, StringValues> store) 194private Dictionary<string, StringValues>.Enumerator _dictionaryEnumerator; 197internal Enumerator(Dictionary<string, StringValues>.Enumerator dictionaryEnumerator)
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (8)
14private readonly Dictionary<TKey, TValue> _source; 15private Dictionary<TKey, TValue>? _copy; 17public CopyOnWriteDictionaryHolder(Dictionary<TKey, TValue> source) 33public Dictionary<TKey, TValue> ReadDictionary 54public Dictionary<TKey, TValue> WriteDictionary 72public Dictionary<TKey, TValue>.KeyCollection Keys 80public Dictionary<TKey, TValue>.ValueCollection Values 161public Dictionary<TKey, TValue>.Enumerator GetEnumerator()
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (3)
27internal Dictionary<TKey, TValue>? _dictionaryStorage; 91internal AdaptiveCapacityDictionary(Dictionary<TKey, TValue> dict) 604private Dictionary<TKey, TValue>.Enumerator? _dictionaryEnumerator;
Microsoft.AspNetCore.Http.Abstractions (2)
ProblemDetails\HttpValidationProblemDetails.cs (1)
40private HttpValidationProblemDetails(Dictionary<string, string[]> errors)
Routing\RouteValueDictionary.cs (1)
900var names = new Dictionary<string, PropertyHelper>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (2)
GetHeaderSplitBenchmark.cs (1)
16var dict = new Dictionary<string, StringValues>()
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
UseMiddlewareTest.cs (2)
318private readonly Dictionary<Type, object> _services = new Dictionary<Type, object>(); 339private readonly Dictionary<object, Tuple<Type, object>> _services = new Dictionary<object, Tuple<Type, object>>();
UsePathBaseExtensionsTests.cs (1)
245private readonly Dictionary<Type, object> _services = new Dictionary<Type, object>();
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
726var requestHeaders = new Dictionary<string, StringValues>(existingRequestFeature.Headers.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Http.Connections.Tests (18)
HttpConnectionDispatcherTests.cs (18)
228var values = new Dictionary<string, StringValues>(); 308var values = new Dictionary<string, StringValues>(); 350var values = new Dictionary<string, StringValues>(); 388var values = new Dictionary<string, StringValues>(); 427var values = new Dictionary<string, StringValues>(); 467var values = new Dictionary<string, StringValues>(); 530var values = new Dictionary<string, StringValues>(); 598var values = new Dictionary<string, StringValues>(); 661var values = new Dictionary<string, StringValues>(); 765var values = new Dictionary<string, StringValues>(); 907var values = new Dictionary<string, StringValues>(); 1842var values = new Dictionary<string, StringValues>(); 1894var values = new Dictionary<string, StringValues>(); 2570var values = new Dictionary<string, StringValues>(); 2630var values = new Dictionary<string, StringValues>(); 2687var values = new Dictionary<string, StringValues>(); 3703var values = new Dictionary<string, StringValues>(); 3740var values = new Dictionary<string, StringValues>();
Microsoft.AspNetCore.Http.Extensions (23)
RequestDelegateFactory.cs (1)
2230var dictionary = new Dictionary<FormKey, StringValues>();
RequestDelegateFactoryContext.cs (1)
43public Dictionary<string, string> TrackedParameters { get; } = new();
src\Components\Endpoints\src\FormMapping\Converters\DictionaryAdapters\ReadOnlyDictionaryBufferAdapter.cs (8)
9: IDictionaryBufferAdapter<ReadOnlyDictionary<TKey, TValue>, Dictionary<TKey, TValue>, TKey, TValue> 12public static Dictionary<TKey, TValue> Add(ref Dictionary<TKey, TValue> buffer, TKey key, TValue value) 18public static Dictionary<TKey, TValue> CreateBuffer() => 21public static ReadOnlyDictionary<TKey, TValue> ToResult(Dictionary<TKey, TValue> buffer) => 31Dictionary<TKey, TValue>, 34Dictionary<TKey, TValue>, 43Dictionary<TKey, TValue>,
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (7)
55var _ when type == (typeof(Dictionary<TKey, TValue>)) => true, 96Dictionary<TKey, TValue>, 97DictionaryBufferAdapter<Dictionary<TKey, TValue>, TKey, TValue>, 98Dictionary<TKey, TValue>, 101Dictionary<TKey, TValue>, TKey, TValue>(valueTypeConverter), 138var _ when type == (typeof(Dictionary<TKey, TValue>)) => 139ConcreteTypeDictionaryConverterFactory<Dictionary<TKey, TValue>, TKey, TValue>.Instance.CreateConverter(type, options),
src\Components\Endpoints\src\FormMapping\FormDataReader.cs (1)
127var result = new Dictionary<FormKey, HashSet<FormKey>>();
src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (1)
315public Dictionary<Type, FormDataTypeMetadata> TypeMetadata { get; set; } = new();
src\Components\Endpoints\src\FormMapping\WellKnownConverters.cs (1)
19var converters = new Dictionary<Type, FormDataConverter>
src\Shared\ParameterBindingMethodCache.cs (1)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length);
src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (1)
11public static readonly Dictionary<int, (string Type, string Title)> Defaults = new()
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Http.Extensions.Tests (15)
HttpRequestJsonExtensionsTests.cs (5)
127var result = await context.Request.ReadFromJsonAsync<Dictionary<string, string>>(); 191var result = (Dictionary<string, string>?)await context.Request.ReadFromJsonAsync(typeof(Dictionary<string, string>));
ProblemDetailsDefaultWriterTest.cs (4)
87var result = await JsonSerializer.DeserializeAsync<Dictionary<string, object>>(stream, JsonSerializerOptions.Default); 119var result = await JsonSerializer.DeserializeAsync<Dictionary<string, object>>(stream, JsonSerializerOptions.Default);
RequestDelegateFactoryTests.FormMapping.cs (3)
21static void TestAction([FromForm] Dictionary<string, string> args) { } 68static void TestAction([FromForm(Name = "shouldSetKeyCorrectly")] Dictionary<string, string> args) { } 115static void TestAction([FromForm] Dictionary<string, string> args) { }
RequestDelegateGenerator\CompileTimeCreationTests.AsParameters.cs (1)
65new object[] { "Dictionary<string, string>", DiagnosticDescriptors.InvalidAsParametersEnumerableType.Id, GetEnumerableTypeError(typeof(Dictionary<string, string>)) }
RequestDelegateGenerator\RuntimeCreationTests.ComplexFormBinding.cs (2)
106await VerifyResponseJsonBodyAsync<Dictionary<string, bool>>(httpContext, (elements) => 143await VerifyResponseJsonBodyAsync<Dictionary<string, bool>>(httpContext, (elements) =>
Microsoft.AspNetCore.Http.Microbenchmarks (7)
AdaptiveCapacityDictionaryBenchmark.cs (3)
14private Dictionary<string, string> _dict; 15private Dictionary<string, string> _dictTen; 16private Dictionary<string, string> _filledDictTen;
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
ValidatableTypesBenchmark.cs (3)
194public Dictionary<string, string> Properties { get; set; } 267private readonly Dictionary<Type, ValidatableTypeInfo> _typeInfoCache = []; 299CreatePropertyInfo(typeof(ComplexModel), "Properties", typeof(Dictionary<string, string>)),
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
18Dictionary<TSource, ImmutableArray<TElement>.Builder> map = new(comparer);
StaticRouteHandlerModel\EndpointParameter.cs (1)
486var lookupTable = new Dictionary<ParameterLookupKey, IPropertySymbol>();
Microsoft.AspNetCore.Http.Results (1)
src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (1)
11public static readonly Dictionary<int, (string Type, string Title)> Defaults = new()
Microsoft.AspNetCore.Http.Results.Tests (6)
ResultsTests.cs (3)
1256var extensions = new Dictionary<string, object> { { "test", "value" } }; 1399var errors = new Dictionary<string, string[]>() { { "testField", new[] { "test error" } } }; 1405var extensions = new Dictionary<string, object>() { { "testExtension", "test value" } };
TypedResultsTests.cs (3)
1072var extensions = new Dictionary<string, object> { { "test", "value" } }; 1191var errors = new Dictionary<string, string[]>() { { "testField", new[] { "test error" } } }; 1196var extensions = new Dictionary<string, object>() { { "testExtension", "test value" } };
Microsoft.AspNetCore.Http.Tests (2)
DefaultHttpContextTests.cs (2)
140var items = new Dictionary<object, object>(); 449private readonly Dictionary<string, byte[]> _store
Microsoft.AspNetCore.Identity (1)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
434var errorDictionary = new Dictionary<string, string[]>(1);
Microsoft.AspNetCore.Identity.FunctionalTests (3)
Infrastructure\ServerFactory.cs (2)
90var _assemblyMap = 103var relatedParts = relatedAssemblies.ToDictionary(
MapIdentityApiTests.cs (1)
1347private static Dictionary<string, Action<IServiceCollection>> AddIdentityActions { get; } = new()
Microsoft.AspNetCore.Identity.InMemory.Test (3)
InMemoryStore.cs (1)
70private readonly Dictionary<string, TRole> _roles = new Dictionary<string, TRole>();
InMemoryUserStore.cs (2)
24private readonly Dictionary<string, TUser> _logins = new Dictionary<string, TUser>(); 26private readonly Dictionary<string, TUser> _users = new Dictionary<string, TUser>();
Microsoft.AspNetCore.Identity.Test (1)
SignInManagerTest.cs (1)
1562private static readonly Dictionary<string, AuthenticationScheme> _defaultCookieSchemes = new()
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\Manage\DownloadPersonalData.cshtml.cs (1)
61var personalData = new Dictionary<string, string?>();
Areas\Identity\Pages\V5\Account\Manage\DownloadPersonalData.cshtml.cs (1)
61var personalData = new Dictionary<string, string?>();
Microsoft.AspNetCore.InternalTesting (4)
AssemblyTestLog.cs (1)
30private static readonly Dictionary<Assembly, AssemblyTestLog> _logs = new();
Tracing\CollectingEventListener.cs (1)
17private readonly Dictionary<string, EventSource> _existingSources = new Dictionary<string, EventSource>(StringComparer.OrdinalIgnoreCase);
xunit\AspNetTestAssemblyRunner.cs (1)
18private readonly Dictionary<Type, object> _assemblyFixtureMappings = new();
xunit\AspNetTestCollectionRunner.cs (1)
19Dictionary<Type, object> assemblyFixtureMappings,
Microsoft.AspNetCore.JsonPatch.SystemTextJson (1)
Adapters\AdapterFactory.cs (1)
26if (typeToConvert.IsGenericType && typeToConvert.GetGenericTypeDefinition() == typeof(Dictionary<,>))
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (19)
CustomNamingStrategyTests.cs (1)
21var targetObject = new Dictionary<string, int>()
Internal\DictionaryAdapterTest.cs (15)
19var dictionary = new Dictionary<string, int>(StringComparer.Ordinal); 39var dictionary = new Dictionary<int, object>(); 61var dictionary = new Dictionary<int, object>(); 89var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 116var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 141var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 161var dictionary = new Dictionary<Guid, object>(); 181var dictionary = new Dictionary<Guid, int>(); 200var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 218var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 236var dictionary = new Dictionary<string, Rectangle>(StringComparer.Ordinal); 260var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 279var dictionary = new Dictionary<Uri, object>(); 298var dictionary = new Dictionary<string, List<object>>(); 322var dictionary = new Dictionary<string, object>();
JsonPatchDocumentGetPathTest.cs (1)
42var patchDocument = new JsonPatchDocument<Dictionary<string, int>>();
TestObjectModels\DynamicTestObject.cs (1)
11private Dictionary<string, object> _dictionary = new Dictionary<string, object>();
WriteOnceDynamicTestObject.cs (1)
25private Dictionary<string, object> _dictionary = new Dictionary<string, object>();
Microsoft.AspNetCore.JsonPatch.Tests (19)
CustomNamingStrategyTests.cs (1)
97var targetObject = new Dictionary<string, int>()
Internal\DictionaryAdapterTest.cs (15)
22var dictionary = new Dictionary<string, int>(StringComparer.Ordinal); 42var dictionary = new Dictionary<int, object>(); 64var dictionary = new Dictionary<int, object>(); 92var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 119var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 144var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 164var dictionary = new Dictionary<Guid, object>(); 184var dictionary = new Dictionary<Guid, int>(); 203var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 221var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 239var dictionary = new Dictionary<string, Rectangle>(StringComparer.Ordinal); 262var dictionary = new Dictionary<string, object>(StringComparer.Ordinal); 281var dictionary = new Dictionary<Uri, object>(); 300var dictionary = new Dictionary<string, List<object>>(); 324var dictionary = new Dictionary<string, object>();
JsonPatchDocumentGetPathTest.cs (1)
42var patchDocument = new JsonPatchDocument<Dictionary<string, int>>();
TestObjectModels\DynamicTestObject.cs (1)
11private Dictionary<string, object> _dictionary = new Dictionary<string, object>();
WriteOnceDynamicTestObject.cs (1)
25private Dictionary<string, object> _dictionary = new Dictionary<string, object>();
Microsoft.AspNetCore.Mvc.Abstractions (5)
ModelBinding\ModelMetadata.cs (2)
667var parameterMapping = new Dictionary<ModelMetadata, ModelMetadata>(); 668var propertyMapping = new Dictionary<ModelMetadata, ModelMetadata>();
ModelBinding\Validation\ValidationStateDictionary.cs (1)
20private readonly Dictionary<object, ValidationStateEntry> _inner;
src\Shared\ParameterBindingMethodCache.cs (1)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
ModelBinding\ModelMetadataTest.cs (2)
89typeof(Dictionary<object, object>), 228[InlineData(typeof(Dictionary<object, object>), typeof(KeyValuePair<object, object>))]
Microsoft.AspNetCore.Mvc.Api.Analyzers (6)
AddResponseTypeAttributeCodeFixAction.cs (6)
136var statusCodeConstants = GetStatusCodeConstants(statusCodesType); 147private static Dictionary<int, string> GetStatusCodeConstants(INamedTypeSymbol statusCodesType) 149var statusCodeConstants = new Dictionary<int, string>(); 179var statusCodes = new Dictionary<int, (int, ITypeSymbol?)>(); 259Dictionary<int, string> statusCodeConstants, 272public Dictionary<int, string> StatusCodeConstants { get; }
Microsoft.AspNetCore.Mvc.ApiExplorer (9)
ApiResponseTypeProvider.cs (6)
84var responseTypes = ReadResponseMetadata( 93var responseTypesFromProvider = ReadResponseMetadata( 135internal static Dictionary<int, ApiResponseType> ReadResponseMetadata( 145var results = new Dictionary<int, ApiResponseType>(); 224internal static Dictionary<int, ApiResponseType> ReadResponseMetadata( 230var results = new Dictionary<int, ApiResponseType>();
DefaultApiDescriptionProvider.cs (1)
240var routeParameters = new Dictionary<string, ApiParameterRouteInfo>(StringComparer.OrdinalIgnoreCase);
EndpointMetadataApiDescriptionProvider.cs (2)
343var responseProviderMetadataTypes = ApiResponseTypeProvider.ReadResponseMetadata( 345var producesResponseMetadataTypes = ApiResponseTypeProvider.ReadResponseMetadata(producesResponseMetadata, responseType);
Microsoft.AspNetCore.Mvc.Core (42)
ApplicationModels\ApplicationModelFactory.cs (7)
60var actionsByMethod = new Dictionary<MethodInfo, List<(ActionModel, SelectorModel)>>(); 61var actionsByRouteName = new Dictionary<string, List<(ActionModel, SelectorModel)>>(StringComparer.OrdinalIgnoreCase); 86var attributeRoutingConfigurationErrors = new Dictionary<MethodInfo, string>(); 131var routeValues = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase) 174Dictionary<MethodInfo, List<(ActionModel, SelectorModel)>> actionsByMethod, 188Dictionary<string, List<(ActionModel action, SelectorModel selector)>> actionsByRouteName, 219Dictionary<string, List<(ActionModel action, SelectorModel selector)>> actionsByRouteName)
Builder\ControllerActionEndpointConventionBuilder.cs (1)
26internal Dictionary<string, object> Items { get; set; } = [];
Controllers\ControllerBinderDelegate.cs (1)
9Dictionary<string, object?> arguments);
Controllers\ControllerBinderDelegateProvider.cs (1)
52async Task Bind(ControllerContext controllerContext, object controller, Dictionary<string, object?> arguments)
Formatters\FormatterMappings.cs (1)
15private readonly Dictionary<string, string> _map =
Formatters\TextOutputFormatter.cs (1)
41var cache = new Dictionary<string, string>();
Infrastructure\ActionSelectionTable.cs (6)
42Dictionary<string[], List<TItem>> ordinalEntries, 43Dictionary<string[], List<TItem>> ordinalIgnoreCaseEntries) 55private Dictionary<string[], List<TItem>> OrdinalEntries { get; } 57private Dictionary<string[], List<TItem>> OrdinalIgnoreCaseEntries { get; } 107var ordinalEntries = new Dictionary<string[], List<T>>(StringArrayComparer.Ordinal); 108var ordinalIgnoreCaseEntries = new Dictionary<string[], List<T>>(StringArrayComparer.OrdinalIgnoreCase);
Infrastructure\ControllerActionInvoker.cs (2)
25private Dictionary<string, object?>? _arguments; 412var arguments = invoker._arguments;
ModelBinding\Binders\ComplexObjectModelBinderProvider.cs (1)
28var propertyBinders = new Dictionary<ModelMetadata, IModelBinder>();
ModelBinding\Binders\ComplexTypeModelBinderProvider.cs (1)
24var propertyBinders = new Dictionary<ModelMetadata, IModelBinder>();
ModelBinding\Binders\DictionaryModelBinder.cs (4)
161var keyMappings = new Dictionary<string, TKey>(StringComparer.Ordinal); 230if (targetType.IsAssignableFrom(typeof(Dictionary<TKey, TValue?>))) 242if (targetType.IsAssignableFrom(typeof(Dictionary<TKey, TValue>))) 254if (targetType.IsAssignableFrom(typeof(Dictionary<TKey, TValue>)))
ModelBinding\JQueryKeyValuePairNormalizer.cs (1)
20var dictionary = new Dictionary<string, StringValues>(
ModelBinding\ModelBinderFactory.cs (2)
125var visited = providerContext.Visited; 246public Dictionary<Key, IModelBinder?> Visited { get; }
ModelBinding\PrefixContainer.cs (1)
77var result = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Routing\AttributeRoute.cs (2)
145var templateCache = new Dictionary<string, RouteTemplate>(StringComparer.OrdinalIgnoreCase); 179Dictionary<string, RouteTemplate> templateCache,
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (8)
14private readonly Dictionary<TKey, TValue> _source; 15private Dictionary<TKey, TValue>? _copy; 17public CopyOnWriteDictionaryHolder(Dictionary<TKey, TValue> source) 33public Dictionary<TKey, TValue> ReadDictionary 54public Dictionary<TKey, TValue> WriteDictionary 72public Dictionary<TKey, TValue>.KeyCollection Keys 80public Dictionary<TKey, TValue>.ValueCollection Values 161public Dictionary<TKey, TValue>.Enumerator GetEnumerator()
src\Shared\ProblemDetails\ProblemDetailsDefaults.cs (1)
11public static readonly Dictionary<int, (string Type, string Title)> Defaults = new()
ValidationProblemDetails.cs (1)
37var errorDictionary = new Dictionary<string, string[]>(StringComparer.Ordinal);
Microsoft.AspNetCore.Mvc.Core.Test (138)
ApplicationModels\AttributeRouteModelTests.cs (3)
148public void ReplaceTokens_ValidValues(string template, Dictionary<string, string> values, string expected) 160public void ReplaceTokens_InvalidFormat(string template, Dictionary<string, string> values, string reason) 183var values = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
ApplicationParts\RelatedAssemblyPartTest.cs (1)
106public Dictionary<string, Assembly> Assemblies { get; } = new Dictionary<string, Assembly>();
Authorization\AuthorizeFilterTest.cs (1)
621var contextItems = new Dictionary<object, object>();
ControllerBaseTest.cs (7)
1406var expected = new Dictionary<string, object> 1446var expected = new Dictionary<string, object> 1467var expected = new Dictionary<string, object> 1600var expected = new Dictionary<string, object> 1625var expected = new Dictionary<string, object> 1646var expected = new Dictionary<string, object> 2594var expected2 = new Dictionary<string, object>
Controllers\ControllerBinderDelegateProviderTest.cs (24)
43var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 97var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 165var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 207var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 257var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 293var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 342var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 401var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 436var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 484var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 532var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 579var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 629var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 668var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 708var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 749var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 811var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 874var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 962var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 990var boundPropertyTypes = new Dictionary<string, Type> 998var inputPropertyValues = new Dictionary<string, object> 1021var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 1176var arguments = new Dictionary<string, object>(StringComparer.Ordinal); 1228var arguments = new Dictionary<string, object>(StringComparer.Ordinal);
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (2)
221var multiRegistrationServiceTypes = MultiRegistrationServiceTypes; 228private Dictionary<Type, Type[]> MultiRegistrationServiceTypes
Infrastructure\ControllerActionInvokerTest.cs (17)
858var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 883var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 909var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 932var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 955var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 1134var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 1162var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 1192var actionParameters = new Dictionary<string, object> { { "i", inputParam1 }, { "s", inputParam2 } }; 1215var actionParameters = new Dictionary<string, object> { ["value"] = 3 }; 1241var actionParameters = new Dictionary<string, object> { ["value"] = 3 }; 1271var actionParameters = new Dictionary<string, object> { { "s", inputParam2 }, { "i", inputParam1 } }; 1301var actionParameters = new Dictionary<string, object> { { "value", inputParam } }; 1330var actionParameters = new Dictionary<string, object> { { "i", "Some Invalid Value" }, { "s", inputParam2 } }; 1453var actionParameters = new Dictionary<string, object> { { "input", inputParam }, }; 1478var actionParameters = new Dictionary<string, object> { { "input", inputParam }, }; 1502var actionParameters = new Dictionary<string, object>(); 1526var actionParameters = new Dictionary<string, object>();
Infrastructure\ValidationProblemDetailsJsonConverterTest.cs (1)
163var errors = new Dictionary<string, string[]>()
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (2)
298var binders = new Dictionary<ModelMetadata, IModelBinder>(); 441var binders = bindingContext.ModelMetadata.Properties.ToDictionary(
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (5)
358var binders = new Dictionary<ModelMetadata, IModelBinder>(); 597var binders = bindingContext.ModelMetadata.Properties.ToDictionary( 619var binders = bindingContext.ModelMetadata.Properties.ToDictionary( 1586var propertyBinders = new Dictionary<ModelMetadata, IModelBinder>(); 1624public Dictionary<ModelMetadata, ModelBindingResult> Results { get; } = new Dictionary<ModelMetadata, ModelBindingResult>();
ModelBinding\Binders\DictionaryModelBinderProviderTest.cs (1)
31[InlineData(typeof(Dictionary<string, int>))]
ModelBinding\Binders\DictionaryModelBinderTest.cs (22)
21var values = new Dictionary<string, string>() 61var values = new Dictionary<string, string>() 72var dictionary = new Dictionary<int, string>(); 101var dictionaryWithOne = new Dictionary<string, string>(StringComparer.Ordinal) 105var dictionaryWithThree = new Dictionary<string, string>(StringComparer.Ordinal) 196var dictionary = new Dictionary<string, string>(StringComparer.Ordinal) 233var dictionary = new Dictionary<string, string>(StringComparer.Ordinal) 268var dictionaryWithOne = new Dictionary<long, int> 272var dictionaryWithThree = new Dictionary<long, int> 288var stringDictionary = dictionary.ToDictionary(kvp => kvp.Key.ToString(CultureInfo.InvariantCulture), kvp => kvp.Value.ToString(CultureInfo.InvariantCulture)); 319var dictionary = new Dictionary<int, ModelWithProperties> 324var stringDictionary = new Dictionary<string, string> 412private IActionResult ActionWithDictionaryParameter(Dictionary<string, string> parameter) => null; 452Assert.Empty(Assert.IsType<Dictionary<string, string>>(bindingContext.Result.Model)); 487Assert.Empty(Assert.IsType<Dictionary<string, string>>(bindingContext.Result.Model)); 496private IActionResult ActionWithDefaultValueDictionaryParameter(Dictionary<string, string> parameter = null) => null; 595{ typeof(Dictionary<int, int>), true }, 641var backingStore = dictionary.ToDictionary( 657var backingStore = dictionary.ToDictionary( 700public Dictionary<string, string> DictionaryProperty { get; set; } 702public Dictionary<int, ModelWithProperties> DictionaryWithComplexValuesProperty { get; set; } 704public Dictionary<long, int> DictionaryWithValueTypesProperty { get; set; }
ModelBinding\CompositeValueProviderTest.cs (3)
37Dictionary<string, StringValues> values, 70var dictionary = new Dictionary<string, string>(StringComparer.Ordinal) 119var values = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
ModelBinding\EnumerableValueProviderTest.cs (9)
11protected static Dictionary<string, StringValues> BackingStore { get; } = new Dictionary<string, StringValues> 32var backingStore = new Dictionary<string, StringValues>(); 87var expected = new Dictionary<string, string> 120var expected = new Dictionary<string, string> 142var expected = new Dictionary<string, string> 207var backingStore = new Dictionary<string, StringValues> 238var store = new Dictionary<string, StringValues>(BackingStore) 292Dictionary<string, StringValues> values, 305Dictionary<string, StringValues> values,
ModelBinding\FormValueProviderTest.cs (2)
19var values = new Dictionary<string, StringValues>(BackingStore) 39Dictionary<string, StringValues> values,
ModelBinding\JQueryFormValueProviderFactoryTest.cs (2)
15private static readonly Dictionary<string, StringValues> _backingStore = new Dictionary<string, StringValues> 186private static ValueProviderFactoryContext CreateContext(string contentType, Dictionary<string, StringValues> formValues)
ModelBinding\JQueryFormValueProviderTest.cs (4)
13Dictionary<string, StringValues> values, 23var dictionary = new Dictionary<string, StringValues>(); 37var store = new Dictionary<string, StringValues>(BackingStore) 57var values = new Dictionary<string, StringValues>(BackingStore)
ModelBinding\JQueryQueryStringValueProviderFactoryTest.cs (2)
14private static readonly Dictionary<string, StringValues> _backingStore = new Dictionary<string, StringValues> 113private static ValueProviderFactoryContext CreateContext(Dictionary<string, StringValues> queryStringValues)
ModelBinding\JQueryQueryStringValueProviderTest.cs (3)
13Dictionary<string, StringValues> values, 23var dictionary = new Dictionary<string, StringValues>(); 40var store = new Dictionary<string, StringValues>(BackingStore)
ModelBinding\Metadata\DefaultModelMetadataTest.cs (2)
255[InlineData(typeof(Dictionary<object, object>), typeof(KeyValuePair<object, object>))] 835[InlineData(typeof(Dictionary<string, string>))]
ModelBinding\ModelBindingHelperTest.cs (7)
62var values = new Dictionary<string, object> 104var values = new Dictionary<string, object> 175var values = new Dictionary<string, object> 255var values = new Dictionary<string, object> 306var values = new Dictionary<string, object> 505var values = new Dictionary<string, object> 580var values = new Dictionary<string, object>
ModelBinding\QueryStringValueProviderFactoryTest.cs (1)
33var queryValues = new Dictionary<string, StringValues>();
ModelBinding\QueryStringValueProviderTest.cs (1)
14Dictionary<string, StringValues> values,
ModelBinding\Validation\DefaultCollectionValidationStrategyTest.cs (1)
49var model = new Dictionary<int, string>()
ModelBinding\Validation\DefaultObjectValidatorTests.cs (1)
985var model = new Dictionary<string, string>()
ModelBinding\Validation\ExplicitIndexCollectionValidationStrategyTest.cs (1)
49var model = new Dictionary<int, string>()
ModelBinding\Validation\ShortFormDictionaryValidationStrategyTest.cs (3)
12var model = new Dictionary<int, string>() 60var model = new Dictionary<int, string>() 101var model = new Dictionary<int, string>()
ResponseCacheAttributeTest.cs (5)
29var cacheProfiles = new Dictionary<string, CacheProfile>(); 49var cacheProfiles = new Dictionary<string, CacheProfile>(); 159Dictionary<string, CacheProfile> cacheProfiles, 189var cacheProfiles = new Dictionary<string, CacheProfile>(); 323private IServiceProvider GetServiceProvider(Dictionary<string, CacheProfile> cacheProfiles)
Routing\UrlHelperTestBase.cs (4)
623var dictionary = new Dictionary<string, object>(); 668var dict = new Dictionary<string, object>(); 889var mockItems = new Dictionary<object, object> 930var mockItems = new Dictionary<object, object>
ValidationProblemDetailsTest.cs (1)
79var errors = new Dictionary<string, string[]>
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
LinkBuilder.cs (1)
22public Dictionary<string, object> Values { get; set; }
RoutingResult.cs (1)
13public Dictionary<string, object> RouteValues { get; set; }
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataAnnotationsMetadataProvider.cs (1)
176var namesAndValues = new Dictionary<string, string>();
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (3)
XmlDataContractSerializerOutputFormatterTest.cs (1)
371new Dictionary<string, string> { { "Hello", "world" } }, typeof(Dictionary<string,string>), true };
XmlSerializerInputFormatterTest.cs (1)
271[InlineData(typeof(Dictionary<string, object>), false)]
XmlSerializerOutputFormatterTest.cs (1)
342new Dictionary<string, string> { { "Hello", "world" } }, typeof(Dictionary<string,string>), false };
Microsoft.AspNetCore.Mvc.FunctionalTests (37)
ApiBehaviorTest.cs (3)
440var expected = new Dictionary<string, string[]> 453var actual = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(content);
BasicTests.cs (5)
398var product = new Dictionary<string, string> 529var formContent = new Dictionary<string, string> 551var formContent = new Dictionary<string, string> 575var formContent = new Dictionary<string, string> 595var formContent = new Dictionary<string, string>
ControllerEndpointFiltersTest.cs (6)
42var content = await response.Content.ReadFromJsonAsync<Dictionary<string, object>>(); 56var content = await response.Content.ReadFromJsonAsync<Dictionary<string, object>>(); 81var content = await response.Content.ReadFromJsonAsync<Dictionary<string, object>>();
FormFileUploadTest.cs (1)
97public Dictionary<string, List<string>> Specs { get; set; }
HtmlGenerationTest.cs (1)
200static void AssertImgElement(IElement imgElement, Dictionary<string, string> expectedAttributes)
InputObjectValidationTests.cs (4)
147var responseObject = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(responseContent); 175var responseObject = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(responseContent);
InputParentValidationTests.cs (5)
57var actualErrors = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(responseContent); 76var actualErrors = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(responseContent); 93var result = new Dictionary<string, string[]>();
InputValidationTests.cs (1)
87var errors = JsonConvert.DeserializeObject<JObject>(responseText)
JsonOutputFormatterTestBase.cs (2)
64var modelStateErrors = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(actualContent);
RemoteAttributeValidationTest.cs (1)
89var contentDictionary = new Dictionary<string, string>
RoutingTestsBase.cs (5)
184public Dictionary<string, object> DataTokens { get; set; } 197var result = JsonConvert.DeserializeObject<Dictionary<string, object>>(body); 209var result = JsonConvert.DeserializeObject<Dictionary<string, object>>(body);
TagHelpersTest.cs (2)
229var validPostValues = new Dictionary<string, string> 257var validPostValues = new Dictionary<string, string>
VersioningTestsBase.cs (1)
567public Dictionary<string, object> RouteValues { get; set; }
Microsoft.AspNetCore.Mvc.IntegrationTests (168)
ActionParametersIntegrationTest.cs (1)
1085var propertyBinders = new Dictionary<ModelMetadata, IModelBinder>();
BodyValidationIntegrationTests.cs (7)
131var modelStateErrors = CreateValidationDictionary(modelState); 177var modelStateErrors = CreateValidationDictionary(modelState); 216var modelStateErrors = CreateValidationDictionary(modelState); 295var modelStateErrors = CreateValidationDictionary(modelState); 337var modelStateErrors = CreateValidationDictionary(modelState); 893private Dictionary<string, string> CreateValidationDictionary(ModelStateDictionary modelState) 895var result = new Dictionary<string, string>();
CollectionModelBinderIntegrationTest.cs (3)
724public static TheoryData<Type, Dictionary<string, StringValues>, Type> CollectionTypeData 728return new TheoryData<Type, Dictionary<string, StringValues>, Type> 932Dictionary<string, StringValues> formContent,
ComplexRecordIntegrationTest.cs (4)
1162private record Order7(string Name, Dictionary<string, int> ProductIds); 1366private record Car1(string Name, Dictionary<string, IEnumerable<SpecDoc>> Specs); 1369private record Car2(string Name, Dictionary<string, SpecDoc[]> Specs); 1809private record Car4(string Name, KeyValuePair<string, Dictionary<string, string>> Specs);
ComplexTypeIntegrationTestBase.cs (4)
1179public Dictionary<string, int> ProductIds { get; set; } 1388public Dictionary<string, IEnumerable<SpecDoc>> Specs { get; set; } 1396public Dictionary<string, SpecDoc[]> Specs { get; set; } 1948public KeyValuePair<string, Dictionary<string, string>> Specs { get; set; }
DictionaryModelBinderIntegrationTest.cs (111)
25ParameterType = typeof(Dictionary<string, int>) 41var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 65ParameterType = typeof(Dictionary<string, int>) 81var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 102ParameterType = typeof(Dictionary<string, int>) 119var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 156ParameterType = typeof(Dictionary<string, int>) 172var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 193ParameterType = typeof(Dictionary<string, int>) 209var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 224var impliedPrefixDictionary = new Dictionary<string, StringValues> 230var reversedImpliedPrefixDictionary = new Dictionary<string, StringValues> 236var longFormDictionary = new Dictionary<string, StringValues> 245var longerFormDictionary = new Dictionary<string, StringValues> 255var longestFormDictionary = new Dictionary<string, StringValues> 269var noPrefixDictionary = new Dictionary<string, StringValues> 275var reversedNoPrefixDictionary = new Dictionary<string, StringValues> 331var expectedDictionary = new Dictionary<string, int> 344ParameterType = typeof(Dictionary<string, int>), 353var model = Assert.IsType<Dictionary<string, int>>(result.Model); 366var expectedDictionary = new Dictionary<string, int> 381ParameterType = typeof(Dictionary<string, int>), 390var model = Assert.IsType<Dictionary<string, int>>(result.Model); 405ParameterType = typeof(Dictionary<string, int>) 421var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 440ParameterType = typeof(Dictionary<string, int>), 510ParameterType = typeof(Dictionary<string, Person>) 526var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 544var expectedDictionary = new Dictionary<string, Person> { { "key0", new Person { Id = 10 } } }; 555ParameterType = typeof(Dictionary<string, Person>) 564var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 582var expectedDictionary = new Dictionary<string, Person> { { "key0", new Person { Id = 10 } } }; 593ParameterType = typeof(Dictionary<string, Person>) 602var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 617var expectedDictionary = new Dictionary<string, Person> { { "42", new Person { Id = 10 } } }; 628ParameterType = typeof(Dictionary<string, Person>) 637var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 652var expectedDictionary = new Dictionary<string, Person> { { "42", new Person { Id = 10 } } }; 663ParameterType = typeof(Dictionary<string, Person>) 672var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 708ParameterType = typeof(Dictionary<string, Person>) 724var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 752ParameterType = typeof(Dictionary<string, Person>) 763var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 787ParameterType = typeof(Dictionary<string, Person>) 803var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 827ParameterType = typeof(Dictionary<string, Person>) 843var model = Assert.IsType<Dictionary<string, Person>>(modelBindingResult.Model); 862ParameterType = typeof(Dictionary<string, Person>), 909var expectedDictionary = new Dictionary<string, string[]> { { "key0", new[] { "10", "11" } } }; 914ParameterType = typeof(Dictionary<string, string[]>) 927var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 941var expectedDictionary = new Dictionary<string, string[]> { { "key0", new[] { "10", "11" } } }; 952ParameterType = typeof(Dictionary<string, string[]>) 961var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 975var expectedDictionary = new Dictionary<string, string[]> { { "key0", new[] { "10", "11" } } }; 986ParameterType = typeof(Dictionary<string, string[]>) 995var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 1014var expectedDictionary = new Dictionary<string, string[]> { { "42", new[] { "10", "11" } } }; 1025ParameterType = typeof(Dictionary<string, string[]>) 1034var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 1053var expectedDictionary = new Dictionary<string, string[]> { { "42", new[] { "10", "11" } } }; 1064ParameterType = typeof(Dictionary<string, string[]>) 1073var model = Assert.IsType<Dictionary<string, string[]>>(modelBindingResult.Model); 1091typeof(Dictionary<string, string>) 1094typeof(Dictionary<string, string>), 1096typeof(Dictionary<string, string>) 1121typeof(Dictionary<string, string>) 1124typeof(Dictionary<string, string>), 1126typeof(Dictionary<string, string>) 1160var expectedDictionary = new Dictionary<string, string> 1210ParameterType = typeof(Dictionary<SuccessfulModel, SuccessfulModel>), 1239ParameterType = typeof(Dictionary<string, string>) 1255var model = Assert.IsType<Dictionary<string, string>>(modelBindingResult.Model); 1293ParameterType = typeof(Dictionary<string, NonNullPerson>) 1309var model = Assert.IsType<Dictionary<string, NonNullPerson>>(modelBindingResult.Model); 1359var expectedDictionary = new Dictionary<DayOfWeek, string> 1368ParameterType = typeof(Dictionary<DayOfWeek, string>) 1394var expectedDictionary = new Dictionary<string, DayOfWeek> 1404ParameterType = typeof(Dictionary<string, DayOfWeek>) 1416var model = Assert.IsType<Dictionary<string, DayOfWeek>>(modelBindingResult.Model); 1446ParameterType = typeof(Dictionary<string, NonNullPersonWithRequiredProperties>) 1462var model = Assert.IsType<Dictionary<string, NonNullPersonWithRequiredProperties>>(modelBindingResult.Model); 1726private void SampleMethod_ComplexType(Dictionary<string, Person> parameter = null) { } 1727private void SampleMethod_SimpleType(Dictionary<string, int> parameter = null) { }
FormFileModelBindingIntegrationTest.cs (1)
1188public Dictionary<string, IFormFile> Dictionary { get; set; }
GenericModelBinderIntegrationTest.cs (17)
266ParameterType = typeof(Dictionary<string, int>[]) 282var model = Assert.IsType<Dictionary<string, int>[]>(modelBindingResult.Model); 283var dictionary = Assert.Single(model); 311ParameterType = typeof(Dictionary<string, int>[]) 327var model = Assert.IsType<Dictionary<string, int>[]>(modelBindingResult.Model); 328var dictionary = Assert.Single(model); 356ParameterType = typeof(Dictionary<string, int>[]) 372var model = Assert.IsType<Dictionary<string, int>[]>(modelBindingResult.Model); 514ParameterType = typeof(Dictionary<string, List<int>>) 531var model = Assert.IsType<Dictionary<string, List<int>>>(modelBindingResult.Model); 563ParameterType = typeof(Dictionary<string, List<int>>) 579var model = Assert.IsType<Dictionary<string, List<int>>>(modelBindingResult.Model); 611ParameterType = typeof(Dictionary<string, List<int>>) 627var model = Assert.IsType<Dictionary<string, List<int>>>(modelBindingResult.Model);
SimpleTypeModelBinderIntegrationTest.cs (3)
637public static TheoryData<Dictionary<string, StringValues>> PersonStoreData 641return new TheoryData<Dictionary<string, StringValues>> 661public async Task BindParameter_FromFormData_BindsCorrectly(Dictionary<string, StringValues> personStore)
TryValidateModelIntegrationTest.cs (7)
40var modelStateErrors = GetModelStateErrors(modelState); 71var modelStateErrors = GetModelStateErrors(modelState); 120var modelStateErrors = GetModelStateErrors(modelState); 147var modelStateErrors = GetModelStateErrors(modelState); 168var modelStateErrors = GetModelStateErrors(modelState); 224private Dictionary<string, string> GetModelStateErrors(ModelStateDictionary modelState) 226var result = new Dictionary<string, string>();
ValidationIntegrationTests.cs (5)
2231var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 2262ParameterType = typeof(Dictionary<string, NeverValid>) 2278var model = Assert.IsType<Dictionary<string, NeverValid>>(modelBindingResult.Model);
ValidationWithRecordIntegrationTests.cs (5)
2022var model = Assert.IsType<Dictionary<string, int>>(modelBindingResult.Model); 2053ParameterType = typeof(Dictionary<string, NeverValid>) 2069var model = Assert.IsType<Dictionary<string, NeverValid>>(modelBindingResult.Model);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (5)
BsonTempDataSerializer.cs (5)
31private static readonly Dictionary<JTokenType, Type> _tokenTypeLookup = new Dictionary<JTokenType, Type>(8) 45Dictionary<string, object?>? tempDataDictionary; 50tempDataDictionary = _jsonSerializer.Deserialize<Dictionary<string, object?>>(reader); 57var convertedDictionary = new Dictionary<string, object?>( 229var convertedDictionary = new Dictionary<string, TVal?>(StringComparer.Ordinal);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (34)
BsonTempDataSerializerTest.cs (7)
97var input = new Dictionary<string, object> 118var input = new Dictionary<string, object> 139var input = new Dictionary<string, object> 161var input = new Dictionary<string, object> 182var input = new Dictionary<string, object> 212var input = new Dictionary<string, object> 239var input = new Dictionary<string, object>
DependencyInjection\MvcNewtonsoftJsonOptionsExtensionsTest.cs (4)
87var dictionary = new Dictionary<string, int> 106var dictionary = new Dictionary<string, int>() 125var dictionary = new Dictionary<string, int> 197var dictionary = new Dictionary<string, int>()
NewtonsoftJsonOutputFormatterTest.cs (2)
241var dictionary = new Dictionary<string, int>(StringComparer.Ordinal) 251var context = GetOutputFormatterContext(dictionary, typeof(Dictionary<string, int>));
src\Mvc\Mvc.ViewFeatures\test\Infrastructure\TempDataSerializerTestBase.cs (21)
30var input = new Dictionary<string, object> 54var input = new Dictionary<string, object> 76var input = new Dictionary<string, object> 97var input = new Dictionary<string, object> 118var input = new Dictionary<string, object> 139var input = new Dictionary<string, object> 160var input = new Dictionary<string, object> 182var input = new Dictionary<string, object> 204var input = new Dictionary<string, object> 226var input = new Dictionary<string, object> 247var input = new Dictionary<string, object> 268var input = new Dictionary<string, object> 289var input = new Dictionary<string, object> 309var value = new Dictionary<string, string> 314var input = new Dictionary<string, object> 324var roundTripValue = Assert.IsType<Dictionary<string, string>>(values[key]); 334var value = new Dictionary<string, int> 339var input = new Dictionary<string, object> 349var roundTripValue = Assert.IsType<Dictionary<string, int>>(values[key]);
Microsoft.AspNetCore.Mvc.Razor (6)
ApplicationParts\RazorCompiledItemFeatureProvider.cs (1)
14private Dictionary<string, Type>? _hotReloadedViews;
Compilation\DefaultViewCompiler.cs (3)
23private Dictionary<string, Task<CompiledViewDescriptor>>? _compiledViews; 52var compiledViews = new Dictionary<string, Task<CompiledViewDescriptor>>( 79internal Dictionary<string, Task<CompiledViewDescriptor>>? CompiledViews => _compiledViews;
RazorViewEngine.cs (1)
237Dictionary<string, string?>? expanderValues = null;
TagHelpers\UrlResolutionTagHelper.cs (1)
57private static readonly Dictionary<string, string[]> ElementAttributeLookups =
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
RuntimeViewCompiler.cs (1)
27private readonly Dictionary<string, CompiledViewDescriptor> _precompiledViews;
Microsoft.AspNetCore.Mvc.Razor.Test (16)
RazorViewEngineTest.cs (16)
23private static readonly Dictionary<string, object> _areaTestContext = new Dictionary<string, object>() 29private static readonly Dictionary<string, object> _controllerTestContext = new Dictionary<string, object>() 34private static readonly Dictionary<string, object> _pageTestContext = new Dictionary<string, object>() 658var routeValues = _controllerTestContext; 725var routeValues = _areaTestContext; 1142var routeValues = _controllerTestContext; 1200var routeValues = _areaTestContext; 1283var routeValues = new Dictionary<string, object> 1295var routesInActionDescriptor = new Dictionary<string, string>() 1324var routeValues = new Dictionary<string, object> 1328var routesInActionDescriptor = new Dictionary<string, string>() 1358var routeValues = new Dictionary<string, object> 1363var routesInActionDescriptor = new Dictionary<string, string>() 1393var routeValues = new Dictionary<string, object>() 1833var routeValues = new Dictionary<string, object> 1870var routeValues = new Dictionary<string, object>
Microsoft.AspNetCore.Mvc.RazorPages (3)
Infrastructure\CompiledPageActionDescriptorProvider.cs (1)
57var lookup = new Dictionary<string, CompiledViewDescriptor>(feature.ViewDescriptors.Count, StringComparer.Ordinal);
Infrastructure\PageActionInvoker.cs (2)
24private Dictionary<string, object?>? _arguments; 219Dictionary<string, object?> argumentsInDictionary,
Microsoft.AspNetCore.Mvc.RazorPages.Test (6)
Infrastructure\PageBinderFactoryTest.cs (4)
603var arguments = new Dictionary<string, object>(); 646var arguments = new Dictionary<string, object>(); 689var arguments = new Dictionary<string, object>(); 740var arguments = new Dictionary<string, object>();
PageModelTest.cs (1)
945var expected2 = new Dictionary<string, object>
PageTest.cs (1)
1874var expected2 = new Dictionary<string, object>
Microsoft.AspNetCore.Mvc.TagHelpers (2)
InputTagHelper.cs (2)
22private static readonly Dictionary<string, string> _defaultInputTypes = 56private static readonly Dictionary<string, string> _rfc3339Formats =
Microsoft.AspNetCore.Mvc.TagHelpers.Test (26)
AnchorTagHelperTest.cs (3)
211var expectedRouteValues = new Dictionary<string, object> { { "area", "Admin" } }; 269var expectedRouteValues = new Dictionary<string, object> { { "area", "Admin" } }; 328var expectedRouteValues = new Dictionary<string, object> { { "area", string.Empty } };
FormActionTagHelperTest.cs (6)
313public static TheoryData<string, Dictionary<string, string>, string> AreaRouteValuesData 317return new TheoryData<string, Dictionary<string, string>, string> 335Dictionary<string, string> routeValues, 352var expectedRouteValues = new Dictionary<string, object> { { "area", expectedArea } }; 389Dictionary<string, string> routeValues, 406var expectedRouteValues = new Dictionary<string, object> { { "area", expectedArea } };
FormTagHelperTest.cs (3)
644var expectedRouteValues = new Dictionary<string, object> { { "area", "Admin" } }; 701var expectedRouteValues = new Dictionary<string, object> { { "area", string.Empty } }; 758var expectedRouteValues = new Dictionary<string, object> { { "area", "Admin" } };
InputTagHelperTest.cs (5)
1682It.Is<Dictionary<string, object>>(m => m.ContainsKey("type")))) // htmlAttributes 1783var htmlAttributes = new Dictionary<string, object> 1844var htmlAttributes = new Dictionary<string, object> 1913var htmlAttributes = new Dictionary<string, object> 2007var htmlAttributes = new Dictionary<string, object>
PrerenderComponentApplicationStoreTest.cs (2)
17var state = new Dictionary<string, byte[]>() 35var expected = new Dictionary<string, ReadOnlySequence<byte>>()
ProtectedPrerenderComponentApplicationStateTest.cs (3)
24var state = new Dictionary<string, byte[]>() 40var expectedState = new Dictionary<string, byte[]>() 61var expectedState = new Dictionary<string, byte[]>()
SelectTagHelperTest.cs (1)
107var attributeData = new Dictionary<string, string>(StringComparer.Ordinal)
TagHelperOutputExtensionsTest.cs (3)
633public static TheoryData<Dictionary<string, string>, TagHelperAttributeList, TagHelperAttributeList> MultipleAttributeSameNameData 638return new TheoryData<Dictionary<string, string>, TagHelperAttributeList, TagHelperAttributeList> 768Dictionary<string, string> tagBuilderAttributes,
Microsoft.AspNetCore.Mvc.Test (2)
MvcServiceCollectionExtensionsTest.cs (2)
463var multiRegistrationServiceTypes = MultiRegistrationServiceTypes; 471private Dictionary<Type, Type[]> MultiRegistrationServiceTypes
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
472var runtimeProjectLibraries = context.RuntimeLibraries
Microsoft.AspNetCore.Mvc.Testing.Tasks (2)
GenerateMvcTestManifestTask.cs (2)
35var output = new Dictionary<string, string>(); 43var serializer = new DataContractJsonSerializer(typeof(Dictionary<string, string>), new DataContractJsonSerializerSettings
Microsoft.AspNetCore.Mvc.ViewFeatures (20)
DefaultEditorTemplates.cs (1)
179var htmlAttributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
FormContext.cs (5)
20private Dictionary<string, bool> _renderedFields; 21private Dictionary<string, bool> _invariantFields; 22private Dictionary<string, object> _formData; 101private Dictionary<string, bool> RenderedFields 118private Dictionary<string, bool> InvariantFields
HtmlHelper.cs (1)
1382var groupList = new Dictionary<string, SelectListGroup>();
Infrastructure\DefaultTempDataSerializer.cs (2)
27var deserialized = new Dictionary<string, object>(StringComparer.Ordinal); 119var dictionary = new Dictionary<string, string>(StringComparer.Ordinal);
Rendering\ViewContext.cs (2)
21private Dictionary<object, object?> _items = default!; 207internal Dictionary<object, object?> Items => _items ??= new Dictionary<object, object?>();
TempDataDictionary.cs (2)
22private Dictionary<string, object?>? _data; 277private Dictionary<string, object?>.Enumerator _enumerator;
TemplateRenderer.cs (4)
22private static readonly Dictionary<string, Func<IHtmlHelper, IHtmlContent>> _defaultDisplayActions = 37private static readonly Dictionary<string, Func<IHtmlHelper, IHtmlContent>> _defaultEditorActions = 101var defaultActions = GetDefaultActions(); 140private Dictionary<string, Func<IHtmlHelper, IHtmlContent>> GetDefaultActions()
TryGetValueProvider.cs (1)
15private static readonly Dictionary<Type, TryGetValueDelegate> _tryGetValueDelegateCache =
ValidationHtmlAttributeProvider.cs (2)
20/// The <see cref="Dictionary{TKey, TValue}"/> to receive the validation attributes. Maps the validation 41/// The <see cref="Dictionary{TKey, TValue}"/> to receive the validation attributes. Maps the validation
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (78)
ControllerUnitTestabilityTests.cs (6)
324var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 360var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 397var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 436var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 474var routeValues = new Dictionary<string, object>() { { "route", "sample" } }; 508var routeValues = new Dictionary<string, object>() { { "route", "sample" } };
CookieTempDataProviderTest.cs (4)
118var values = new Dictionary<string, object>(); 269var values = new Dictionary<string, object>(); 298var input = new Dictionary<string, object> 341private readonly Dictionary<string, CookieInfo> _cookies = new Dictionary<string, CookieInfo>(StringComparer.OrdinalIgnoreCase);
DefaultHtmlGeneratorTest.cs (12)
116var htmlAttributes = new Dictionary<string, object> 171var htmlAttributes = new Dictionary<string, object> 201var htmlAttributes = new Dictionary<string, object> 225var htmlAttributes = new Dictionary<string, object> 249var htmlAttributes = new Dictionary<string, object> 271var htmlAttributes = new Dictionary<string, object> 293var htmlAttributes = new Dictionary<string, object> 316var htmlAttributes = new Dictionary<string, object> 369var htmlAttributes = new Dictionary<string, object> 399var htmlAttributes = new Dictionary<string, object> 424var htmlAttributes = new Dictionary<string, object> 471var htmlAttributes = new Dictionary<string, object>
Infrastructure\DefaultTempDataSerializerTest.cs (3)
20var input = new Dictionary<string, object> 40var value = new Dictionary<string, int> 45var input = new Dictionary<string, object>
Infrastructure\TempDataSerializerTestBase.cs (21)
30var input = new Dictionary<string, object> 54var input = new Dictionary<string, object> 76var input = new Dictionary<string, object> 97var input = new Dictionary<string, object> 118var input = new Dictionary<string, object> 139var input = new Dictionary<string, object> 160var input = new Dictionary<string, object> 182var input = new Dictionary<string, object> 204var input = new Dictionary<string, object> 226var input = new Dictionary<string, object> 247var input = new Dictionary<string, object> 268var input = new Dictionary<string, object> 289var input = new Dictionary<string, object> 309var value = new Dictionary<string, string> 314var input = new Dictionary<string, object> 324var roundTripValue = Assert.IsType<Dictionary<string, string>>(values[key]); 334var value = new Dictionary<string, int> 339var input = new Dictionary<string, object> 349var roundTripValue = Assert.IsType<Dictionary<string, int>>(values[key]);
Rendering\HtmlHelperCheckboxTest.cs (5)
113var attributes = new Dictionary<string, object> 502var dictionary = new Dictionary<string, object> { { "Property3", "Property3Value" } }; 528var attributes = new Dictionary<string, object> 707var attributes = new Dictionary<string, object> 732var attributes = new Dictionary<string, object> { { "Property3", "PropValue" } };
Rendering\HtmlHelperHiddenTest.cs (13)
24var htmlAttributes1 = new Dictionary<string, object> 184var attributes = new Dictionary<string, object> { { "data-key", "value" } }; 310var attributes = new Dictionary<string, object> { { "baz", "BazValue" } }; 425var attributes = new Dictionary<string, object> 447var attributes = new Dictionary<string, object> 467var attributes = new Dictionary<string, object> 534var attributes = new Dictionary<string, object> { { "data-test", "val" } }; 573var attributes = new Dictionary<string, object> { { "data-test", "val" } }; 665var attributes = new Dictionary<string, object> { { "key", "value" } }; 731var attributes = new Dictionary<string, object> 809var attributes = new Dictionary<string, object> 876var attributes = new Dictionary<string, object> 986public Dictionary<string, string> Property3 { get; } = new Dictionary<string, string>();
Rendering\HtmlHelperPasswordTest.cs (4)
185var attributes = new Dictionary<string, object> 242var attributes = new Dictionary<string, object> { { "data-test", "val" } }; 293var attributes = new Dictionary<string, object> 533public Dictionary<string, string> Property3 { get; } = new Dictionary<string, string>();
Rendering\HtmlHelperTextAreaTest.cs (1)
148public Dictionary<string, string> Property3 { get; } = new Dictionary<string, string>();
Rendering\HtmlHelperTextBoxTest.cs (1)
166public Dictionary<string, string> Property3 { get; } = new Dictionary<string, string>();
Rendering\HtmlHelperValidationSummaryTest.cs (1)
19var dictionary = new Dictionary<string, object>
SessionStateTempDataProviderTest.cs (1)
101private readonly Dictionary<string, byte[]> _innerDictionary = new Dictionary<string, byte[]>();
TempDataDictionaryTest.cs (1)
147var data = new Dictionary<string, object>();
ViewComponents\DefaultViewComponentHelperTest.cs (2)
26Assert.IsType<Dictionary<string, object>>(argumentDictionary); 122var arguments = new Dictionary<string, object>
ViewComponentTests.cs (1)
268private readonly Dictionary<string, byte[]> _innerDictionary = new Dictionary<string, byte[]>();
ViewDataDictionaryTest.cs (2)
229{ typeof(Dictionary<string, object>), new Dictionary<string, object>() }, 701var value = new Dictionary<string, object>
Microsoft.AspNetCore.Mvc.Views.TestCommon (3)
TestFileProvider.cs (3)
10private readonly Dictionary<string, IFileInfo> _lookup = 12private readonly Dictionary<string, IDirectoryContents> _directoryContentsLookup = 15private readonly Dictionary<string, TestFileChangeToken> _fileTriggers =
Microsoft.AspNetCore.OpenApi (14)
Extensions\JsonNodeSchemaExtensions.cs (1)
27private static readonly Dictionary<Type, OpenApiSchema> _simpleTypeToOpenApiSchema = new()
Extensions\JsonTypeInfoExtensions.cs (1)
14private static readonly Dictionary<Type, string> _simpleTypeToName = new()
Schemas\OpenApiJsonSchema.Helpers.cs (4)
57public static Dictionary<string, T>? ReadDictionary<T>(ref Utf8JsonReader reader) 69var values = new Dictionary<string, T>(); 275var props = ReadDictionary<OpenApiJsonSchema>(ref reader); 304var mappings = ReadDictionary<string>(ref reader);
Services\OpenApiDocumentService.cs (2)
258private async Task<Dictionary<HttpMethod, OpenApiOperation>> GetOperationsAsync( 266var operations = new Dictionary<HttpMethod, OpenApiOperation>();
Services\OpenApiGenerator.cs (4)
117var eligibileAnnotations = new Dictionary<int, (Type?, MediaTypeCollection)>(); 200var responseContent = new Dictionary<string, OpenApiMediaType>(); 238private static void GenerateDefaultResponses(Dictionary<int, (Type?, MediaTypeCollection)> eligibleAnnotations, Type responseType) 272var requestBodyContent = new Dictionary<string, OpenApiMediaType>();
src\Shared\ParameterBindingMethodCache.cs (1)
325var lookupTable = new Dictionary<ParameterLookupKey, PropertyInfo>(properties.Length);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.OpenApi.Build.Tests (1)
GenerateAdditionalXmlFilesForOpenApiTests.cs (1)
117private record AdditionalFilesResult(Dictionary<string, string>[] AdditionalFiles);
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
18Dictionary<TSource, ImmutableArray<TElement>.Builder> map = new(comparer);
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (2)
AdditionalTextsTests.Schemas.cs (1)
187var references = new Dictionary<string, List<string>>
SnapshotTestHelper.cs (1)
33public static Task Verify(string source, IIncrementalGenerator generator, Dictionary<string, List<string>> classLibrarySources, out Compilation compilation, out List<byte[]> generatedAssemblies)
Microsoft.AspNetCore.OpenApi.Tests (8)
Extensions\JsonTypeInfoExtensionsTests.cs (3)
73[typeof(Dictionary<string, string[]>), null], 74[typeof(Dictionary<string, List<string[]>>), null], 75[typeof(Dictionary<string, IEnumerable<string[]>>), null],
Extensions\OpenApiRouteHandlerBuilderExtensionTests.cs (1)
224var summaries = builder.DataSources
Transformers\CustomSchemaTransformerTests.cs (1)
532public Dictionary<string, object> Metadata { get; set; } = [];
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (3)
131builder.MapPost("/api-2", (Dictionary<string, Todo> todo) => { }); 637builder.MapPost("/dictionary", (Dictionary<string, LocationContainer> items) => { }); 770builder.MapPost("/dictionary", (Dictionary<string, ParentObject> item) => { });
Microsoft.AspNetCore.OutputCaching (5)
CacheVaryByRules.cs (1)
14private Dictionary<string, string>? _varyByValues;
Memory\MemoryOutputCacheStore.cs (2)
13private readonly Dictionary<string, HashSet<TaggedEntry>> _taggedEntries = []; 24internal Dictionary<string, HashSet<string>> TaggedEntries => _taggedEntries.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Select(t => t.Key).ToHashSet());
OutputCacheOptions.cs (1)
39internal Dictionary<string, IOutputCachePolicy>? NamedPolicies { get; set; }
Policies\NamedPolicy.cs (1)
76var policies = _options!.Value.NamedPolicies;
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.OutputCaching.Tests (1)
TestUtils.cs (1)
328private readonly Dictionary<string, byte[]?> _storage = new();
Microsoft.AspNetCore.Owin.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.Owin.Tests (2)
OwinFeatureCollectionTests.cs (2)
25var env = new Dictionary<string, object> 44var env = new Dictionary<string, object>
Microsoft.AspNetCore.RateLimiting (3)
RateLimiterOptions.cs (2)
16internal Dictionary<string, DefaultRateLimiterPolicy> PolicyMap { get; } 19internal Dictionary<string, Func<IServiceProvider, DefaultRateLimiterPolicy>> UnactivatedPolicyMap { get; }
RateLimitingMiddleware.cs (1)
24private readonly Dictionary<string, DefaultRateLimiterPolicy> _policyMap;
Microsoft.AspNetCore.Razor.Runtime (9)
Runtime\TagHelpers\TagHelperExecutionContext.cs (1)
20private Dictionary<HtmlEncoder, TagHelperContent> _perEncoderChildContent;
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (8)
14private readonly Dictionary<TKey, TValue> _source; 15private Dictionary<TKey, TValue>? _copy; 17public CopyOnWriteDictionaryHolder(Dictionary<TKey, TValue> source) 33public Dictionary<TKey, TValue> ReadDictionary 54public Dictionary<TKey, TValue> WriteDictionary 72public Dictionary<TKey, TValue>.KeyCollection Keys 80public Dictionary<TKey, TValue>.ValueCollection Values 161public Dictionary<TKey, TValue>.Enumerator GetEnumerator()
Microsoft.AspNetCore.Razor.Runtime.Test (7)
Runtime\TagHelpers\TagHelperExecutionContextTest.cs (3)
149var items = new Dictionary<object, object>(); 167var updatedItems = new Dictionary<object, object>(); 209var expectedItems = new Dictionary<object, object>
Runtime\TagHelpers\TagHelperScopeManagerTest.cs (2)
49var parentComplexObject = new Dictionary<string, int>(StringComparer.Ordinal); 55((Dictionary<string, int>)executionContext.Items["test-entry"]).Add("from-child", 1234);
Runtime\TagHelpers\TestTagHelpers\TagHelperDescriptorFactoryTagHelpers.cs (2)
343public Dictionary<string, object> DictionaryProperty { get; set; } 378public Dictionary<int, string> DictionaryOfIntProperty { get; set; }
Microsoft.AspNetCore.Razor.Test (4)
TagHelpers\TagHelperContextTest.cs (4)
15var initialItems = new Dictionary<object, object> 19var expectedItems = new Dictionary<object, object> 47var expectedItems = new Dictionary<object, object> 72var expectedItems = new Dictionary<object, object>
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.Rewrite (2)
IISUrlRewrite\IISRewriteMap.cs (1)
8private readonly Dictionary<string, string> _map = new Dictionary<string, string>();
IISUrlRewrite\IISRewriteMapCollection.cs (1)
10private readonly Dictionary<string, IISRewriteMap> _rewriteMaps = new Dictionary<string, IISRewriteMap>();
Microsoft.AspNetCore.Rewrite.Tests (6)
ApacheModRewrite\FlagParserTest.cs (3)
14var dict = new Dictionary<FlagType, string>(); 25var dict = new Dictionary<FlagType, string>(); 38var dict = new Dictionary<FlagType, string>();
IISUrlRewrite\InputParserTests.cs (1)
89var variablesDict = new Dictionary<string, string>()
IISUrlRewrite\TestServerVariablesFeature.cs (2)
10private readonly Dictionary<string, string> _variables; 12public TestServerVariablesFeature(Dictionary<string, string> variables)
Microsoft.AspNetCore.Routing (34)
DecisionTree\DecisionCriterion.cs (1)
12public Dictionary<object, DecisionTreeNode<TItem>> Branches { get; set; }
DecisionTree\DecisionTreeBuilder.cs (2)
103var criteria = new Dictionary<string, Criterion>(StringComparer.OrdinalIgnoreCase); 153var reducedBranches = new Dictionary<object, DecisionTreeNode<TItem>>(comparer.InnerComparer);
DefaultLinkParser.cs (4)
89var constraints = new Dictionary<string, List<IRouteConstraint>>(StringComparer.OrdinalIgnoreCase); 155public readonly Dictionary<string, List<IRouteConstraint>> Constraints; 157public MatcherState(RoutePatternMatcher matcher, Dictionary<string, List<IRouteConstraint>> constraints) 163public void Deconstruct(out RoutePatternMatcher matcher, out Dictionary<string, List<IRouteConstraint>> constraints)
EndpointNameAddressScheme.cs (1)
38var entries = new Dictionary<string, Endpoint[]>(StringComparer.Ordinal);
Internal\DfaGraphWriter.cs (1)
54var visited = new Dictionary<DfaNode, int>();
Matching\AcceptsMatcherPolicy.cs (1)
150var edges = new Dictionary<string, List<Endpoint>>(StringComparer.OrdinalIgnoreCase);
Matching\ContentEncodingNegotiationMatcherPolicy.cs (1)
48private readonly Dictionary<string, (int destination, double quality)>? _extraDestinations;
Matching\DataSourceDependentMatcher.cs (1)
41var seenEndpointNames = new Dictionary<string, string?>();
Matching\DfaMatcherBuilder.cs (2)
28private readonly Dictionary<string, int> _assignments; 119private readonly Dictionary<string, IParameterPolicy> _cachedParameters;
Matching\DfaNode.cs (2)
28public Dictionary<string, DfaNode> Literals { get; private set; } 36public Dictionary<object, DfaNode> PolicyEdges { get; private set; }
Matching\HostMatcherPolicy.cs (1)
198var edges = new Dictionary<EdgeKey, List<Endpoint>>();
Matching\HttpMethodDestinationsLookup.cs (1)
21private readonly Dictionary<string, int>? _extraDestinations;
Matching\HttpMethodMatcherPolicy.cs (1)
175var edges = new Dictionary<EdgeKey, List<Endpoint>>();
Matching\NegotiationMatcherPolicy.cs (1)
233var edges = new Dictionary<string, List<Endpoint>>(StringComparer.OrdinalIgnoreCase);
Patterns\RoutePatternFactory.cs (5)
443Dictionary<string, List<RoutePatternParameterPolicyReference>>? parameterPolicyReferences, 458Dictionary<string, object?>? updatedDefaults = null; 648private static Dictionary<string, List<RoutePatternParameterPolicyReference>>? CreateRoutePatternPolicyReferences(RouteValueDictionary? parameterPolicies) 650Dictionary<string, List<RoutePatternParameterPolicyReference>>? updatedParameterPolicies = null; 1050var combinedDictionary = new Dictionary<string, TValue>(leftDictionary.Count + rightDictionary.Count, StringComparer.OrdinalIgnoreCase);
RouteCollection.cs (1)
21private readonly Dictionary<string, INamedRouter> _namedRoutes =
RouteConstraintBuilder.cs (2)
27private readonly Dictionary<string, List<IRouteConstraint>> _constraints; 54var constraints = new Dictionary<string, IRouteConstraint>(StringComparer.OrdinalIgnoreCase);
RouteOptions.cs (2)
104var defaults = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase); 173private static void AddConstraint<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TConstraint>(Dictionary<string, Type> constraintMap, string text) where TConstraint : IRouteConstraint
RouteValuesAddressScheme.cs (1)
73var namedOutboundMatchResults = new Dictionary<string, List<OutboundMatchResult>>(StringComparer.OrdinalIgnoreCase);
Tree\LinkGenerationDecisionTree.cs (1)
176var results = new Dictionary<string, DecisionCriterionValue>(StringComparer.OrdinalIgnoreCase);
Tree\TreeRouteBuilder.cs (1)
268var trees = new Dictionary<int, UrlMatchingTree>();
Tree\UrlMatchingNode.cs (1)
55public Dictionary<string, UrlMatchingNode> Literals { get; }
Microsoft.AspNetCore.Routing.FunctionalTests (3)
MinimalFormTests.cs (3)
514b.MapPost("/todo", ([FromForm] Dictionary<string, string> todo) => todo) 565g.MapPost("/1", ([FromForm] Dictionary<string, string> todo) => todo) 617g.MapPost("/1", ([FromForm] Dictionary<string, string> todo) => todo)
Microsoft.AspNetCore.Routing.Microbenchmarks (3)
Matching\HttpMethodPolicyJumpTableBenchmark.cs (2)
14private Dictionary<string, int> _destinations = new(); 31private static HttpMethodDestinationsLookup CreateLookup(Dictionary<string, int> extra)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.Routing.Tests (16)
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (1)
946var endpoints = builder.DataSources
ConstraintMatcherTest.cs (9)
23var constraints = new Dictionary<string, IRouteConstraint> 50var constraints = new Dictionary<string, IRouteConstraint> 69var constraints = new Dictionary<string, IRouteConstraint> 84var constraints = new Dictionary<string, IRouteConstraint> 104var constraints = new Dictionary<string, IRouteConstraint> 124var constraints = new Dictionary<string, IRouteConstraint> 144var constraints = new Dictionary<string, IRouteConstraint> 164var constraints = new Dictionary<string, IRouteConstraint> 193private TestSink SetUpMatch(Dictionary<string, IRouteConstraint> constraints, bool loggerEnabled)
DecisionTreeBuilderTest.cs (1)
201public Dictionary<string, DecisionCriterionValue> Criteria { get; private set; }
RouteTest.cs (1)
308var constraints = new Dictionary<string, object>();
Template\TemplateBinderTests.cs (1)
1463public Dictionary<string, string> Parameters { get; private set; }
Tree\TreeRouterTest.cs (3)
804var values = new Dictionary<string, object> 861var values = new Dictionary<string, object> 893var values = new Dictionary<string, object>
Microsoft.AspNetCore.Security.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.Server.HttpSys (3)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
762var info = new Dictionary<int, ReadOnlyMemory<byte>>(count);
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
36var newDict = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
StandardFeatureCollection.cs (1)
14private static readonly Dictionary<Type, Func<RequestContext, object?>> _featureFuncLookup = new()
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (4)
RequestHeaderTests.cs (2)
199var headerDictionary = new Dictionary<string, string> 224var headerDictionary = new Dictionary<string, string>
src\Shared\Http2cat\Http2Utilities.cs (2)
130public readonly Dictionary<string, string> _decodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 231internal Dictionary<string, string> DecodeHeaders(Http2FrameWithPayload frame, bool endHeaders = false)
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.Server.IIS (3)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
762var info = new Dictionary<int, ReadOnlyMemory<byte>>(count);
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
36var newDict = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.AspNetCore.Server.IntegrationTesting (1)
CachingApplicationPublisher.cs (1)
10private readonly Dictionary<DotnetPublishParameters, PublishedApplication> _publishCache = new Dictionary<DotnetPublishParameters, PublishedApplication>();
Microsoft.AspNetCore.Server.Kestrel.Core (25)
Internal\CertificatePathWatcher.cs (2)
23private readonly Dictionary<string, DirectoryWatchMetadata> _metadataForDirectory = new(); 25private readonly Dictionary<string, FileWatchMetadata> _metadataForFile = new();
Internal\ConfigSectionClone.cs (1)
24public Dictionary<string, ConfigSectionClone> Children { get; }
Internal\ConfigurationReader.cs (7)
41var certificates = new Dictionary<string, CertificateConfig>(0, StringComparer.OrdinalIgnoreCase); 121private static Dictionary<string, SniConfig> ReadSni(IConfigurationSection sniConfig, string endpointName) 123var sniDictionary = new Dictionary<string, SniConfig>(0, StringComparer.OrdinalIgnoreCase); 275Dictionary<string, SniConfig> sni, 293public Dictionary<string, SniConfig> Sni { get; } 319private static bool CompareSniDictionaries(Dictionary<string, SniConfig> lhs, Dictionary<string, SniConfig> rhs)
Internal\Http\HttpHeaders.cs (2)
25protected Dictionary<string, StringValues>? MaybeUnknown; 26protected Dictionary<string, StringValues> Unknown => MaybeUnknown ??= new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
Internal\Http\HttpRequestHeaders.cs (1)
240private Dictionary<string, StringValues>.Enumerator _unknownEnumerator;
Internal\Http\HttpResponseHeaders.cs (4)
42var extraHeaders = MaybeUnknown; 57static void CopyExtraHeaders(ref BufferWriter<PipeWriter> buffer, Dictionary<string, StringValues> headers) 74static void CopyExtraHeadersCustomEncoding(ref BufferWriter<PipeWriter> buffer, Dictionary<string, StringValues> headers, 148private Dictionary<string, StringValues>.Enumerator _unknownEnumerator;
Internal\Http\HttpResponseTrailers.cs (1)
57private Dictionary<string, StringValues>.Enumerator _unknownEnumerator;
Internal\Http2\Http2Connection.cs (1)
148internal readonly Dictionary<int, Http2Stream> _streams = new Dictionary<int, Http2Stream>();
Internal\Http3\Http3Connection.cs (3)
25internal readonly Dictionary<long, IHttp3Stream> _streams = new(); 26internal readonly Dictionary<long, Http3PendingStream> _unidentifiedStreams = new(); 43private readonly Dictionary<long, WebTransportSession>? _webtransportSessions;
Internal\SniOptionsSelector.cs (2)
28private readonly Dictionary<string, SniOptions> _exactNameOptions = new Dictionary<string, SniOptions>(StringComparer.OrdinalIgnoreCase); 34Dictionary<string, SniConfig> sniDictionary,
src\Shared\runtime\Http3\QPack\H3StaticTable.Http3.cs (1)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int>
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (42)
CertificatePathWatcherTests.cs (3)
476var dict = new Dictionary<string, object>(pairs); 521private readonly Dictionary<string, ConfigurationReloadToken> _changeTokens = new(); 522private readonly Dictionary<string, DateTimeOffset?> _lastModifiedTimes = new();
ConnectionDispatcherTests.cs (1)
45var pairs = scopeObjects[0].ToDictionary(p => p.Key, p => p.Value);
Http2\Http2HPackEncoderTests.cs (1)
662var groupedHeaders = headers
HttpParserTests.cs (1)
906public Dictionary<string, string> Headers { get; } = new Dictionary<string, string>();
SniOptionsSelectorTests.cs (30)
27var sniDictionary = new Dictionary<string, SniConfig> 62var pathDictionary = mockCertificateConfigLoader.CertToPathDictionary; 94var sniDictionary = new Dictionary<string, SniConfig> 119var pathDictionary = mockCertificateConfigLoader.CertToPathDictionary; 140var sniDictionary = new Dictionary<string, SniConfig> 165var pathDictionary = mockCertificateConfigLoader.CertToPathDictionary; 188var sniDictionary = new Dictionary<string, SniConfig> 213var pathDictionary = mockCertificateConfigLoader.CertToPathDictionary; 214var fullChainDictionary = mockCertificateConfigLoader.CertToFullChain; 252var sniDictionary = new Dictionary<string, SniConfig> 277var pathDictionary = mockCertificateConfigLoader.CertToPathDictionary; 297var sniDictionary = new Dictionary<string, SniConfig> 322var pathDictionary = mockCertificateConfigLoader.CertToPathDictionary; 355var sniDictionary = new Dictionary<string, SniConfig> 370var pathDictionary = mockCertificateConfigLoader.CertToPathDictionary; 387var sniDictionary = new Dictionary<string, SniConfig> 414var sniDictionary = new Dictionary<string, SniConfig> 455var sniDictionary = new Dictionary<string, SniConfig> 508var sniDictionary = new Dictionary<string, SniConfig> 528var sniDictionary = new Dictionary<string, SniConfig> 552var sniDictionary = new Dictionary<string, SniConfig> 580var sniDictionary = new Dictionary<string, SniConfig> 611var sniDictionary = new Dictionary<string, SniConfig> 644var sniDictionary = new Dictionary<string, SniConfig> 674var sniDictionary = new Dictionary<string, SniConfig> 708var sniDictionary = new Dictionary<string, SniConfig> 737var sniDictionary = new Dictionary<string, SniConfig> 773var sniDictionary = new Dictionary<string, SniConfig> 927public Dictionary<object, string> CertToPathDictionary { get; } = new Dictionary<object, string>(ReferenceEqualityComparer.Instance); 928public Dictionary<object, X509Certificate2Collection> CertToFullChain { get; } = new Dictionary<object, X509Certificate2Collection>(ReferenceEqualityComparer.Instance);
src\Servers\Kestrel\shared\test\RevocationResponder.cs (2)
19private readonly Dictionary<string, CertificateAuthority> _aiaPaths = 22private readonly Dictionary<string, CertificateAuthority> _crlPaths
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (2)
962public Dictionary<string, string> DecodedHeaders { get; } = new Dictionary<string, string>(); 963public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (2)
369public Dictionary<string, string> DecodedHeaders { get; } = new Dictionary<string, string>(); 370public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (9)
InMemoryTransportBenchmark.cs (1)
108private readonly Dictionary<EndPoint, IReadOnlyList<InMemoryConnection>> _connections =
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (7)
95internal Dictionary<string, object> ConnectionTags => MultiplexedConnectionContext.Tags.ToDictionary(t => t.Key, t => t.Value); 660public readonly Dictionary<string, string> DecodedHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 714var dictionary = headers 736internal async ValueTask<Dictionary<string, string>> ExpectHeadersAsync(bool expectEnd = false) 753internal async ValueTask<Dictionary<string, string>> ExpectTrailersAsync() 838internal async ValueTask<Dictionary<long, long>> ExpectSettingsAsync() 845var settings = new Dictionary<long, long>();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.Session (1)
DefaultDistributedSessionStore.cs (1)
11private readonly Dictionary<EncodedKey, byte[]> _store = new Dictionary<EncodedKey, byte[]>();
Microsoft.AspNetCore.Shared.Tests (33)
CopyOnWriteDictionaryHolderTest.cs (3)
17var source = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 43var source = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) 68var source = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)
CopyOnWriteDictionaryTest.cs (2)
63var sourceDictionary = new Dictionary<string, object> 87var sourceDictionary = new Dictionary<string, object>
runtime\Http2\HPackDecoderTest.cs (2)
962public Dictionary<string, string> DecodedHeaders { get; } = new Dictionary<string, string>(); 963public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
runtime\Http3\QPackDecoderTest.cs (2)
369public Dictionary<string, string> DecodedHeaders { get; } = new Dictionary<string, string>(); 370public Dictionary<int, KeyValuePair<string, string>> DecodedStaticHeaders { get; } = new Dictionary<int, KeyValuePair<string, string>>();
src\Shared\CopyOnWriteDictionary\CopyOnWriteDictionaryHolder.cs (8)
14private readonly Dictionary<TKey, TValue> _source; 15private Dictionary<TKey, TValue>? _copy; 17public CopyOnWriteDictionaryHolder(Dictionary<TKey, TValue> source) 33public Dictionary<TKey, TValue> ReadDictionary 54public Dictionary<TKey, TValue> WriteDictionary 72public Dictionary<TKey, TValue>.KeyCollection Keys 80public Dictionary<TKey, TValue>.ValueCollection Values 161public Dictionary<TKey, TValue>.Enumerator GetEnumerator()
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (3)
27internal Dictionary<TKey, TValue>? _dictionaryStorage; 91internal AdaptiveCapacityDictionary(Dictionary<TKey, TValue> dict) 604private Dictionary<TKey, TValue>.Enumerator? _dictionaryEnumerator;
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (1)
762var info = new Dictionary<int, ReadOnlyMemory<byte>>(count);
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
36var newDict = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase);
src\Shared\runtime\Http3\QPack\H3StaticTable.Http3.cs (1)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int>
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
17private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
TypeNameHelperTest.cs (9)
16[InlineData(typeof(Dictionary<int, string>), "System.Collections.Generic.Dictionary<int, string>")] 17[InlineData(typeof(Dictionary<int, List<string>>), "System.Collections.Generic.Dictionary<int, System.Collections.Generic.List<string>>")] 64[InlineData(typeof(Dictionary<int, string>), "Dictionary<int, string>")] 65[InlineData(typeof(Dictionary<int, List<string>>), "Dictionary<int, List<string>>")] 122var openDictionaryType = typeof(Dictionary<,>); 140{ typeof(Dictionary<,>), false , "Dictionary<,>" }, 142{ typeof(Dictionary<,>), true , "System.Collections.Generic.Dictionary<,>" }, 228{ typeof(Dictionary<int, string>), "System.Collections.Generic.Dictionary" }, 229{ typeof(Dictionary<int, List<string>>), "System.Collections.Generic.Dictionary" },
Microsoft.AspNetCore.SignalR.Client.Core (10)
HubConnection.cs (10)
734var readers = default(Dictionary<string, object>); 767private Dictionary<string, object>? PackageStreamingParams(ConnectionState connectionState, ref object?[] args, out List<string>? streamIds) 769Dictionary<string, object>? readers = null; 824private void LaunchStreams(ConnectionState connectionState, Dictionary<string, object>? readers, CancellationToken cancellationToken) 1081var readers = default(Dictionary<string, object>); 1231var readers = default(Dictionary<string, object>); 2130private readonly Dictionary<string, InvocationRequest> _pendingCalls = new Dictionary<string, InvocationRequest>(StringComparer.Ordinal);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (14)
HubConnectionTests.cs (1)
3035public static Dictionary<string, IHubProtocol> HubProtocols =>
HubConnectionTests.Tracing.cs (13)
160var baggage = a.Baggage.ToDictionary(); 172var baggage = a.Baggage.ToDictionary(); 193var baggage = clientActivity1.Baggage.ToDictionary(); 196var tags = clientActivity1.TagObjects.ToDictionary(); 333var baggage = a.Baggage.ToDictionary(); 354var baggage = clientActivity.Baggage.ToDictionary(); 357var tags = clientActivity.TagObjects.ToDictionary(); 449var tags = clientActivity.TagObjects.ToDictionary(); 458var tags = clientActivity.TagObjects.ToDictionary(); 546var tags = clientActivity.TagObjects.ToDictionary(); 555var tags = clientActivity.TagObjects.ToDictionary(); 641var tags = clientActivity.TagObjects.ToDictionary(); 651var tags = clientActivity.TagObjects.ToDictionary();
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Parser.cs (1)
240var providerSymbols = new Dictionary<string, (ITypeSymbol, MemberAccessExpressionSyntax)>();
HubServerProxyGenerator.Parser.cs (1)
228var hubSymbols = new Dictionary<string, (ITypeSymbol, MemberAccessExpressionSyntax)>();
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HttpConnectionFactoryTests.cs (1)
84var testValues = new Dictionary<string, object>
Microsoft.AspNetCore.SignalR.Core (2)
Internal\DefaultHubDispatcher.cs (1)
25private readonly Dictionary<string, HubMethodDescriptor> _methods = new(StringComparer.OrdinalIgnoreCase);
Internal\DefaultHubProtocolResolver.cs (1)
15private readonly Dictionary<string, IHubProtocol> _availableProtocols;
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.SignalR.Protocols.Json (4)
Protocol\JsonHubProtocol.cs (4)
141Dictionary<string, string>? headers = null; 481private static Dictionary<string, string> ReadHeaders(ref Utf8JsonReader reader) 483var headers = new Dictionary<string, string>(StringComparer.Ordinal); 904private static HubMessage ApplyHeaders(HubMessage message, Dictionary<string, string>? headers)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (7)
Protocol\MessagePackHubProtocolWorker.cs (7)
75var headers = ReadHeaders(ref reader); 111var headers = ReadHeaders(ref reader); 141var headers = ReadHeaders(ref reader); 161var headers = ReadHeaders(ref reader); 215var headers = ReadHeaders(ref reader); 241private static Dictionary<string, string>? ReadHeaders(ref MessagePackReader reader) 246var headers = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (4)
Protocol\NewtonsoftJsonHubProtocol.cs (4)
137Dictionary<string, string>? headers = null; 478private static Dictionary<string, string> ReadHeaders(JsonTextReader reader) 480var headers = new Dictionary<string, string>(StringComparer.Ordinal); 927private static HubMessage ApplyHeaders(HubMessage message, Dictionary<string, string>? headers)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (5)
DefaultHubMessageSerializerTests.cs (1)
67private static readonly Dictionary<string, ProtocolTestData> _invocationTestData = new[]
RedisProtocolTests.cs (4)
22private static readonly Dictionary<string, ProtocolTestData<int>> _ackTestData = new[] 57private static readonly Dictionary<string, ProtocolTestData<RedisGroupCommand>> _groupCommandTestData = new[] 97private static readonly Dictionary<string, ProtocolTestData<Func<RedisInvocation>>> _invocationTestData = new[] 203private static readonly Dictionary<string, ProtocolTestData<RedisCompletion>> _completionMessageTestData = new[]
Microsoft.AspNetCore.SignalR.Tests (5)
HubConnectionHandlerTests.Activity.cs (2)
132var headers = new Dictionary<string, string> 262var headers = new Dictionary<string, string>
HubConnectionHandlerTests.cs (2)
2469var result = message.Arguments[0] as Dictionary<object, object>;
UserAgentHeaderTest.cs (1)
22public static Dictionary<string, UserAgentTestData> UserAgents => new[]
Microsoft.AspNetCore.SpaServices.Extensions (1)
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (1)
73var envVars = new Dictionary<string, string>
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFileContextTest.cs (1)
150private readonly Dictionary<string, IFileInfo> _files = new Dictionary<string, IFileInfo>(StringComparer.Ordinal);
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Autobahn\AutobahnExpectations.cs (1)
11private readonly Dictionary<string, Expectation> _expectations = new Dictionary<string, Expectation>();
Microsoft.AspNetCore.WebSockets.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.WebUtilities (12)
FormPipeReader.cs (1)
91public async Task<Dictionary<string, StringValues>> ReadFormAsync(CancellationToken cancellationToken = default)
FormReader.cs (2)
283public Dictionary<string, StringValues> ReadForm() 299public async Task<Dictionary<string, StringValues>> ReadFormAsync(CancellationToken cancellationToken = new CancellationToken())
KeyValueAccumulator.cs (3)
14private Dictionary<string, StringValues> _accumulator; 15private Dictionary<string, List<string>> _expandingAccumulator; 94public Dictionary<string, StringValues> GetResults()
MultipartReader.cs (2)
99var headers = await ReadHeadersAsync(cancellationToken); 106private async Task<Dictionary<string, StringValues>> ReadHeadersAsync(CancellationToken cancellationToken)
MultipartSection.cs (1)
47public Dictionary<string, StringValues>? Headers { get; set; }
QueryHelpers.cs (3)
121public static Dictionary<string, StringValues> ParseQuery(string? queryString) 123var result = ParseNullableQuery(queryString); 138public static Dictionary<string, StringValues>? ParseNullableQuery(string? queryString)
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.AspNetCore.WebUtilities.Tests (45)
FormPipeReaderTests.cs (22)
19var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe)); 29var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe)); 40var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe)); 50var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe)); 60var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe)); 71var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe)); 94var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe) { ValueCountLimit = 3 }); 137var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe) { KeyLengthLimit = 10 }); 165var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe) { ValueLengthLimit = 10 }); 249var form = await ReadFormAsync(new FormPipeReader(bodyPipe)); 267var dict = accumulator.GetResults(); 285var dict = accumulator.GetResults(); 307var dict = accumulator.GetResults(); 326var dict = accumulator.GetResults(); 348var dict = accumulator.GetResults(); 367var dict = accumulator.GetResults(); 385var dict = accumulator.GetResults(); 404var dict = accumulator.GetResults(); 423var dict = accumulator.GetResults(); 440var dict = accumulator.GetResults(); 594var formCollection = await ReadFormAsync(new FormPipeReader(bodyPipe)); 622internal virtual Task<Dictionary<string, StringValues>> ReadFormAsync(FormPipeReader reader)
FormReaderAsyncTest.cs (1)
10protected override async Task<Dictionary<string, StringValues>> ReadFormAsync(FormReader reader)
FormReaderTests.cs (9)
18var formCollection = await ReadFormAsync(new FormReader(body)); 30var formCollection = await ReadFormAsync(new FormReader(body)); 43var formCollection = await ReadFormAsync(new FormReader(body)); 55var formCollection = await ReadFormAsync(new FormReader(body)); 68var formCollection = await ReadFormAsync(new FormReader(body) { ValueCountLimit = 3 }); 107var formCollection = await ReadFormAsync(new FormReader(body) { KeyLengthLimit = 10 }); 134var formCollection = await ReadFormAsync(new FormReader(body) { ValueLengthLimit = 10 }); 200var form = await ReadFormAsync(new FormReader(body)); 205protected virtual Task<Dictionary<string, StringValues>> ReadFormAsync(FormReader reader)
QueryHelpersTests.cs (13)
13var collection = QueryHelpers.ParseQuery("?key1=value1&key2=value2"); 22var collection = QueryHelpers.ParseQuery("key1=value1&key2=value2"); 31var collection = QueryHelpers.ParseQuery("?key1=valueA&key2=valueB&key1=valueC"); 40var collection = QueryHelpers.ParseQuery("?key1=&key2="); 49var collection = QueryHelpers.ParseQuery("?=value1&="); 57var collection = QueryHelpers.ParseQuery("?fields+%5BtodoItems%5D"); 65var collection = QueryHelpers.ParseQuery("?=fields+%5BtodoItems%5D"); 73var collection = QueryHelpers.ParseQuery("?fields+%5BtodoItems%5D="); 81var collection = QueryHelpers.ParseQuery("?fields+%5BtodoItems%5D=%5B+1+%5D"); 89var collection = QueryHelpers.ParseQuery("?fields+%5BtodoItems%5D=%5B+1+%5D&fields+%5BtodoItems%5D=%5B+2+%5D"); 100var collection = QueryHelpers.ParseQuery(queryString); 158var queryStrings = new Dictionary<string, string?>() 191var queryStrings = new Dictionary<string, StringValues>()
Microsoft.Build.Framework (63)
BinaryReaderExtensions.cs (2)
129public static Dictionary<string, TimeSpan> ReadDurationDictionary(this BinaryReader reader) 132var durations = new Dictionary<string, TimeSpan>(count);
BinaryTranslator.cs (9)
581public void TranslateDictionary(ref Dictionary<string, string> dictionary, IEqualityComparer<string> comparer) 589dictionary = (Dictionary<string, string>)copy; 603public void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys) 690public void TranslateDictionary<T>(ref Dictionary<string, T> dictionary, IEqualityComparer<string> comparer, ObjectTranslator<T> objectTranslator) 770public void TranslateDictionary(ref Dictionary<string, DateTime> dictionary, StringComparer comparer) 1369public void TranslateDictionary(ref Dictionary<string, string> dictionary, IEqualityComparer<string> comparer) 1386public void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys) 1490public void TranslateDictionary<T>(ref Dictionary<string, T> dictionary, IEqualityComparer<string> comparer, ObjectTranslator<T> objectTranslator) 1572public void TranslateDictionary(ref Dictionary<string, DateTime> dictionary, StringComparer comparer)
BinaryWriterExtensions.cs (1)
133public static void WriteDurationsDictionary(this BinaryWriter writer, Dictionary<string, TimeSpan> durations)
BuildCheck\BuildCheckEventArgs.cs (2)
29internal BuildCheckTracingEventArgs(Dictionary<string, TimeSpan> executionData) 80var infrastructureTracingData = reader.ReadDurationDictionary();
BuildCheck\BuildCheckTracingData.cs (7)
16Dictionary<string, BuildCheckRuleTelemetryData> telemetryData, 17Dictionary<string, TimeSpan> infrastructureTracingData) 19public BuildCheckTracingData(IReadOnlyList<BuildCheckRuleTelemetryData> telemetryData, Dictionary<string, TimeSpan> infrastructureTracingData) 27internal BuildCheckTracingData(Dictionary<string, TimeSpan> executionData) 31public Dictionary<string, BuildCheckRuleTelemetryData> TelemetryData { get; private set; } = telemetryData; 32public Dictionary<string, TimeSpan> InfrastructureTracingData { get; private set; } = infrastructureTracingData; 37public Dictionary<string, TimeSpan> ExtractCheckStats() =>
BuildException\BuildExceptionSerializationHelper.cs (2)
24private static Dictionary<string, Func<string, Exception?, BuildExceptionBase>>? s_exceptionFactories; 49var exceptionFactories = new Dictionary<string, Func<string, Exception?, BuildExceptionBase>>();
BuildSubmissionStartedEventArgs.cs (1)
84Dictionary<string, string?> globalProperties = new Dictionary<string, string?>(numberOfProperties);
ExtendedBuildErrorEventArgs.cs (1)
24public Dictionary<string, string?>? ExtendedMetadata { get; set; }
ExtendedBuildMessageEventArgs.cs (1)
21public Dictionary<string, string?>? ExtendedMetadata { get; set; }
ExtendedBuildWarningEventArgs.cs (1)
24public Dictionary<string, string?>? ExtendedMetadata { get; set; }
ExtendedCriticalBuildMessageEventArgs.cs (1)
21public Dictionary<string, string?>? ExtendedMetadata { get; set; }
ExtendedCustomBuildEventArgs.cs (1)
21public Dictionary<string, string?>? ExtendedMetadata { get; set; }
Features.cs (1)
39private static readonly Dictionary<string, FeatureStatus> _featureStatusMap = new Dictionary<string, FeatureStatus>
IExtendedBuildEventArgs.cs (1)
25Dictionary<string, string?>? ExtendedMetadata { get; set; }
InsertionBehavior.cs (1)
16/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
InterningReadTranslator.cs (1)
23private Dictionary<InternPathIds, string> _pathIdsToString = [];
InterningWriteTranslator.cs (2)
40private Dictionary<string, int> _stringToIds = []; 42private Dictionary<string, InternPathIds> _stringToPathIds = [];
ITranslator.cs (4)
308void TranslateDictionary(ref Dictionary<string, string> dictionary, IEqualityComparer<string> comparer); 321void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys); 325void TranslateDictionary(ref Dictionary<string, DateTime> dictionary, StringComparer comparer); 336void TranslateDictionary<T>(ref Dictionary<string, T> dictionary, IEqualityComparer<string> comparer, ObjectTranslator<T> objectTranslator)
Profiler\EvaluationLocation.cs (1)
62private static readonly Dictionary<EvaluationPass, string> PassDefaultDescription =
Sdk\SdkResultItem.cs (2)
19public Dictionary<string, string>? Metadata { get; } 32public SdkResultItem(string itemSpec, Dictionary<string, string>? metadata)
SegmentedDictionary`2.cs (1)
25/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
TaskItemData.cs (2)
19private static readonly Dictionary<string, string> _emptyMetadata = new Dictionary<string, string>(); 41var dictionary = new Dictionary<string, string>();
Telemetry\BuildCheckTelemetry.cs (2)
25var properties = new Dictionary<string, string>(); 53var properties = new Dictionary<string, string>();
Telemetry\BuildTelemetry.cs (1)
100var properties = new Dictionary<string, string>();
Telemetry\IWorkerNodeTelemetryData.cs (2)
10Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats> TasksExecutionData { get; } 11Dictionary<TaskOrTargetTelemetryKey, bool> TargetsExecutionData { get; }
Telemetry\LoggingConfigurationTelemetry.cs (1)
102var properties = new Dictionary<string, string>();
Telemetry\WorkerNodeTelemetryData.cs (4)
11public WorkerNodeTelemetryData(Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats> tasksExecutionData, Dictionary<TaskOrTargetTelemetryKey, bool> targetsExecutionData) 57public Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats> TasksExecutionData { get; } 58public Dictionary<TaskOrTargetTelemetryKey, bool> TargetsExecutionData { get; }
Telemetry\WorkerNodeTelemetryEventArgs.cs (2)
43Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats> tasksExecutionData = new(); 54Dictionary<TaskOrTargetTelemetryKey, bool> targetsExecutionData = new();
XamlTypes\ContentType.cs (4)
23private Lazy<Dictionary<string, string>> _metadata; 33_metadata = new Lazy<Dictionary<string, string>>(this.InitializeMetadata, System.Threading.LazyThreadSafetyMode.ExecutionAndPublication); 157private Dictionary<string, string> InitializeMetadata() 159var metadata = new Dictionary<string, string>(this.Metadata.Count, StringComparer.OrdinalIgnoreCase);
XamlTypes\Rule.cs (2)
360public Dictionary<string, object> Metadata { get; set; } 497var map = new Dictionary<string, BaseProperty>(this.Properties.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (2)
92var rootByItemSpec = new Dictionary<string, ITaskItem>(); 123var topLevelMappedPaths = new Dictionary<string, string>();
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (2)
92var rootByItemSpec = new Dictionary<string, ITaskItem>(); 123var topLevelMappedPaths = new Dictionary<string, string>();
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (5)
TargetTests.cs (1)
956static void addTask(Project proj, string taskName, Dictionary<string, string> parameters)
TestUtilities\MSBuildUtil.cs (1)
29public static ITaskItem CreateTaskItem(string fileName, Dictionary<string, string> metadata)
TestUtilities\SimpleTaskItem.cs (3)
16public Dictionary<string, string> Metadata { get; } 22internal SimpleTaskItem(string itemSpec, Dictionary<string, string> metadata) 45var map = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.Cci.Extensions (14)
Extensions\TypeExtensions.cs (1)
448private static Dictionary<string, string> s_tokenNames = new Dictionary<string, string>()
Filters\BaselineDifferenceFilter.cs (1)
14private readonly Dictionary<string, bool> _ignoreDifferences = new Dictionary<string, bool>();
Mappings\AssemblyMapping.cs (2)
13private readonly Dictionary<INamespaceDefinition, NamespaceMapping> _namespaces; 14private Dictionary<string, ElementMapping<AssemblyProperty>> _properties;
Mappings\AssemblySetMapping.cs (2)
11private readonly Dictionary<IAssembly, AssemblyMapping> _assemblies; 12private readonly Dictionary<INamespaceDefinition, NamespaceMapping> _namespaces;
Mappings\AttributesMapping.cs (1)
16private Dictionary<string, ElementMapping<AttributeGroup>> _attributes;
Mappings\NamespaceMapping.cs (1)
14private readonly Dictionary<ITypeDefinition, TypeMapping> _types;
Mappings\TypeMapping.cs (2)
13private readonly Dictionary<ITypeDefinitionMember, MemberMapping> _members; 14private readonly Dictionary<INestedTypeDefinition, TypeMapping> _nestedTypes;
SRMetadataPEReaderCache.cs (1)
19private Dictionary<string, (FileStream, PEReader)> _cache = null;
Traversers\DependencyTraverser.cs (1)
16private readonly Dictionary<IDefinition, HashSet<IReference>> _dependencies;
Traversers\DocIdToTypeMappingTraverser.cs (1)
11private readonly Dictionary<string, ITypeDefinition> _typesIdMap;
Traversers\ResolveAllReferencesTraverser.cs (1)
14private Dictionary<IReference, HashSet<IReference>> _missingDependencies;
Microsoft.CodeAnalysis (235)
Binding\AbstractLookupSymbolsInfo.cs (1)
231private readonly Dictionary<string, UniqueSymbolOrArities> _nameMap;
CodeGen\CompilationTestData.cs (1)
68var map = new Dictionary<string, MethodData>();
CodeGen\LocalSlotManager.cs (3)
64private Dictionary<ILocalSymbolInternal, LocalDefinition>? _localMap; 89private Dictionary<ILocalSymbolInternal, LocalDefinition> LocalMap 93var map = _localMap;
CodeGen\SwitchStringJumpTableEmitter.cs (7)
115Dictionary<uint, HashBucket> stringHashMap = ComputeStringHashMap( 121Dictionary<uint, object> hashBucketLabelsMap = EmitHashBucketJumpTable(stringHashMap); 137private Dictionary<uint, object> EmitHashBucketJumpTable(Dictionary<uint, HashBucket> stringHashMap) 140var hashBucketLabelsMap = new Dictionary<uint, object>(count); 191private static Dictionary<uint, HashBucket> ComputeStringHashMap( 196var stringHashMap = new Dictionary<uint, HashBucket>(caseLabels.Length);
Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
Collections\IdentifierCollection.cs (1)
27private readonly Dictionary<string, object> _map = new Dictionary<string, object>(
Collections\KeyedStack.cs (1)
18private readonly Dictionary<T, Stack<R>> _dict = new Dictionary<T, Stack<R>>();
Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
CommandLine\CommandLineParser.cs (1)
1344internal ReportDiagnostic GetDiagnosticOptionsFromRulesetFile(string? fullPath, out Dictionary<string, ReportDiagnostic> diagnosticOptions, IList<Diagnostic> diagnostics)
CommandLine\CommonCompiler.cs (1)
432var embeddedTreeMap = new Dictionary<string, SyntaxTree>(Arguments.EmbeddedFiles.Length);
CommandLine\SarifV1ErrorLogger.cs (2)
235private readonly Dictionary<string, int> _counters = new Dictionary<string, int>(); 238private readonly Dictionary<DiagnosticDescriptor, string> _keys = new Dictionary<DiagnosticDescriptor, string>(SarifDiagnosticComparer.Instance);
CommandLine\SarifV2ErrorLogger.cs (1)
459private readonly Dictionary<DiagnosticDescriptor, DescriptorInfoWithIndex> _distinctDescriptors = new(SarifDiagnosticComparer.Instance);
Compilation\CommonModuleCompilationState.cs (1)
40private Dictionary<TMethodSymbol, TNamedTypeSymbol>? _lazyStateMachineTypes;
DiagnosticAnalyzer\AnalysisResultBuilder.cs (34)
29private readonly Dictionary<DiagnosticAnalyzer, TimeSpan>? _analyzerExecutionTimeOpt; 31private readonly Dictionary<SyntaxTree, HashSet<DiagnosticAnalyzer>> _completedSyntaxAnalyzersByTree; 32private readonly Dictionary<SyntaxTree, HashSet<DiagnosticAnalyzer>> _completedSemanticAnalyzersByTree; 33private readonly Dictionary<AdditionalText, HashSet<DiagnosticAnalyzer>> _completedSyntaxAnalyzersByAdditionalFile; 34private readonly Dictionary<DiagnosticAnalyzer, AnalyzerActionCounts> _analyzerActionCounts; 37private Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localSemanticDiagnosticsOpt = null; 38private Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localSyntaxDiagnosticsOpt = null; 39private Dictionary<AdditionalText, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? _localAdditionalFileDiagnosticsOpt = null; 40private Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? _nonLocalDiagnosticsOpt = null; 53private static Dictionary<DiagnosticAnalyzer, TimeSpan> CreateAnalyzerExecutionTimeMap(ImmutableArray<DiagnosticAnalyzer> analyzers) 55var map = new Dictionary<DiagnosticAnalyzer, TimeSpan>(analyzers.Length); 109var completedAnalyzersByTree = syntax ? _completedSyntaxAnalyzersByTree : _completedSemanticAnalyzersByTree; 135var completedAnalyzersByTree = syntax ? _completedSyntaxAnalyzersByTree : _completedSemanticAnalyzersByTree; 332ref Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? lazyLocalDiagnostics) 340lazyLocalDiagnostics = lazyLocalDiagnostics ?? new Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>(); 350Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? allDiagnostics; 443Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? lazyLocalDiagnostics, 450foreach (var localDiagsByTree in lazyLocalDiagnostics.Values) 458Dictionary<SyntaxTree, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics, 464Dictionary<AdditionalText, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics, 470Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnostics, 476Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? diagnosticsForTree; 484Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder> diagnostics, 527Dictionary<TKey, Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>>? localDiagnosticsOpt) 563Dictionary<DiagnosticAnalyzer, ImmutableArray<Diagnostic>.Builder>? nonLocalDiagnosticsOpt)
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (1)
29private readonly Dictionary<string, DirectoryLoadContext> _loadContextByDirectory = new Dictionary<string, DirectoryLoadContext>(GeneratedPathComparer);
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (3)
76private readonly Dictionary<string, (IAnalyzerPathResolver? Resolver, string ResolvedPath, AssemblyName? AssemblyName)> _originalPathInfoMap = new(OriginalPathComparer); 86private readonly Dictionary<string, HashSet<string>> _assemblySimpleNameToOriginalPathListMap = new(SimpleNameComparer.Comparer); 97private readonly Dictionary<string, string> _resolvedToOriginalPathMap = new(GeneratedPathComparer);
DiagnosticAnalyzer\AnalyzerDriver.cs (2)
245private Dictionary<SyntaxTree, ImmutableHashSet<ISymbol>>? _lazyGeneratedCodeSymbolsForTreeMap; 250private Dictionary<SyntaxTree, ImmutableHashSet<ISymbol>> GeneratedCodeSymbolsForTreeMap
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
230Dictionary<string, ImmutableHashSet<string>.Builder> typeNameMap = new Dictionary<string, ImmutableHashSet<string>.Builder>(StringComparer.OrdinalIgnoreCase);
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (3)
33private Dictionary<ISymbol, HashSet<ISymbol>?>? _lazyPendingMemberSymbolsMap; 38private Dictionary<ISymbol, (ImmutableArray<SymbolEndAnalyzerAction>, SymbolDeclaredCompilationEvent)>? _lazyPendingSymbolEndActionsMap; 54private Dictionary<ISymbol, Task<HostSymbolStartAnalysisScope>>? _lazySymbolScopeTasks;
DiagnosticAnalyzer\AnalyzerManager.cs (3)
31private readonly Dictionary<DiagnosticAnalyzer, AnalyzerExecutionContext> _analyzerExecutionContextMap; 43private Dictionary<DiagnosticAnalyzer, AnalyzerExecutionContext> CreateAnalyzerExecutionContextMap(IEnumerable<DiagnosticAnalyzer> analyzers) 45var analyzerExecutionContextMap = new Dictionary<DiagnosticAnalyzer, AnalyzerExecutionContext>();
DiagnosticAnalyzer\CompilationAnalysisValueProvider.cs (1)
20private readonly Dictionary<TKey, TValue> _valueMap;
DiagnosticAnalyzer\CompilationAnalysisValueProviderFactory.cs (1)
14private Dictionary<object, object> _lazySharedStateProviderMap;
DiagnosticAnalyzer\DiagnosticQueue.cs (8)
100private Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? _lazyLocalSemanticDiagnostics; 101private Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? _lazyLocalSyntaxDiagnostics; 102private Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? _lazyNonLocalDiagnostics; 128[NotNull] ref Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? lazyDiagnosticsMap, 139private static void EnqueueCore_NoLock(Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue> diagnosticsMap, Diagnostic diagnostic, DiagnosticAnalyzer analyzer) 171private static bool TryDequeue_NoLock(Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? lazyDiagnosticsMap, [NotNullWhen(returnValue: true)] out Diagnostic? d) 200private ImmutableArray<Diagnostic> DequeueDiagnosticsCore(DiagnosticAnalyzer analyzer, Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? lazyDiagnosticsMap) 218Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? diagnosticsMap,
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (6)
46private readonly Dictionary<string, SuppressMessageInfo> _compilationWideSuppressions = new Dictionary<string, SuppressMessageInfo>(); 47private readonly Dictionary<ISymbol, Dictionary<string, SuppressMessageInfo>> _globalSymbolSuppressions = new Dictionary<ISymbol, Dictionary<string, SuppressMessageInfo>>(); 56Dictionary<string, SuppressMessageInfo>? suppressions; 76Dictionary<string, SuppressMessageInfo>? suppressions;
Emit\EditAndContinue\DefinitionMap.cs (4)
67var mappedMethods = new Dictionary<IMethodSymbolInternal, EncMappedMethod>(); 190var declaratorToIndex = new Dictionary<SyntaxNode, int>(); 499var hoistedLocals = new Dictionary<EncHoistedLocalInfo, int>(); 500var awaiters = new Dictionary<Cci.ITypeReference, int>(Cci.SymbolEquivalentEqualityComparer.Instance);
Emit\EditAndContinue\DeletedSourceDefinition.cs (2)
19private readonly Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> _typesUsedByDeletedMembers; 29protected DeletedSourceDefinition(T oldDefinition, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers)
Emit\EditAndContinue\DeletedSourceGenericParameter.cs (1)
17public DeletedSourceGenericParameter(IGenericMethodParameter oldParameter, DeletedSourceMethodDefinition method, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers)
Emit\EditAndContinue\DeletedSourceMethodDefinition.cs (1)
21public DeletedSourceMethodDefinition(IMethodDefinition oldMethod, MethodDefinitionHandle handle, ImmutableArray<byte> bodyIL, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers)
Emit\EditAndContinue\DeletedSourceParameterDefinition.cs (1)
16public DeletedSourceParameterDefinition(IParameterDefinition oldParameter, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers)
Emit\EditAndContinue\DeletedSourceTypeDefinition.cs (1)
20public DeletedSourceTypeDefinition(ITypeDefinition oldDefinition, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers)
Emit\EditAndContinue\DeltaMetadataWriter.cs (15)
35private readonly Dictionary<ITypeDefinition, ImmutableArray<IMethodDefinition>> _deletedTypeMembers; 44private readonly Dictionary<IParameterDefinition, IMethodDefinition> _parameterDefList; 52private readonly Dictionary<EntityHandle, ImmutableArray<int>> _customAttributesAdded; 57private readonly Dictionary<IParameterDefinition, int> _existingParameterDefs; 58private readonly Dictionary<MethodDefinitionHandle, int> _firstParamRowMap; 67private readonly Dictionary<IMethodDefinition, AddedOrChangedMethodInfo> _addedOrChangedMethods; 182var addedOrChangedMethodsByIndex = new Dictionary<int, AddedOrChangedMethodInfo>(); 207var generationOrdinals = CreateDictionary(_previousGeneration.GenerationOrdinals, SymbolEquivalentEqualityComparer.Instance); 249private static Dictionary<K, V> CreateDictionary<K, V>(IReadOnlyDictionary<K, V> dictionary, IEqualityComparer<K>? comparer) 252var result = new Dictionary<K, V>(comparer); 274var result = CreateDictionary(previous, comparer); 507var result = new Dictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>>(ReferenceEqualityComparer.Instance); 508var typesUsedByDeletedMembers = new Dictionary<ITypeDefinition, DeletedSourceTypeDefinition>(ReferenceEqualityComparer.Instance); 1456protected readonly Dictionary<T, int> added; // Definitions added in this generation. 1550private readonly Dictionary<int, T> _map;
Emit\EditAndContinue\EmitBaseline.cs (6)
501private static Dictionary<int, int> CalculateTypePropertyMap(MetadataReader reader) 503var result = new Dictionary<int, int>(); 516private static Dictionary<int, int> CalculateTypeEventMap(MetadataReader reader) 518var result = new Dictionary<int, int>(); 531private static Dictionary<MethodImplKey, int> CalculateMethodImpls(MetadataReader reader) 533var result = new Dictionary<MethodImplKey, int>();
Emit\EditAndContinue\EncVariableSlotAllocator.cs (1)
83var previousLocalInfoToSlot = new Dictionary<EncLocalInfo, int>();
Emit\EditAndContinue\SymbolChanges.cs (5)
356var changesBuilder = new Dictionary<ISymbolInternal, SymbolChange>(); 357var updatedMethodsBuilder = new Dictionary<INamedTypeSymbolInternal, ArrayBuilder<(IMethodSymbolInternal oldMethod, IMethodSymbolInternal newMethod)>>(); 359var lazyDeletedMembersBuilder = (Dictionary<ISymbolInternal, ArrayBuilder<ISymbolInternal>>?)null; 477private static void AddContainingSymbolChanges(Dictionary<ISymbolInternal, SymbolChange> changes, ISymbolInternal symbol)
Emit\EditAndContinue\SymbolMatcher.cs (2)
79var result = new Dictionary<K, V>(Cci.SymbolEquivalentEqualityComparer.Instance); 98var result = new Dictionary<int, AddedOrChangedMethodInfo>();
InternalUtilities\ConcurrentLruCache.cs (1)
28private readonly Dictionary<K, CacheValue> _cache;
InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
MetadataReader\MetadataHelpers.cs (1)
899var names = new Dictionary<string, int>(nestedNamespaces.Count, nameComparer);
MetadataReader\PEAssembly.cs (3)
57private Dictionary<string, List<ImmutableArray<byte>>> _lazyInternalsVisibleToMap; 134private Dictionary<string, List<ImmutableArray<byte>>> BuildInternalsVisibleToMap() 136var ivtMap = new Dictionary<string, List<ImmutableArray<byte>>>(StringComparer.OrdinalIgnoreCase);
MetadataReader\PEModule.cs (10)
50private static readonly Dictionary<string, (int FirstIndex, int SecondIndex)> s_sharedEmptyForwardedTypes = new Dictionary<string, (int FirstIndex, int SecondIndex)>(); 51private static readonly Dictionary<string, (string OriginalName, int FirstIndex, int SecondIndex)> s_sharedEmptyCaseInsensitiveForwardedTypes = new Dictionary<string, (string OriginalName, int FirstIndex, int SecondIndex)>(); 59private Dictionary<string, (int FirstIndex, int SecondIndex)> _lazyForwardedTypesToAssemblyIndexMap; 66private Dictionary<string, (string OriginalName, int FirstIndex, int SecondIndex)> _lazyCaseInsensitiveForwardedTypesToAssemblyIndexMap; 676Dictionary<string, ArrayBuilder<TypeDefinitionHandle>?> namespaces = new Dictionary<string, ArrayBuilder<TypeDefinitionHandle>?>(); 754private void GetTypeNamespaceNamesOrThrow(Dictionary<string, ArrayBuilder<TypeDefinitionHandle>> namespaces) 757var namespaceHandles = new Dictionary<NamespaceDefinitionHandle, ArrayBuilder<TypeDefinitionHandle>>(NamespaceHandleEqualityComparer.Singleton); 834private void GetForwardedTypeNamespaceNamesOrThrow(Dictionary<string, ArrayBuilder<TypeDefinitionHandle>?> namespaces) 3821var caseInsensitiveMap = new Dictionary<string, (string OriginalName, int FirstIndex, int SecondIndex)>(StringComparer.OrdinalIgnoreCase); 3844Dictionary<string, (int FirstIndex, int SecondIndex)>? typesToAssemblyIndexMap = null;
MetadataReference\AssemblyIdentityMap.cs (1)
21private readonly Dictionary<string, OneOrMany<KeyValuePair<AssemblyIdentity, TValue>>> _map;
NativePdbWriter\PdbWriter.cs (2)
32private readonly Dictionary<DebugSourceDocument, int> _documentIndex; 38private readonly Dictionary<object, string> _qualifiedNameCache;
Operations\ControlFlowGraphBuilder.cs (1)
7975var explicitProperties = new Dictionary<IPropertySymbol, IOperation>(SymbolEqualityComparer.IgnoreAll);
Operations\OperationMapBuilder.cs (8)
19internal static void AddToMap(IOperation root, Dictionary<SyntaxNode, IOperation> dictionary) 25private sealed class Walker : OperationWalker<Dictionary<SyntaxNode, IOperation>> 29public override object? DefaultVisit(IOperation operation, Dictionary<SyntaxNode, IOperation> argument) 35public override object? VisitBinaryOperator([DisallowNull] IBinaryOperation? operation, Dictionary<SyntaxNode, IOperation> argument) 57public override object? VisitConditional(IConditionalOperation operation, Dictionary<SyntaxNode, IOperation> argument) 78public override object? VisitBinaryPattern(IBinaryPatternOperation operation, Dictionary<SyntaxNode, IOperation> argument) 100internal override object? VisitNoneOperation(IOperation operation, Dictionary<SyntaxNode, IOperation> argument) 107private static void RecordOperation(IOperation operation, Dictionary<SyntaxNode, IOperation> argument)
PEWriter\FullMetadataWriter.cs (2)
27private readonly Dictionary<ITypeDefinition, int> _fieldDefIndex; 28private readonly Dictionary<ITypeDefinition, int> _methodDefIndex;
PEWriter\MetadataWriter.cs (13)
83private readonly Dictionary<(ImmutableArray<byte>, bool), int> _smallMethodBodies; 438private readonly Dictionary<ICustomAttribute, BlobHandle> _customAttributeSignatureIndex = new Dictionary<ICustomAttribute, BlobHandle>(); 439private readonly Dictionary<ITypeReference, BlobHandle> _typeSpecSignatureIndex = new Dictionary<ITypeReference, BlobHandle>(ReferenceEqualityComparer.Instance); 440private readonly Dictionary<string, int> _fileRefIndex = new Dictionary<string, int>(32); // more than enough in most cases, value is a RowId 442private readonly Dictionary<IFieldReference, BlobHandle> _fieldSignatureIndex = new Dictionary<IFieldReference, BlobHandle>(ReferenceEqualityComparer.Instance); 447private readonly Dictionary<IMarshallingInformation, BlobHandle> _marshallingDescriptorIndex = new Dictionary<IMarshallingInformation, BlobHandle>(); 449private readonly Dictionary<IGenericMethodInstanceReference, BlobHandle> _methodInstanceSignatureIndex = new Dictionary<IGenericMethodInstanceReference, BlobHandle>(ReferenceEqualityComparer.Instance); 4256private readonly Dictionary<T, int> _index; 4263private HeapOrReferenceIndex(MetadataWriter writer, Dictionary<T, int> index, int lastRowId) 4283private readonly Dictionary<ITypeReference, int> _index; 4290private TypeReferenceIndex(MetadataWriter writer, Dictionary<ITypeReference, int> index, int lastRowId) 4310private readonly Dictionary<T, int> _instanceIndex; 4311private readonly Dictionary<T, int> _structuralIndex;
PEWriter\MetadataWriter.DynamicAnalysis.cs (5)
33private readonly Dictionary<ImmutableArray<byte>, BlobHandle> _blobs; 37private readonly Dictionary<Guid, GuidHandle> _guids; 44private readonly Dictionary<DebugSourceDocument, int> _documentIndex; 126Dictionary<DebugSourceDocument, int> documentIndex) 205private int GetOrAddDocument(DebugSourceDocument document, Dictionary<DebugSourceDocument, int> index)
PEWriter\MetadataWriter.PortablePdb.cs (6)
54private readonly Dictionary<DebugSourceDocument, DocumentHandle> _documentIndex = new Dictionary<DebugSourceDocument, DocumentHandle>(); 55private readonly Dictionary<IImportScope, ImportScopeHandle> _scopeIndex; 436private ImportScopeHandle GetImportScopeIndex(IImportScope scope, Dictionary<IImportScope, ImportScopeHandle> scopeIndex) 629Dictionary<DebugSourceDocument, DocumentHandle> documentIndex, 743private DocumentHandle GetOrAddDocument(DebugSourceDocument document, Dictionary<DebugSourceDocument, DocumentHandle> index) 753private DocumentHandle AddDocument(DebugSourceDocument document, Dictionary<DebugSourceDocument, DocumentHandle> index)
ReferenceManager\CommonReferenceManager.Binding.cs (4)
101[In, Out] Dictionary<string, List<ReferencedAssemblyIdentity>> assemblyReferencesBySimpleName, 218[In, Out] Dictionary<string, List<ReferencedAssemblyIdentity>> assemblyReferencesBySimpleName, 239Dictionary<MetadataReference, MergedAliases>? lazyAliasMap = null; 462Dictionary<MetadataReference, MergedAliases>? propertyMapOpt,
ReferenceManager\CommonReferenceManager.Resolution.cs (6)
213[Out] Dictionary<string, List<ReferencedAssemblyIdentity>> assemblyReferencesBySimpleName, 233Dictionary<MetadataReference, MergedAliases>? lazyAliasMap = null; 236var boundReferences = new Dictionary<MetadataReference, MetadataReference>(MetadataReferenceEqualityComparer.Instance); 440private static ResolvedReference GetResolvedReferenceAndFreePropertyMapEntry(MetadataReference reference, int index, MetadataImageKind kind, Dictionary<MetadataReference, MergedAliases>? propertyMapOpt) 611private void MergeReferenceProperties(MetadataReference primaryReference, MetadataReference newReference, DiagnosticBag diagnostics, ref Dictionary<MetadataReference, MergedAliases>? lazyAliasMap) 670Dictionary<string, List<ReferencedAssemblyIdentity>> referencesBySimpleName,
ReferenceManager\CommonReferenceManager.State.cs (12)
72internal readonly Dictionary<MetadataReference, MetadataOrDiagnostic> ObservedMetadata; 91private Dictionary<MetadataReference, int>? _lazyReferencedAssembliesMap; 101private Dictionary<MetadataReference, int>? _lazyReferencedModuleIndexMap; 195public CommonReferenceManager(string simpleAssemblyName, AssemblyIdentityComparer identityComparer, Dictionary<MetadataReference, MetadataOrDiagnostic>? observedMetadata) 223internal Dictionary<MetadataReference, int> ReferencedAssembliesMap 232internal Dictionary<MetadataReference, int> ReferencedModuleIndexMap 409Dictionary<MetadataReference, int> referencedAssembliesMap, 410Dictionary<MetadataReference, int> referencedModulesMap, 423Dictionary<MetadataReference, ImmutableArray<MetadataReference>>? mergedAssemblyReferencesMapOpt) 467out Dictionary<MetadataReference, int> referencedAssembliesMap, 468out Dictionary<MetadataReference, int> referencedModulesMap, 470out Dictionary<MetadataReference, ImmutableArray<MetadataReference>>? mergedAssemblyReferencesMapOpt)
RuleSet\RuleSet.cs (4)
108var effectiveSpecificOptions = new Dictionary<string, ReportDiagnostic>(); 283public static ReportDiagnostic GetDiagnosticOptionsFromRulesetFile(string? rulesetFileFullPath, out Dictionary<string, ReportDiagnostic> specificDiagnosticOptions) 288internal static ReportDiagnostic GetDiagnosticOptionsFromRulesetFile(string? rulesetFileFullPath, out Dictionary<string, ReportDiagnostic> diagnosticOptions, IList<Diagnostic>? diagnosticsOpt, CommonMessageProvider? messageProviderOpt) 299private static ReportDiagnostic GetDiagnosticOptionsFromRulesetFile(Dictionary<string, ReportDiagnostic> diagnosticOptions, string resolvedPath, IList<Diagnostic>? diagnosticsOpt, CommonMessageProvider? messageProviderOpt)
SourceGeneration\Nodes\GeneratorRunStateTable.cs (4)
27private readonly Dictionary<string, HashSet<IncrementalGeneratorRunStep>>? _namedSteps; 28private readonly Dictionary<string, HashSet<IncrementalGeneratorRunStep>>? _outputSteps; 57private static ImmutableDictionary<string, ImmutableArray<IncrementalGeneratorRunStep>> StepCollectionToImmutable(Dictionary<string, HashSet<IncrementalGeneratorRunStep>>? builder) 93static void addToNamedStepCollection(Dictionary<string, HashSet<IncrementalGeneratorRunStep>> stepCollectionBuilder, IncrementalGeneratorRunStep step)
SpecialTypes.cs (1)
80private static readonly Dictionary<string, ExtendedSpecialType> s_nameToTypeIdMap;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
WellKnownTypes.cs (1)
704private static readonly Dictionary<string, WellKnownType> s_nameToTypeIdMap = new Dictionary<string, WellKnownType>((int)Count);
Microsoft.CodeAnalysis.Analyzers (155)
FixAnalyzers\FixerWithFixAllAnalyzer.cs (3)
155private readonly Dictionary<INamedTypeSymbol, HashSet<IInvocationOperation>> _codeActionCreateInvocations = []; 160private readonly Dictionary<INamedTypeSymbol, HashSet<IObjectCreationOperation>> _codeActionObjectCreations = []; 202private static void AddOperation<T>(INamedTypeSymbol namedType, T operation, Dictionary<INamedTypeSymbol, HashSet<T>> map)
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (3)
201Dictionary<string, string> entriesToUpdate, 208Dictionary<string, string>? entriesToUpdate, 253Dictionary<string, string>? entriesToUpdate,
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (1)
145var entriesToUpdate = new Dictionary<string, string>();
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (1)
100var fixInfoMap = new Dictionary<TextDocument, List<FixInfo>>();
MetaAnalyzers\PreferIsKindAnalyzer.cs (2)
50Dictionary<INamedTypeSymbol, INamedTypeSymbol> containingTypeMap = []; 70private static void HandleBinaryOperation(OperationAnalysisContext context, Dictionary<INamedTypeSymbol, INamedTypeSymbol> containingTypeMap)
MetaAnalyzers\RegisterActionAnalyzer.cs (1)
199private Dictionary<IParameterSymbol, List<NodeAndSymbol>>? _nestedActionsMap;
MetaAnalyzers\ReleaseTrackingHelper.cs (1)
51var releaseTrackingDataByRulesBuilder = new Dictionary<string, ReleaseTrackingDataForRuleBuilder>();
MetaAnalyzers\SymbolIsBannedInAnalyzersAnalyzer.cs (2)
84protected sealed override Dictionary<(string ContainerName, string SymbolName), ImmutableArray<BanFileEntry>>? ReadBannedApis(CompilationStartAnalysisContext compilationContext) 95var result = new Dictionary<(string ContainerName, string SymbolName), List<BanFileEntry>>();
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (2)
22protected abstract Dictionary<(string ContainerName, string SymbolName), ImmutableArray<BanFileEntry>>? ReadBannedApis(CompilationStartAnalysisContext compilationContext); 48var bannedApis = ReadBannedApis(compilationContext);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (2)
94using var collisionMapPool = (isCaseSensitive ? SharedPools.Default<Dictionary<string, bool>>() : SharedPools.StringIgnoreCaseDictionary<bool>()).GetPooledObject(); 95var collisionMap = collisionMapPool.Object;
Microsoft.CodeAnalysis.AnalyzerUtilities (155)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (1)
124var originalCoreAnalysisData = new Dictionary<AnalysisEntity, CopyAbstractValue>(coreAnalysisData);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (1)
28private readonly Dictionary<IFieldSymbol, PointsToAbstractValue>? _trackedInstanceFieldLocations;
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
35private Dictionary<SymbolAccess, (ImmutableHashSet<SinkKind>.Builder SinkKinds, ImmutableHashSet<SymbolAccess>.Builder SourceOrigins)> TaintedSourcesBySink { get; }
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (5)
30private readonly Dictionary<IOperation, AnalysisEntity?> _analysisEntityMap; 31private readonly Dictionary<ITupleOperation, ImmutableArray<AnalysisEntity>> _tupleElementEntitiesMap; 32private readonly Dictionary<CaptureId, AnalysisEntity> _captureIdEntityMap; 33private readonly Dictionary<CaptureId, CopyAbstractValue> _captureIdCopyValueMap; 34private readonly Dictionary<ISymbol, PointsToAbstractValue> _instanceLocationsForSymbols;
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResult.cs (2)
46Dictionary<PointsToAbstractValue, TAbstractAnalysisValue>? taskWrappedValuesMap, 223internal Dictionary<PointsToAbstractValue, TAbstractAnalysisValue>? TaskWrappedValuesMap { get; }
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (2)
56Dictionary<ThrownExceptionInfo, TAnalysisData>? analysisDataForUnhandledThrowOperations, 57Dictionary<PointsToAbstractValue, TAbstractAnalysisValue>? taskWrappedValuesMap,
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (7)
128private readonly Dictionary<IMethodSymbol, ControlFlowGraph?>? _interproceduralMethodToCfgMap; 151internal Dictionary<ThrownExceptionInfo, TAnalysisData>? AnalysisDataForUnhandledThrowOperations { get; private set; } 161internal Dictionary<PointsToAbstractValue, TAbstractAnalysisValue>? TaskWrappedValuesMap { get; private set; } 229private Dictionary<BasicBlock, ThrownExceptionInfo>? _exceptionPathsThrownExceptionInfoMap; 2146private void ApplyInterproceduralAnalysisDataForUnhandledThrowOperations(Dictionary<ThrownExceptionInfo, TAnalysisData> interproceduralUnhandledThrowOperationsData) 2316if (analysisResult.AnalysisDataForUnhandledThrowOperations is Dictionary<ThrownExceptionInfo, TAnalysisData> interproceduralUnhandledThrowOperationsDataOpt) 2321if (analysisResult.TaskWrappedValuesMap is Dictionary<PointsToAbstractValue, TAbstractAnalysisValue> taskWrappedValuesMap)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\LValueFlowCapturesProvider.cs (1)
33var rvalueFlowCaptureIds = new Dictionary<CaptureId, HashSet<IFlowCaptureReferenceOperation>>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Microsoft.CodeAnalysis.BannedApiAnalyzers (143)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (2)
94using var collisionMapPool = (isCaseSensitive ? SharedPools.Default<Dictionary<string, bool>>() : SharedPools.StringIgnoreCaseDictionary<bool>()).GetPooledObject(); 95var collisionMap = collisionMapPool.Object;
SymbolIsBannedAnalyzer.cs (2)
53protected sealed override Dictionary<(string ContainerName, string SymbolName), ImmutableArray<BanFileEntry>>? ReadBannedApis( 112var result = new Dictionary<(string ContainerName, string SymbolName), List<BanFileEntry>>();
SymbolIsBannedAnalyzerBase.cs (2)
22protected abstract Dictionary<(string ContainerName, string SymbolName), ImmutableArray<BanFileEntry>>? ReadBannedApis(CompilationStartAnalysisContext compilationContext); 48var bannedApis = ReadBannedApis(compilationContext);
Microsoft.CodeAnalysis.CodeStyle (150)
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
25private static readonly Dictionary<(bool includeInFixAll, string equivalenceKey), ImmutableDictionary<string, string?>> s_cachedProperties = [];
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (3)
46|| !_helpers.TryGetOrComputePreferredOrder(option.Value, out var preferredOrder)) 62Dictionary<int, int> preferredOrder, 68Dictionary<int, int> preferredOrder,
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (6)
19private Tuple<string, Dictionary<int, int>>? _lastParsed; 23public static bool IsOrdered(Dictionary<int, int> preferredOrder, SyntaxTokenList modifiers) 43public bool TryGetOrComputePreferredOrder(string value, [NotNullWhen(true)] out Dictionary<int, int>? preferredOrder) 54if (!TryParse(value, out var parsed)) 68protected virtual bool TryParse(string value, [NotNullWhen(true)] out Dictionary<int, int>? parsed) 70var result = new Dictionary<int, int>();
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (4)
29var enumMembers = new Dictionary<long, ISymbol>(); 52ISwitchExpressionOperation operation, Dictionary<long, ISymbol> enumMembers) 64internal static void HandleBinaryPattern(IBinaryPatternOperation? binaryPattern, Dictionary<long, ISymbol> enumMembers) 76private static void RemoveIfConstantPatternHasValue(IOperation operation, Dictionary<long, ISymbol> enumMembers)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (3)
60var enumMembers = new Dictionary<long, ISymbol>(); 97private static bool TryRemoveExistingEnumMembers(ISwitchOperation switchStatement, Dictionary<long, ISymbol> enumValues) 153Dictionary<long, ISymbol> enumValues)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
123private readonly Dictionary<ISymbol, ValueUsageInfo> _symbolValueUsageStateMap_doNotAccessDirectly = new(OriginalDefinitionSymbolEqualityComparer.Instance);
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
81var typeToNameSegments = new Dictionary<ITypeSymbol, ImmutableArray<string>>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
176var result = new Dictionary<ITypeSymbol, ITypeParameterSymbol>(SymbolEqualityComparer.Default);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (1)
36public readonly Dictionary<ITypeSymbol, ITypeSymbol> Substitutions = [];
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (1)
54if (!_helpers.TryGetOrComputePreferredOrder(option.Value, out var preferredOrder))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
94using var collisionMapPool = (isCaseSensitive ? SharedPools.Default<Dictionary<string, bool>>() : SharedPools.StringIgnoreCaseDictionary<bool>()).GetPooledObject();
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
src\Workspaces\CoreTestUtilities\OptionsCollection.cs (1)
30private readonly Dictionary<OptionKey2, object?> _options = [];
Microsoft.CodeAnalysis.Collections.Package (16)
Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.CSharp (207)
Binder\Binder.CapturedParametersFinder.cs (1)
76var result = new Dictionary<ParameterSymbol, FieldSymbol>(ReferenceEqualityComparer.Instance);
Binder\Binder.QueryTranslationState.cs (1)
50public readonly Dictionary<RangeVariableSymbol, ArrayBuilder<string>> allRangeVariables = new Dictionary<RangeVariableSymbol, ArrayBuilder<string>>();
Binder\Binder_Constraints.cs (1)
44var names = new Dictionary<string, int>(n, StringOrdinalComparer.Instance);
Binder\DecisionDagBuilder.cs (1)
815Dictionary<DagState, DagState> uniqueState)
Binder\NameofBinder.cs (1)
29private readonly Dictionary<GenericNameSyntax, bool>? _allowedMap;
Binder\OpenTypeVisitor.cs (2)
25private Dictionary<GenericNameSyntax, bool>? _allowedMap; 33public static void Visit(ExpressionSyntax typeSyntax, out Dictionary<GenericNameSyntax, bool>? allowedMap)
Binder\PatternExplainer.cs (10)
197gatherConstraintsAndEvaluations(targetNode, shortestPathToNode, out var constraints, out var evaluations); 220gatherConstraintsAndEvaluations(targetNode, currentPathToNode, out var constraints, out var evaluations); 245out Dictionary<BoundDagTemp, ArrayBuilder<(BoundDagTest, bool)>> constraints, 246out Dictionary<BoundDagTemp, ArrayBuilder<BoundDagEvaluation>> evaluations) 293Dictionary<BoundDagTemp, ArrayBuilder<(BoundDagTest test, bool sense)>> constraintMap, 294Dictionary<BoundDagTemp, ArrayBuilder<BoundDagEvaluation>> evaluationMap, 311static ImmutableArray<T> getArray<T>(Dictionary<BoundDagTemp, ArrayBuilder<T>> map, BoundDagTemp temp) 533var properties = new Dictionary<Symbol, string>();
Binder\RefSafetyAnalysis.cs (2)
63private Dictionary<LocalSymbol, (SafeContext RefEscapeScope, SafeContext ValEscapeScope)>? _localEscapeScopes; 64private Dictionary<BoundValuePlaceholderBase, SafeContext>? _placeholderScopes;
Binder\Semantics\Operators\BinaryOperatorOverloadResolution.cs (1)
225Dictionary<TypeSymbol, bool> lookedInInterfaces, ArrayBuilder<BinaryOperatorAnalysisResult> candidates)
Binder\Semantics\OverloadResolution\MethodTypeInference.cs (9)
143private readonly Dictionary<TypeParameterSymbol, int> _ordinals; 281Dictionary<TypeParameterSymbol, int> ordinals = null) 331Dictionary<TypeParameterSymbol, int>? ordinals) 2879var candidates = new Dictionary<TypeWithAnnotations, TypeWithAnnotations>(EqualsIgnoringDynamicTupleNamesAndNullabilityComparer.Instance); 3358private static void GetAllCandidates(Dictionary<TypeWithAnnotations, TypeWithAnnotations> candidates, ArrayBuilder<TypeWithAnnotations> builder) 3371Dictionary<TypeWithAnnotations, TypeWithAnnotations> candidates, 3400Dictionary<TypeWithAnnotations, TypeWithAnnotations> candidates, 3415Dictionary<TypeWithAnnotations, TypeWithAnnotations> candidates, 3482Dictionary<TypeWithAnnotations, TypeWithAnnotations> candidates,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (6)
370Dictionary<NamedTypeSymbol, ArrayBuilder<TMember>> containingTypeMapOpt = null; 900private static Dictionary<NamedTypeSymbol, ArrayBuilder<TMember>> PartitionMembersByContainingType<TMember>(ArrayBuilder<TMember> members) where TMember : Symbol 902Dictionary<NamedTypeSymbol, ArrayBuilder<TMember>> containingTypeMap = new Dictionary<NamedTypeSymbol, ArrayBuilder<TMember>>(); 918private static void ClearContainingTypeMap<TMember>(ref Dictionary<NamedTypeSymbol, ArrayBuilder<TMember>> containingTypeMapOpt) where TMember : Symbol 1063Dictionary<NamedTypeSymbol, ArrayBuilder<TMember>> containingTypeMapOpt, 4413Dictionary<TypeParameterSymbol, int> ordinals = member.MakeAdjustedTypeParameterOrdinalsIfNeeded(originalTypeParameters);
Binder\SwitchBinder.cs (8)
77private Dictionary<object, SourceLabelSymbol> _lazySwitchLabelsMap; 80private Dictionary<object, SourceLabelSymbol> LabelsByValue 93private static Dictionary<object, SourceLabelSymbol> BuildLabelsByValue(ImmutableArray<LabelSymbol> labels) 97var map = new Dictionary<object, SourceLabelSymbol>(labels.Length, new SwitchConstantValueHelper.SwitchLabelsComparer()); 314var labelsMap = LabelsByValue; 449private Dictionary<SyntaxNode, LabelSymbol> _labelsByNode; 450protected Dictionary<SyntaxNode, LabelSymbol> LabelsByNode 456var result = new Dictionary<SyntaxNode, LabelSymbol>();
Binder\SwitchBinder_Patterns.cs (1)
190Dictionary<SyntaxNode, LabelSymbol> labelsByNode = LabelsByNode;
Binder\TypeofBinder.cs (1)
25private readonly Dictionary<GenericNameSyntax, bool> _allowedMap;
BoundTree\BoundNode_Source.cs (1)
24void appendSourceCore(BoundNode node, int indent, Dictionary<SynthesizedLocal, int> tempIdentifiers)
CodeGen\EmitStatement.cs (2)
1940private Dictionary<LabelSymbol, GeneratedLabelSymbol> _labelClones; 2011var labelClones = _labelClones;
CodeGen\Optimizer.cs (8)
92private static void FilterValidStackLocals(Dictionary<LocalSymbol, LocalDefUseInfo> info) 125private static void RemoveIntersectingLocals(Dictionary<LocalSymbol, LocalDefUseInfo> info, ArrayBuilder<LocalDefUseInfo> dummies) 403private readonly Dictionary<LocalSymbol, LocalDefUseInfo> _locals; 417private StackOptimizerPass1(Dictionary<LocalSymbol, LocalDefUseInfo> locals, 432Dictionary<LocalSymbol, LocalDefUseInfo> locals, 2031private readonly Dictionary<LocalSymbol, LocalDefUseInfo> _info; 2033private StackOptimizerPass2(Dictionary<LocalSymbol, LocalDefUseInfo> info) 2038public static BoundStatement Rewrite(BoundStatement src, Dictionary<LocalSymbol, LocalDefUseInfo> info)
CommandLine\CSharpCommandLineParser.cs (5)
118var diagnosticOptions = new Dictionary<string, ReportDiagnostic>(); 119var noWarns = new Dictionary<string, ReportDiagnostic>(); 120var warnAsErrors = new Dictionary<string, ReportDiagnostic>(); 2104private static void AddWarnings(Dictionary<string, ReportDiagnostic> d, ReportDiagnostic kind, ReadOnlyMemory<char> warningArgument) 2149private static void AddDiagnostic(IList<Diagnostic> diagnostics, Dictionary<string, ReportDiagnostic> warningOptions, ErrorCode errorCode, params object[] arguments)
Compilation\MemberSemanticModel.cs (3)
33private readonly Dictionary<SyntaxNode, OneOrMany<BoundNode>> _guardedBoundNodeMap = new Dictionary<SyntaxNode, OneOrMany<BoundNode>>(); 34private readonly Dictionary<SyntaxNode, IOperation> _guardedIOperationNodeMap = new Dictionary<SyntaxNode, IOperation>(); 35private Dictionary<SyntaxNode, BoundStatement> _lazyGuardedSynthesizedStatementsMap;
Compilation\MemberSemanticModel.NodeMapBuilder.cs (1)
39public static void AddToMap(BoundNode root, Dictionary<SyntaxNode, OneOrMany<BoundNode>> map, SyntaxTree tree, SyntaxNode node = null)
Compiler\ClsComplianceChecker.cs (1)
1068Dictionary<NamedTypeSymbol, NamedTypeSymbol> containingTypes = null; // maps definition to constructed
Compiler\TypeCompilationState.cs (1)
52private Dictionary<MethodSymbol, MethodSymbol>? _wrappers;
Declarations\MergedNamespaceDeclaration.cs (1)
162var namespaceGroups = new Dictionary<string, ArrayBuilder<SingleNamespaceDeclaration>>(StringOrdinalComparer.Instance);
Declarations\MergedTypeDeclaration.cs (1)
226var typesGrouped = nestedTypes.ToDictionary(t => t.Identity);
Emitter\EditAndContinue\CSharpDefinitionMap.cs (3)
64var hoistedLocals = new Dictionary<EncHoistedLocalInfo, int>(); 65var awaiters = new Dictionary<Cci.ITypeReference, int>(Cci.SymbolEquivalentEqualityComparer.Instance); 155var map = new Dictionary<EncLocalInfo, int>();
Emitter\Model\PEModuleBuilder.cs (2)
48private Dictionary<FieldSymbol, NamedTypeSymbol> _fixedImplementationTypes; 672var exportedNamesMap = new Dictionary<string, NamedTypeSymbol>(StringOrdinalComparer.Instance);
Errors\ErrorFacts.cs (1)
98var map = new Dictionary<ErrorCode, string>()
FlowAnalysis\AbstractFlowPass.cs (1)
178private readonly Dictionary<BoundLoopStatement, TLocalState> _loopHeadState;
FlowAnalysis\NullableWalker.cs (1)
8310Dictionary<TypeParameterSymbol, int>? ordinals = definition.MakeAdjustedTypeParameterOrdinalsIfNeeded(typeParameters);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (6)
255var proxyLabels = frame.proxyLabels; 759private Dictionary<BoundTryStatement, HashSet<LabelSymbol>> _labelsInInterestingTry; 819var labelsInInterestingTry = _labelsInInterestingTry; 925public Dictionary<LabelSymbol, LabelSymbol> proxyLabels; 964var proxyLabels = this.proxyLabels; 1039private readonly Dictionary<LocalSymbol, LocalSymbol> _hoistedLocals;
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
61private readonly Dictionary<TypeSymbol, FieldSymbol> _awaiterFields; 64private readonly Dictionary<BoundValuePlaceholderBase, BoundExpression> _placeholderMap;
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (2)
24private readonly Dictionary<LocalSymbol, LocalSymbol> localMap = new Dictionary<LocalSymbol, LocalSymbol>(); 27private readonly Dictionary<BoundValuePlaceholderBase, BoundExpression> _placeholderMap = new Dictionary<BoundValuePlaceholderBase, BoundExpression>();
Lowering\ClosureConversion\ClosureConversion.cs (3)
85private readonly Dictionary<ParameterSymbol, ParameterSymbol> _parameterMap = new Dictionary<ParameterSymbol, ParameterSymbol>(); 88private readonly Dictionary<BoundNode, Analysis.ClosureEnvironment> _frames = new Dictionary<BoundNode, Analysis.ClosureEnvironment>(); 92private readonly Dictionary<NamedTypeSymbol, Symbol> _framePointers = new Dictionary<NamedTypeSymbol, Symbol>();
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
21private readonly Dictionary<ParameterSymbol, BoundExpression> _parameterMap = new Dictionary<ParameterSymbol, BoundExpression>();
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.IteratorFinallyFrame.cs (4)
31public Dictionary<StateMachineState, IteratorFinallyFrame> knownStates; 41public Dictionary<LabelSymbol, LabelSymbol> proxyLabels; 81var knownStates = this.knownStates; 106var proxyLabels = this.proxyLabels;
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.YieldsInTryAnalysis.cs (2)
23private Dictionary<BoundTryStatement, HashSet<LabelSymbol>> _labelsInYieldingTrys; 74var yieldingTryLabels = _labelsInYieldingTrys;
Lowering\LocalRewriter\DelegateCacheContainer.cs (1)
19private readonly Dictionary<(TypeSymbol?, TypeSymbol, MethodSymbol), FieldSymbol> _delegateFields = new(CLRSignatureComparer.Instance);
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
24private Dictionary<Symbol, DelegateCacheContainer>? _genericCacheContainers;
Lowering\LocalRewriter\LocalRewriter.cs (1)
53private Dictionary<BoundValuePlaceholderBase, BoundExpression>? _placeholderReplacementMapDoNotUseDirectly;
Lowering\LocalRewriter\LocalRewriter.PlaceholderReplacer.cs (3)
14private readonly Dictionary<BoundEarlyValuePlaceholderBase, BoundExpression> _placeholders; 16private PlaceholderReplacer(Dictionary<BoundEarlyValuePlaceholderBase, BoundExpression> placeholders) 21public static BoundExpression Replace(Dictionary<BoundEarlyValuePlaceholderBase, BoundExpression> placeholders, BoundExpression expr)
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (1)
167private Dictionary<BoundNode, HashSet<LabelSymbol>>? _lazyUnmatchedLabelCache;
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (1)
26private readonly Dictionary<SyntaxNode, LabelSymbol> _sectionLabels = PooledDictionary<SyntaxNode, LabelSymbol>.GetInstance();
Lowering\MethodToClassRewriter.cs (1)
24protected Dictionary<Symbol, CapturedSymbolReplacement> proxies = new Dictionary<Symbol, CapturedSymbolReplacement>();
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
40private readonly Dictionary<LocalSymbol, BoundExpression> _boundRefLocalInitializers = new Dictionary<LocalSymbol, BoundExpression>();
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (3)
64private Dictionary<LabelSymbol, List<StateMachineState>> _dispatches = new Dictionary<LabelSymbol, List<StateMachineState>>(); 70private Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>? _lazyAvailableReusableHoistedFields; 885var oldDispatches = _dispatches;
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
34protected Dictionary<Symbol, CapturedSymbolReplacement>? initialParameters; 142var proxiesBuilder = new Dictionary<Symbol, CapturedSymbolReplacement>(); 464var copySrc = initialParameters;
Lowering\SynthesizedSubmissionFields.cs (1)
29private Dictionary<ImplicitNamedTypeSymbol, FieldSymbol> _previousSubmissionFieldMap;
Lowering\UnmatchedGotoFinder.cs (3)
22private readonly Dictionary<BoundNode, HashSet<LabelSymbol>> _unmatchedLabelsCache; // NB: never modified. 27private UnmatchedGotoFinder(Dictionary<BoundNode, HashSet<LabelSymbol>> unmatchedLabelsCache, int recursionDepth) 34public static HashSet<LabelSymbol> Find(BoundNode node, Dictionary<BoundNode, HashSet<LabelSymbol>> unmatchedLabelsCache, int recursionDepth)
Symbols\MemberSymbolExtensions.cs (2)
150internal static Dictionary<TypeParameterSymbol, int>? MakeAdjustedTypeParameterOrdinalsIfNeeded<TMember>(this TMember member, ImmutableArray<TypeParameterSymbol> originalTypeParameters) 155Dictionary<TypeParameterSymbol, int>? ordinals = null;
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
481Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>> typesDict)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (10)
33private static readonly Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>> s_emptyNestedTypes = 61private Dictionary<string, ImmutableArray<Symbol>> _lazyMembersByName; 67private Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>> _lazyNestedTypes; 1654Dictionary<string, ImmutableArray<Symbol>> membersDict = GroupByName(members); 1656var exchangeResult = Interlocked.CompareExchange(ref _lazyMembersByName, membersDict, null); 2271private void CreateProperties(Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, ArrayBuilder<Symbol> members) 2302Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, 2335private PEMethodSymbol GetAccessorMethod(PEModule module, Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, TypeDefinitionHandle typeDef, MethodDefinitionHandle methodDef) 2348private static Dictionary<string, ImmutableArray<Symbol>> GroupByName(ArrayBuilder<Symbol> symbols) 2353private static Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>> GroupByName(ArrayBuilder<PENamedTypeSymbol> symbols)
Symbols\Metadata\PE\PENamespaceSymbol.cs (5)
29protected Dictionary<ReadOnlyMemory<char>, PENestedNamespaceSymbol>? lazyNamespaces; 35protected Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>>? lazyTypes; 42private Dictionary<string, TypeDefinitionHandle>? _lazyNoPiaLocalTypes; 262var namespaces = new Dictionary<ReadOnlyMemory<char>, PENestedNamespaceSymbol>(ReadOnlyMemoryOfCharComparer.Instance); 286Dictionary<string, TypeDefinitionHandle>? noPiaLocalTypes = null;
Symbols\ReferenceManager.cs (9)
57public ReferenceManager(string simpleAssemblyName, AssemblyIdentityComparer identityComparer, Dictionary<MetadataReference, MetadataOrDiagnostic>? observedMetadata) 403Dictionary<MetadataReference, int> referencedAssembliesMap, referencedModulesMap; 405Dictionary<MetadataReference, ImmutableArray<MetadataReference>>? mergedAssemblyReferencesMapOpt; 457Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies = null; 541Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies) 642ref Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies, 719ref Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies, 764ref Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies, 843ref Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies)
Symbols\Retargeting\RetargetingModuleSymbol.cs (1)
49private readonly Dictionary<AssemblySymbol, DestinationData> _retargetingAssemblyMap =
Symbols\Retargeting\RetargetingSymbolTranslator.cs (1)
154private Dictionary<AssemblySymbol, DestinationData> RetargetingAssemblyMap
Symbols\Source\ConstantEvaluationHelpers.cs (5)
101Dictionary<SourceFieldSymbolWithSyntaxReference, Node<SourceFieldSymbolWithSyntaxReference>> graph, 156Dictionary<SourceFieldSymbolWithSyntaxReference, Node<SourceFieldSymbolWithSyntaxReference>> graph, 266Dictionary<SourceFieldSymbolWithSyntaxReference, Node<SourceFieldSymbolWithSyntaxReference>> graph, 292Dictionary<SourceFieldSymbolWithSyntaxReference, Node<SourceFieldSymbolWithSyntaxReference>> graph, 328private static void CheckGraph(Dictionary<SourceFieldSymbolWithSyntaxReference, Node<SourceFieldSymbolWithSyntaxReference>> graph)
Symbols\Source\QuickAttributeChecker.cs (1)
26private readonly Dictionary<string, QuickAttributes> _nameToAttributeMap;
Symbols\Source\SourceMemberContainerSymbol.cs (43)
205private Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>? _lazyMembersDictionary; 206private Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>? _lazyEarlyAttributeDecodingMembersDictionary; 208private static readonly Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>> s_emptyTypeMembers = 211private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>>? _lazyTypeMembers; 1308private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>> GetTypeMembersDictionary() 1326private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>> MakeTypeMembers(BindingDiagnosticBag diagnostics) 1329var conflictDict = new Dictionary<(string name, int arity, SyntaxTree? syntaxTree), SourceNamedTypeSymbol>(); 1577private Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> GetEarlyAttributeDecodingMembersDictionary() 1581if (Volatile.Read(ref _lazyMembersDictionary) is Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> result) 1591Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName; 1614private static Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> ToNameKeyedDictionary(ImmutableArray<Symbol> symbols) 1639var dictionary = new Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>(accumulator.Count, ReadOnlyMemoryOfCharComparer.Instance); 1766protected Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> GetMembersByName() 1776private Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> GetMembersByNameSlow() 1780var membersDictionary = MakeAllMembers(); 1968Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>>? typesByName, 1969Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 1977var methodsBySignature = new Dictionary<MethodSymbol, MethodSymbol>(MemberSignatureComparer.DuplicateSourceComparer); 1978var conversionsAsMethods = new Dictionary<MethodSymbol, MethodSymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2227BindingDiagnosticBag diagnostics, Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName) 2232var indexersBySignature = new Dictionary<PropertySymbol, PropertySymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2296Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2297Dictionary<PropertySymbol, PropertySymbol> indexersBySignature, 2365Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2366Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>>? typesByName, 2382Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>? membersByName; 2394static (Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>? membersByName, ImmutableArray<Symbol> membersUnordered) mergeMembersInGroup(IGrouping<ExtensionGroupingKey, NamedTypeSymbol> grouping) 2396Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>? membersByName = null; 2404Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByNameToMerge = ((SourceMemberContainerTypeSymbol)extension).GetMembersByName(); 2573Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2725Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2767Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2806Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2983var instanceMap = new Dictionary<NamedTypeSymbol, NamedTypeSymbol>(ReferenceEqualityComparer.Instance); 3015private static bool InfiniteFlatteningGraph(SourceMemberContainerTypeSymbol top, NamedTypeSymbol t, Dictionary<NamedTypeSymbol, NamedTypeSymbol> instanceMap) 3133private Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> MakeAllMembers() 3135Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName; 3157Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 3158Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>> typesByName) 3995Dictionary<ReadOnlyMemory<char>, object> membersByName, 4000var membersBySignature = new Dictionary<Symbol, Symbol>(MemberSignatureComparer.PartialMethodsComparer); 4377Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 4428Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName,
Symbols\Source\SourceNamespaceSymbol.cs (7)
31private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamespaceOrTypeSymbol>> _nameToMembersMap; 32private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>> _nameToTypeMembersMap; 224private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamespaceOrTypeSymbol>> GetNameToMembersMap() 248private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>> GetNameToTypeMembersMap() 264private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamespaceOrTypeSymbol>> MakeNameToMembersMap(BindingDiagnosticBag diagnostics) 282var result = new Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamespaceOrTypeSymbol>>(builder.Count, ReadOnlyMemoryOfCharComparer.Instance); 291private static void CheckMembers(NamespaceSymbol @namespace, Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamespaceOrTypeSymbol>> result, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceNamespaceSymbol_Completion.cs (1)
28var tmp = GetNameToMembersMap();
Syntax\InternalSyntax\CSharpSyntaxNode.cs (3)
253private static readonly ConditionalWeakTable<SyntaxNode, Dictionary<CodeAnalysis.SyntaxTrivia, WeakReference<SyntaxNode>>> s_structuresTable 254= new ConditionalWeakTable<SyntaxNode, Dictionary<CodeAnalysis.SyntaxTrivia, WeakReference<SyntaxNode>>>(); 279var structsInParent = s_structuresTable.GetOrCreateValue(parent);
Utilities\FirstAmongEqualsSet.cs (1)
42private readonly Dictionary<T, T> _dictionary;
Microsoft.CodeAnalysis.CSharp.CodeStyle (21)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
134Dictionary<IMethodSymbol, Diagnostic> methodToDiagnostic)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersDiagnosticAnalyzer.cs (1)
30Dictionary<int, int> preferredOrder,
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
25protected override bool TryParse(string value, [NotNullWhen(true)] out Dictionary<int, int>? parsed)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (3)
387Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove) 409Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove) 466Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove,
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
170private static bool DeclaredLocalCausesCollision(Dictionary<string, ArrayBuilder<ISymbol>> symbolNameToExistingSymbol, ImmutableArray<ILocalSymbol> locals)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (2)
42var directiveSyntaxMap = GetDirectiveInfo(directive, cancellationToken).DirectiveMap; 54var directiveConditionalMap = GetDirectiveInfo(directive, cancellationToken).ConditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (2)
17private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new(); 22var dictionary = DeclarationFinder.GetAllDeclarations(member);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (2)
16private readonly Dictionary<string, List<SyntaxToken>> _map = []; 23public static Dictionary<string, List<SyntaxToken>> GetAllDeclarations(SyntaxNode syntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.LocalDeclarationMap.cs (2)
16private readonly Dictionary<string, ImmutableArray<SyntaxToken>> _dictionary; 18internal LocalDeclarationMap(Dictionary<string, ImmutableArray<SyntaxToken>> dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\AggregatedFormattingResult.cs (1)
20protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\FormattingResult.cs (1)
24protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (4)
24private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _trailingTriviaMap = []; 25private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _leadingTriviaMap = []; 30Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, 47Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (15)
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (2)
26var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false); 31private static SyntaxNode GetNewNode(SyntaxNode node, Dictionary<int, int>? preferredOrder)
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (2)
61var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false); 75private static async Task<Dictionary<int, int>?> GetModifierOrderAsync(Document document, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (3)
174var expandUsingDirectiveTasks = allUsingDirectives.ToDictionary( 222var namespaceDeclarationMap = namespaceDeclarations.ToDictionary( 257var namespaceDeclarationMap = namespaceDeclarations.ToDictionary(
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
63Dictionary<SyntaxToken, SyntaxToken> tokenToToken,
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
89Dictionary<SyntaxToken, SyntaxToken> replacementMap, SyntaxToken colonToken, SyntaxToken thisBaseKeyword)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
15private static readonly Dictionary<SyntaxKind, int> s_kindPrecedenceMap = new(SyntaxFacts.EqualityComparer) 36private static readonly Dictionary<SyntaxKind, int> s_operatorPrecedenceMap = new(SyntaxFacts.EqualityComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (4)
645var map = DetermineTypeParameterMapping(type, method.ReturnType); 662private static Dictionary<ITypeParameterSymbol, ITypeSymbol> DetermineTypeParameterMapping(ITypeSymbol inferredType, ITypeSymbol returnType) 664var result = new Dictionary<ITypeParameterSymbol, ITypeSymbol>(); 669private static void DetermineTypeParameterMapping(ITypeSymbol inferredType, ITypeSymbol returnType, Dictionary<ITypeParameterSymbol, ITypeSymbol> result)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (12)
CommandLineTests.cs (12)
85private readonly Dictionary<string, string> _responseFiles; 86private readonly Dictionary<string, string[]> _recursivePatterns; 87private readonly Dictionary<string, string[]> _patterns; 90Dictionary<string, string> responseFiles = null, 91Dictionary<string, string[]> patterns = null, 92Dictionary<string, string[]> recursivePatterns = null, 2426var expectedEmbeddedMap = new Dictionary<string, string>(); 2465private static void ValidateEmbeddedSources_Portable(Dictionary<string, string> expectedEmbeddedMap, TempDirectory dir, bool isEmbeddedPdb) 2496private static void ValidateEmbeddedSources_Windows(Dictionary<string, string> expectedEmbeddedMap, TempDirectory dir) 2526private static void ValidateWrittenSources(Dictionary<string, Dictionary<string, string>> expectedFilesMap, Encoding encoding = null) 2528foreach ((var dirPath, var fileMap) in expectedFilesMap.ToArray())
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (2)
889private readonly Dictionary<string, SuppressionDescriptor> mapping = []; 896Dictionary<string, SuppressionDescriptor> mapping,
EditAndContinue\ActiveStatementTrackingServiceTests.cs (2)
81var spans1 = trackingSession.Test_GetTrackingSpans(); 108var spans5 = trackingSession.Test_GetTrackingSpans();
Formatting\CodeCleanupTests.cs (1)
797var map = new Dictionary<string, ImmutableArray<DiagnosticAnalyzer>>{
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (3)
Recommendations\FromKeywordRecommenderTests.cs (1)
248var experimentalFeatures = new System.Collections.Generic.Dictionary<string, string>(); // no experimental features to enable
Recommendations\IsKeywordRecommenderTests.cs (1)
145var experimentalFeatures = new System.Collections.Generic.Dictionary<string, string>(); // no experimental features to enable
Recommendations\KeywordRecommenderTests.cs (1)
17private static readonly Dictionary<SyntaxKind, AbstractSyntacticSingleKeywordRecommender> s_recommenderMap = new(SyntaxFacts.EqualityComparer);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\CompilationEmitTests.cs (1)
4748var warnings = new System.Collections.Generic.Dictionary<string, ReportDiagnostic>();
Emit\EmitErrorTests.cs (1)
304var warnOpts = new System.Collections.Generic.Dictionary<string, ReportDiagnostic>();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (31)
Attributes\AttributeTests.cs (1)
3137attrs[1].VerifyValue<object>(0, TypedConstantKind.Type, typeof(Dictionary<string, int>));
Attributes\AttributeTests_Assembly.cs (3)
182var warnings = new Dictionary<string, ReportDiagnostic>(); 214var warnings = new Dictionary<string, ReportDiagnostic>(); 430var warnings = new Dictionary<string, ReportDiagnostic>();
Attributes\AttributeTests_MarshalAs.cs (17)
26private void VerifyFieldMetadataDecoding(CompilationVerifier verifier, Dictionary<string, byte[]> blobs) 58private void VerifyParameterMetadataDecoding(CompilationVerifier verifier, Dictionary<string, byte[]> blobs) 230var blobs = new Dictionary<string, byte[]> 327var blobs = new Dictionary<string, byte[]> 374var blobs = new Dictionary<string, byte[]> 461var blobs = new Dictionary<string, byte[]> 486var expectedBlobs = new Dictionary<string, byte[]>(); 594var blobs = new Dictionary<string, byte[]> 632var expectedBlobs = new Dictionary<string, byte[]>(); 760var blobs = new Dictionary<string, byte[]> 800var blobs = new Dictionary<string, byte[]> 832var cciBlobs = new Dictionary<string, byte[]> 913var blobs = new Dictionary<string, byte[]> 1032var blobs = new Dictionary<string, byte[]> 1140var blobs = new Dictionary<string, byte[]>() 1185var blobs = new Dictionary<string, byte[]>() 1220var blobs = new Dictionary<string, byte[]>()
Attributes\AttributeTests_WellKnownAttributes.cs (1)
2814var visitedEntryPoints = new Dictionary<string, bool>();
Diagnostics\DiagnosticAnalyzerTests.cs (8)
316var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 458var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 530var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 1140var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 1278Dictionary<string, ReportDiagnostic> specificOptions = null, 1302var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", ReportDiagnostic.Default } }; 1323var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", specificOption } }; 1346var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", specificOption } };
FlowAnalysis\FlowDiagnosticTests.cs (1)
383Dictionary<int, int> warnings = new Dictionary<int, int>();
Microsoft.CodeAnalysis.CSharp.Features (26)
ChangeSignature\CSharpChangeSignatureService.cs (1)
827var dictionary = new Dictionary<string, XmlElementSyntax>();
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (1)
71private static readonly Dictionary<string, (int sortOrder, OperatorPosition position)> s_operatorNameToInfo = [];
Completion\CompletionProviders\SymbolCompletionProvider.cs (1)
31private static readonly Dictionary<(bool importDirective, bool preselect, bool tupleLiteral), CompletionItemRules> s_cachedRules = [];
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
22private static readonly Dictionary<BinaryOperatorKind, SyntaxKind> s_operatorMap = new()
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
2472Dictionary<SyntaxNode, EditKind> editMap)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
697var replacements = new Dictionary<SyntaxNode, SyntaxNode>();
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (3)
96var map = new Dictionary<ITypeSymbol, List<LocalDeclarationStatementSyntax>>(); 118Dictionary<ITypeSymbol, List<LocalDeclarationStatementSyntax>> map) 129Dictionary<ITypeSymbol, List<LocalDeclarationStatementSyntax>> map)
ExtractMethod\CSharpMethodExtractor.TriviaResult.cs (1)
76Dictionary<SyntaxToken, LeadingTrailingTriviaPair> triviaMap,
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
134Dictionary<IMethodSymbol, Diagnostic> methodToDiagnostic)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersDiagnosticAnalyzer.cs (1)
30Dictionary<int, int> preferredOrder,
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
25protected override bool TryParse(string value, [NotNullWhen(true)] out Dictionary<int, int>? parsed)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (3)
387Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove) 409Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove) 466Dictionary<ISymbol, IParameterSymbol> candidateMembersToRemove,
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
170private static bool DeclaredLocalCausesCollision(Dictionary<string, ArrayBuilder<ISymbol>> symbolNameToExistingSymbol, ImmutableArray<ILocalSymbol> locals)
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (2)
26var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false); 31private static SyntaxNode GetNewNode(SyntaxNode node, Dictionary<int, int>? preferredOrder)
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (2)
61var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false); 75private static async Task<Dictionary<int, int>?> GetModifierOrderAsync(Document document, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (3)
174var expandUsingDirectiveTasks = allUsingDirectives.ToDictionary( 222var namespaceDeclarationMap = namespaceDeclarations.ToDictionary( 257var namespaceDeclarationMap = namespaceDeclarations.ToDictionary(
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
63Dictionary<SyntaxToken, SyntaxToken> tokenToToken,
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
89Dictionary<SyntaxToken, SyntaxToken> replacementMap, SyntaxToken colonToken, SyntaxToken thisBaseKeyword)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (7)
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.CodeBlockSuggestions.cs (1)
67private static readonly Dictionary<string, object[]> s_codeBlockSuggestions = new()
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (3)
182var implementationMap = new Dictionary<string, string> 540private static ImmutableDictionary<SyntaxNode, ImplementationDetails> BuildResult(ImmutableDictionary<SyntaxNode, ImmutableArray<ReferencedSymbol>> memberReferences, Dictionary<string, string> implementationMap) 669Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> ICopilotCodeAnalysisService.GetDocumentationCommentAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
451var experimentalFeatures = new Dictionary<string, string>(); // no experimental features to enable 499var featuresToEnable = new Dictionary<string, string>() { { feature, "enabled" } };
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
1154var builtInTypeMap = new Dictionary<string, string>()
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
InteractiveSessionTests.cs (1)
1360Assert.True(result is Dictionary<string, int>, "Expected Dictionary<string, int>");
ObjectFormatterTests.cs (1)
583var obj = new Dictionary<string, int>
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\MethodBodyModelTests.cs (1)
126Dictionary<int, int> errors = new Dictionary<int, int>();
Semantics\NullableTests.cs (5)
712var zeros = new Dictionary<string, string>() 730var ones = new Dictionary<string, string>() 1147var twos = new Dictionary<string, string>() 1163var ones = new Dictionary<string, string>() 1180var names = new Dictionary<string, string>()
Semantics\SemanticErrorTests.cs (1)
11037var noWarns = new Dictionary<string, ReportDiagnostic>();
Semantics\UnsafeTests.cs (1)
10579private static readonly Dictionary<SpecialType, int> s_specialTypeSizeOfMap = new Dictionary<SpecialType, int>
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\CompilationAPITests.cs (1)
2395var open = typeof(Dictionary<,>).MakeGenericType(typeof(int), genericParameter);
Compilation\CSharpCompilationOptionsTests.cs (1)
228var warnings = new Dictionary<string, ReportDiagnostic>
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
6814var warnDict = new Dictionary<string, ReportDiagnostic> { { MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_MissingXMLComment), ReportDiagnostic.Suppress } };
Symbols\Metadata\PE\LoadingAttributes.cs (1)
931attrSym.VerifyNamedArgumentValue(0, "TypeField", TypedConstantKind.Type, typeof(Dictionary<string, int>));
Symbols\PartialPropertiesTests.cs (1)
841var visitedEntryPoints = new Dictionary<string, bool>();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Diagnostics\DiagnosticTest.cs (3)
1431var warnings = new Dictionary<string, ReportDiagnostic>(); 1826var warnings = new Dictionary<string, ReportDiagnostic>(); 2250var warnings = new Dictionary<string, ReportDiagnostic>();
LexicalAndXml\XmlDocCommentTests.cs (1)
3392private void VerifyXmlAttributes(SyntaxList<XmlAttributeSyntax> xmlAttributes, Dictionary<string, string> attributes)
Syntax\SyntaxAnnotationTests.cs (6)
435var nodeOrTokenMap = new Dictionary<SyntaxNodeOrToken, SyntaxNodeOrToken>(); 456var triviaMap = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 812private readonly Dictionary<SyntaxNodeOrToken, SyntaxNodeOrToken> _nodeOrTokenMap; 813private readonly Dictionary<SyntaxTrivia, SyntaxTrivia> _triviaMap; 815public CopyAnnotationRewriter(Dictionary<SyntaxNodeOrToken, SyntaxNodeOrToken> nodeOrTokenMap, Dictionary<SyntaxTrivia, SyntaxTrivia> triviaMap) :
Syntax\SyntaxNodeTests.cs (1)
4022var tests = new Dictionary<string, string>
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1531internal CompilationVerifier CompileAndVerifyFieldMarshal(CSharpTestSource source, Dictionary<string, byte[]> expectedBlobs, bool isField = true) =>
Microsoft.CodeAnalysis.CSharp.Workspaces (25)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (5)
94private static void AddAliasMaps(SyntaxNode node, List<Dictionary<string, string>> aliasMaps) 109private static void ProcessUsings(List<Dictionary<string, string>> aliasMaps, SyntaxList<UsingDirectiveSyntax> usings) 111Dictionary<string, string> aliasMap = null; 138List<Dictionary<string, string>> aliasMaps) 148foreach (var aliasMap in aliasMaps)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (2)
42var directiveSyntaxMap = GetDirectiveInfo(directive, cancellationToken).DirectiveMap; 54var directiveConditionalMap = GetDirectiveInfo(directive, cancellationToken).ConditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (2)
17private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new(); 22var dictionary = DeclarationFinder.GetAllDeclarations(member);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (2)
16private readonly Dictionary<string, List<SyntaxToken>> _map = []; 23public static Dictionary<string, List<SyntaxToken>> GetAllDeclarations(SyntaxNode syntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.LocalDeclarationMap.cs (2)
16private readonly Dictionary<string, ImmutableArray<SyntaxToken>> _dictionary; 18internal LocalDeclarationMap(Dictionary<string, ImmutableArray<SyntaxToken>> dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\AggregatedFormattingResult.cs (1)
20protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\FormattingResult.cs (1)
24protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (4)
24private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _trailingTriviaMap = []; 25private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _leadingTriviaMap = []; 30Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, 47Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
15private static readonly Dictionary<SyntaxKind, int> s_kindPrecedenceMap = new(SyntaxFacts.EqualityComparer) 36private static readonly Dictionary<SyntaxKind, int> s_operatorPrecedenceMap = new(SyntaxFacts.EqualityComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (4)
645var map = DetermineTypeParameterMapping(type, method.ReturnType); 662private static Dictionary<ITypeParameterSymbol, ITypeSymbol> DetermineTypeParameterMapping(ITypeSymbol inferredType, ITypeSymbol returnType) 664var result = new Dictionary<ITypeParameterSymbol, ITypeSymbol>(); 669private static void DetermineTypeParameterMapping(ITypeSymbol inferredType, ITypeSymbol returnType, Dictionary<ITypeParameterSymbol, ITypeSymbol> result)
Microsoft.CodeAnalysis.Debugging.Package (4)
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.EditorFeatures (31)
Classification\Syntactic\SyntacticClassificationTaggerProvider.ClassifiedLineCache.cs (1)
84private readonly Dictionary<Span, LinkedListNode<SpanAndClassifiedSpans>> _spanToLruNode = [];
CommentSelection\ToggleLineCommentCommandHandler.cs (1)
84var linesInSelections = selectedSpans.ToDictionary(
DocumentationComments\CopilotGenerateDocumentationCommentProvider.cs (1)
232static string? GetCopilotStatement(Dictionary<string, string> documentationCommentDictionary, DocumentationCommentProposedEdit edit, string? symbolKey)
EditAndContinue\ActiveStatementTrackingService.cs (2)
116private readonly Dictionary<string, ImmutableArray<ActiveStatementTrackingSpan>> _trackingSpans = []; 130internal Dictionary<string, ImmutableArray<ActiveStatementTrackingSpan>> Test_GetTrackingSpans()
EditAndContinue\PdbMatchingSourceTextProvider.cs (1)
33private readonly Dictionary<string, (DocumentState state, int solutionVersion)> _documentsWithChangedLoaderByPath = [];
InlineRename\AbstractInlineRenameUndoManager.cs (1)
30protected readonly Dictionary<ITextBuffer, TBufferState> UndoManagers = [];
InlineRename\InlineRenameSession.cs (1)
61private readonly Dictionary<ITextBuffer, OpenTextBufferManager> _openTextBuffers = [];
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
47private readonly Dictionary<TextSpan, RenameTrackingSpan> _referenceSpanToLinkedRenameSpanMap = [];
LanguageServer\RazorInProcLanguageClient.cs (2)
78var experimental = (Dictionary<string, bool>)vsServerCapabilities.Experimental;
Preview\AbstractPreviewFactoryService.cs (2)
228var oldProjectReferences = projectChanges.OldProject.ProjectReferences.ToDictionary(r => r.ProjectId); 229var newProjectReferences = projectChanges.NewProject.ProjectReferences.ToDictionary(r => r.ProjectId);
Shared\Extensions\HostWorkspaceServicesExtensions.cs (3)
47private static readonly ConditionalWeakTable<SolutionServices, Dictionary<string, string>> s_hostServicesToContentTypeMap = new(); 51if (!s_hostServicesToContentTypeMap.TryGetValue(workspaceServices, out var contentTypeMap)) 60private static Dictionary<string, string> CreateContentTypeMap(SolutionServices hostWorkspaceServices)
Shared\Extensions\ITextViewExtensions.AutoClosingViewProperty.cs (1)
17private readonly Dictionary<object, TProperty> _map = [];
Shared\Extensions\ITextViewExtensions.PerSubjectBufferProperty.cs (7)
22private readonly Dictionary<ITextBuffer, Dictionary<object, TProperty>> _subjectBufferMap = []; 26private readonly ConditionalWeakTable<ITextBuffer, Dictionary<object, TProperty>> _buffersRemovedFromTextViewBufferGraph = new(); 104if (_subjectBufferMap.TryGetValue(buffer, out var value)) 113if (_buffersRemovedFromTextViewBufferGraph.TryGetValue(buffer, out var value)) 123if (_subjectBufferMap.TryGetValue(subjectBuffer, out var bufferMap)) 145if (_subjectBufferMap.TryGetValue(subjectBuffer, out var bufferMap))
Shared\Utilities\ClassificationTypeMap.cs (1)
28private readonly Dictionary<string, IClassificationType> _identityMap;
Suggestions\SuggestedActions\SuggestedAction.cs (1)
190private void CreateLogProperties(Dictionary<string, object> map)
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (3)
376var bufferToChanges = ProcessNewTagTrees(spansToTag, oldTagTrees, newTagTrees); 597private Dictionary<ITextBuffer, DiffResult> ProcessNewTagTrees( 604var bufferToChanges = new Dictionary<ITextBuffer, DiffResult>();
Undo\EditorSourceTextUndoService.cs (1)
23private readonly Dictionary<SourceText, SourceTextUndoTransaction> _transactions = [];
Workspaces\AbstractTextBufferVisibilityTracker.cs (1)
29private readonly Dictionary<ITextBuffer, VisibleTrackerData> _subjectBufferToCallbacks = [];
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
Workspaces\EditorTestWorkspace.cs (5)
35private readonly Dictionary<string, ITextBuffer2> _createdTextBuffers = []; 279out var projectionBufferSpans, out var mappedSpans, out var mappedCaretLocation); 338out Dictionary<string, ImmutableArray<TextSpan>> mappedMarkupSpans, out int? mappedCaretLocation) 434out Dictionary<string, ImmutableArray<TextSpan>> mappedMarkupSpans, 437var tempMappedMarkupSpans = new Dictionary<string, PooledObjects.ArrayBuilder<TextSpan>>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (16)
CodeFixes\CodeFixServiceTests.cs (1)
609public Dictionary<string, string> Messages = [];
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (4)
96private static Dictionary<string, string> GetExpectedMap(string expected, out string[] expectedLines) 100var expectedMap = new Dictionary<string, string>(); 114var expectedMap = GetExpectedMap(expected, out var expectedLines); 715var expectedMap = expected.ToDictionary(entry => (entry.diagnosticId, entry.optionName), entry => entry.optionValue);
LanguageServer\VSTypeScriptHandlerTests.cs (1)
106public VSTypeScriptTestLspServer(LspTestWorkspace testWorkspace, Dictionary<string, IList<Roslyn.LanguageServer.Protocol.Location>> locations, InitializationOptions options, AbstractLspLogger logger) : base(testWorkspace, locations, options, logger)
UnusedReferences\ProjectAssets\TestProjectAssetsFile.cs (10)
21var libraries = BuildLibraries(allReferences); 22var targets = BuildTargets(targetFramework, allReferences); 47private static Dictionary<string, ProjectAssetsLibrary> BuildLibraries(List<ReferenceInfo> references) 49var libraries = new Dictionary<string, ProjectAssetsLibrary>(); 59private static Dictionary<string, Dictionary<string, ProjectAssetsTargetLibrary>> BuildTargets(string targetFramework, List<ReferenceInfo> references) 61var libraries = new Dictionary<string, ProjectAssetsTargetLibrary>(); 64var dependencies = BuildDependencies(reference.Dependencies); 74return new Dictionary<string, Dictionary<string, ProjectAssetsTargetLibrary>>() { { targetFramework, libraries } }; 87private static Dictionary<string, string> BuildDependencies(ImmutableArray<ReferenceInfo> references)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (5)
EEMetadataReferenceResolver.cs (1)
16internal readonly Dictionary<AssemblyIdentity, (AssemblyIdentity? Identity, int Count)> Requests = [];
MetadataUtilities.cs (3)
95Dictionary<string, ModuleMetadata?>? modulesByName = null; 122var refsBySimpleName = new Dictionary<string, ImmutableArray<(AssemblyIdentity, MetadataReference)>>(StringComparer.OrdinalIgnoreCase); 327private static PortableExecutableReference MakeAssemblyReference(ModuleMetadata metadata, Dictionary<string, ModuleMetadata?>? modulesByName)
PDB\MethodDebugInfo.Native.cs (1)
451private static void GetLocalKindByName(Dictionary<string, LocalKind> localNames, IEnumerable<ISymUnmanagedScope> scopes)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
Resolver.cs (1)
19private readonly Dictionary<Process, List<Request>> _requests;
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (6)
src\ExpressionEvaluator\Core\Source\ResultProvider\Expansion\MemberExpansion.cs (1)
82var favoritesMembersByName = new Dictionary<string, MemberAndDeclarationInfo>();
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (5)
46var previousDeclarationMap = includeInherited ? new Dictionary<string, DeclarationInfo>() : null; 58var browsableState = DkmClrType.Create(appDomain, type).GetDebuggerBrowsableAttributeState(); 75Dictionary<string, object> favoritesMemberNames = null; 564private static Dictionary<string, DkmClrDebuggerBrowsableAttributeState> GetDebuggerBrowsableAttributeState(this DkmClrType type) 566Dictionary<string, DkmClrDebuggerBrowsableAttributeState> result = null;
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (9)
Debugger\Engine\DkmClrRuntimeInstance.cs (2)
35private readonly Dictionary<string, DkmClrObjectFavoritesInfo> _favoritesByTypeName; 56internal DkmClrRuntimeInstance(Assembly[] assemblies, Dictionary<string, DkmClrObjectFavoritesInfo> favoritesByTypeName)
Debugger\Engine\DkmDataContainer.cs (1)
19private readonly Dictionary<Guid, object> _dataItems = [];
src\ExpressionEvaluator\Core\Source\ResultProvider\Expansion\MemberExpansion.cs (1)
82var favoritesMembersByName = new Dictionary<string, MemberAndDeclarationInfo>();
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (5)
46var previousDeclarationMap = includeInherited ? new Dictionary<string, DeclarationInfo>() : null; 58var browsableState = DkmClrType.Create(appDomain, type).GetDebuggerBrowsableAttributeState(); 75Dictionary<string, object> favoritesMemberNames = null; 564private static Dictionary<string, DkmClrDebuggerBrowsableAttributeState> GetDebuggerBrowsableAttributeState(this DkmClrType type) 566Dictionary<string, DkmClrDebuggerBrowsableAttributeState> result = null;
Microsoft.CodeAnalysis.Extensions.Package (47)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Microsoft.CodeAnalysis.ExternalAccess.Copilot (7)
CodeMapper\ICSharpCopilotMapCodeService.cs (1)
19Dictionary<string, object> options,
GenerateDocumentation\IExternalCSharpCopilotGenerateDocumentationService.cs (1)
13Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentAsync(CopilotDocumentationCommentProposalWrapper proposal, CancellationToken cancellationToken);
Internal\Analyzer\AbstractCopilotCodeAnalysisService.cs (2)
48protected abstract Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentCoreAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken); 203public async Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken)
Internal\Analyzer\CSharp\CSharpCopilotCodeAnalysisService.cs (2)
146protected override Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentCoreAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken) 151return Task.FromResult<(Dictionary<string, string>?, bool)>((null, false));
Internal\CodeMapper\CopilotCSharpMapCodeService.cs (1)
32var options = new Dictionary<string, object>();
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Editor\Shared\Utilities\FSharpClassificationTypeMap.cs (1)
20private readonly Dictionary<string, IClassificationType> _identityMap;
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Testing\TestSolutionStore.cs (1)
13private readonly Dictionary<Checksum, Solution> _solutions = [];
Microsoft.CodeAnalysis.Features (264)
BracePairs\IBracePairsService.cs (1)
27private readonly Dictionary<int, int> _bracePairKinds = [];
ChangeSignature\AbstractChangeSignatureService.cs (7)
254var nodesToUpdate = new Dictionary<DocumentId, List<SyntaxNode>>(); 255var definitionToUse = new Dictionary<SyntaxNode, ISymbol>(); 376var updatedRoots = new Dictionary<DocumentId, SyntaxNode>(); 445private static void AddUpdatableNodeToDictionaries(Dictionary<DocumentId, List<SyntaxNode>> nodesToUpdate, DocumentId documentId, SyntaxNode nodeToUpdate, Dictionary<SyntaxNode, ISymbol> definitionToUse, ISymbol symbolWithSemanticParameters) 482var argumentToParameterMap = new Dictionary<IUnifiedArgumentSyntax, IParameterSymbol>(); 483var parameterToIndexMap = new Dictionary<IParameterSymbol, int>();
ChangeSignature\SignatureChange.cs (1)
19private readonly Dictionary<int, int?> _originalIndexToUpdatedIndexMap = [];
CodeFixes\Service\CodeFixService.cs (7)
513var uniqueDiagosticToEquivalenceKeysMap = new Dictionary<Diagnostic, PooledHashSet<string?>>(); 518var diagnosticAndEquivalenceKeyToFixersMap = new Dictionary<(Diagnostic diagnostic, string? equivalenceKey), CodeFixProvider>(); 632Dictionary<Diagnostic, PooledHashSet<string?>> uniqueDiagosticToEquivalenceKeysMap, 633Dictionary<(Diagnostic diagnostic, string? equivalenceKey), CodeFixProvider> diagnosticAndEquivalenceKeyToFixersMap, 671Dictionary<Diagnostic, PooledHashSet<string?>> uniqueDiagosticToEquivalenceKeysMap, 672Dictionary<(Diagnostic diagnostic, string? equivalenceKey), CodeFixProvider> diagnosticAndEquivalenceKeyToFixersMap) 1007private readonly Dictionary<CodeFixProvider, int> _fixerToIndex;
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (2)
280var codeActionToDiagnosticLocation = diagnosticsAndCodeActions.ToDictionary( 297Dictionary<CodeAction, int> codeActionToDiagnosticLocation,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (2)
50var currentDiagnosticSpans = new Dictionary<Diagnostic, TextSpan>(); 130private static void UpdateDiagnosticSpans(ImmutableArray<Diagnostic> diagnostics, Dictionary<Diagnostic, TextSpan> currentDiagnosticSpans, IEnumerable<TextChange> textChanges)
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
126private readonly Dictionary<string, FolderInfo> _childFolders;
Completion\CompletionService.ProviderManager.cs (1)
30private readonly Dictionary<ImmutableHashSet<string>, ImmutableArray<CompletionProvider>> _rolesToProviders;
Completion\CompletionService_GetCompletions.cs (5)
123var completionProviderToIndex = GetCompletionProviderToIndex(providers); 305private static Dictionary<CompletionProvider, int> GetCompletionProviderToIndex(ConcatImmutableArray<CompletionProvider> completionProviders) 307var result = new Dictionary<CompletionProvider, int>(completionProviders.Length); 347private static readonly ObjectPool<Dictionary<string, object>> s_uniqueSourcesPool = new(factory: () => [], size: 5); 350private readonly Dictionary<string, object> _displayNameToItemsMap = s_uniqueSourcesPool.Allocate();
Completion\PatternMatchHelper.cs (1)
38private readonly Dictionary<(CultureInfo, bool includeMatchedSpans), PatternMatcher> _patternMatcherMap = [];
Completion\Providers\AbstractDocCommentCompletionProvider.cs (1)
30private static readonly Dictionary<string, (string tagOpen, string textBeforeCaret, string textAfterCaret, string? tagClose)> s_tagMap =
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
206var typeConvertibilityCache = new Dictionary<ITypeSymbol, bool>(SymbolEqualityComparer.Default);
Completion\Providers\AbstractSymbolCompletionProvider.cs (13)
52Dictionary<ITypeSymbol, bool> typeConvertibilityCache) 91private static bool ShouldIncludeInTargetTypedCompletionListForNamedType(INamedTypeSymbol symbol, TSyntaxContext syntaxContext, Dictionary<ITypeSymbol, bool> typeConvertibilityCache) 151Dictionary<ISymbol, ArrayBuilder<ProjectId>>? invalidProjectMap, 176var typeConvertibilityCache = new Dictionary<ITypeSymbol, bool>(SymbolEqualityComparer.Default); 233Dictionary<ITypeSymbol, bool> typeConvertibilityCache, 250Dictionary<ISymbol, ArrayBuilder<ProjectId>>? invalidProjectMap, 366var symbolToContextMap = UnionSymbols(contextAndSymbolLists); 367var missingSymbolsMap = FindSymbolsMissingInLinkedContexts(symbolToContextMap, contextAndSymbolLists); 385private static Dictionary<SymbolAndSelectionInfo, TSyntaxContext> UnionSymbols( 392var result = new Dictionary<SymbolAndSelectionInfo, TSyntaxContext>(); 453private static Dictionary<ISymbol, ArrayBuilder<ProjectId>> FindSymbolsMissingInLinkedContexts( 454Dictionary<SymbolAndSelectionInfo, TSyntaxContext> symbolToContext, 457var missingSymbols = new Dictionary<ISymbol, ArrayBuilder<ProjectId>>(LinkedFilesSymbolEquivalenceComparer.Instance);
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (3)
129Dictionary<ITypeSymbol, bool> typeConvertibilityCache = []; 197Dictionary<ITypeSymbol, bool> typeConvertibilityCache) 215private static string GetFullyQualifiedNamespaceName(INamespaceSymbol symbol, Dictionary<INamespaceSymbol, string> stringCache)
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
382var parameterToPropMap = new Dictionary<string, ISymbol>();
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (4)
302var documentToEditorMap = new Dictionary<Document, SyntaxEditor>(); 325Dictionary<Document, SyntaxEditor> documentToEditorMap, 554Dictionary<Document, SyntaxEditor> documentToEditorMap, 584Document startingDocument, Dictionary<Document, SyntaxEditor> documentToEditorMap, CancellationToken cancellationToken)
Copilot\CopilotChangeAnalysis.cs (10)
39[property: DataMember(Order = 2)] Dictionary<string, int> IdToCount, 40[property: DataMember(Order = 3)] Dictionary<string, int> CategoryToCount, 41[property: DataMember(Order = 4)] Dictionary<DiagnosticSeverity, int> SeverityToCount); 54[property: DataMember(Order = 2)] Dictionary<string, int> DiagnosticIdToCount, 55[property: DataMember(Order = 3)] Dictionary<string, TimeSpan> DiagnosticIdToApplicationTime, 56[property: DataMember(Order = 4)] Dictionary<string, HashSet<string>> DiagnosticIdToProviderName, 57[property: DataMember(Order = 5)] Dictionary<string, TimeSpan> ProviderNameToApplicationTime, 58[property: DataMember(Order = 6)] Dictionary<string, bool> ProviderNameToHasConflict, 59[property: DataMember(Order = 7)] Dictionary<string, int> ProviderNameToTotalCount, 60[property: DataMember(Order = 8)] Dictionary<string, int> ProviderNameToSuccessCount);
Copilot\CopilotChangeAnalysisUtilities.cs (1)
129private static string StringifyDictionary<TKey, TValue>(Dictionary<TKey, TValue> dictionary) where TKey : notnull where TValue : notnull
Copilot\ICopilotChangeAnalysisService.cs (12)
162private static void IncrementCount<TKey>(Dictionary<TKey, int> map, TKey key) where TKey : notnull 168private static void IncrementElapsedTime<TKey>(Dictionary<TKey, TimeSpan> map, TKey key, TimeSpan elapsed) where TKey : notnull 193var idToCount = new Dictionary<string, int>(); 194var categoryToCount = new Dictionary<string, int>(); 195var severityToCount = new Dictionary<DiagnosticSeverity, int>(); 255var diagnosticIdToCount = new Dictionary<string, int>(); 256var diagnosticIdToApplicationTime = new Dictionary<string, TimeSpan>(); 257var diagnosticIdToProviderName = new Dictionary<string, HashSet<string>>(); 258var providerNameToApplicationTime = new Dictionary<string, TimeSpan>(); 259var providerNameToHasConflict = new Dictionary<string, bool>(); 260var providerNameToTotalCount = new Dictionary<string, int>(); 261var providerNameToSuccessCount = new Dictionary<string, int>();
Copilot\ICopilotCodeAnalysisService.cs (1)
89Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken);
Diagnostics\DiagnosticAnalyzerExtensions.cs (1)
50public static void AppendAnalyzerMap(this Dictionary<string, DiagnosticAnalyzer> analyzerMap, ImmutableArray<DiagnosticAnalyzer> analyzers)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (4)
129Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 144Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 156Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 169Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder)
Diagnostics\Service\EngineV2\InProcOrRemoteHostAnalyzerRunner.cs (2)
166using var pooledObject1 = SharedPools.Default<Dictionary<string, DiagnosticAnalyzer>>().GetPooledObject(); 167using var pooledObject2 = SharedPools.Default<Dictionary<string, DiagnosticAnalyzer>>().GetPooledObject();
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (16)
397internal abstract void ReportTopLevelSyntacticRudeEdits(RudeEditDiagnosticsBuilder diagnostics, Match<SyntaxNode> match, Edit<SyntaxNode> edit, Dictionary<SyntaxNode, EditKind> editMap); 604var editMap = BuildEditMap(syntacticEdits); 779private void ReportTopLevelSyntacticRudeEdits(RudeEditDiagnosticsBuilder diagnostics, EditScript<SyntaxNode> syntacticEdits, Dictionary<SyntaxNode, EditKind> editMap) 787internal Dictionary<SyntaxNode, EditKind> BuildEditMap(EditScript<SyntaxNode> editScript) 789var map = new Dictionary<SyntaxNode, EditKind>(editScript.Edits.Length); 1022Dictionary<LambdaBody, LambdaInfo>? lazyActiveOrMatchedLambdas = null; 1457ref Dictionary<LambdaBody, LambdaInfo>? lazyActiveOrMatchedLambdas) 1510var map = new Dictionary<SyntaxNode, SyntaxNode>(); 1542[Out] Dictionary<LambdaBody, LambdaInfo> activeOrMatchedLambdas) 1677Dictionary<LambdaBody, LambdaInfo> lambdaInfos) 2538public readonly Dictionary<SyntaxNode, SyntaxMaps> ChangedDeclarations = []; 3493Dictionary<INamedTypeSymbol, MemberInitializationUpdates> constructorEdits; 6153private static void BuildIndex(Dictionary<VariableCaptureKey, int> index, ImmutableArray<VariableCapture> array) 6282[Out] Dictionary<SyntaxNode, RudeEditDiagnostic> closureRudeEdits, 6940internal void ReportTopLevelSyntacticRudeEdits(RudeEditDiagnosticsBuilder diagnostics, EditScript<SyntaxNode> syntacticEdits, Dictionary<SyntaxNode, EditKind> editMap) 6946ref Dictionary<LambdaBody, LambdaInfo>? lazyActiveOrMatchedLambdas)
EditAndContinue\CommittedSolution.cs (1)
107private readonly Dictionary<DocumentId, DocumentState> _documentState = [];
EditAndContinue\DebuggingSession.cs (2)
76private readonly Dictionary<ProjectId, ImmutableList<ProjectBaseline>> _projectBaselines = []; 77private readonly Dictionary<Guid, (IDisposable metadata, IDisposable pdb)> _initialBaselineModuleReaders = [];
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (1)
34private static Dictionary<ManagedHotReloadAvailabilityStatus, DiagnosticDescriptor>? s_lazyModuleDiagnosticDescriptors;
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (1)
27private readonly Dictionary<DocumentId, (AsyncLazy<DocumentAnalysisResults> results, Project oldProject, Document? newDocument, ImmutableArray<ActiveStatementLineSpan> activeStatementSpans)> _analyses = [];
EditAndContinue\EditSession.cs (2)
786var mergedUpdateEditSyntaxMaps = new Dictionary<SymbolKey, (Func<SyntaxNode, SyntaxNode?>? matchingNodes, Func<SyntaxNode, RuntimeRudeEdit?>? runtimeRudeEdits)>(symbolKeyComparer); 857var changedDocumentsStaleness = new Dictionary<string, bool>(SolutionState.FilePathComparer);
EditAndContinue\SolutionSnapshotRegistry.cs (1)
27private readonly Dictionary<SolutionSnapshotId, Solution> _pendingSolutionSnapshots = [];
EditAndContinue\Utilities\BidirectionalMap.cs (4)
28var forward = new Dictionary<T, T>(Forward.Count + 1); 29var reverse = new Dictionary<T, T>(Reverse.Count + 1); 50var forward = new Dictionary<T, T>(count); 51var reverse = new Dictionary<T, T>(count);
EmbeddedLanguages\EmbeddedLanguageCommentOptions.cs (1)
23private static readonly Dictionary<string, TOptions> s_nameToOption =
EmbeddedLanguages\RegularExpressions\RegexCharClass.cs (1)
24public static readonly Dictionary<string, (string shortDescription, string longDescription)> EscapeCategories =
Extensions\ExtensionMessageHandlerService.cs (4)
18using CachedHandlers = Dictionary<string, AsyncLazy<ImmutableArray<IExtensionMessageHandlerWrapper>>>; 51private readonly (CachedHandlers workspace, CachedHandlers document) _cachedHandlers_useOnlyUnderLock = ([], []); 186CachedHandlers cachedHandlers,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerLogger.cs (1)
195var statMap = new Dictionary<string, List<int>>();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
30private readonly Dictionary<(string workspaceKind, SolutionServices services), UnitTestingWorkCoordinator> _documentWorkCoordinatorMap = [];
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncDocumentWorkItemQueue.cs (9)
18private readonly Dictionary<ProjectId, Dictionary<DocumentId, UnitTestingWorkItem>> _documentWorkQueue = []; 25if (_documentWorkQueue.TryGetValue(key.ProjectId, out var documentMap) && 33SharedPools.BigDefault<Dictionary<DocumentId, UnitTestingWorkItem>>().ClearAndFree(documentMap); 69var documentMap = _documentWorkQueue[projectId]; 101if (_documentWorkQueue.TryGetValue(key.ProjectId, out var documentMap) && 115documentMap = SharedPools.BigDefault<Dictionary<DocumentId, UnitTestingWorkItem>>().AllocateAndClear(); 133foreach (var map in _documentWorkQueue.Values) 140SharedPools.BigDefault<Dictionary<DocumentId, UnitTestingWorkItem>>().ClearAndFree(map);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncProjectWorkItemQueue.cs (1)
18private readonly Dictionary<ProjectId, UnitTestingWorkItem> _projectWorkQueue = [];
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncWorkItemQueue.cs (2)
29private readonly Dictionary<object, CancellationTokenSource> _cancellationMap = []; 241Dictionary<ProjectId, T> workQueue,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs (1)
287private readonly Dictionary<(string workspaceKind, SolutionServices services), ImmutableArray<IUnitTestingIncrementalAnalyzer>> _analyzerMap = [];
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (4)
39private readonly Dictionary<DocumentId, UnitTestingData> _pendingWork = []; 266private static TValue DequeueWorker<TKey, TValue>(SemaphoreSlim gate, Dictionary<TKey, TValue> map, CancellationToken cancellationToken) 286private static void ClearQueueWorker<TKey, TValue>(SemaphoreSlim gate, Dictionary<TKey, TValue> map, Func<TValue, IDisposable> disposerSelector) 331private readonly Dictionary<ProjectId, UnitTestingData> _pendingWork = [];
ExtractMethod\AbstractSyntaxTriviaService.cs (15)
32var tokens = GetTokensAtEdges(root, textSpan); 37var triviaList = GetTriviaAtEdges(tokens, textSpan); 39var annotations = Enumerable.Range((int)TriviaLocation.BeforeBeginningOfSpan, TriviaLocationsCount) 43var map = CreateOldToNewTokensMap(tokens, annotations); 63Dictionary<TriviaLocation, SyntaxAnnotation> annotations, 64Dictionary<TriviaLocation, IEnumerable<SyntaxTrivia>> triviaList) 69private static Dictionary<SyntaxToken, SyntaxToken> CreateOldToNewTokensMap( 70Dictionary<TriviaLocation, SyntaxToken> tokens, 71Dictionary<TriviaLocation, SyntaxAnnotation> annotations) 74var map = new Dictionary<SyntaxToken, SyntaxToken>(); 92private static Dictionary<TriviaLocation, IEnumerable<SyntaxTrivia>> GetTriviaAtEdges(Dictionary<TriviaLocation, SyntaxToken> tokens, TextSpan textSpan) 97var triviaList = new Dictionary<TriviaLocation, IEnumerable<SyntaxTrivia>> 108private static Dictionary<TriviaLocation, SyntaxToken> GetTokensAtEdges(SyntaxNode root, TextSpan textSpan) 110var tokens = new Dictionary<TriviaLocation, SyntaxToken>
ExtractMethod\AbstractSyntaxTriviaService.Result.cs (26)
22private readonly Dictionary<TriviaLocation, SyntaxAnnotation> _annotations; 23private readonly Dictionary<TriviaLocation, IEnumerable<SyntaxTrivia>> _triviaList; 28Dictionary<TriviaLocation, SyntaxAnnotation> annotations, 29Dictionary<TriviaLocation, IEnumerable<SyntaxTrivia>> triviaList) 49var tokens = RecoverTokensAtEdges(root, annotationResolver); 50var map = CreateOldToNewTokensMap(tokens, triviaResolver); 55private static Dictionary<SyntaxToken, SyntaxToken> CreateOldToNewTokensMap( 56Dictionary<TriviaLocation, PreviousNextTokenPair> tokenPairs, 57Dictionary<TriviaLocation, LeadingTrailingTriviaPair> triviaPairs) 59var map = new Dictionary<SyntaxToken, SyntaxToken>(); 100private Dictionary<TriviaLocation, SyntaxToken> RecoverTokensAtEdges( 106var tokens = Enumerable.Range((int)TriviaLocation.BeforeBeginningOfSpan, TriviaLocationsCount) 122private Dictionary<SyntaxToken, SyntaxToken> CreateOldToNewTokensMap( 123Dictionary<TriviaLocation, SyntaxToken> tokens, 126var tokenPairs = CreatePreviousNextTokenPairs(tokens); 127var tokenToLeadingTrailingTriviaMap = CreateTokenLeadingTrailingTriviaMap(tokens); 131var triviaPairs = Enumerable.Range((int)TriviaLocation.BeforeBeginningOfSpan, TriviaLocationsCount) 154Dictionary<TriviaLocation, PreviousNextTokenPair> tokenPairs, 155Dictionary<TriviaLocation, LeadingTrailingTriviaPair> triviaPairs) 173private Dictionary<SyntaxToken, LeadingTrailingTriviaPair> CreateTokenLeadingTrailingTriviaMap( 174Dictionary<TriviaLocation, SyntaxToken> tokens) 177var map = new Dictionary<SyntaxToken, LeadingTrailingTriviaPair>(); 210private static Dictionary<TriviaLocation, PreviousNextTokenPair> CreatePreviousNextTokenPairs( 211Dictionary<TriviaLocation, SyntaxToken> tokens) 213var tokenPairs = new Dictionary<TriviaLocation, PreviousNextTokenPair> 270Dictionary<SyntaxToken, LeadingTrailingTriviaPair> triviaMap)
ExtractMethod\ExtractMethodFlowControlInformation.cs (3)
33private readonly Dictionary<FlowControlKind, object?> _flowValues = []; 43Dictionary<FlowControlKind, object?> flowValues) 62var flowValues = new Dictionary<FlowControlKind, object?>();
ExtractMethod\ExtractMethodMatrix.cs (1)
15private static readonly Dictionary<Key, VariableStyle> s_matrix;
ExtractMethod\ISyntaxTriviaService.cs (1)
34internal delegate IEnumerable<SyntaxTrivia> TriviaResolver(TriviaLocation location, PreviousNextTokenPair tokenPair, Dictionary<SyntaxToken, LeadingTrailingTriviaPair> triviaMap);
ExtractMethod\MethodExtractor.Analyzer.cs (3)
81bestEffort: false, dataFlowAnalysisData, symbolMap, isInPrimaryConstructorBaseType, out var variableInfoMap, out var failedVariables); 147GetSignatureInformation(Dictionary<ISymbol, VariableInfo> symbolMap, ExtractMethodFlowControlInformation flowControlInformation) 406out Dictionary<ISymbol, VariableInfo> variableInfoMap,
ExtractMethod\SelectionResult.cs (2)
245var tokenMap = pairs.GroupBy(p => p.Item1, p => p.Item2).ToDictionary(g => g.Key, g => g.ToArray()); 258var tokenMap = pairs.GroupBy(p => p.Item1, p => p.Item2).ToDictionary(g => g.Key, g => g.ToArray());
FindUsages\AbstractFindUsagesService.ProgressAdapter.cs (1)
68private readonly Dictionary<SymbolGroup, DefinitionItem> _definitionToItem = [];
FindUsages\IRemoteFindUsagesService.cs (1)
91private readonly Dictionary<int, DefinitionItem> _idToDefinition = [];
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
360var renameTable = new Dictionary<ISymbol, string>();
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (4)
157var methodCallSites = await FindCallSitesAsync(document, methodSymbol, cancellationToken).ConfigureAwait(false); 243IMethodSymbol methodSymbol, SyntaxNode containingMethod, Dictionary<Document, List<TExpressionSyntax>> methodCallSites, bool allOccurrences, IntroduceParameterCodeActionKind selectedCodeAction, 275protected static async Task<Dictionary<Document, List<TExpressionSyntax>>> FindCallSitesAsync( 278var methodCallSites = new Dictionary<Document, List<TExpressionSyntax>>();
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (10)
62private async Task<Dictionary<TIdentifierNameSyntax, IParameterSymbol>> MapExpressionToParametersAsync(CancellationToken cancellationToken) 64var nameToParameterDict = new Dictionary<TIdentifierNameSyntax, IParameterSymbol>(); 226var expressionParameterMap = await MapExpressionToParametersAsync(cancellationToken).ConfigureAwait(false); 235var parameterToArgumentMap = new Dictionary<IParameterSymbol, int>(); 305Dictionary<IParameterSymbol, int> parameterToArgumentMap, SyntaxNode currentArgumentListSyntax, 487var parameterToArgumentMap = new Dictionary<IParameterSymbol, int>(); 488var expressionToParameterMap = await MapExpressionToParametersAsync(cancellationToken).ConfigureAwait(false); 542Dictionary<TIdentifierNameSyntax, IParameterSymbol> mappingDictionary, 543Dictionary<IParameterSymbol, int> parameterToArgumentMap, 608Dictionary<IParameterSymbol, int> mapping, SeparatedSyntaxList<SyntaxNode> arguments,
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (4)
114var structuralTypeToName = GenerateStructuralTypeNames(transitiveStructuralTypeReferences); 121private static Dictionary<INamedTypeSymbol, string> GenerateStructuralTypeNames( 125var anonymousTypeToName = new Dictionary<INamedTypeSymbol, string>(); 189var transitiveReferences = new Dictionary<INamedTypeSymbol, (int order, int count)>();
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (2)
13private sealed class StructuralTypeCollectorVisitor(Dictionary<INamedTypeSymbol, (int order, int count)> namedTypes) : SymbolVisitor 16private readonly Dictionary<INamedTypeSymbol, (int order, int count)> _namedTypes = namedTypes;
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (3)
83private readonly Dictionary<SymbolDescriptionGroups, IList<SymbolDisplayPart>> _groupMap = []; 84private readonly Dictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>> _documentationMap = []; 432var result = new Dictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>(_documentationMap);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
46private readonly Dictionary<UniqueDocumentKey, MetadataAsSourceGeneratedFileInfo> _keyToInformation = [];
MetadataAsSource\TelemetryMessage.cs (1)
53private void SetLogProperties(Dictionary<string, object?> properties)
PdbSourceDocument\ImplementationAssemblyLookupService.cs (7)
33private readonly Dictionary<string, Dictionary<(string @namespace, string typeName), string>?> _typeForwardCache = new(StringComparer.OrdinalIgnoreCase); 72if (TryGetCachedTypeForwards(dllPath, out var typeForwards)) 91var cachedTypeForwards = GetAllTypeForwards(md); 105bool TryGetCachedTypeForwards(string dllPath, [NotNullWhen(true)] out Dictionary<(string @namespace, string typeName), string>? typeForwards) 192private static Dictionary<(string, string), string>? GetAllTypeForwards(MetadataReader md) 197Dictionary<(string, string), string>? result = null;
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
57private readonly Dictionary<string, ProjectId> _assemblyToProjectMap = [];
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
23var result = new Dictionary<Glyph, QuickInfoGlyphElement>(capacity: glyphs.Length);
Snippets\AbstractSnippetService.cs (1)
20private readonly Dictionary<string, ISnippetProvider> _identifierToProviderMap = [];
Snippets\RoslynLSPSnippetConverter.cs (1)
84private static void PopulateMapOfSpanStartsToLSPStringItem(Dictionary<int, (string identifier, int priority)> dictionary, ImmutableArray<SnippetPlaceholder> placeholders, int textChangeStart)
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
25private static readonly Dictionary<(bool includeInFixAll, string equivalenceKey), ImmutableDictionary<string, string?>> s_cachedProperties = [];
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (3)
46|| !_helpers.TryGetOrComputePreferredOrder(option.Value, out var preferredOrder)) 62Dictionary<int, int> preferredOrder, 68Dictionary<int, int> preferredOrder,
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (6)
19private Tuple<string, Dictionary<int, int>>? _lastParsed; 23public static bool IsOrdered(Dictionary<int, int> preferredOrder, SyntaxTokenList modifiers) 43public bool TryGetOrComputePreferredOrder(string value, [NotNullWhen(true)] out Dictionary<int, int>? preferredOrder) 54if (!TryParse(value, out var parsed)) 68protected virtual bool TryParse(string value, [NotNullWhen(true)] out Dictionary<int, int>? parsed) 70var result = new Dictionary<int, int>();
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (4)
29var enumMembers = new Dictionary<long, ISymbol>(); 52ISwitchExpressionOperation operation, Dictionary<long, ISymbol> enumMembers) 64internal static void HandleBinaryPattern(IBinaryPatternOperation? binaryPattern, Dictionary<long, ISymbol> enumMembers) 76private static void RemoveIfConstantPatternHasValue(IOperation operation, Dictionary<long, ISymbol> enumMembers)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (3)
60var enumMembers = new Dictionary<long, ISymbol>(); 97private static bool TryRemoveExistingEnumMembers(ISwitchOperation switchStatement, Dictionary<long, ISymbol> enumValues) 153Dictionary<long, ISymbol> enumValues)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
123private readonly Dictionary<ISymbol, ValueUsageInfo> _symbolValueUsageStateMap_doNotAccessDirectly = new(OriginalDefinitionSymbolEqualityComparer.Instance);
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
81var typeToNameSegments = new Dictionary<ITypeSymbol, ImmutableArray<string>>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
176var result = new Dictionary<ITypeSymbol, ITypeParameterSymbol>(SymbolEqualityComparer.Default);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (1)
36public readonly Dictionary<ITypeSymbol, ITypeSymbol> Substitutions = [];
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (1)
54if (!_helpers.TryGetOrComputePreferredOrder(option.Value, out var preferredOrder))
UnusedReferences\ProjectAssets\ProjectAssetsModel.cs (8)
16public Dictionary<string, Dictionary<string, ProjectAssetsTargetLibrary>>? Targets { get; set; } 17public Dictionary<string, ProjectAssetsLibrary>? Libraries { get; set; } 18public Dictionary<string, List<string>>? ProjectFileDependencyGroups { get; set; } 25public Dictionary<string, string>? Dependencies { get; set; } 26public Dictionary<string, ProjectAssetsTargetLibraryCompile>? Compile { get; set; } 42public Dictionary<string, ProjectAssetsProjectFramework>? Frameworks { get; set; } 54public Dictionary<string, ProjectAssetsProjectFrameworkDependency>? Dependencies { get; set; }
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (4)
60var builtReferences = new Dictionary<string, ReferenceInfo?>(); 75Dictionary<string, ReferenceInfo?> builtReferences) 100Dictionary<string, ReferenceInfo?> builtReferences) 120var target = projectAssets.Targets[targetName];
UnusedReferences\UnusedReferencesRemover.cs (1)
70var referencesByType = references.GroupBy(reference => reference.ReferenceType)
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (2)
171var canEdit = new Dictionary<DocumentId, bool>(); 359Dictionary<DocumentId, bool> canEdit)
Wrapping\AbstractCodeActionComputer.cs (2)
222Dictionary<SyntaxToken, SyntaxTriviaList> leftTokenToTrailingTrivia, 223Dictionary<SyntaxToken, SyntaxTriviaList> rightTokenToLeadingTrivia,
Microsoft.CodeAnalysis.Features.Test.Utilities (9)
EditAndContinue\ActiveStatementsDescription.cs (3)
44var oldDocumentMap = new Dictionary<string, List<ActiveStatement>>(); 97Dictionary<string, List<ActiveStatement>> documentMap) 138var map = new Dictionary<string, List<ActiveStatement>>();
EditAndContinue\EditAndContinueTestAnalyzerConfigOptions.cs (1)
14private readonly Dictionary<string, string> _options;
EditAndContinue\EditAndContinueTestVerifier.cs (2)
514Dictionary<LambdaBody, LambdaInfo>? lazyActiveOrMatchedLambdas = null; 517var result = new Dictionary<SyntaxNode, SyntaxNode>();
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
45private protected readonly Dictionary<ProjectId, CompilationOutputs> _mockCompilationOutputs = [];
EditAndContinue\MockManagedEditAndContinueDebuggerService.cs (1)
18public Dictionary<Guid, ManagedHotReloadAvailability>? LoadedModules;
EditAndContinue\SourceMarkers.cs (1)
48var tagMap = new Dictionary<(int major, int minor), (int start, int end)>();
Microsoft.CodeAnalysis.Features.UnitTests (3)
EditAndContinue\ActiveStatementsMapTests.cs (3)
124var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>(); 179var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>(); 230var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>();
Microsoft.CodeAnalysis.InteractiveHost (16)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.LanguageServer (9)
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (1)
67private readonly Dictionary<string, int> _watchedFiles = new Dictionary<string, int>(s_stringComparer);
HostWorkspace\LanguageServerProjectLoader.cs (2)
53private readonly Dictionary<string, ProjectLoadState> _loadedProjects = []; 234Dictionary<ProjectFileInfo, ProjectLoadTelemetryReporter.TelemetryInfo> telemetryInfos = [];
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (2)
36public async Task ReportProjectLoadTelemetryAsync(Dictionary<ProjectFileInfo, TelemetryInfo> projectFileInfos, ProjectToLoad projectToLoad, CancellationToken cancellationToken) 109var fileCounts = new Dictionary<string, int>();
LanguageServer\Handler\CopilotCompletion\ContextResolveParam.cs (2)
26public Dictionary<string, SumType<string, int, bool, string[]>>? ActiveExperiments { get; set; } 35var result = new Dictionary<string, object>(this.ActiveExperiments.Count);
Services\ExtensionAssemblyManager.cs (2)
57var directoryLoadContexts = new Dictionary<string, AssemblyLoadContext>(StringComparer.Ordinal); 58var assemblyFullNameToLoadContext = new Dictionary<string, AssemblyLoadContext>(StringComparer.Ordinal);
Microsoft.CodeAnalysis.LanguageServer.Protocol (37)
Features\DecompiledSource\AssemblyResolver.cs (2)
23private static readonly Dictionary<MetadataReference, (string fileName, ImmutableArray<byte> image)> _inMemoryImagesForTesting = []; 26private readonly Dictionary<string, List<IAssemblySymbol>> _cache = [];
Handler\Completion\CompletionResultFactory.cs (3)
70var commitCharactersRuleCache = new Dictionary<ImmutableArray<CharacterSetModificationRule>, string[]>(CommitCharacterArrayComparer.Instance); 237Dictionary<ImmutableArray<CharacterSetModificationRule>, string[]> currentRuleCache) 269var commitCharacterReferences = new Dictionary<object, int>();
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
223Dictionary<ProjectOrDocumentId, PreviousPullResult> idToPreviousDiagnosticParams,
Handler\Diagnostics\AbstractWorkspacePullDiagnosticsHandler.cs (1)
35private readonly Dictionary<string, bool> _categoryToLspChanged = [];
Handler\InlineCompletions\InlineCompletionsHandler.cs (1)
267var fieldOffsets = new Dictionary<SnippetFieldPart, ImmutableArray<TextSpan>>();
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (1)
180var fieldNameToSnippetIndex = new Dictionary<string, int>();
Handler\PullHandlers\VersionedPullCache.cs (1)
72Dictionary<ProjectOrDocumentId, PreviousPullResult> idToClientLastResult,
Handler\References\FindUsagesLSPContext.cs (2)
48private readonly Dictionary<DefinitionItem, int> _definitionToId = []; 54private readonly Dictionary<int, SumType<VSInternalReferenceItem, LSP.Location>> _definitionsWithoutReference = [];
Handler\SemanticTokens\SemanticTokensRefreshQueue.cs (1)
29private readonly Dictionary<ProjectId, Checksum> _projectIdToLastComputedChecksum = [];
Handler\SemanticTokens\SemanticTokensSchema.cs (1)
118var tokenTypeToIndex = new Dictionary<string, int>();
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (4)
82var documentToPreviousParams = await GetDocumentToPreviousParamsAsync(context, previousResults, cancellationToken).ConfigureAwait(false); 100var documentToPreviousDiagnosticParams = documentToPreviousParams.ToDictionary(kvp => new ProjectOrDocumentId(kvp.Key.Id), kvp => kvp.Value); 135private static async Task<Dictionary<Document, PreviousPullResult>> GetDocumentToPreviousParamsAsync( 140var result = new Dictionary<Document, PreviousPullResult>();
LanguageInfoProvider.cs (1)
25private static readonly Dictionary<string, LanguageInformation> s_extensionToLanguageInformation = new()
LspServices\LspServices.cs (1)
41var serviceMap = new Dictionary<string, Lazy<ILspService, LspServiceMetadataView>>();
Protocol\Converters\FormattingOptionsConverter.cs (1)
48Dictionary<string, SumType<bool, int, string>>? otherOptions = null;
Protocol\DocumentDiagnosticReportPartialResult.cs (1)
24public Dictionary<Uri, SumType<FullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport>> RelatedDocuments
Protocol\FormattingOptions.cs (1)
63public Dictionary<string, SumType<bool, int, string>>? OtherOptions { get; set; }
Protocol\Internal\Efficiency\OptimizedVSCompletionListJsonConverter.cs (2)
72var itemRawJsonCache = new Dictionary<object, string>(capacity: 1); 96private static void WriteCompletionItem(Utf8JsonWriter writer, CompletionItem completionItem, JsonSerializerOptions options, Dictionary<object, string> itemRawJsonCache)
Protocol\MessageActionItem.cs (1)
35public Dictionary<string, object?> AdditionalProperties { get; set; }
Protocol\RelatedFullDocumentDiagnosticReport.cs (1)
32public Dictionary<Uri, SumType<FullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport>>? RelatedDocuments
Protocol\RelatedUnchangedDocumentDiagnosticReport.cs (1)
32public Dictionary<Uri, SumType<FullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport>>? RelatedDocuments
Protocol\SumType.cs (2)
897public static Dictionary<TKey, object> AsUntyped<TKey, TValue>(this Dictionary<TKey, TValue> dictionary)
Protocol\WorkspaceEdit.cs (2)
23public Dictionary<string, TextEdit[]>? Changes { get; set; } 54public Dictionary<ChangeAnnotationIdentifier, ChangeAnnotation>? ChangeAnnotations { get; init; }
RoslynLanguageServer.cs (1)
77var baseServiceMap = new Dictionary<string, object>();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\HandlerProvider.cs (1)
50var builder = new Dictionary<RequestHandlerMetadata, Lazy<IMethodHandler>>();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (2)
96var genericMethodMap = new Dictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>>(); 103var languages = new Dictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>();
Workspaces\LspWorkspaceManager.cs (1)
56private readonly Dictionary<Workspace, (int? forkedFromVersion, Solution solution)> _cachedLspSolutions = [];
Microsoft.CodeAnalysis.LanguageServer.UnitTests (10)
Utilities\AbstractLanguageServerClientTests.cs (4)
64Dictionary<DocumentUri, SourceText> files = new() { [codeUri] = text }; 65var annotatedLocations = GetAnnotatedLocations(codeUri, text, spans); 95private protected static Dictionary<string, IList<LSP.Location>> GetAnnotatedLocations(DocumentUri codeUri, SourceText text, ImmutableDictionary<string, ImmutableArray<TextSpan>> spanMap) 97var locations = new Dictionary<string, IList<LSP.Location>>();
Utilities\AbstractLanguageServerClientTests.TestLspClient.cs (6)
26private readonly Dictionary<DocumentUri, SourceText> _documents; 27private readonly Dictionary<string, IList<LSP.Location>> _locations; 40Dictionary<DocumentUri, SourceText>? documents = null, 41Dictionary<string, IList<LSP.Location>>? locations = null) 126private TestLspClient(Process process, string pipeName, Dictionary<DocumentUri, SourceText> documents, Dictionary<string, IList<LSP.Location>> locations, ILoggerFactory loggerFactory)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (139)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (2)
94using var collisionMapPool = (isCaseSensitive ? SharedPools.Default<Dictionary<string, bool>>() : SharedPools.StringIgnoreCaseDictionary<bool>()).GetPooledObject(); 95var collisionMap = collisionMapPool.Object;
Microsoft.CodeAnalysis.PooledObjects.Package (4)
ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.PublicApiAnalyzers (137)
DeclarePublicApiAnalyzer.cs (1)
409private static void ValidateApiList(ImmutableDictionary<AdditionalText, SourceText> additionalFiles, Dictionary<string, ApiLine> publicApiMap, ImmutableArray<ApiLine> apiList, bool isPublic, List<Diagnostic> errors)
DeclarePublicApiAnalyzer.Impl.cs (1)
104var publicApiMap = new Dictionary<string, ApiLine>(shippedData.ApiList.Length + unshippedData.ApiList.Length, StringComparer.Ordinal);
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (4)
AnnotatePublicApiFix.cs (4)
80private static SourceText AnnotateSymbolNamesInSourceText(SourceText sourceText, Dictionary<string, string> changes) 128var allChanges = new Dictionary<string, Dictionary<string, string>>(); 165if (!allChanges.TryGetValue(fileName, out var mapToUpdate))
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RebuildCommandLineTests.cs (1)
29public Dictionary<string, TestableFile> FilePathToStreamMap { get; } = new Dictionary<string, TestableFile>(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.Remote.ServiceHub (26)
Host\RemoteWorkspace.SolutionCreator.cs (4)
235Dictionary<ProjectId, ProjectStateChecksums> oldProjectIdToStateChecksums, 236Dictionary<ProjectId, ProjectStateChecksums> newProjectIdToStateChecksums, 476Dictionary<DocumentId, (Checksum attributeChecksum, Checksum textChecksum)> oldDocumentIdToStateChecksums, 477Dictionary<DocumentId, (Checksum attributeChecksum, Checksum textChecksum)> newDocumentIdToStateChecksums,
Host\RemoteWorkspace_SolutionCaching.cs (1)
35private readonly Dictionary<Checksum, InFlightSolution> _solutionChecksumToSolution = [];
Host\TestUtils.cs (13)
23public static void RemoveChecksums(this Dictionary<Checksum, object> map, ChecksumCollection checksums) 31public static void RemoveChecksums(this Dictionary<Checksum, object> map, IEnumerable<Checksum> checksums) 50var assetMapFromNewSolution = await solutionFromScratch.GetAssetMapAsync(projectConeId, CancellationToken.None).ConfigureAwait(false); 51var assetMapFromIncrementalSolution = await incrementalSolutionBuilt.GetAssetMapAsync(projectConeId, CancellationToken.None).ConfigureAwait(false); 158public static async Task<Dictionary<Checksum, object>> GetAssetMapAsync(this Solution solution, ProjectId? projectConeId, CancellationToken cancellationToken) 160var map = new Dictionary<Checksum, object>(); 169public static async Task<Dictionary<Checksum, object>> GetAssetMapAsync(this Project project, CancellationToken cancellationToken) 171var map = new Dictionary<Checksum, object>(); 182public static Task AppendAssetMapAsync(this Solution solution, Dictionary<Checksum, object> map, CancellationToken cancellationToken) 186this Solution solution, Dictionary<Checksum, object> map, ProjectId? projectId, CancellationToken cancellationToken) 188var callback = static (Checksum checksum, object asset, Dictionary<Checksum, object> map) => { map[checksum] = asset; }; 224private static async Task AppendAssetMapAsync(this Project project, Dictionary<Checksum, object> map, CancellationToken cancellationToken) 231var callback = static (Checksum checksum, object asset, Dictionary<Checksum, object> map) => { map[checksum] = asset; };
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (1)
362using var pooledMap = SharedPools.Default<Dictionary<string, DiagnosticAnalyzer>>().GetPooledObject();
Services\DiagnosticAnalyzer\PerformanceQueue.cs (5)
68using var pooledMap = SharedPools.Default<Dictionary<int, string>>().GetPooledObject(); 132private readonly Dictionary<int, double> _performanceMap; 163Dictionary<int, double> map, IEnumerable<(int assignedAnalyzerNumber, TimeSpan timeSpan)> rawData, int fileCount) 195private readonly Dictionary<string, int> _idMap; 222public void GetReverseMap(Dictionary<int, string> reverseMap)
Services\FindUsages\RemoteFindUsagesService.cs (1)
79private readonly Dictionary<DefinitionItem, int> _definitionItemToId = [];
Services\SourceGeneration\RemoteSourceGenerationService.cs (1)
74private static readonly Dictionary<string, (AnalyzerReferenceMap analyzerReferenceMap, AnalyzerReferenceMap.CreateValueCallback callback)> s_languageToAnalyzerReferenceMap = new()
Microsoft.CodeAnalysis.Remote.Workspaces (1)
SolutionAssetStorage.cs (1)
32private readonly Dictionary<Checksum, Scope> _checksumToScope = [];
Microsoft.CodeAnalysis.ResxSourceGenerator (135)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Microsoft.CodeAnalysis.Scripting (7)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (4)
45private readonly Dictionary<Assembly, LoadedAssembly> _assembliesLoadedFromLocation; 49private readonly Dictionary<string, AssemblyAndLocation> _assembliesLoadedFromLocationByFullPath; 52private readonly Dictionary<string, List<LoadedAssemblyInfo>> _loadedAssembliesBySimpleName; 55private readonly Dictionary<string, List<AssemblyIdentityAndLocation>> _dependenciesWithLocationBySimpleName;
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (2)
52private readonly Dictionary<FileKey, CacheEntry<MetadataShadowCopy>> _shadowCopies = new Dictionary<FileKey, CacheEntry<MetadataShadowCopy>>(); 56private readonly Dictionary<FileKey, CacheEntry<Metadata>> _noShadowCopyCache = new Dictionary<FileKey, CacheEntry<Metadata>>();
ScriptState.cs (1)
123var map = new Dictionary<string, int>(Script.Compiler.IdentifierComparer);
Microsoft.CodeAnalysis.Test.Utilities (57)
Assert\AssertEx.cs (1)
384var indexes = new Dictionary<string, int>(comparer);
CommonTestBase.cs (5)
131internal CompilationVerifier CompileAndVerifyFieldMarshalCommon(Compilation compilation, Dictionary<string, byte[]> expectedBlobs, bool isField = true) 578var parentMap = GetParentOperationsMap(model); 594private static Dictionary<IOperation, IOperation?> GetParentOperationsMap(SemanticModel model) 603var map = new Dictionary<IOperation, IOperation?>(); 615private static void CollectParentOperations(IOperation operation, Dictionary<IOperation, IOperation?> map)
Compilation\CompilationDifference.cs (1)
93Dictionary<int, string> sequencePointMarkers = null;
Compilation\CompilationExtensions.cs (1)
324var explicitNodeMap = new Dictionary<SyntaxNode, IOperation>();
Compilation\ControlFlowGraphVerifier.cs (2)
1800private readonly Dictionary<IFlowAnonymousFunctionOperation, ControlFlowGraph> _anonymousFunctionsMap; 1804Dictionary<IFlowAnonymousFunctionOperation, ControlFlowGraph> anonymousFunctionsMap,
Compilation\OperationTreeVerifier.cs (2)
28private readonly Dictionary<SyntaxNode, IOperation> _explicitNodeMap; 29private readonly Dictionary<ILabelSymbol, uint> _labelIdMap;
Compilation\TestOperationVisitor.cs (1)
193var explicitNodeMap = new Dictionary<SyntaxNode, IOperation>();
Compilation\TestSyntaxTreeOptionsProvider.cs (5)
15private readonly Dictionary<SyntaxTree, Dictionary<string, ReportDiagnostic>>? _options; 16private readonly Dictionary<SyntaxTree, GeneratedKind>? _isGenerated; 17private readonly Dictionary<string, ReportDiagnostic>? _globalOptions; 74_options.TryGetValue(tree, out var diags)
CompilationVerifier.cs (7)
106var map = new Dictionary<string, ICSharpCode.Decompiler.TypeSystem.IMethod>(); 121void listMethods(ICSharpCode.Decompiler.TypeSystem.INamespace @namespace, Dictionary<string, ICSharpCode.Decompiler.TypeSystem.IMethod> result) 138void listMethodsInType(ICSharpCode.Decompiler.TypeSystem.ITypeDefinition type, Dictionary<string, ICSharpCode.Decompiler.TypeSystem.IMethod> result) 396private readonly Dictionary<string, PEReader> _readersByName; 398internal Resolver(Dictionary<string, PEReader> readersByName) 432var readersByName = new Dictionary<string, PEReader>(StringComparer.OrdinalIgnoreCase); 744Dictionary<int, string>? markers = null;
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (9)
47Dictionary<IFieldSymbol, HashSet<INamedTypeSymbol>> fieldsSourceTypes = new Dictionary<IFieldSymbol, HashSet<INamedTypeSymbol>>(); 54Dictionary<ILocalSymbol, HashSet<INamedTypeSymbol>> localsSourceTypes = new Dictionary<ILocalSymbol, HashSet<INamedTypeSymbol>>(); 162private static bool HasMoreSpecificSourceType<SymbolType>(SymbolType symbol, ITypeSymbol symbolType, Dictionary<SymbolType, HashSet<INamedTypeSymbol>> symbolsSourceTypes, out INamedTypeSymbol commonSourceType) 232private static void AssignTo(IOperation target, Dictionary<ILocalSymbol, HashSet<INamedTypeSymbol>> localsSourceTypes, Dictionary<IFieldSymbol, HashSet<INamedTypeSymbol>> fieldsSourceTypes, IOperation sourceValue) 237private static void AssignTo(IOperation target, Dictionary<ILocalSymbol, HashSet<INamedTypeSymbol>> localsSourceTypes, Dictionary<IFieldSymbol, HashSet<INamedTypeSymbol>> fieldsSourceTypes, ITypeSymbol sourceType) 252private static void AssignTo<SymbolType>(SymbolType target, ITypeSymbol targetType, Dictionary<SymbolType, HashSet<INamedTypeSymbol>> sourceTypes, IOperation sourceValue) 257private static void AssignTo<SymbolType>(SymbolType target, ITypeSymbol targetType, Dictionary<SymbolType, HashSet<INamedTypeSymbol>> sourceTypes, ITypeSymbol sourceType)
Diagnostics\OptionsDiagnosticAnalyzer.cs (1)
19private readonly Dictionary<string, AnalyzerOptions> _mismatchedOptions = new Dictionary<string, AnalyzerOptions>();
InstrumentationChecker.cs (1)
279private readonly Dictionary<int /*method*/, MethodChecker> _spanExpectations = new Dictionary<int, MethodChecker>();
MarkedSource\MarkupTestFile.cs (1)
56var tempSpans = new Dictionary<string, ArrayBuilder<TextSpan>>();
Metadata\ILValidation.cs (4)
394public static Dictionary<int, string> GetSequencePointMarkers(XElement methodXml) 396var result = new Dictionary<int, string>(); 425public static Dictionary<int, string> GetSequencePointMarkers(XElement methodXml, Func<string, SourceText> getSource) 427var result = new Dictionary<int, string>();
Mocks\TestMetadataReferenceResolver.cs (5)
18private readonly Dictionary<string, PortableExecutableReference> _assemblyNames; 19private readonly Dictionary<string, PortableExecutableReference> _files; 23Dictionary<string, PortableExecutableReference> assemblyNames = null, 24Dictionary<string, PortableExecutableReference> files = null) 33Dictionary<string, PortableExecutableReference> map;
Mocks\TestMissingMetadataReferenceResolver.cs (2)
34private readonly Dictionary<string, MetadataReference> _map; 37public TestMissingMetadataReferenceResolver(Dictionary<string, MetadataReference> map)
Mocks\TestSourceReferenceResolver.cs (3)
30public static SourceReferenceResolver Create(Dictionary<string, string> sources = null) 35private readonly Dictionary<string, object> _sources; 37private TestSourceReferenceResolver(Dictionary<string, object> sources)
PDB\DeterministicBuildCompilationTestHelpers.cs (1)
157Dictionary<string, string> kvp = new Dictionary<string, string>();
TestableFileSystem.cs (5)
18private readonly Dictionary<string, TestableFile>? _map; 24public Dictionary<string, TestableFile> Map => _map ?? throw new InvalidOperationException(); 27private TestableFileSystem(Dictionary<string, TestableFile>? map = null) 66var map = files.ToDictionary( 74public static TestableFileSystem CreateForMap(Dictionary<string, TestableFile> map)
Microsoft.CodeAnalysis.Threading.Package (16)
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.UnitTests (16)
CachingLookupTests.cs (4)
156var dict = new Dictionary<string, ImmutableArray<int>>(comparer); 188var dict = new Dictionary<string, ImmutableArray<int>>(comparer); 220var dict = new Dictionary<string, ImmutableArray<int>>(comparer); 250var dict = new Dictionary<string, ImmutableArray<int>>(comparer);
Collections\ImmutableDictionaryTestBase.cs (2)
60var template = new Dictionary<string, int> 68var changes = new Dictionary<string, int>
Diagnostics\DiagnosticLocalizationTests.cs (10)
130var defaultCultureResources = new Dictionary<string, string>() 138var arResources = new Dictionary<string, string>() 146var resourceSetMap = new Dictionary<string, Dictionary<string, string>>() 157private readonly Dictionary<string, CustomResourceSet> _resourceSetMap; 159public CustomResourceManager(Dictionary<string, CustomResourceSet> resourceSetMap) 164public CustomResourceManager(Dictionary<string, Dictionary<string, string>> resourceSetMap) 210private readonly Dictionary<string, string> _resourcesMap; 211public CustomResourceSet(Dictionary<string, string> resourcesMap)
Microsoft.CodeAnalysis.VisualBasic (63)
Analysis\FlowAnalysis\AbstractFlowPass.Regions.vb (1)
43Private ReadOnly _loopHeadState As Dictionary(Of BoundLoopStatement, LocalState)
Analysis\IteratorAndAsyncAnalysis\IteratorAndAsyncCaptureWalker.vb (3)
25Private ReadOnly _byRefLocalsInitializers As Dictionary(Of LocalSymbol, BoundExpression) 33Public ReadOnly ByRefLocalsInitializers As Dictionary(Of LocalSymbol, BoundExpression) 35Friend Sub New(cl As OrderedSet(Of Symbol), initializers As Dictionary(Of LocalSymbol, BoundExpression))
Binding\Binder_Imports.vb (4)
22aliases As Dictionary(Of String, AliasAndImportsClausePosition), 23xmlNamespaces As Dictionary(Of String, XmlNamespaceAndImportsClausePosition)) 30Public ReadOnly Aliases As Dictionary(Of String, AliasAndImportsClausePosition) 31Public ReadOnly XmlNamespaces As Dictionary(Of String, XmlNamespaceAndImportsClausePosition)
Binding\Binder_XmlLiterals.vb (9)
125Dim allAttributes As Dictionary(Of XmlName, BoundXmlAttribute) = Nothing 144<Out()> ByRef allAttributes As Dictionary(Of XmlName, BoundXmlAttribute), 549<Out()> ByRef allAttributes As Dictionary(Of XmlName, BoundXmlAttribute), 1075<Out()> ByRef allAttributes As Dictionary(Of XmlName, BoundXmlAttribute), 1079diagnostics As BindingDiagnosticBag) As Dictionary(Of String, String) 1083Dim namespaces As Dictionary(Of String, String) = Nothing 1143<Out()> ByRef allAttributes As Dictionary(Of XmlName, BoundXmlAttribute), 1477Private ReadOnly _namespaces As Dictionary(Of String, String) 1479Public Sub New(containingBinder As Binder, namespaces As Dictionary(Of String, String))
Binding\BlockBaseBinder.vb (3)
34Private _lazyLocalsMap As Dictionary(Of String, T) 36Private ReadOnly Property LocalsMap As Dictionary(Of String, T) 45Private Function BuildMap(locals As ImmutableArray(Of T)) As Dictionary(Of String, T)
Binding\GetTypeBinder.vb (3)
23Private ReadOnly _allowedMap As Dictionary(Of GenericNameSyntax, Boolean) 46Private _allowedMap As Dictionary(Of GenericNameSyntax, Boolean) = Nothing 54Public Overloads Shared Sub Visit(typeSyntax As ExpressionSyntax, <Out()> ByRef allowedMap As Dictionary(Of GenericNameSyntax, Boolean))
Binding\ImplicitVariableBinder.vb (1)
51Private _implicitLocals As Dictionary(Of String, LocalSymbol)
Compilation\DocumentationComments\DocumentationCommentWalker.vb (3)
33Private ReadOnly _wellKnownElementNodes As Dictionary(Of WellKnownTag, ArrayBuilder(Of XmlNodeSyntax)) 40wellKnownElementNodes As Dictionary(Of WellKnownTag, ArrayBuilder(Of XmlNodeSyntax)), 111wellKnownElementNodes As Dictionary(Of WellKnownTag, ArrayBuilder(Of XmlNodeSyntax)),
Lowering\AsyncRewriter\AsyncRewriter.vb (2)
393initializers As Dictionary(Of LocalSymbol, BoundExpression)) As CapturedSymbolOrExpression 401initializers As Dictionary(Of LocalSymbol, BoundExpression)) As CapturedSymbolOrExpression
Lowering\Diagnostics\DiagnosticsPass.vb (1)
25Private _withExpressionPlaceholderMap As Dictionary(Of BoundValuePlaceholderBase, BoundWithStatement)
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (1)
38Private ReadOnly _parameterMap As Dictionary(Of ParameterSymbol, BoundExpression) = New Dictionary(Of ParameterSymbol, BoundExpression)()
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (6)
50Friend blockParent As Dictionary(Of BoundNode, BoundNode) = New Dictionary(Of BoundNode, BoundNode)() 51Friend lambdaParent As Dictionary(Of LambdaSymbol, MethodSymbol) = New Dictionary(Of LambdaSymbol, MethodSymbol)(ReferenceEqualityComparer.Instance) 58Friend variableScope As Dictionary(Of Symbol, BoundNode) = New Dictionary(Of Symbol, BoundNode)(ReferenceEqualityComparer.Instance) 63Friend labelBlock As Dictionary(Of LabelSymbol, BoundNode) = New Dictionary(Of LabelSymbol, BoundNode)(ReferenceEqualityComparer.Instance) 68Friend gotoBlock As Dictionary(Of BoundGotoStatement, BoundNode) = New Dictionary(Of BoundGotoStatement, BoundNode)() 99Friend lambdaScopes As Dictionary(Of LambdaSymbol, BoundNode)
Lowering\SynthesizedSubmissionFields.vb (1)
27Private _previousSubmissionFieldMap As Dictionary(Of ImplicitNamedTypeSymbol, FieldSymbol)
Symbols\MergedNamespaceSymbol.vb (3)
435Friend Overrides Sub BuildExtensionMethodsMap(map As Dictionary(Of String, ArrayBuilder(Of MethodSymbol))) 567Friend Overrides Sub BuildExtensionMethodsMap(map As Dictionary(Of String, ArrayBuilder(Of MethodSymbol))) 646Friend Overrides Sub BuildExtensionMethodsMap(map As Dictionary(Of String, ArrayBuilder(Of MethodSymbol)))
Symbols\Metadata\PE\PENamespaceSymbol.vb (5)
27Protected m_lazyMembers As Dictionary(Of String, ImmutableArray(Of Symbol)) 33Protected m_lazyTypes As Dictionary(Of String, ImmutableArray(Of PENamedTypeSymbol)) 39Private _lazyNoPiaLocalTypes As Dictionary(Of String, TypeDefinitionHandle) 236Dim noPiaLocalTypes As Dictionary(Of String, TypeDefinitionHandle) = Nothing 268Dim typesDict As Dictionary(Of String, ImmutableArray(Of PENamedTypeSymbol)) =
Symbols\NamedTypeSymbol.vb (1)
327map As Dictionary(Of String, ArrayBuilder(Of MethodSymbol)),
Symbols\NamespaceSymbol.vb (2)
462Friend Overridable Sub BuildExtensionMethodsMap(map As Dictionary(Of String, ArrayBuilder(Of MethodSymbol))) 489map As Dictionary(Of String, ArrayBuilder(Of MethodSymbol)),
Symbols\Retargeting\RetargetingNamedTypeSymbol.vb (1)
210map As Dictionary(Of String, ArrayBuilder(Of MethodSymbol)),
Symbols\Retargeting\RetargetingNamespaceSymbol.vb (1)
245Friend Overrides Sub BuildExtensionMethodsMap(map As Dictionary(Of String, ArrayBuilder(Of MethodSymbol)))
Symbols\Source\QuickAttributeChecker.vb (1)
22Private ReadOnly _nameToAttributeMap As Dictionary(Of String, QuickAttributes)
Symbols\Source\SourceFieldSymbol.vb (5)
308Private Sub CreateGraph(graph As Dictionary(Of SourceFieldSymbol, DependencyInfo)) 395Private Shared Sub CheckGraph(graph As Dictionary(Of SourceFieldSymbol, DependencyInfo)) 430Private Shared Sub OrderGraph(graph As Dictionary(Of SourceFieldSymbol, DependencyInfo), order As ArrayBuilder(Of FieldInfo)) 524graph As Dictionary(Of SourceFieldSymbol, DependencyInfo), 546Private Shared Function IsPartOfCycle(graph As Dictionary(Of SourceFieldSymbol, DependencyInfo), field As SourceFieldSymbol) As Boolean
Symbols\Source\SourceModuleSymbol.BoundImports.vb (4)
20Public ReadOnly AliasImportsMap As Dictionary(Of String, AliasAndImportsClausePosition) 25Public ReadOnly XmlNamespaces As Dictionary(Of String, XmlNamespaceAndImportsClausePosition) 31aliasImportsMap As Dictionary(Of String, AliasAndImportsClausePosition), 34xmlNamespaces As Dictionary(Of String, XmlNamespaceAndImportsClausePosition),
Symbols\Source\SynthesizedFieldSymbol.vb (1)
181Friend Overrides ReadOnly Property ImplicitlyDefinedBy(Optional membersInProgress As Dictionary(Of String, ArrayBuilder(Of Symbol)) = Nothing) As Symbol
Symbols\SubstitutedNamedType.vb (1)
410Private Shared Function GetMethodSubstitute(methodSubstitutions As Dictionary(Of MethodSymbol, SubstitutedMethodSymbol), method As MethodSymbol) As SubstitutedMethodSymbol
Microsoft.CodeAnalysis.Workspaces (297)
CodeActions\CodeAction.cs (3)
35private static readonly Dictionary<Type, bool> s_isNonProgressGetChangedSolutionAsyncOverridden = []; 36private static readonly Dictionary<Type, bool> s_isNonProgressComputeOperationsAsyncOverridden = []; 109private bool IsNonProgressApiOverridden(Dictionary<Type, bool> dictionary, Func<CodeAction, bool> computeResult)
CodeCleanup\AbstractCodeCleanerService.cs (3)
276var tokenAnnotationMap = new Dictionary<SyntaxToken, List<SyntaxAnnotation>>(); 593private static SyntaxNode InjectAnnotations(SyntaxNode node, Dictionary<SyntaxToken, List<SyntaxAnnotation>> map) 595var tokenMap = map.ToDictionary(p => p.Key, p => p.Value);
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (4)
50var docIdToTextMerger = new Dictionary<DocumentId, TextChangeMerger>(); 77FixAllContext fixAllContext, IProgress<CodeAnalysisProgress> progressTracker, Dictionary<DocumentId, TextChangeMerger> docIdToTextMerger) 109Dictionary<DocumentId, TextChangeMerger> docIdToTextMerger, 199Dictionary<DocumentId, TextChangeMerger> docIdToTextMerger)
Diagnostics\DiagnosticAnalysisResultBuilder.cs (9)
23private Dictionary<DocumentId, List<DiagnosticData>>? _lazySyntaxLocals = null; 24private Dictionary<DocumentId, List<DiagnosticData>>? _lazySemanticLocals = null; 25private Dictionary<DocumentId, List<DiagnosticData>>? _lazyNonLocals = null; 51ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, DocumentId documentId, ImmutableArray<Diagnostic> diagnostics) 96private static void AddDocumentDiagnostic(ref Dictionary<DocumentId, List<DiagnosticData>>? map, TextDocument document, Diagnostic diagnostic) 122Dictionary<DocumentId, List<DiagnosticData>>? dummy = null; 130ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, SyntaxTree? tree, Diagnostic diagnostic) 183ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, SyntaxTree? tree, ImmutableArray<Diagnostic> diagnostics) 189private static ImmutableDictionary<DocumentId, ImmutableArray<DiagnosticData>> Convert(Dictionary<DocumentId, List<DiagnosticData>>? map)
Differencing\EditScript.cs (2)
211var s = lcs.GetMatchingNodes(s1, s2); 241private static bool ContainsPair(Dictionary<TNode, TNode> dict, TNode a, TNode b)
Differencing\Match.cs (2)
23private readonly Dictionary<TNode, TNode> _oneToTwo = []; 24private readonly Dictionary<TNode, TNode> _twoToOne = [];
Differencing\Match.LongestCommonSubsequence.cs (2)
27internal Dictionary<TNode, TNode> GetMatchingNodes(IReadOnlyList<TNode> oldNodes, IReadOnlyList<TNode> newNodes) 29var result = new Dictionary<TNode, TNode>();
Editing\SolutionEditor.cs (1)
18private readonly Dictionary<DocumentId, DocumentEditor> _documentEditors = [];
ExtensionManager\IExtensionManagerExtensions.cs (2)
93var map = new Dictionary<Type, ImmutableArray<TExtension>>(); 117var map = new Dictionary<int, ImmutableArray<TExtension>>();
FindSymbols\FindReferences\DependentProjectsFinder.cs (6)
30private static readonly Dictionary<MetadataId, string?> s_metadataIdToAssemblyName = []; 35Dictionary< 78var symbolOriginations = GetSymbolOriginations(solution, symbols, cancellationToken); 104private static Dictionary<IAssemblySymbol, (Project? sourceProject, SymbolVisibility maxVisibility)> GetSymbolOriginations( 107var result = new Dictionary<IAssemblySymbol, (Project? sourceProject, SymbolVisibility visibility)>(); 140var dictionary = s_solutionToDependentProjectMap.GetValue(solution, static _ => []);
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
465var order = new Dictionary<ProjectId, int>(capacity: solution.ProjectIds.Count);
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (10)
35private static readonly ObjectPool<Dictionary<ISymbol, SymbolGroup>> s_symbolToGroupPool = new(() => new(MetadataUnifyingEquivalenceComparer.Instance)); 90using var _1 = s_symbolToGroupPool.GetPooledObject(out var symbolToGroup); 128Dictionary<ISymbol, SymbolGroup> symbolToGroup, 164ImmutableArray<ISymbol> symbols, Dictionary<ISymbol, SymbolGroup> symbolToGroup, CancellationToken cancellationToken) 176ISymbol symbol, Dictionary<ISymbol, SymbolGroup> symbolToGroup, CancellationToken cancellationToken) 219using var _2 = PooledDictionary<Document, Dictionary<ISymbol, SymbolGroup>>.GetInstance(out var documentToSymbolsWithin); 241var symbolsWithin = documentToSymbolsWithin.GetOrAdd(document, static _ => s_symbolToGroupPool.AllocateAndClear()); 269private static PooledHashSet<U>? TryGet<T, U>(Dictionary<T, PooledHashSet<U>> dictionary, T key) where T : notnull 274Dictionary<ISymbol, SymbolGroup> symbolsToSearchFor, 275Dictionary<ISymbol, PooledHashSet<string>> symbolToGlobalAliases,
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (2)
35using var _ = s_symbolToGroupPool.GetPooledObject(out var symbolToGroup); 47var hasInheritanceRelationshipCache = new Dictionary<(ISymbol searchSymbol, ISymbol candidateSymbol), bool>();
FindSymbols\ReferenceLocationExtensions.cs (3)
16public static async Task<Dictionary<ISymbol, List<Location>>> FindReferencingSymbolsAsync( 22var result = new Dictionary<ISymbol, List<Location>>(); 51Dictionary<ISymbol, List<Location>> result)
FindSymbols\StreamingProgressCollector.cs (1)
27private readonly Dictionary<ISymbol, List<ReferenceLocation>> _symbolToLocations = [];
FindSymbols\SymbolFinder.FindReferencesServerCallback.cs (2)
25private readonly Dictionary<SerializableSymbolGroup, SymbolGroup> _groupMap = []; 26private readonly Dictionary<SerializableSymbolAndProjectId, ISymbol> _definitionMap = [];
FindSymbols\SymbolFinder_Callers.cs (1)
67var result = await reference.Locations.FindReferencingSymbolsAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_Helpers.cs (1)
122Dictionary<INamedTypeSymbol, INamedTypeSymbol> equivalentTypesWithDifferingAssemblies)
FindSymbols\SyntaxTree\SyntaxTreeIndex.cs (2)
20private readonly Dictionary<InterceptsLocationData, TextSpan>? _interceptsLocationInfo; 28Dictionary<InterceptsLocationData, TextSpan>? interceptsLocationInfo)
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (2)
53Dictionary<InterceptsLocationData, TextSpan>? interceptsLocationInfo = null; 259ref Dictionary<InterceptsLocationData, TextSpan>? interceptsLocationInfo,
FindSymbols\SyntaxTree\SyntaxTreeIndex_Persistence.cs (1)
84Dictionary<InterceptsLocationData, TextSpan>? interceptsLocationInfo = null;
FindSymbols\TopLevelSyntaxTree\IDeclaredSymbolInfoFactoryService.cs (1)
16void AddDeclaredSymbolInfos(ProjectState project, SyntaxNode root, ArrayBuilder<DeclaredSymbolInfo> declaredSymbolInfos, Dictionary<string, ArrayBuilder<int>> extensionMethodInfo, CancellationToken cancellationToken);
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (12)
36private static readonly ObjectPool<List<Dictionary<string, string>>> s_aliasMapListPool 37= SharedPools.Default<List<Dictionary<string, string>>>(); 44private static readonly ObjectPool<Dictionary<string, string>> s_aliasMapPool 88protected static List<Dictionary<string, string>> AllocateAliasMapList() 120protected static void FreeAliasMapList(List<Dictionary<string, string>> list) 124foreach (var aliasMap in list) 133protected static void FreeAliasMap(Dictionary<string, string> aliasMap) 141protected static Dictionary<string, string> AllocateAliasMap() 156Dictionary<string, ArrayBuilder<int>> extensionMethodInfo, 180Dictionary<string, string?> aliases, 181Dictionary<string, ArrayBuilder<int>> extensionMethodInfo, 361private static void AddAliases(Dictionary<string, string?> allAliases, ImmutableArray<(string aliasName, string name)> aliases)
LinkedFileDiffMerging\LinkedFileMergeSessionResult.cs (1)
16public readonly Dictionary<DocumentId, ImmutableArray<TextSpan>> MergeConflictCommentSpans = [];
Log\HistogramLogAggregator.cs (1)
112public void WriteTelemetryPropertiesTo(Dictionary<string, object?> properties, string prefix)
Log\KeyValueLogMessage.cs (16)
24private Action<Dictionary<string, object?>>? _propertySetter; 37_lazyMap = SharedPools.Default<Dictionary<string, object?>>().AllocateAndClear(); 42private void Initialize(LogType kind, Action<Dictionary<string, object?>>? propertySetter, LogLevel logLevel) 49public static new SimpleKeyValueLogMessage Create(Action<Dictionary<string, object?>> propertySetter, LogLevel logLevel = LogLevel.Information) 60public static new SimpleKeyValueLogMessage Create(LogType kind, Action<Dictionary<string, object?>>? propertySetter, LogLevel logLevel = LogLevel.Information) 73private Action<Dictionary<string, object?>, TArgs> _propertySetter = null!; 88_lazyMap = SharedPools.Default<Dictionary<string, object?>>().AllocateAndClear(); 94LogType kind, Action<Dictionary<string, object?>, TArgs> propertySetter, TArgs args, LogLevel logLevel) 103Action<Dictionary<string, object?>, TArgs> propertySetter, TArgs args, LogLevel logLevel) 112LogType kind, Action<Dictionary<string, object?>, TArgs> propertySetter, TArgs args, LogLevel logLevel) 127public static KeyValueLogMessage Create(Action<Dictionary<string, object?>> propertySetter, LogLevel logLevel = LogLevel.Information) 133public static KeyValueLogMessage Create(LogType kind, Action<Dictionary<string, object?>>? propertySetter, LogLevel logLevel = LogLevel.Information) 136public static KeyValueLogMessage Create<TArgs>(Action<Dictionary<string, object?>, TArgs> propertySetter, TArgs args, LogLevel logLevel = LogLevel.Information) 139public static KeyValueLogMessage Create<TArgs>(LogType kind, Action<Dictionary<string, object?>, TArgs> propertySetter, TArgs args, LogLevel logLevel = LogLevel.Information) 142private Dictionary<string, object?>? _lazyMap; 235SharedPools.Default<Dictionary<string, object?>>().ClearAndFree(_lazyMap);
Log\StatisticResult.cs (1)
77public void WriteTelemetryPropertiesTo(Dictionary<string, object?> properties, string prefix)
Rename\ConflictEngine\ConflictingIdentifierTracker.cs (1)
16private readonly Dictionary<string, List<SyntaxToken>> _currentIdentifiersInScope = new Dictionary<string, List<SyntaxToken>>(identifierComparer);
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
262var documentIdErrorStateLookup = new Dictionary<DocumentId, bool>(); 339var reverseMappedLocations = new Dictionary<Location, Location>();
Rename\ConflictEngine\DeclarationConflictHelpers.cs (1)
42var signatureToConflictingMember = new Dictionary<ImmutableArray<ITypeSymbol>, ISymbol>(ConflictingSignatureComparer.Instance);
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
25private readonly Dictionary<DocumentId, List<(TextSpan oldSpan, TextSpan newSpan)>> _documentToModifiedSpansMap = []; 26private readonly Dictionary<DocumentId, List<MutableComplexifiedSpan>> _documentToComplexifiedSpansMap = [];
Shared\Utilities\DocumentationComment.cs (4)
122private Dictionary<string, ImmutableArray<string>.Builder>? _exceptionTextBuilders; 316private readonly Dictionary<string, string> _parameterTexts = []; 317private readonly Dictionary<string, string> _typeParameterTexts = []; 318private readonly Dictionary<string, ImmutableArray<string>> _exceptionTexts = [];
Shared\Utilities\ExtensionOrderer.Graph.cs (1)
16public readonly Dictionary<Lazy<TExtension, TMetadata>, Node<TExtension, TMetadata>> Nodes = [];
Shared\Utilities\SemanticMap.cs (2)
15private readonly Dictionary<SyntaxNode, SymbolInfo> _expressionToInfoMap = []; 17private readonly Dictionary<SyntaxToken, SymbolInfo> _tokenToInfoMap = [];
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (1)
29private readonly Dictionary<string, DirectoryLoadContext> _loadContextByDirectory = new Dictionary<string, DirectoryLoadContext>(GeneratedPathComparer);
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (3)
76private readonly Dictionary<string, (IAnalyzerPathResolver? Resolver, string ResolvedPath, AssemblyName? AssemblyName)> _originalPathInfoMap = new(OriginalPathComparer); 86private readonly Dictionary<string, HashSet<string>> _assemblySimpleNameToOriginalPathListMap = new(SimpleNameComparer.Comparer); 97private readonly Dictionary<string, string> _resolvedToOriginalPathMap = new(GeneratedPathComparer);
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (2)
94using var collisionMapPool = (isCaseSensitive ? SharedPools.Default<Dictionary<string, bool>>() : SharedPools.StringIgnoreCaseDictionary<bool>()).GetPooledObject(); 95var collisionMap = collisionMapPool.Object;
Storage\SQLite\v2\Interop\SqlConnection.cs (3)
70private readonly Dictionary<string, SqlStatement> _queryToStatement; 85var queryToStatement = new Dictionary<string, SqlStatement>(); 153private SqlConnection(SafeSqliteHandle handle, Dictionary<string, SqlStatement> queryToStatement)
Utilities\Documentation\XmlDocumentationProvider.cs (2)
25private Dictionary<string, string> _docComments; 73var comments = new Dictionary<string, string>();
Workspace\Host\Metadata\MetadataReferenceCache.cs (1)
43private readonly Dictionary<MetadataReferenceProperties, WeakReference<MetadataReference>> _references = [];
Workspace\IsolatedAnalyzerReferenceSet.Core.cs (8)
29private static readonly ObjectPool<Dictionary<string, Guid>> s_pathToMvidMapPool = new(() => new(SolutionState.FilePathComparer)); 45private static readonly Dictionary<Checksum, WeakReference<IsolatedAnalyzerReferenceSet>> s_checksumToReferenceSet = []; 78private readonly Dictionary<string, Guid> _analyzerFileReferencePathToMvid = []; 91private readonly Dictionary<Checksum, ImmutableArray<AnalyzerReference>> _analyzerReferences = []; 150Dictionary<string, Guid> filePathToMvid) 183private bool HasConflicts(Dictionary<string, Guid> filePathToMvid) 273using var _ = s_pathToMvidMapPool.GetPooledObject(out var pathToMvidMap); 295Dictionary<string, Guid> pathToMvidMap)
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (1)
37private readonly Dictionary<string, (IWatchedFile Token, int RefCount)> _referenceFileWatchingTokens = [];
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (2)
38private readonly Dictionary<string, DocumentId> _documentPathsToDocumentIds = new(StringComparer.OrdinalIgnoreCase); 49private readonly Dictionary<DocumentId, IDynamicFileInfoProvider> _documentIdToDynamicFileInfoProvider = [];
Workspace\ProjectSystem\ProjectSystemProject.cs (3)
112private readonly Dictionary<string, ImmutableArray<MetadataReferenceProperties>> _allMetadataReferences = []; 118private readonly Dictionary<DocumentId, IWatchedFile> _documentWatchedFiles = []; 147private readonly Dictionary<string, string?> _dynamicFilePathMaps = new(StringComparer.OrdinalIgnoreCase);
Workspace\Solution\Project.cs (6)
31private Dictionary<DocumentId, Document?>? _idToDocumentMap; 32private Dictionary<DocumentId, SourceGeneratedDocument>? _idToSourceGeneratedDocumentMap; 33private Dictionary<DocumentId, AdditionalDocument?>? _idToAdditionalDocumentMap; 34private Dictionary<DocumentId, AnalyzerConfigDocument?>? _idToAnalyzerConfigDocumentMap; 258private static TDocument GetOrAddDocumentUnderLock<TDocument, TArg>(DocumentId documentId, ref Dictionary<DocumentId, TDocument>? idMap, Func<DocumentId, TArg, TDocument> tryCreate, TArg arg) 273private static bool TryGetDocumentValueUnderLock<TDocument>(DocumentId documentId, ref Dictionary<DocumentId, TDocument>? idMap, out TDocument? document)
Workspace\Solution\ProjectState.cs (5)
55private AsyncLazy<Dictionary<ImmutableArray<byte>, DocumentId>>? _lazyContentHashToDocumentId; 138private async Task<Dictionary<ImmutableArray<byte>, DocumentId>> ComputeContentHashToDocumentIdAsync(CancellationToken cancellationToken) 140var result = new Dictionary<ImmutableArray<byte>, DocumentId>(ImmutableArrayComparer<byte>.Instance); 171private AsyncLazy<Dictionary<ImmutableArray<byte>, DocumentId>> LazyContentHashToDocumentId 197var map = await LazyContentHashToDocumentId.GetValueAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Solution.cs (2)
33private readonly Dictionary<ProjectId, Project> _projectIdToProjectMap = []; 44private readonly Dictionary<DocumentId, AsyncLazy<Solution>> _documentIdToFrozenSolution = [];
Workspace\Solution\SolutionCompilationState.CompilationTracker.CompilationTrackerState.cs (2)
220Dictionary<MetadataReference, ProjectId>? metadataReferenceToProjectId) 250private static void RecordAssemblySymbols(ProjectId projectId, Compilation compilation, Dictionary<MetadataReference, ProjectId>? metadataReferenceToProjectId)
Workspace\Solution\SolutionCompilationState.cs (1)
1450var documentStatesByProjectId = documentStates.Values.ToMultiDictionary(static state => state.Id.ProjectId);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
494var metadataReferenceToProjectId = new Dictionary<MetadataReference, ProjectId>();
Workspace\Solution\SolutionCompilationState.SkeletonReferenceSet.cs (1)
32private readonly Dictionary<MetadataReferenceProperties, PortableExecutableReference> _referenceMap = [];
Workspace\Solution\SolutionCompilationState_Checksum.cs (1)
31private readonly Dictionary<ProjectId, AsyncLazy<(SolutionCompilationStateChecksums checksums, ProjectCone projectCone)>> _lazyProjectChecksums = [];
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (1)
48private static readonly Dictionary<string, AnalyzerReferenceMap> s_languageToAnalyzerReferenceMap = new()
Workspace\Solution\SolutionState_Checksum.cs (1)
32private readonly Dictionary<ProjectId, AsyncLazy<SolutionStateChecksums>> _lazyProjectChecksums = [];
Workspace\Solution\TextDocumentStates.cs (2)
40private static readonly ObjectPool<Dictionary<string, OneOrMany<DocumentId>>> s_filePathPool = new(() => new(SolutionState.FilePathComparer)); 357var result = pooledDictionary.Object;
Workspace\Workspace.cs (1)
1478var outputAssemblyToProjectIdMap = new Dictionary<string, ProjectId>();
Workspace\Workspace_Editor.cs (6)
24private readonly Dictionary<ProjectId, HashSet<DocumentId>> _projectToOpenDocumentsMap = []; 31private readonly Dictionary<SourceTextContainer, DocumentId> _bufferToDocumentInCurrentContextMap = []; 36private readonly Dictionary<SourceTextContainer, OneOrMany<DocumentId>> _bufferToAssociatedDocumentsMap = []; 38private readonly Dictionary<DocumentId, TextTracker> _textTrackers = []; 39private readonly Dictionary<DocumentId, SourceTextContainer> _documentToAssociatedBufferMap = []; 40private readonly Dictionary<DocumentId, (SourceGeneratedDocumentIdentity identity, DateTime generationDateTime)> _openSourceGeneratedDocumentIdentities = [];
Workspace\Workspace_EventsLegacy.cs (1)
17private readonly Dictionary<(object eventHandler, WorkspaceEventType eventType), (int adviseCount, IDisposable disposer)> _disposableEventHandlers = new();
Workspace\WorkspaceEventMap.cs (1)
19private readonly Dictionary<WorkspaceEventType, EventHandlerSet> _eventTypeToHandlerSet = [];
Microsoft.CodeAnalysis.Workspaces.MSBuild (9)
MSBuild\BuildHostProcessManager.cs (1)
31private readonly Dictionary<BuildHostProcessKind, BuildHostProcess> _processes = [];
MSBuild\MSBuildProjectLoader.Worker.cs (3)
69private readonly Dictionary<ProjectId, ProjectFileInfo> _projectIdToFileInfoMap; 70private readonly Dictionary<ProjectId, List<ProjectReference>> _projectIdToProjectReferencesMap; 71private readonly Dictionary<string, ImmutableArray<ProjectInfo>> _pathToDiscoveredProjectInfosMap;
MSBuild\ProjectFileExtensionRegistry.cs (1)
19private readonly Dictionary<string, string> _extensionToLanguageMap;
MSBuild\ProjectMap.cs (4)
24private readonly Dictionary<string, HashSet<ProjectId>> _projectPathToProjectIdsMap; 30private readonly Dictionary<string, ImmutableArray<ProjectInfo>> _projectPathToProjectInfosMap; 35private readonly Dictionary<ProjectId, string> _projectIdToOutputFilePathMap; 40private readonly Dictionary<ProjectId, string> _projectIdToOutputRefFilePathMap;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (46)
MSBuild\ProjectFile\ProjectFile.cs (3)
369Dictionary<string, string>? metadata = null; 408var metadata = new Dictionary<string, string>(); 482var metadata = new Dictionary<string, string>
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
28private readonly Dictionary<K, CacheValue> _cache;
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (7)
MSBuildWorkspaceTestBase.cs (2)
183private static Dictionary<string, string> CreateProperties((string key, string value)[] additionalProperties) 185var properties = new Dictionary<string, string>();
NetCoreTests.cs (1)
37var environmentVariables = new Dictionary<string, string>()
NewlyCreatedProjectsFromDotNetNew.cs (1)
246Dictionary<string, string> additionalEnvironmentVars = new()
TestFiles\Resources.cs (3)
45private static Dictionary<string, byte[]> s_bytesCache; 46private static Dictionary<string, string> s_textCache; 48private static TResult GetOrLoadValue<TResult>(string name, Func<string, TResult> loader, ref Dictionary<string, TResult> cache)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (8)
MEF\TestComposition.cs (1)
26private static readonly Dictionary<CacheKey, IExportProviderFactory> s_factoryCache = [];
Options\NamingStyleTestUtilities.cs (1)
51var guidMap = new Dictionary<Guid, int>();
Options\OptionsTestHelpers.cs (1)
199public static NamingStylePreferences ParseNamingStylePreferences(Dictionary<string, string> options)
OptionsCollection.cs (1)
30private readonly Dictionary<OptionKey2, object?> _options = [];
Remote\InProcRemostHostClient.cs (2)
155private readonly Dictionary<ServiceMoniker, Func<object>> _inProcBrokeredServicesMap = []; 156private readonly Dictionary<ServiceMoniker, BrokeredServiceBase.IFactory> _remoteBrokeredServicesMap = [];
Workspaces\TestWorkspace`1.cs (2)
611var projectNameToTestHostProject = new Dictionary<string, TProject>(); 612var projectElementToProjectName = new Dictionary<XElement, string>();
Microsoft.CodeAnalysis.Workspaces.UnitTests (26)
FunctionIdTests.cs (1)
17var map = new Dictionary<FunctionId, string>();
Options\EditorConfigNamingStyleParserTests.cs (16)
21var dictionary = new Dictionary<string, string>() 69var dictionary = new Dictionary<string, string>() 90var dictionary = new Dictionary<string, string>() 132var dictionary = new Dictionary<string, string>() 149var dictionary = new Dictionary<string, string>() 197var dictionary = new Dictionary<string, string>() 239var dictionary = new Dictionary<string, string>() 282var dictionary = new Dictionary<string, string>() 321var dictionary = new Dictionary<string, string>() 346var rule = new Dictionary<string, string>() 377var rule = new Dictionary<string, string>() 397var charpRule = new Dictionary<string, string>() 405var vbRule = new Dictionary<string, string>() 426var rule = new Dictionary<string, string>() 580var dictionary = new Dictionary<string, string>() 649var dictionary = new Dictionary<string, string>()
Remote\ServiceDescriptorTests.cs (3)
52private static Dictionary<Type, MemberInfo> GetAllParameterTypesOfRemoteApis() 65var types = new Dictionary<Type, MemberInfo>(); 293var types = GetAllParameterTypesOfRemoteApis();
SolutionTests\ProjectDependencyGraphTests.cs (2)
678var references = new Dictionary<string, IEnumerable<string>>(); 718var referencesByTargetProject = new Dictionary<string, List<ProjectReference>>();
UtilityTest\DictionaryExtensionsTests.cs (4)
16var dictionary = new Dictionary<int, string>(); 24var dictionary = new Dictionary<int, string> 42var dictionary = new Dictionary<int, string> 60var dictionary = new Dictionary<int, string>
Microsoft.CommonLanguageServerProtocol.Framework.Package (3)
HandlerProvider.cs (1)
50var builder = new Dictionary<RequestHandlerMetadata, Lazy<IMethodHandler>>();
RequestExecutionQueue.cs (2)
96var genericMethodMap = new Dictionary<string, FrozenDictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>>(); 103var languages = new Dictionary<string, Lazy<(RequestHandlerMetadata, IMethodHandler, MethodInfo)>>();
Microsoft.CSharp (15)
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (1)
30private readonly Dictionary<ExprCall, Expression> _DictionaryOfParameters;
Microsoft\CSharp\RuntimeBinder\Semantics\COperators.cs (3)
96private static Dictionary<Name, string> s_operatorsByName; 98private static Dictionary<Name, string> GetOperatorByName() 100Dictionary<Name, string> dict = new Dictionary<Name, string>(28)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolStore.cs (1)
18private static readonly Dictionary<Key, Symbol> s_dictionary = new Dictionary<Key, Symbol>();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (3)
181private static readonly Dictionary<string, PredefinedType> s_typesByName = CreatePredefinedTypeFacts(); 183private static Dictionary<string, PredefinedType> CreatePredefinedTypeFacts() 185var typesByName = new Dictionary<string, PredefinedType>((int)PredefinedType.PT_COUNT);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeArray.cs (1)
81private static readonly Dictionary<TypeArrayKey, TypeArray> s_tableTypeArrays =
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (1)
18private static readonly Dictionary<(Assembly, Assembly), bool> s_internalsVisibleToCache =
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeTable.cs (5)
51private static readonly Dictionary<KeyPair<AggregateSymbol, KeyPair<AggregateType, TypeArray>>, AggregateType> s_aggregateTable = 54private static readonly Dictionary<KeyPair<CType, int>, ArrayType> s_arrayTable = 57private static readonly Dictionary<KeyPair<CType, bool>, ParameterModifierType> s_parameterModifierTable = 61private static readonly Dictionary<CType, PointerType> s_pointerTable = new Dictionary<CType, PointerType>(); 62private static readonly Dictionary<CType, NullableType> s_nullableTable = new Dictionary<CType, NullableType>();
Microsoft.Data.Analysis (38)
DataFrame.IO.cs (1)
394var names = new Dictionary<string, int>();
DataFrame.Join.cs (11)
185Dictionary<long, ICollection<long>> occurrences = GetOccurences(retainedDataFrame, supplementaryDataFrame, 192private static Dictionary<long, ICollection<long>> GetOccurences(DataFrame retainedDataFrame, DataFrame supplementaryDataFrame, 199Dictionary<long, ICollection<long>> occurrences = null; 200Dictionary<long, long> retainedIndicesReverseMapping = null; 213var newRetainedIndicesReverseMapping = new Dictionary<long, long>(shrinkedRetainedIndices.Length); 231var newOccurrences = shrinkedRetainedColumn.GetGroupedOccurrences(supplementaryColumn, out HashSet<long> supplementaryColumnNullIndices); 252private static Dictionary<long, ICollection<long>> GetShrinkedOccurences(Dictionary<long, ICollection<long>> occurrences, 253Dictionary<long, ICollection<long>> newOccurrences) 255var shrinkedOccurences = new Dictionary<long, ICollection<long>>(); 276Dictionary<long, ICollection<long>> occurrences, HashSet<long> supplementaryJoinColumnsNullIndices,
DataFrameColumn.cs (5)
255public virtual Dictionary<TKey, ICollection<long>> GroupColumnValues<TKey>(out HashSet<long> nullIndices) => throw new NotImplementedException(); 263public abstract Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices); 272protected Dictionary<long, ICollection<long>> GetGroupedOccurrences<TKey>(DataFrameColumn other, out HashSet<long> otherColumnNullIndices) 278Dictionary<TKey, ICollection<long>> multimap = other.GroupColumnValues<TKey>(out otherColumnNullIndices); 280var ret = new Dictionary<long, ICollection<long>>();
DataFrameColumnCollection.cs (1)
17private readonly Dictionary<string, int> _columnNameToIndexDictionary = new Dictionary<string, int>(StringComparer.Ordinal);
DataFrameColumns\ArrowStringDataFrameColumn.cs (6)
477Dictionary<string, ICollection<long>> groupedValues = GroupColumnValues<string>(out HashSet<long> _); 484Dictionary<string, ICollection<long>> dictionary = GroupColumnValues<string>(out HashSet<long> _); 489public override Dictionary<TKey, ICollection<long>> GroupColumnValues<TKey>(out HashSet<long> nullIndices) 494Dictionary<string, ICollection<long>> multimap = new Dictionary<string, ICollection<long>>(EqualityComparer<string>.Default); 515return multimap as Dictionary<TKey, ICollection<long>>; 697public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
DataFrameColumns\StringDataFrameColumn.cs (7)
384internal static DataFrame ValueCountsImplementation(Dictionary<string, ICollection<long>> groupedValues) 398Dictionary<string, ICollection<long>> groupedValues = GroupColumnValues<string>(out HashSet<long> _); 404Dictionary<string, ICollection<long>> dictionary = GroupColumnValues<string>(out HashSet<long> _); 408public override Dictionary<TKey, ICollection<long>> GroupColumnValues<TKey>(out HashSet<long> nullIndices) 412Dictionary<string, ICollection<long>> multimap = new Dictionary<string, ICollection<long>>(EqualityComparer<string>.Default); 434return multimap as Dictionary<TKey, ICollection<long>>; 534public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
DataFrameColumns\VBufferDataFrameColumn.cs (1)
180public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
PrimitiveDataFrameColumn.cs (6)
383Dictionary<T, ICollection<long>> groupedValues = GroupColumnValues<T>(out HashSet<long> _); 609Dictionary<T, ICollection<long>> dictionary = GroupColumnValues<T>(out HashSet<long> _); 613public override Dictionary<TKey, ICollection<long>> GroupColumnValues<TKey>(out HashSet<long> nullIndices) 617Dictionary<T, ICollection<long>> multimap = new Dictionary<T, ICollection<long>>(EqualityComparer<T>.Default); 646return multimap as Dictionary<TKey, ICollection<long>>; 923public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
Microsoft.Data.Analysis.Tests (1)
DataFrameGroupByTests.cs (1)
71var groupings = df.GroupBy<int>("Tens").Groupings.ToDictionary(g => g.Key, g => g.ToList());
Microsoft.DotNet.Arcade.Sdk (1)
src\InstallDotNetCore.cs (1)
65var runtimeItems = new Dictionary<string, IEnumerable<KeyValuePair<string, string>>>();
Microsoft.DotNet.ArcadeLogging (6)
PipelinesLogger.cs (6)
21private readonly Dictionary<BuildEventContext, Guid> _buildEventContextMap = new Dictionary<BuildEventContext, Guid>(BuildEventContextComparer.Instance); 22private readonly Dictionary<Guid, ProjectInfo> _projectInfoMap = new Dictionary<Guid, ProjectInfo>(); 23private readonly Dictionary<Guid, TelemetryTaskInfo> _taskTelemetryInfoMap = new Dictionary<Guid, TelemetryTaskInfo>(); 321private readonly Dictionary<string, string> _parameters; 325public LoggerParameters(Dictionary<string, string> parameters) 339var parameters = new Dictionary<string, string>(Comparer);
Microsoft.DotNet.Build.Manifest (3)
MSBuildListSplitter.cs (1)
23var values = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
VersionIdentifier.cs (1)
102Dictionary<int,string> majorMinorPatchDictionary = new Dictionary<int, string>();
XElementParsingExtensions.cs (1)
24public static Dictionary<string, string> CreateAttributeDictionary(this XElement element)
Microsoft.DotNet.Build.Tasks.Feed (4)
src\common\AzureStorageUtils.cs (2)
27private static readonly Dictionary<string, string> MimeMappings = new Dictionary<string, string>() 33private static readonly Dictionary<string, string> CacheMappings = new Dictionary<string, string>()
src\common\GeneralUtils.cs (1)
197var whichCategory = new Dictionary<string, string>()
src\common\LatestLinksManager.cs (1)
25private static Dictionary<string, string> AccountsWithCdns { get; } = new()
Microsoft.DotNet.Build.Tasks.Feed.Tests (6)
DownloadFileTests.cs (6)
70Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>> 139Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>> 215Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>> 248private static void ValidateNoRemainingResponses(Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses, HttpClient client) 340Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>> 414Dictionary<string, IEnumerable<HttpResponseMessage>> fakeHttpResponses = new Dictionary<string, IEnumerable<HttpResponseMessage>>
Microsoft.DotNet.Build.Tasks.Installers (3)
src\BuildFPMToolPreReqs.cs (1)
158.ToObject<Dictionary<string, string>>()
src\CreateRpmPackage.cs (1)
121Dictionary<string, string> filePathToKind = RawPayloadFileKinds.Select(k => k.ItemSpec.Split(':')).ToDictionary(k => k[0], k => k[1].Trim());
src\RpmBuilder.cs (1)
166private readonly Dictionary<string, string> _scripts = [];
Microsoft.DotNet.Build.Tasks.Packaging (45)
ApplyBaseLine.cs (1)
61Dictionary<string, SortedSet<Version>> baseLineVersions = new Dictionary<string, SortedSet<Version>>();
ApplyMetaPackages.cs (3)
58var suppressMetaPackages = new Dictionary<string, HashSet<string>>(); 95Dictionary<string, HashSet<NuGetFramework>> metaPackagesToAdd = new Dictionary<string, HashSet<NuGetFramework>>(); 129private bool ShouldSuppressMetapackage(Dictionary<string, HashSet<string>> suppressedMetaPackages, string metaPackage, NuGetFramework tfm) =>
ApplyPreReleaseSuffix.cs (1)
18private Dictionary<string, Version> _stablePackageVersions;
GeneratePackageReport.cs (3)
16private Dictionary<string, PackageItem> _targetPathToPackageItem; 18private Dictionary<NuGetFramework, string[]> _frameworks; 285var packageItems = new Dictionary<string, List<PackageItem>>();
GenerateRuntimeDependencies.cs (1)
75Dictionary<string, string> packageAliases = new Dictionary<string, string>();
GetApplicableAssetsFromPackages.cs (2)
18private Dictionary<string, List<PackageItem>> _packageToPackageItems; 19private Dictionary<string, PackageItem> _targetPathToPackageItem;
GetLastStablePackage.cs (3)
74Dictionary<string, ITaskItem> originalItems = new Dictionary<string, ITaskItem>(); 75Dictionary<string, Version> latestPackages = new Dictionary<string, Version>(); 76Dictionary<string, Version> lastStablePackages = new Dictionary<string, Version>();
GetLayoutFiles.cs (1)
45var frameworks = Frameworks.NullAsEmpty().ToDictionary(
GetPackageDescription.cs (6)
16private static Dictionary<string, Dictionary<string, string>> s_descriptionCache = new Dictionary<string, Dictionary<string, string>>(); 61Dictionary<string, string> descriptionTable = null; 88private Dictionary<string, string> LoadDescriptions(string descriptionPath) 92Dictionary<string, string> descriptions = new Dictionary<string, string>();
HarvestPackage.cs (3)
116private Dictionary<string, string> _packageFolders = new Dictionary<string, string>(); 274var livePackageFiles = new Dictionary<string, PackageItem>(StringComparer.OrdinalIgnoreCase); 516private Dictionary<string, ITaskItem> _pathsToInclude = null;
NuGetAssetResolver.cs (5)
158private Dictionary<string, ContentItemCollection> _packages; 192Dictionary<string, ContentItemGroup> resolvedAssets = new Dictionary<string, ContentItemGroup>(); 243Dictionary<string, ContentItemGroup> resolvedAssets = new Dictionary<string, ContentItemGroup>(); 261Dictionary<string, ContentItemGroup> resolvedAssets = new Dictionary<string, ContentItemGroup>(); 276Dictionary<string, IEnumerable<ContentItemGroup>> resolvedAssets = new Dictionary<string, IEnumerable<ContentItemGroup>>();
NuGetPack.cs (1)
272Dictionary<string, bool> pathHasMatches = EffectiveLibPackageExcludes.ToDictionary(
NugetPropertyStringProvider.cs (3)
12public static Dictionary<string, string> GetNuspecPropertyDictionary(string[] nuspecProperties) 19var propertyDictionary = new Dictionary<string, string>(); 31var propertyDictionary = GetNuspecPropertyDictionary(nuspecPropertyStrings);
PackageIndex.cs (1)
746private Dictionary<string, string> packageToMetaPackage = new Dictionary<string, string>();
PackageReport.cs (2)
28public Dictionary<string, string> SupportedFrameworks { get; set; } 29public Dictionary<string,Target> Targets { get; set; }
PromoteDependencies.cs (2)
44var refSets = dependencies.Where(d => d.Id != "_._").Where(d => d.IsReference).GroupBy(d => NuGetFramework.Parse(d.TargetFramework)).ToDictionary(g => g.Key, g => g.ToArray()); 49var libSets = dependencies.Where(d => !d.IsReference).GroupBy(d => NuGetFramework.Parse(d.TargetFramework)).ToDictionary(g => g.Key, g => g.ToArray());
SplitReferences.cs (3)
57Dictionary<string, ITaskItem> packageReferences = new Dictionary<string, ITaskItem>(); 58Dictionary<string, ITaskItem> assemblyReferences = new Dictionary<string, ITaskItem>(); 99private static void AddReference(Dictionary<string, ITaskItem> collection, ITaskItem item)
ValidateFrameworkPackage.cs (1)
41var testAssetsByName = testAssets.Where(a => Path.GetExtension(a.PackagePath) == ".dll")
ValidatePackage.cs (2)
115private Dictionary<NuGetFramework, ValidationFramework> _frameworks; 302Dictionary<string, PackageAsset> implementationFiles = new Dictionary<string, PackageAsset>();
ValidationTask.cs (1)
46private Dictionary<Suppression, HashSet<string>> _suppressions;
Microsoft.DotNet.Build.Tasks.Packaging.Tests (5)
NugetPropertyStringProviderTests.cs (5)
18var expectedDictionary = new Dictionary<string, string>{ {"a", "b"} }; 26var expectedDictionary = new Dictionary<string, string> { { "a", "=b=" } }; 35var expectedDictionary = new Dictionary<string, string> { { "a", multiLineString } }; 54var expectedDictionary = new Dictionary<string, string>(); 86private static void AssertPropertyStringsParseToDictionary(string[] propertyStrings, Dictionary<string, string> expectedDictionary)
Microsoft.DotNet.Build.Tasks.TargetFramework (1)
TargetFrameworkResolver.cs (1)
19private static readonly Dictionary<string, TargetFrameworkResolver> s_targetFrameworkResolverCache = new();
Microsoft.DotNet.Build.Tasks.Templating (1)
MSBuildListSplitter.cs (1)
14Dictionary<string, string> values = new(StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.Build.Tasks.Workloads (16)
BuildData.wix.cs (1)
26public Dictionary<string, HashSet<ReleaseVersion>> FeatureBands = new();
CreateVisualStudioWorkload.wix.cs (5)
27private Dictionary<ReleaseVersion, bool> _supportsMachineArch = new(); 140Dictionary<string, BuildData> buildData = new(); 141Dictionary<string, WorkloadPackGroupPackage> packGroupPackages = new(); 166Dictionary<string, WorkloadManifestMsi> manifestMsisByPlatform = new(); 204Dictionary<string, List<WorkloadPackPackage>> packsInWorkloadByPlatform = new();
EmbeddedTemplates.cs (1)
12private static readonly Dictionary<string, string> s_templateResources = new();
Msi\MsiBase.wix.cs (1)
118public Dictionary<string, string> NuGetPackageFiles { get; set; } = new();
Msi\MsiPayloadPackageProject.wix.cs (2)
31public Dictionary<string, string> PackageContents { get; set; } = new(); 33public MsiPayloadPackageProject(MsiMetadata package, ITaskItem msi, string baseIntermediateOutputPath, string baseOutputPath, Dictionary<string, string> packageContents) :
Msi\WorkloadPackGroupMsi.wix.cs (2)
36Dictionary<string, string> sourceDirectoryNamesAndValues = new(); 157public Dictionary<string, MsiDirectory> Subdirectories { get; } = new();
ProjectTemplateBase.cs (1)
54protected Dictionary<string, string> ReplacementTokens
Utils.cs (1)
66internal static void StringReplace(string fileName, Dictionary<string, string> tokenReplacements, Encoding encoding)
Wix\HarvesterToolTask.cs (1)
20private static readonly Dictionary<HeatSuppressions, string> s_SuppressionArguments = new()
WorkloadPackGroupPackage.wix.cs (1)
17public Dictionary<string, List<WorkloadManifestPackage>> ManifestsPerPlatform { get; } = new();
Microsoft.DotNet.CodeAnalysis (6)
Analyzers\PinvokeAnalyzer.cs (6)
35private Dictionary<string, string> _allowedPinvokes; 36private Dictionary<string, string> _exceptionPinvokes; 38private Dictionary<string, string> AllowedPinvokes 51private Dictionary<string, string> ExceptionPinvokes 70private Dictionary<string, string> ParseAdditionalFile(AdditionalText additionalFile) 72Dictionary<string, string> parsedPinvokes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.GenFacades (5)
GenPartialFacadeSourceGenerator.cs (5)
32Dictionary<string, string> seedTypePreferences = ParseSeedTypePreferences(seedTypePreferencesList, logger); 64private static Dictionary<string, string> ParseSeedTypePreferences(ITaskItem[] preferences, ILog logger) 66var dictionary = new Dictionary<string, string>(StringComparer.Ordinal); 145var typeTable = new Dictionary<string, IList<string>>(); 157private static void AddTypeToTable(Dictionary<string, IList<string>> typeTable, string type, string assemblyName)
Microsoft.DotNet.Helix.Client (1)
generated-code\PagedResponse.cs (1)
107var props = new Dictionary<string, string>();
Microsoft.DotNet.Helix.JobSender (3)
JobDefinition.cs (2)
24private readonly Dictionary<string, string> _properties; 180Dictionary<string, string> correlationPayloadUris =
JobListEntry.cs (1)
11public Dictionary<string, string> CorrelationPayloadUrisWithDestinations { get; set; } = new Dictionary<string, string>();
Microsoft.DotNet.Helix.Sdk (1)
ProvisioningProfileProvider.cs (1)
59private readonly Dictionary<ApplePlatform, string> _downloadedProfiles = new();
Microsoft.DotNet.Helix.Sdk.Tests (2)
FindDotNetCliPackageTests.cs (2)
86Dictionary<string, string> metadata = new Dictionary<string, string>() 137Dictionary<string, string> metadata = new Dictionary<string, string>()
Microsoft.DotNet.NuGetRepack.Tasks (7)
src\NuGetVersionUpdater.cs (4)
74var packages = new Dictionary<string, PackageInfo>(); 100private static void LoadPackages(IEnumerable<string> packagePaths, Dictionary<string, PackageInfo> packages, string tempDirectoryOpt, VersionTranslation translation) 283private static void UpdateDependencies(Dictionary<string, PackageInfo> packages, VersionTranslation translation, bool exactVersions, Func<string, string, string, bool> allowPreReleaseDependencyOpt) 358private static void SavePackages(Dictionary<string, PackageInfo> packages, string outDirectory)
src\ReplacePackageParts.cs (3)
86private Dictionary<string, string> GetPartReplacementMap() 96var map = new Dictionary<string, string>(partCount); 115var replacementMap = GetPartReplacementMap();
Microsoft.DotNet.Open.Api.Tools.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
Microsoft.DotNet.PackageTesting (7)
GetCompatiblePackageTargetFrameworks.cs (1)
17private static Dictionary<NuGetFramework, HashSet<NuGetFramework>> packageTfmMapping = new();
VerifyClosure.cs (4)
41private Dictionary<string, AssemblyInfo> assemblies = new Dictionary<string, AssemblyInfo>(); 43private Dictionary<string, Version> ignoredReferences = new Dictionary<string, Version>(StringComparer.OrdinalIgnoreCase); 261var suspectCycles = new Dictionary<AssemblyInfo, AssemblyInfo[]>(); 275void DumpCycles(Stack<AssemblyInfo> depStack, AssemblyInfo root, Dictionary<AssemblyInfo, AssemblyInfo[]> suspectCycles)
VerifyTypes.cs (2)
33private Dictionary<string, AssemblyInfo> assemblies = new Dictionary<string, AssemblyInfo>(); 47var types = new Dictionary<string, AssemblyInfo>();
Microsoft.DotNet.SharedFramework.Sdk (9)
src\CreateFrameworkListFile.cs (1)
69Dictionary<string, ITaskItem> fileClassLookup = FileClassifications
src\GeneratePlatformManifestEntriesFromTemplate.cs (1)
32var files = Files.ToLookup(file => Path.GetFileName(file.ItemSpec)).ToDictionary(l => l.Key, l=> l.First());
src\Microsoft.DotNet.PackageTesting\VerifyClosure.cs (4)
41private Dictionary<string, AssemblyInfo> assemblies = new Dictionary<string, AssemblyInfo>(); 43private Dictionary<string, Version> ignoredReferences = new Dictionary<string, Version>(StringComparer.OrdinalIgnoreCase); 261var suspectCycles = new Dictionary<AssemblyInfo, AssemblyInfo[]>(); 275void DumpCycles(Stack<AssemblyInfo> depStack, AssemblyInfo root, Dictionary<AssemblyInfo, AssemblyInfo[]> suspectCycles)
src\Microsoft.DotNet.PackageTesting\VerifyTypes.cs (2)
33private Dictionary<string, AssemblyInfo> assemblies = new Dictionary<string, AssemblyInfo>(); 47var types = new Dictionary<string, AssemblyInfo>();
src\ValidateFileVersions.cs (1)
22var fileVersions = new Dictionary<string, FileVersionData>(StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.SignCheckLibrary (16)
Verification\ArchiveVerifier.cs (1)
85Dictionary<string, string> archiveMap = new Dictionary<string, string>();
Verification\Exclusion.cs (10)
21private Dictionary<string, HashSet<string>> _fileExcludedCache = new(); 22private Dictionary<string, HashSet<string>> _fileNotExcludedCache = new(); 23private Dictionary<string, HashSet<string>> _parentExcludedCache = new(); 24private Dictionary<string, HashSet<string>> _parentNotExcludedCache = new(); 130Dictionary<string, HashSet<string>> cache = isExcluded ? _fileExcludedCache : _fileNotExcludedCache; 136Dictionary<string, HashSet<string>> cache = isExcluded ? _parentExcludedCache : _parentNotExcludedCache; 141Dictionary<string, HashSet<string>> excludedCache, 142Dictionary<string, HashSet<string>> notExcludedCache, 163private void AddToCache(Dictionary<string, HashSet<string>> cache, string key, IEnumerable<string> values) 179private bool IsInCache(Dictionary<string, HashSet<string>> cache, string key, IEnumerable<string> values)
Verification\Exclusions.cs (1)
18private Dictionary<string, Regex> _regexCache = new Dictionary<string, Regex>();
Verification\MsiVerifier.cs (1)
33var originalFiles = new Dictionary<string, string>();
Verification\SignatureVerificationManager.cs (1)
17private static Dictionary<string, FileVerifier> _fileVerifiers = null;
Verification\SignatureVerificationResult.cs (2)
14private Dictionary<string, string> _detail; 23public Dictionary<string, string> Detail
Microsoft.DotNet.SignTool (36)
src\BatchSignUtil.cs (3)
25private readonly Dictionary<SignedFileContentKey, string> _hashToCollisionIdMap; 35Dictionary<SignedFileContentKey, string> hashToCollisionIdMap, 167Dictionary<SignedFileContentKey, FileSignInfo> engines = new Dictionary<SignedFileContentKey, FileSignInfo>();
src\Configuration.cs (14)
29private readonly Dictionary<SignedFileContentKey, ZipData> _zipDataMap; 41private readonly Dictionary<ExplicitCertificateKey, string> _fileSignInfo; 46private readonly Dictionary<string, List<SignInfo>> _strongNameInfo; 61private readonly Dictionary<string, List<SignInfo>> _fileExtensionSignInfo; 63private readonly Dictionary<SignedFileContentKey, FileSignInfo> _filesByContentKey; 68private readonly Dictionary<SignedFileContentKey, HashSet<string>> _whichPackagesTheFileIsIn; 73private readonly Dictionary<SigningToolErrorCode, HashSet<SignedFileContentKey>> _errors; 79private readonly Dictionary<string, List<AdditionalCertificateInformation>> _additionalCertificateInformation; 97internal Dictionary<SignedFileContentKey, string> _hashToCollisionIdMap; 113Dictionary<string, List<SignInfo>> strongNameInfo, 114Dictionary<ExplicitCertificateKey, string> fileSignInfo, 115Dictionary<string, List<SignInfo>> extensionSignInfo, 116Dictionary<string, List<AdditionalCertificateInformation>> additionalCertificateInformation, 776var nestedParts = new Dictionary<string, ZipPart>();
src\SignTool.cs (5)
65private Dictionary<string, string> ZipMacFiles(IEnumerable<FileSignInfo> filesToSign) 67var zipPaths = new Dictionary<string, string>(); 104private void UnzipMacFiles(Dictionary<string, string> zippedOSXFiles) 148var zippedPaths = ZipMacFiles(filesToSign); 177private string GenerateBuildFileContent(IEnumerable<FileSignInfo> filesToSign, Dictionary<string, string> zippedPaths, bool notarize)
src\SignToolTask.cs (12)
239var strongNameInfo = ParseStrongNameSignInfo(); 240var fileSignInfo = ParseFileSignInfo(); 241var extensionSignInfo = ParseFileExtensionSignInfo(); 242var dualCertificates = ParseAdditionalCertificateInformation(); 310private Dictionary<string, List<AdditionalCertificateInformation>> ParseAdditionalCertificateInformation() 321var map = new Dictionary<string, List<AdditionalCertificateInformation>>(StringComparer.OrdinalIgnoreCase); 421private Dictionary<string, List<SignInfo>> ParseFileExtensionSignInfo() 423var map = new Dictionary<string, List<SignInfo>>(StringComparer.OrdinalIgnoreCase); 468private Dictionary<string, List<SignInfo>> ParseStrongNameSignInfo() 470var map = new Dictionary<string, List<SignInfo>>(StringComparer.OrdinalIgnoreCase); 524private Dictionary<ExplicitCertificateKey, string> ParseFileSignInfo() 526var map = new Dictionary<ExplicitCertificateKey, string>();
src\Telemetry.cs (2)
14private Dictionary<string, double> _metrics; 15private static readonly Dictionary<string, string> s_properties = new Dictionary<string, string>()
Microsoft.DotNet.SignTool.Tests (116)
SignToolTests.cs (116)
29private static readonly Dictionary<string, List<SignInfo>> s_fileExtensionSignInfo = new Dictionary<string, List<SignInfo>>() 52private static readonly Dictionary<string, List<SignInfo>> s_fileExtensionSignInfoWithCollisionId = 324Dictionary<string, List<SignInfo>> strongNameSignInfo, 325Dictionary<ExplicitCertificateKey, string> fileSignInfo, 326Dictionary<string, List<SignInfo>> extensionsSignInfo, 328Dictionary<string, List<AdditionalCertificateInformation>> additionalCertificateInfo = null, 377Dictionary<string, List<SignInfo>> strongNameSignInfo, 378Dictionary<ExplicitCertificateKey, string> fileSignInfo, 379Dictionary<string, List<SignInfo>> extensionsSignInfo, 382Dictionary<string, List<AdditionalCertificateInformation>> additionalCertificateInfo = null, 521var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 523var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 584var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 590var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 619var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 625var fileSignInfo = new Dictionary<ExplicitCertificateKey, string> 652var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 658var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 673var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 679var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 697var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 703var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 721var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 727var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 749var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 755var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 782var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 788var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 824var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 830var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 864var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 870var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 892var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 899var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 930var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 935var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 952var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 957var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 977var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() { }; 978var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 999var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() { }; 1000var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 1021var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1027var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1071var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1077var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1149var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1156var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1232var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1238var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1288var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1294var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1322var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1328var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1379var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1385var additionalCertificateInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 1395var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1455var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1461var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1507var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1513var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1553var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1559var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1605var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1611var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1657var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1663var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1664var tempFileExtensionSignInfo = s_fileExtensionSignInfo.Where(s => s.Key != ".symbols.nupkg").ToDictionary(e => e.Key, e => e.Value); 1711var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1714var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1755var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1758var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1783var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1786var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1826var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1829var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1857var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1860var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1889var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1892var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1957var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1963var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2004var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2010var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2069var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2075var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2104var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2110var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2165var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2171var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2226var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2232var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2284var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2290var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2344var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2350var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2382var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2384var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 2406var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2409var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2641var additionalCertInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2646var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2651var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2670var additionalCertInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2679var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2684var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2699var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2705var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2731var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2737var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2782var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2788var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 2811var certificatesSignInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2856var needContent = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 2896var needContent = new Dictionary<string, (string, string[])>(StringComparer.OrdinalIgnoreCase) 2917var extensionSignInfo = new Dictionary<string, List<SignInfo>>()
Microsoft.DotNet.SourceBuild.Tasks (2)
src\UsageReport\WriteUsageReports.cs (2)
68var prodConPackageOrigin = new Dictionary<string, string>( 225Dictionary<string, string> packageOrigin,
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (4)
Languages\Language.cs (1)
52private static readonly Dictionary<string, Language> _languages;
Modeler\ServiceClientModelFactory.cs (2)
36private readonly Dictionary<string, EnumTypeModel> _enumTypeModels = new Dictionary<string, EnumTypeModel>(); 45private readonly Dictionary<string, TypeModel> _types = new Dictionary<string, TypeModel>();
ServiceClientCodeFactory.cs (1)
18private Dictionary<string, CodeFile> _files = new Dictionary<string, CodeFile>();
Microsoft.DotNet.XliffTasks (8)
Model\JsonDocument.cs (4)
21private Dictionary<string, string> _json; 26_json = JsonSerializer.Deserialize<Dictionary<string, string>>(text); 31writer.Write(JsonSerializer.Serialize(_json, typeof(Dictionary<string, string>), s_serializerOptions)); 37private sealed class Node(Dictionary<string, string> json, string id, string source) : TranslatableNode(id, source, note: null)
Model\XlfDocument.cs (2)
78Dictionary<string, TranslatableNode> nodesById = new(); 262Dictionary<string, string> dictionary = new();
Tasks\TransformTemplates.cs (2)
35Dictionary<string, ITaskItem> resourceMap = UnstructuredResources.ToDictionary(item => item.GetMetadata("FullPath")); 93Dictionary<string, string> defaultTranslation = document.Nodes.ToDictionary(node => node.Id, node => node.Source);
Microsoft.DotNet.XliffTasks.Tests (9)
JsonDocumentTests.cs (1)
23Dictionary<string, string> translations = new()
ResxDocumentTests.cs (1)
26Dictionary<string, string> translations = new()
UnstructuredDocumentTests.cs (2)
22Dictionary<string, string> translations = new() 48Dictionary<string, string> translations = new()
VsctDocumentTests.cs (2)
36Dictionary<string, string> translations = new() 154Dictionary<string, string> translations = new()
XamlRuleDocumentTests.cs (3)
125Dictionary<string, string> translations = new() 293Dictionary<string, string> translations = new() 343private static void RunXamlTranslationTest(string source, Dictionary<string, string> translations, string expectedTranslation, string expectedXlf)
Microsoft.DotNet.XUnitAssert.Tests (98)
CollectionAssertsTests.cs (52)
1254 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1255 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1263 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1264 var actual = new Dictionary<string, int> { { "b", 2 }, { "c", 3 }, { "a", 1 } }; 1272 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1273 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 } }; 1289 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 } }; 1290 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1306 var expected = new Dictionary<string, int> 1315 var actual = new Dictionary<string, int> 1340 var expected = new Dictionary<string, IEnumerable<string>> 1345 var actual = new Dictionary<string, IEnumerable<string>> 1358 var expected = new Dictionary<string, IEnumerable<string>> 1363 var actual = new Dictionary<string, IEnumerable<string>> 1387 var expected = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 1388 var actual = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 1396 var expected = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 1397 var actual = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'b' } } }; 1421 var expected = new Dictionary<string, object>() 1425 ["key"] = new List<Dictionary<string, object>>() 1434 var actual = new Dictionary<string, object>() 1438 ["key"] = new List<Dictionary<string, object>>() 1454 var expected = new Dictionary<string, object>() 1458 ["key"] = new List<Dictionary<string, object>>() 1467 var actual = new Dictionary<string, object>() 1471 ["key"] = new List<Dictionary<string, object>>() 1929 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1930 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1946 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1947 var actual = new Dictionary<string, int> { { "b", 2 }, { "c", 3 }, { "a", 1 } }; 1963 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1964 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 } }; 1972 var expected = new Dictionary<string, int> { { "a", 1 }, { "b", 2 } }; 1973 var actual = new Dictionary<string, int> { { "a", 1 }, { "b", 2 }, { "c", 3 } }; 1981 var expected = new Dictionary<string, int> 1990 var actual = new Dictionary<string, int> 2007 var expected = new Dictionary<string, IEnumerable<string>> 2012 var actual = new Dictionary<string, IEnumerable<string>> 2033 var expected = new Dictionary<string, IEnumerable<string>> 2038 var actual = new Dictionary<string, IEnumerable<string>> 2054 var expected = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 2055 var actual = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 2071 var expected = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'a' } } }; 2072 var actual = new Dictionary<string, EquatableObject> { { "Key1", new() { Char = 'b' } } }; 2088 var expected = new Dictionary<string, object>() 2092 ["key"] = new List<Dictionary<string, object>>() 2101 var actual = new Dictionary<string, object>() 2105 ["key"] = new List<Dictionary<string, object>>() 2129 var expected = new Dictionary<string, object>() 2133 ["key"] = new List<Dictionary<string, object>>() 2142 var actual = new Dictionary<string, object>() 2146 ["key"] = new List<Dictionary<string, object>>()
DictionaryAssertsTests.cs (4)
18 var dictionary = new Dictionary<string, int>(StringComparer.InvariantCultureIgnoreCase) 36 var dictionary = new Dictionary<string, int>() 70 var dictionary = new Dictionary<string, int>() 88 var dictionary = new Dictionary<string, int>(StringComparer.InvariantCultureIgnoreCase)
EqualityAssertsTests.cs (20)
1124 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 1125 var actual = new Dictionary<string, string> { ["foo"] = "bar" }; 1135 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 1136 var actual = new Dictionary<string, string> { ["foo"] = "baz" }; 1159 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 1169 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 1192 var expected = new Dictionary<string, int?> { { "two", null } }; 1193 var actual = new Dictionary<string, int?> { { "two", null } }; 1201 var expected = new Dictionary<string, int?> { { "two", null } }; 1202 var actual = new Dictionary<string, int?> { { "two", 1 } }; 3353 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 3354 var actual = new Dictionary<string, string> { ["foo"] = "bar" }; 3377 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 3378 var actual = new Dictionary<string, string> { ["foo"] = "baz" }; 3388 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 3411 var expected = new Dictionary<string, string> { ["foo"] = "bar" }; 3421 var expected = new Dictionary<string, int?> { { "two", null } }; 3422 var actual = new Dictionary<string, int?> { { "two", null } }; 3438 var expected = new Dictionary<string, int?> { { "two", null } }; 3439 var actual = new Dictionary<string, int?> { { "two", 1 } };
EquivalenceAssertsTests.cs (18)
1158 var expected = new Dictionary<string, int> { ["Foo"] = 42 }; 1159 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 }; 1167 var expected = new Dictionary<string, int[]> { ["Foo"] = new[] { 42 } }; 1168 var actual = new Dictionary<string, int[]> { ["Foo"] = new[] { 42 }, ["Bar"] = new[] { 2112 } }; 1176 var expected = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 } }; 1177 var actual = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 }, ["Bar"] = new List<int> { 2112 } }; 1194 var expected = new Dictionary<string, int> { ["Foo"] = 16 }; 1195 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 }; 1211 var expected = new Dictionary<string, int[]> { ["Foo"] = new[] { 16 } }; 1212 var actual = new Dictionary<string, int[]> { ["Foo"] = new[] { 42 }, ["Bar"] = new[] { 2112 } }; 1228 var expected = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 16 } }; 1229 var actual = new Dictionary<string, List<int>> { ["Foo"] = new List<int> { 42 }, ["Bar"] = new List<int> { 2112 } }; 1265 var expected = new Dictionary<string, int> { ["Bar"] = 2112, ["Foo"] = 42 }; 1266 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 }; 1283 var expected = new Dictionary<string, int> { ["Foo"] = 16 }; 1284 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Bar"] = 2112 }; 1300 var expected = new Dictionary<string, int> { ["Bar"] = 2112, ["Foo"] = 42 }; 1301 var actual = new Dictionary<string, int> { ["Foo"] = 42, ["Biff"] = 2600, ["Bar"] = 2112 };
Sdk\ArgumentFormatterTests.cs (4)
329 var value = new Dictionary<object, List<object>> 519 { typeof(Dictionary<int, string>), "typeof(System.Collections.Generic.Dictionary<int, string>)" }, 521 { typeof(Dictionary<,>), "typeof(System.Collections.Generic.Dictionary<,>)" } 543 var genericTypeParameters = typeof(Dictionary<,>).GetGenericArguments();
Microsoft.DotNet.XUnitExtensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTheoryDiscoverer.cs (1)
29private readonly Dictionary<IMethodInfo, string> _conditionCache = new();
Microsoft.DotNet.XUnitV3Extensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\SkippedTestCase.cs (1)
38Dictionary<string, HashSet<string>> traits = null,
Microsoft.Extensions.AI.Abstractions (9)
AdditionalPropertiesDictionary{TValue}.cs (3)
28private readonly Dictionary<string, TValue> _dictionary; 220private Dictionary<string, TValue>.Enumerator _dictionaryEnumerator; 224internal Enumerator(Dictionary<string, TValue>.Enumerator dictionaryEnumerator)
Functions\AIFunctionArguments.cs (4)
32private readonly Dictionary<string, object?> _arguments; 48/// already a <see cref="Dictionary{TKey, TValue}"/>, in which case all dictionary 75/// <see cref="Dictionary{TKey, TValue}"/> with the same <see cref="IEqualityComparer{T}"/> or if 86: (arguments is Dictionary<string, object?> dc) && (comparer is null || dc.Comparer == comparer)
Functions\AIFunctionFactory.cs (1)
635Dictionary<ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions>? boundParameters = null;
Utilities\AIJsonUtilities.Defaults.cs (1)
83[JsonSerializable(typeof(Dictionary<string, object>))]
Microsoft.Extensions.AI.Abstractions.Tests (30)
Contents\FunctionCallContentTests..cs (14)
36Dictionary<string, object?> args = []; 111AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options); 133AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options); 153var arguments = JsonSerializer.Deserialize<Dictionary<string, JsonDocument>>(""" 166AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options); 174var arguments = JsonSerializer.Deserialize<Dictionary<string, JsonNode>>(""" 187AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options); 195AIFunctionArguments arguments = new(JsonSerializer.Deserialize<Dictionary<string, JsonDocument>>(""" 213AIFunctionArguments arguments = new(JsonSerializer.Deserialize<Dictionary<string, object?>>(""" 231AIFunctionArguments arguments = new(JsonSerializer.Deserialize<Dictionary<string, JsonNode>>(""" 265argumentParser: static json => JsonSerializer.Deserialize<Dictionary<string, object?>>(json, AIJsonUtilities.DefaultOptions)); 314static Dictionary<string, object?> ThrowingParser(Exception ex) => throw ex;
Functions\AIFunctionArgumentsTests.cs (4)
208var originalArgs = new Dictionary<string, object?> 240var originalDict = new Dictionary<string, object?>(comparer) 264var originalDict = new Dictionary<string, object?>(comparer) 291var originalDict = new Dictionary<string, object?>(StringComparer.Ordinal)
test\Shared\JsonSchemaExporter\TestTypes.cs (7)
814yield return new TestData<Dictionary<string, int>>( 826yield return new TestData<Dictionary<string, SimplePoco>>( 849yield return new TestData<Dictionary<string, object>>( 1018public Dictionary<string, object>? ExtensionData { get; set; } 1294[JsonSerializable(typeof(Dictionary<string, int>))] 1296[JsonSerializable(typeof(Dictionary<string, SimplePoco>))] 1297[JsonSerializable(typeof(Dictionary<string, object>))]
TestJsonSerializerContext.cs (4)
25[JsonSerializable(typeof(Dictionary<string, object?>))] 29[JsonSerializable(typeof(Dictionary<string, JsonDocument>))] // Used in Content tests 30[JsonSerializable(typeof(Dictionary<string, JsonNode>))] // Used in Content tests 31[JsonSerializable(typeof(Dictionary<string, string>))] // Used in Content tests
Utilities\AIJsonUtilitiesTests.cs (1)
1026Dictionary<string, object> dict = new() { ["key1"] = 1, ["key2"] = 2 };
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIChatToolJson.cs (1)
20public Dictionary<string, JsonElement> Properties { get; set; } = [];
AzureAIInferenceChatClient.cs (1)
145Dictionary<string, FunctionCallInfo>? functionCallInfos = null;
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
642public Dictionary<string, JsonElement> Properties { get; set; } = [];
Microsoft.Extensions.AI.Evaluation (1)
EvaluationResult.cs (1)
59var metricsDictionary = new Dictionary<string, EvaluationMetric>();
Microsoft.Extensions.AI.Evaluation.NLP (5)
Common\BLEUAlgorithm.cs (2)
73Dictionary<NGram<string>, int> maxCounts = []; 93Dictionary<NGram<string>, int> clippedCounts = [];
Common\MatchCounter.cs (3)
17private readonly Dictionary<T, int> _counts = []; 61(Dictionary<T, int> smaller, Dictionary<T, int> larger) =
Microsoft.Extensions.AI.Evaluation.NLP.Tests (1)
MatchCounterTests.cs (1)
74Dictionary<int, int> dict = intersection.ToDictionary(kv => kv.Key, kv => kv.Value);
Microsoft.Extensions.AI.Evaluation.Safety (8)
ContentSafetyServicePayloadUtilities.cs (8)
92List<Dictionary<string, ChatMessage>> turns; 186List<Dictionary<string, ChatMessage>> turns; 264List<Dictionary<string, ChatMessage>> turns; 278IEnumerable<JsonObject> GetMessages(Dictionary<string, ChatMessage> turn, int turnIndex) 388(List<Dictionary<string, ChatMessage>> turns, 399List<Dictionary<string, ChatMessage>> turns = []; 400Dictionary<string, ChatMessage> currentTurn = []; 478foreach (var turn in turns)
Microsoft.Extensions.AI.Integration.Tests (5)
ChatClientIntegrationTests.cs (1)
434Dictionary<string, object?> additionalProperties = new();
VerbatimMultiPartHttpHandler.cs (4)
58Dictionary<string, object> parameters = []; 192private static Dictionary<char, int>? GetCharacterFrequencies(string text) 198var expectedFrequencies = GetCharacterFrequencies(expected); 199var actualFrequencies = GetCharacterFrequencies(actual);
Microsoft.Extensions.AI.OpenAI (4)
OpenAIChatClient.cs (1)
296Dictionary<int, FunctionCallInfo>? functionCallInfos = null;
OpenAIClientExtensions.cs (1)
218public Dictionary<string, JsonElement> Properties { get; set; } = [];
OpenAIResponseChatClient.cs (2)
173Dictionary<int, MessageResponseItem> outputIndexToMessages = []; 174Dictionary<int, FunctionCallInfo>? functionCallInfos = null;
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIChatClientTests.cs (1)
668public Dictionary<string, JsonElement> Properties { get; set; } = [];
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\TestCommand.cs (1)
24public Dictionary<string, string> EnvironmentVariables = [];
Microsoft.Extensions.AI.Tests (4)
TestJsonSerializerContext.cs (4)
22[JsonSerializable(typeof(Dictionary<string, JsonDocument>))] 23[JsonSerializable(typeof(Dictionary<string, JsonNode>))] 24[JsonSerializable(typeof(Dictionary<string, object>))] 25[JsonSerializable(typeof(Dictionary<string, string>))]
Microsoft.Extensions.ApiDescription.Client.Tests (14)
GetOpenApiReferenceMetadataTest.cs (13)
26var inputMetadata = new Dictionary<string, string> { { "CodeGenerator", "NSwagCSharp" } }; 81var inputMetadata = new Dictionary<string, string> 141var inputMetadata = new Dictionary<string, string> 201var inputMetadata = new Dictionary<string, string> 263var inputMetadata1 = new Dictionary<string, string> 267var inputMetadata2 = new Dictionary<string, string> 308var inputMetadata1 = new Dictionary<string, string> 313var inputMetadata2 = new Dictionary<string, string> 354var inputMetadata = new Dictionary<string, string> 418var inputMetadata = new Dictionary<string, string> 479var inputMetadata1 = new Dictionary<string, string> { { "CodeGenerator", codeGenerator13 } }; 480var inputMetadata2 = new Dictionary<string, string> { { "CodeGenerator", codeGenerator2 } }; 481var inputMetadata3 = new Dictionary<string, string> { { "CodeGenerator", codeGenerator13 } };
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
Microsoft.Extensions.AsyncState (5)
src\Shared\Pools\PooledDictionaryPolicy.cs (3)
14internal sealed class PooledDictionaryPolicy<TKey, TValue> : PooledObjectPolicy<Dictionary<TKey, TValue>> 24public override Dictionary<TKey, TValue> Create() => new(_comparer); 26public override bool Return(Dictionary<TKey, TValue> obj)
src\Shared\Pools\PoolFactory.cs (2)
141/// Creates an object pool of <see cref="Dictionary{TKey, TValue}"/> instances. 152public static ObjectPool<Dictionary<TKey, TValue>> CreateDictionaryPool<TKey, TValue>(IEqualityComparer<TKey>? comparer = null, int maxCapacity = DefaultCapacity)
Microsoft.Extensions.Caching.Hybrid (4)
Internal\DefaultJsonSerializerFactory.cs (4)
49Dictionary<Type, FieldOnlyResult>? state = null; // only needed for complex types 63Type type, ref Dictionary<Type, FieldOnlyResult>? state) 117static void PrepareStateForDepth(Type type, ref Dictionary<Type, FieldOnlyResult>? state) 126static FieldOnlyResult SetState(Type type, Dictionary<Type, FieldOnlyResult>? state, bool result)
Microsoft.Extensions.Caching.Hybrid.Tests (5)
SerializerTests.cs (2)
189Dictionary<string, (int id, string who, DateTime when)> source = new() 194var clone = RoundTrip(source,
StampedeTests.cs (1)
453Dictionary<object, int> counts = [];
TestEventListener.cs (2)
21private readonly Dictionary<string, (string? displayName, double value)> _counters = []; 49var args = new Dictionary<string, string?>
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheWithDatabaseTest.cs (1)
36var memoryConfigurationData = new Dictionary<string, string>
Microsoft.Extensions.Compliance.Abstractions (5)
src\Shared\Pools\PooledDictionaryPolicy.cs (3)
14internal sealed class PooledDictionaryPolicy<TKey, TValue> : PooledObjectPolicy<Dictionary<TKey, TValue>> 24public override Dictionary<TKey, TValue> Create() => new(_comparer); 26public override bool Return(Dictionary<TKey, TValue> obj)
src\Shared\Pools\PoolFactory.cs (2)
141/// Creates an object pool of <see cref="Dictionary{TKey, TValue}"/> instances. 152public static ObjectPool<Dictionary<TKey, TValue>> CreateDictionaryPool<TKey, TValue>(IEqualityComparer<TKey>? comparer = null, int maxCapacity = DefaultCapacity)
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Classification\DataClassificationTypeConverterTests.cs (1)
52var expected = new Dictionary<string, DataClassification>
Microsoft.Extensions.Compliance.Redaction (3)
RedactorProvider.cs (2)
38private static FrozenDictionary<DataClassificationSet, Redactor> GetClassRedactorMap(IEnumerable<Redactor> redactors, Dictionary<DataClassificationSet, Type> map) 46var dict = new Dictionary<DataClassificationSet, Redactor>(map.Count);
RedactorProviderOptions.cs (1)
23public Dictionary<DataClassificationSet, Type> Redactors { get; } = [];
Microsoft.Extensions.Configuration (1)
ConfigurationManager.cs (1)
265private readonly Dictionary<string, object> _properties = new();
Microsoft.Extensions.Configuration.Binder (2)
ConfigurationBinder.cs (2)
695dictionaryType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); 743(dictionaryType.GetGenericTypeDefinition() == typeof(IDictionary<,>) || dictionaryType.GetGenericTypeDefinition() == typeof(Dictionary<,>)));
Microsoft.Extensions.Configuration.CommandLine (4)
CommandLineConfigurationProvider.cs (4)
14private readonly Dictionary<string, string>? _switchMappings; 43var data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase); 135private static Dictionary<string, string> GetValidatedSwitchMappingsCopy(IDictionary<string, string> switchMappings) 140var switchMappingsCopy = new Dictionary<string, string>(switchMappings.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.EnvironmentVariables (3)
EnvironmentVariablesConfigurationProvider.cs (3)
74var data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase); 142private void HandleMatchedConnectionStringPrefix(Dictionary<string, string?> data, string connectionStringPrefix, string? provider, string fullKey, string? value) 154private void AddIfNormalizedKeyMatchesPrefix(Dictionary<string, string?> data, string normalizedKey, string? value)
Microsoft.Extensions.Configuration.Ini (1)
IniStreamConfigurationProvider.cs (1)
28var data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.Json (2)
JsonConfigurationFileParser.cs (2)
16private readonly Dictionary<string, string?> _data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase); 22private Dictionary<string, string?> ParseStream(Stream input)
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationProvider.cs (1)
60var data = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Configuration.Xml (3)
XmlStreamConfigurationProvider.cs (3)
94var children = new Dictionary<string, List<XmlConfigurationElement>>(StringComparer.OrdinalIgnoreCase); 255private static Dictionary<string, string?> ProvideConfiguration(XmlConfigurationElement? root) 257Dictionary<string, string?> configuration = new(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.DependencyInjection (6)
ServiceLookup\CallSiteChain.cs (1)
13private readonly Dictionary<ServiceIdentifier, ChainItemInfo> _callSiteChain;
ServiceLookup\CallSiteFactory.cs (2)
19private readonly Dictionary<ServiceIdentifier, ServiceDescriptorCacheItem> _descriptorLookup = new Dictionary<ServiceIdentifier, ServiceDescriptorCacheItem>(); 317Dictionary<ServiceIdentifier, int>? keyedSlotAssignment = null;
ServiceLookup\CallSiteRuntimeResolver.cs (1)
116Dictionary<ServiceCacheKey, object?> resolvedServices = serviceProviderEngine.ResolvedServices;
ServiceLookup\ServiceProviderEngineScope.cs (1)
30internal Dictionary<ServiceCacheKey, object?> ResolvedServices { get; }
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.Extensions.DependencyModel (10)
CollectionExtensions.netcoreapp.cs (1)
11internal static Dictionary<string, T> LibraryCollectionToDictionary<T>(this IReadOnlyList<T> collection) where T : Library
DependencyContextJsonReader.cs (7)
20private readonly Dictionary<string, string> _stringPool = new Dictionary<string, string>(); 140Dictionary<string, LibraryStub>? libraryStubs = null; 634private Dictionary<string, LibraryStub> ReadLibraries(ref Utf8JsonReader reader) 636var libraries = new Dictionary<string, LibraryStub>(); 738private IEnumerable<Library> CreateLibraries(IEnumerable<TargetLibrary>? libraries, bool runtime, Dictionary<string, LibraryStub>? libraryStubs) 747IEnumerable<Library> CreateLibrariesNotNull(IEnumerable<TargetLibrary> libraries, bool runtime, Dictionary<string, LibraryStub>? libraryStubs) 758private Library? CreateLibrary(TargetLibrary targetLibrary, bool runtime, Dictionary<string, LibraryStub>? libraryStubs)
DependencyContextWriter.cs (2)
146Dictionary<string, RuntimeLibrary> runtimeLookup = runtimeLibraries.LibraryCollectionToDictionary(); 147Dictionary<string, CompilationLibrary> compileLookup = compilationLibraries.LibraryCollectionToDictionary();
Microsoft.Extensions.Diagnostics (2)
Metrics\DefaultMeterFactory.cs (1)
14private readonly Dictionary<string, List<FactoryMeter>> _cachedMeters = new();
Metrics\ListenerSubscription.cs (1)
16private readonly Dictionary<Instrument, object?> _instruments = new();
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.Extensions.Diagnostics.ExceptionSummarization (3)
ExceptionSummarizer.cs (1)
19var exceptionTypesToProvidersBuilder = new Dictionary<Type, IExceptionSummaryProvider>();
HttpExceptionSummaryProvider.cs (2)
37var socketErrors = new Dictionary<SocketError, int>(); 52var webStatuses = new Dictionary<WebExceptionStatus, int>();
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
62var entries = new Dictionary<string, HealthReportEntry>(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Diagnostics.HealthChecks.Common (5)
src\Shared\Pools\PooledDictionaryPolicy.cs (3)
14internal sealed class PooledDictionaryPolicy<TKey, TValue> : PooledObjectPolicy<Dictionary<TKey, TValue>> 24public override Dictionary<TKey, TValue> Create() => new(_comparer); 26public override bool Return(Dictionary<TKey, TValue> obj)
src\Shared\Pools\PoolFactory.cs (2)
141/// Creates an object pool of <see cref="Dictionary{TKey, TValue}"/> instances. 152public static ObjectPool<Dictionary<TKey, TValue>> CreateDictionaryPool<TKey, TValue>(IEqualityComparer<TKey>? comparer = null, int maxCapacity = DefaultCapacity)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (2)
TelemetryHealthChecksPublisherExtensionsTests.cs (1)
73var configurationDict = new Dictionary<string, string?>
TelemetryHealthChecksPublisherTests.cs (1)
154var healthStatusRecords = new Dictionary<string, HealthReportEntry>();
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
DefaultHealthCheckServiceTest.cs (3)
67var data = new Dictionary<string, object>() 170var data = new Dictionary<string, object> 700var data = new Dictionary<string, object>()
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
MockHealthCheckService.cs (1)
26var healthStatusRecords = new Dictionary<string, HealthReportEntry> { { "id", entry } };
Microsoft.Extensions.Diagnostics.ResourceMonitoring (6)
src\Shared\Pools\PooledDictionaryPolicy.cs (3)
14internal sealed class PooledDictionaryPolicy<TKey, TValue> : PooledObjectPolicy<Dictionary<TKey, TValue>> 24public override Dictionary<TKey, TValue> Create() => new(_comparer); 26public override bool Return(Dictionary<TKey, TValue> obj)
src\Shared\Pools\PoolFactory.cs (2)
141/// Creates an object pool of <see cref="Dictionary{TKey, TValue}"/> instances. 152public static ObjectPool<Dictionary<TKey, TValue>> CreateDictionaryPool<TKey, TValue>(IEqualityComparer<TKey>? comparer = null, int maxCapacity = DefaultCapacity)
Windows\Disk\WindowsDiskMetrics.cs (1)
26private readonly Dictionary<string, WindowsDiskIoRatePerfCounter> _diskIoRateCounters = new();
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
Linux\Disk\FakeDiskStatsReader.cs (1)
10internal class FakeDiskStatsReader(Dictionary<string, List<DiskStats>> stats) : IDiskStatsReader
Linux\Resources\HardcodedValueFileSystem.cs (2)
16private readonly Dictionary<string, string> _fileContent; 25public HardcodedValueFileSystem(Dictionary<FileInfo, string> fileContent, string fallback = "")
Linux\Resources\TestResources.cs (1)
15private static readonly Dictionary<string, string> _files = new(StringComparer.OrdinalIgnoreCase)
Microsoft.Extensions.Diagnostics.Testing (1)
Metrics\CollectedMeasurement.cs (1)
28var d = new Dictionary<string, object?>();
Microsoft.Extensions.Diagnostics.Testing.Tests (1)
Logging\FakeLoggerTests.cs (1)
88var ss = logger.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value);
Microsoft.Extensions.FileProviders.Embedded.Tests (1)
ManifestEmbeddedFileProviderTests.cs (1)
392var root = provider.GetDirectoryContents("/").ToDictionary(f => f.Name);
Microsoft.Extensions.FileSystemGlobbing (1)
InMemoryDirectoryInfo.cs (1)
84var dict = new Dictionary<string, List<string>>();
Microsoft.Extensions.Http (3)
DependencyInjection\HttpClientMappingRegistry.cs (2)
16public Dictionary<string, Type> NamedClientRegistrations { get; } = new(); 18public Dictionary<string, HttpClientKeyedLifetime> KeyedLifetimeMap { get; } = new();
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.Extensions.Http.Diagnostics (12)
Http\DownstreamDependencyMetadataManager.cs (6)
32Dictionary<string, RequestMetadataTrieNode> dependencyTrieMap = []; 92private static void AddRouteToTrie(RequestMetadata routeMetadata, Dictionary<string, RequestMetadataTrieNode> dependencyTrieMap) 180private static Dictionary<string, ProcessedMetadata> ProcessDownstreamDependencyMetadata(Dictionary<string, RequestMetadataTrieNode> dependencyTrieMap) 182Dictionary<string, ProcessedMetadata> finalArrayDict = []; 285private void AddDependency(IDownstreamDependencyMetadata downstreamDependencyMetadata, Dictionary<string, RequestMetadataTrieNode> dependencyTrieMap)
Latency\Internal\HttpRequestLatencyListener.cs (6)
78private static readonly Dictionary<string, string> _socketMap = new() 84private static readonly Dictionary<string, string> _nameResolutionMap = new() 90private static readonly Dictionary<string, string> _httpMap = new() 106Dictionary<string, CheckpointToken> socket = []; 112Dictionary<string, CheckpointToken> nameResolution = []; 118Dictionary<string, CheckpointToken> http = [];
Microsoft.Extensions.Http.Diagnostics.Tests (11)
Logging\HttpClientLoggerTest.cs (7)
242var logRecordState = logRecord.GetStructuredState(); 339var logRecordRequest = logRecords[0].GetStructuredState(); 348var logRecordFull = logRecords[1].GetStructuredState(); 444var logRecordState = logRecord.GetStructuredState(); 559var logRecordState = logRecord.GetStructuredState(); 649var logRecordState = logRecord.GetStructuredState(); 921var logRecord = Assert.Single(logRecords).GetStructuredState();
Logging\Internal\LogRecordExtensions.cs (1)
15public static Dictionary<string, string?> GetStructuredState(this FakeLogRecord logRecord)
Logging\LoggingOptionsTest.cs (3)
73var testHeaders = new Dictionary<string, DataClassification> 87var testHeaders = new Dictionary<string, DataClassification> 122var paramsToRedacts = new Dictionary<string, DataClassification>
Microsoft.Extensions.Http.Resilience (5)
src\Shared\Pools\PooledDictionaryPolicy.cs (3)
14internal sealed class PooledDictionaryPolicy<TKey, TValue> : PooledObjectPolicy<Dictionary<TKey, TValue>> 24public override Dictionary<TKey, TValue> Create() => new(_comparer); 26public override bool Return(Dictionary<TKey, TValue> obj)
src\Shared\Pools\PoolFactory.cs (2)
141/// Creates an object pool of <see cref="Dictionary{TKey, TValue}"/> instances. 152public static ObjectPool<Dictionary<TKey, TValue>> CreateDictionaryPool<TKey, TValue>(IEqualityComparer<TKey>? comparer = null, int maxCapacity = DefaultCapacity)
Microsoft.Extensions.Http.Resilience.Tests (8)
Helpers\ConfigurationStubFactory.cs (4)
12public static IConfiguration Create(Dictionary<string, string?> collection) => Create(collection, out _); 14public static IConfiguration Create(Dictionary<string, string?> collection, out Action<Dictionary<string, string?>> reload) 38public void Reload(Dictionary<string, string?> data)
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (1)
365public Dictionary<string, object?> Tags { get; } = [];
Routing\RoutingStrategyTest.cs (3)
113Dictionary<string, string?> config1, 114Dictionary<string, string?> config2, 190public void Reload(Dictionary<string, string?> data)
Microsoft.Extensions.Identity.Core (2)
TokenOptions.cs (1)
36public Dictionary<string, TokenProviderDescriptor> ProviderMap { get; set; } = new Dictionary<string, TokenProviderDescriptor>();
UserManager.cs (1)
43private readonly Dictionary<string, IUserTwoFactorTokenProvider<TUser>> _tokenProviders =
Microsoft.Extensions.Logging.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
15private static readonly Dictionary<Type, string> _builtInTypeNames = new Dictionary<Type, string>
Microsoft.Extensions.Logging.Generators (3)
LoggerMessageGenerator.Parser.cs (3)
575var methods = new Dictionary<string, int>(lc.Methods.Count); 738private static bool ExtractTemplates(string? message, Dictionary<string, string> templateMap, List<string> templateList) 876public readonly Dictionary<string, string> TemplateMap = new(StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
60public Dictionary<string, Type> ConfigTypes { get; }
Microsoft.Extensions.Options (1)
StartupValidatorOptions.cs (1)
12public Dictionary<(Type, string), Action> _validators { get; } = new Dictionary<(Type, string), Action>();
Microsoft.Extensions.Options.SourceGeneration (14)
Emitter.cs (11)
61var staticValidationAttributesDict = new Dictionary<string, StaticFieldInfo>(); 62var staticValidatorsDict = new Dictionary<string, StaticFieldInfo>(); 102private void GenValidatorType(ValidatorType vt, ref Dictionary<string, StaticFieldInfo> staticValidationAttributesDict, ref Dictionary<string, StaticFieldInfo> staticValidatorsDict) 670ref Dictionary<string, StaticFieldInfo> staticValidationAttributesDict, 671ref Dictionary<string, StaticFieldInfo> staticValidatorsDict) 738private void GenMemberValidation(ValidatedMember vm, string modelName, ref Dictionary<string, StaticFieldInfo> staticValidationAttributesDict, bool cleanListsBeforeUse) 761private StaticFieldInfo GetOrAddStaticValidationAttribute(ref Dictionary<string, StaticFieldInfo> staticValidationAttributesDict, ValidationAttributeInfo attr) 821private void GenTransitiveValidation(ValidatedMember vm, string modelName, ref Dictionary<string, StaticFieldInfo> staticValidatorsDict) 852private void GenEnumerationValidation(ValidatedMember vm, string modelName, ref Dictionary<string, StaticFieldInfo> staticValidatorsDict) 909private StaticFieldInfo GetOrAddStaticValidator(ref Dictionary<string, StaticFieldInfo> staticValidatorsDict, string validatorTypeFQN)
Model\ValidationAttributeInfo.cs (1)
11public Dictionary<string, string> Properties { get; } = new();
OptionsSourceGenContext.cs (1)
26internal Dictionary<string, HashSet<object>?> AttributesToGenerate { get; set; } = new Dictionary<string, HashSet<object>?>();
Parser.cs (1)
29private readonly Dictionary<ITypeSymbol, ValidatorType> _synthesizedValidators = new(SymbolEqualityComparer.Default);
Microsoft.Extensions.SecretManager.Tools.Tests (1)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
16private readonly Dictionary<string, string> _files = new Dictionary<string, string>();
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Resolver\DnsResolver.cs (2)
241Dictionary<EncodedDomainName, EncodedDomainName> aliasMap = new(); 242Dictionary<EncodedDomainName, List<AddressResult>> aRecordMap = new();
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ConfigurationServiceEndpointResolverTests.cs (1)
232var data = new Dictionary<string, string?>();
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
ServiceDiscoveryDestinationResolver.cs (1)
26Dictionary<string, DestinationConfig> results = new();
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (7)
YarpServiceDiscoveryTests.cs (7)
39var destinationConfigs = new Dictionary<string, DestinationConfig> 70var destinationConfigs = new Dictionary<string, DestinationConfig> 100var destinationConfigs = new Dictionary<string, DestinationConfig> 134var destinationConfigs = new Dictionary<string, DestinationConfig> 218var destinationConfigs = new Dictionary<string, DestinationConfig> 244var destinationConfigs = new Dictionary<string, DestinationConfig> 293var destinationConfigs = new Dictionary<string, DestinationConfig>
Microsoft.Extensions.Telemetry (7)
Latency\Internal\Registry.cs (1)
33var keyOrderBuilder = new Dictionary<string, int>(c);
Logging\ExtendedLoggerFactory.cs (1)
21private readonly Dictionary<string, ExtendedLogger> _loggers = new(StringComparer.Ordinal);
src\Shared\Pools\PooledDictionaryPolicy.cs (3)
14internal sealed class PooledDictionaryPolicy<TKey, TValue> : PooledObjectPolicy<Dictionary<TKey, TValue>> 24public override Dictionary<TKey, TValue> Create() => new(_comparer); 26public override bool Return(Dictionary<TKey, TValue> obj)
src\Shared\Pools\PoolFactory.cs (2)
141/// Creates an object pool of <see cref="Dictionary{TKey, TValue}"/> instances. 152public static ObjectPool<Dictionary<TKey, TValue>> CreateDictionaryPool<TKey, TValue>(IEqualityComparer<TKey>? comparer = null, int maxCapacity = DefaultCapacity)
Microsoft.Extensions.Telemetry.Abstractions (5)
src\Shared\Pools\PooledDictionaryPolicy.cs (3)
14internal sealed class PooledDictionaryPolicy<TKey, TValue> : PooledObjectPolicy<Dictionary<TKey, TValue>> 24public override Dictionary<TKey, TValue> Create() => new(_comparer); 26public override bool Return(Dictionary<TKey, TValue> obj)
src\Shared\Pools\PoolFactory.cs (2)
141/// Creates an object pool of <see cref="Dictionary{TKey, TValue}"/> instances. 152public static ObjectPool<Dictionary<TKey, TValue>> CreateDictionaryPool<TKey, TValue>(IEqualityComparer<TKey>? comparer = null, int maxCapacity = DefaultCapacity)
Microsoft.Extensions.Telemetry.Abstractions.Tests (4)
Logging\LoggerMessageHelperTests.cs (4)
28var d0 = new Dictionary<string, string> 34var d1 = new Dictionary<string, string> 48var d3 = new Dictionary<string, int> 56var d4 = new Dictionary<int, string>
Microsoft.Extensions.Telemetry.Tests (30)
Buffering\GlobalLogBufferingConfigureOptionsTests.cs (3)
47var configValues = new Dictionary<string, string?> 70var configValues = new Dictionary<string, string?> 100var configValues = new Dictionary<string, string?>
Enrichment\Internals\TestLogEnrichmentTagCollector.cs (1)
10private readonly Dictionary<string, object> _tags = [];
Enrichment\Internals\TestMetricEnrichmentTagCollector.cs (1)
10private readonly Dictionary<string, string> _tags = [];
Http\HttpParserTests.cs (11)
21Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 38Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 57Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 77Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 123Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 155Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 226Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 280Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.PrivateData } }; 347Dictionary<string, DataClassification> parametersToRedact = new() 391Dictionary<string, DataClassification> parametersToRedact = new() 437Dictionary<string, DataClassification> parametersToRedact = new()
Http\HttpRouteFormatterTests.cs (13)
20var parametersToRedact = new Dictionary<string, DataClassification>(); 93Dictionary<string, DataClassification> parametersToRedact = new() 136Dictionary<string, DataClassification> parametersToRedact = new() 157Dictionary<string, DataClassification> parametersToRedact = new() 218Dictionary<string, DataClassification> parametersToRedact = new() 239Dictionary<string, DataClassification> parametersToRedact = new() 257Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 324Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } }; 353Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 373Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.PrivateData } }; 415Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 435Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } }; 451Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
Latency\Internal\TagCollectionTests.cs (1)
30Dictionary<string, int> namesNumTimes = new Dictionary<string, int>
Microsoft.Extensions.Validation (1)
ValidateContext.cs (1)
55public Dictionary<string, string[]>? ValidationErrors { get; set; }
Microsoft.Extensions.Validation.Tests (19)
ValidatableParameterInfoTests.cs (16)
31var errors = context.ValidationErrors; 56var errors = context.ValidationErrors; 79var errors = context.ValidationErrors; 99var errors = context.ValidationErrors; 122var errors = context.ValidationErrors; 151var typeMapping = new Dictionary<Type, ValidatableTypeInfo> 163var errors = context.ValidationErrors; 191var typeMapping = new Dictionary<Type, ValidatableTypeInfo> 207var errors = context.ValidationErrors; 234var errors = context.ValidationErrors; 260var errors = context.ValidationErrors; 283var errors = context.ValidationErrors; 304Dictionary<Type, ValidatableTypeInfo>? typeMapping = null) 359public TestValidationOptions(Dictionary<Type, ValidatableTypeInfo> typeInfoMappings) 371private readonly Dictionary<Type, ValidatableTypeInfo> _typeInfoMappings; 373public DictionaryBasedResolver(Dictionary<Type, ValidatableTypeInfo> typeInfoMappings)
ValidatableTypeInfoTests.cs (3)
796public TestValidationOptions(Dictionary<Type, ValidatableTypeInfo> typeInfoMappings) 808private readonly Dictionary<Type, ValidatableTypeInfo> _typeInfoMappings; 810public DictionaryBasedResolver(Dictionary<Type, ValidatableTypeInfo> typeInfoMappings)
Microsoft.Extensions.Validation.ValidationsGenerator (1)
Models\ValidationAttribute.cs (1)
12Dictionary<string, string> NamedArguments,
Microsoft.Gen.ComplianceReports (7)
Parser.cs (7)
48Dictionary<string, ClassifiedItem>? classifiedMembers = null; 103private Dictionary<string, ClassifiedItem>? GetClassifiedMembers(RecordDeclarationSyntax recordSyntax, 104Dictionary<string, ClassifiedItem>? classifiedMembers, 140private Dictionary<string, ClassifiedItem>? GetClassifiedMembers(ITypeSymbol typeSymbol, Dictionary<string, ClassifiedItem>? classifiedMembers) 157Dictionary<string, ClassifiedItem>? ClassifyMember(Dictionary<string, ClassifiedItem>? classifiedMembers, ISymbol member, ITypeSymbol memberType)
Microsoft.Gen.ComplianceReports.Unit.Tests (7)
GeneratorTests.cs (7)
56Dictionary<string, string>? options = useExplicitReportPath 121var options = new Dictionary<string, string> 148var options = new Dictionary<string, string> 164private static async Task<IReadOnlyList<Diagnostic>> RunGenerator(string code, string? outputFile = null, Dictionary<string, string>? options = null) 186private readonly Dictionary<string, string> _options; 188public Options(Dictionary<string, string>? analyzerOptions) 199private sealed class OptionsProvider(Dictionary<string, string>? analyzerOptions) : AnalyzerConfigOptionsProvider
Microsoft.Gen.ContextualOptions (3)
ContextReceiver.cs (1)
37public bool TryGetTypeDeclarations(Compilation compilation, out Dictionary<INamedTypeSymbol, List<TypeDeclarationSyntax>>? typeDeclarations)
ContextualOptionsGenerator.cs (1)
37var typeDeclarations = nodes.OfType<TypeDeclarationSyntax>()
Parser.cs (1)
16public static IEnumerable<OptionsContextType> GetContextualOptionTypes(Dictionary<INamedTypeSymbol, List<TypeDeclarationSyntax>> types) =>
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
SyntaxContextReceiverTests.cs (3)
31Assert.True(sut.TryGetTypeDeclarations(comp, out var typeDeclarations)); 68Assert.True(sut.TryGetTypeDeclarations(comp, out var typeDeclarations)); 87Assert.True(sut.TryGetTypeDeclarations(comp, out var typeDeclarations));
Microsoft.Gen.Logging (4)
Emission\Emitter.cs (1)
19private readonly Dictionary<string, string> _classificationMap = [];
Parsing\Parser.cs (2)
48var parameterSymbols = new Dictionary<LoggingMethodParameter, IParameterSymbol>(); 479private void CheckTagNamesAreUnique(LoggingMethod lm, Dictionary<LoggingMethodParameter, IParameterSymbol> parameterSymbols)
Parsing\Parser.LogProperties.cs (1)
105var sensitivePropsFromCtor = new Dictionary<string, List<INamedTypeSymbol>>();
Microsoft.Gen.Logging.Generated.Tests (39)
LogPropertiesRedactionTests.cs (6)
33var expectedState = new Dictionary<string, string?> 59var expectedState = new Dictionary<string, string?> 82var expectedState = new Dictionary<string, string?> 113var expectedState = new Dictionary<string, string?> 142var expectedState = new Dictionary<string, string?> 168var expectedState = new Dictionary<string, string?>
LogPropertiesTests.cs (15)
45var ss = _logger.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 176var ss = collector.LatestRecord.StructuredState!.ToDictionary(x => x.Key, x => x.Value); 231var expectedState = new Dictionary<string, string?> 305var expectedState = new Dictionary<string, string?> 325var expectedState = new Dictionary<string, string?> 345var expectedState = new Dictionary<string, string?> 368var expectedState = new Dictionary<string, string?> 392var expectedState = new Dictionary<string, string?> 422var expectedState = new Dictionary<string, string?> 451var expectedState = new Dictionary<string, string?> 477var expectedState = new Dictionary<string, string?> 504var expectedState = new Dictionary<string, string?> 528var expectedState = new Dictionary<string, string?> 553var expectedState = new Dictionary<string, string?> 579var expectedState = new Dictionary<string, string?>
TagProviderTests.cs (15)
37var expectedState = new Dictionary<string, string?> 60var expectedState = new Dictionary<string, string?> 87var expectedState = new Dictionary<string, string?> 110var expectedState = new Dictionary<string, string?> 142var expectedState = new Dictionary<string, string?> 211var expectedState = new Dictionary<string, string?> 230var expectedState = new Dictionary<string, string?> 250var expectedState = new Dictionary<string, string?> 272var expectedState = new Dictionary<string, string?> 293var expectedState = new Dictionary<string, string?> 313var expectedState = new Dictionary<string, string?> 334var expectedState = new Dictionary<string, string?> 361var expectedState = new Dictionary<string, string?> 399var expectedState = new Dictionary<string, string?> 424var expectedState = new Dictionary<string, string?>
test\Generators\Microsoft.Gen.Logging\TestClasses\EnumerableTestExtensions.cs (1)
45public static partial void M10(ILogger logger, IEnumerable<int> p1, int[] p2, Dictionary<string, int> p3);
TransitiveTests.cs (2)
22var expectedState = new Dictionary<string, string?> 49var expectedState = new Dictionary<string, string?>
Microsoft.Gen.MetadataExtractor (16)
src\Generators\Microsoft.Gen.ComplianceReports\Parser.cs (7)
48Dictionary<string, ClassifiedItem>? classifiedMembers = null; 103private Dictionary<string, ClassifiedItem>? GetClassifiedMembers(RecordDeclarationSyntax recordSyntax, 104Dictionary<string, ClassifiedItem>? classifiedMembers, 140private Dictionary<string, ClassifiedItem>? GetClassifiedMembers(ITypeSymbol typeSymbol, Dictionary<string, ClassifiedItem>? classifiedMembers) 157Dictionary<string, ClassifiedItem>? ClassifyMember(Dictionary<string, ClassifiedItem>? classifiedMembers, ISymbol member, ITypeSymbol memberType)
src\Generators\Microsoft.Gen.Metrics\Model\MetricMethod.cs (1)
12public Dictionary<string, string> TagDescriptionDictionary = [];
src\Generators\Microsoft.Gen.Metrics\Parser.cs (6)
276private (string metricName, HashSet<string> tagNames, Dictionary<string, string> dimensionDescriptions) ExtractAttributeParameters( 281var tagDescriptionMap = new Dictionary<string, string>(); 369Dictionary<string, string> tagDescriptionDictionary) 679Dictionary<string, string> tagDescriptionDictionary, 857Dictionary<string, string> tagDescriptionDictionary, 896Dictionary<string, string> tagDescriptionDictionary,
src\Generators\Microsoft.Gen.Metrics\StrongTypeAttributeParameters.cs (1)
13public Dictionary<string, string> TagDescriptionDictionary = [];
src\Generators\Microsoft.Gen.MetricsReports\ReportedMetricClass.cs (1)
11internal readonly record struct ReportedMetricMethod(string MetricName, string Summary, InstrumentKind Kind, HashSet<string> Dimensions, Dictionary<string, string> DimensionsDescriptions);
Microsoft.Gen.MetadataExtractor.Unit.Tests (8)
GeneratorTests.cs (8)
73Dictionary<string, string>? options = useExplicitReportPath 125var options = new Dictionary<string, string> 146var options = new Dictionary<string, string> 176var options = new Dictionary<string, string> 201Dictionary<string, string>? analyzerOptions = null, 236private readonly Dictionary<string, string> _options; 238public Options(Dictionary<string, string>? analyzerOptions) 253private sealed class OptionsProvider(Dictionary<string, string>? analyzerOptions) : AnalyzerConfigOptionsProvider
Microsoft.Gen.Metrics (10)
Emitter.cs (1)
23Dictionary<string, List<MetricType>> metricClassesDict = [];
MetricFactoryEmitter.cs (1)
19Dictionary<string, List<MetricType>> metricClassesDict = [];
Model\MetricMethod.cs (1)
12public Dictionary<string, string> TagDescriptionDictionary = [];
Parser.cs (6)
276private (string metricName, HashSet<string> tagNames, Dictionary<string, string> dimensionDescriptions) ExtractAttributeParameters( 281var tagDescriptionMap = new Dictionary<string, string>(); 369Dictionary<string, string> tagDescriptionDictionary) 679Dictionary<string, string> tagDescriptionDictionary, 857Dictionary<string, string> tagDescriptionDictionary, 896Dictionary<string, string> tagDescriptionDictionary,
StrongTypeAttributeParameters.cs (1)
13public Dictionary<string, string> TagDescriptionDictionary = [];
Microsoft.Gen.MetricsReports (9)
ReportedMetricClass.cs (1)
11internal readonly record struct ReportedMetricMethod(string MetricName, string Summary, InstrumentKind Kind, HashSet<string> Dimensions, Dictionary<string, string> DimensionsDescriptions);
src\Generators\Microsoft.Gen.Metrics\Model\MetricMethod.cs (1)
12public Dictionary<string, string> TagDescriptionDictionary = [];
src\Generators\Microsoft.Gen.Metrics\Parser.cs (6)
276private (string metricName, HashSet<string> tagNames, Dictionary<string, string> dimensionDescriptions) ExtractAttributeParameters( 281var tagDescriptionMap = new Dictionary<string, string>(); 369Dictionary<string, string> tagDescriptionDictionary) 679Dictionary<string, string> tagDescriptionDictionary, 857Dictionary<string, string> tagDescriptionDictionary, 896Dictionary<string, string> tagDescriptionDictionary,
src\Generators\Microsoft.Gen.Metrics\StrongTypeAttributeParameters.cs (1)
13public Dictionary<string, string> TagDescriptionDictionary = [];
Microsoft.Gen.MetricsReports.Unit.Tests (8)
GeneratorTests.cs (8)
38Dictionary<string, string>? options = useExplicitReportPath 86var options = new Dictionary<string, string> 102var options = new Dictionary<string, string> 129var options = new Dictionary<string, string> 147Dictionary<string, string>? analyzerOptions = null, 176private readonly Dictionary<string, string> _options; 178public Options(Dictionary<string, string>? analyzerOptions) 189private sealed class OptionsProvider(Dictionary<string, string>? analyzerOptions) : AnalyzerConfigOptionsProvider
Microsoft.Interop.ComInterfaceGenerator (5)
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (1)
53var methodsOfInterest = new Dictionary<ISymbol, ImmutableArray<Func<IInvocationOperation, (ITypeSymbol, Location)?>>>(SymbolEqualityComparer.Default);
ComInterfaceContext.cs (2)
32Dictionary<string, ComInterfaceInfo> nameToInterfaceInfoMap = new(); 38Dictionary<string, DiagnosticOr<ComInterfaceContext>> nameToContextCache = new();
ComMethodContext.cs (2)
163var ifaceToDeclaredMethodsMap = ifaceAndDeclaredMethods.ToDictionary(static pair => pair.Item1, static pair => pair.Item2); 164var allMethodsCache = new Dictionary<ComInterfaceContext, ImmutableArray<Builder>>();
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\CustomMarshallerAttributeFixer.cs (2)
32Dictionary<(INamedTypeSymbol marshallerType, ITypeSymbol managedType, bool isLinearCollectionMarshaller), HashSet<string>> uniqueMarshallersToFix = new(); 55Dictionary<INamedTypeSymbol, INamedTypeSymbol> partiallyUpdatedSymbols = new(SymbolEqualityComparer.Default);
Microsoft.Interop.SourceGeneration (2)
ManualTypeMarshallingHelper.cs (1)
163Dictionary<MarshalMode, CustomTypeMarshallerData> modes = new();
Marshalling\MarshallerHelpers.cs (1)
124Dictionary<U, int> elementIndexToEdgeMapNodeId = new(elements.Count);
Microsoft.JSInterop (4)
Infrastructure\DotNetDispatcher.cs (4)
399static Dictionary<string, (MethodInfo, Type[])> ScanTypeForCallableMethods([DynamicallyAccessedMembers(JSInvokable)] Type type) 401var result = new Dictionary<string, (MethodInfo, Type[])>(StringComparer.Ordinal); 434private static Dictionary<string, (MethodInfo, Type[])> ScanAssemblyForCallableMethods(AssemblyKey assemblyKey) 438var result = new Dictionary<string, (MethodInfo, Type[])>(StringComparer.Ordinal);
Microsoft.Maui (25)
Animations\Lerp.cs (1)
9 public static readonly Dictionary<Type, Lerp> Lerps = new Dictionary<Type, Lerp>()
CommandMapper.cs (1)
9 readonly Dictionary<string, Command> _mapper = new(StringComparer.Ordinal);
Extensions\EnumerableExtensions.cs (1)
39 var result = new Dictionary<TKey, List<TSource>>();
Fonts\FontRegistrar.cs (3)
13 readonly Dictionary<string, (string Filename, string? Alias, Assembly Assembly)> _embeddedFonts = new(StringComparer.Ordinal); 14 readonly Dictionary<string, (string Filename, string? Alias)> _nativeFonts = new(StringComparer.Ordinal); 15 readonly Dictionary<string, string?> _fontLookupCache = new(StringComparer.Ordinal);
Handlers\HybridWebView\HybridWebViewQueryStringHelper.cs (2)
30 public static Dictionary<string, string> GetKeyValuePairs(string? url) 32 var result = new Dictionary<string, string>();
Hosting\ImageSources\ImageSourceToImageSourceServiceTypeMapping.cs (3)
15 private readonly Dictionary<Type, Type> _concreteTypeMapping = new(); 16 private readonly Dictionary<Type, Type> _interfaceTypeMapping = new(); 47 private static Type? FindImageSourceServiceMapping(Type type, Dictionary<Type, Type> mapping)
Hosting\Internal\MauiServiceCollection.cs (1)
12 readonly Dictionary<Type, ServiceDescriptor> _descriptorDictionary = new Dictionary<Type, ServiceDescriptor>();
HotReload\HotReloadHelper.cs (3)
117 static Dictionary<string, Type> replacedViews = new(StringComparer.Ordinal); 118 static Dictionary<IHotReloadableView, object[]> currentViews = new Dictionary<IHotReloadableView, object[]>(); 119 static Dictionary<string, List<KeyValuePair<Type, Type>>> replacedHandlers = new(StringComparer.Ordinal);
Layouts\GridLayoutManager.cs (1)
83 readonly Dictionary<SpanKey, Span> _spans = new();
LifecycleEvents\LifecycleEventService.cs (1)
9 readonly Dictionary<string, List<Delegate>> _mapper = new(StringComparer.Ordinal);
PropertyMapper.cs (6)
20 protected readonly Dictionary<string, Action<IElementHandler, IElement>> _mapper = new(StringComparer.Ordinal); 25 Dictionary<string, Action<IElementHandler, IElement>?>? _cachedMappers; 29 Dictionary<string, Action<IElementHandler, IElement>?> CachedMappers => _cachedMappers ?? SnapshotMappers().CachedMappers; 59 var cachedMappers = CachedMappers; 177 private (List<string> UpdatePropertiesKeys, List<Action<IElementHandler, IElement>> UpdatePropertiesMappers, Dictionary<string, Action<IElementHandler, IElement>?> CachedMappers) SnapshotMappers() 186 var cachedMappers = new Dictionary<string, Action<IElementHandler, IElement>?>(cacheSize);
VisualDiagnostics\VisualDiagnosticsOverlay.Standard.cs (1)
7 readonly Dictionary<IScrollView, object> _scrollViews = new();
WeakEventManager.cs (1)
13 readonly Dictionary<string, List<Subscription>> _eventHandlers = new(StringComparer.Ordinal);
Microsoft.Maui.Controls (59)
AnimationExtensions.cs (2)
48 static readonly Dictionary<AnimatableKey, Info> s_animations; 49 static readonly Dictionary<AnimatableKey, int> s_kinetics;
Application\Application.cs (1)
418 readonly Dictionary<string, WeakReference<Window>> _requestedWindows = new(StringComparer.Ordinal);
AppLinkEntry.cs (1)
10 readonly Dictionary<string, string> keyValues;
BindableObject.cs (4)
41 internal Dictionary<TriggerBase, SetterSpecificity> _triggerSpecificity = new Dictionary<TriggerBase, SetterSpecificity>(); 42 readonly Dictionary<BindableProperty, BindablePropertyContext> _properties = new Dictionary<BindableProperty, BindablePropertyContext>(4); 179 Dictionary<BindableProperty, BindablePropertyContext>.Enumerator _propertiesEnumerator; 220 Dictionary<BindableProperty, BindablePropertyContext> properties = _properties;
BindableProperty.cs (3)
43 internal static readonly Dictionary<Type, TypeConverter> KnownTypeConverters = new Dictionary<Type, TypeConverter> 51 internal static readonly Dictionary<Type, IValueConverter> KnownIValueConverters = new Dictionary<Type, IValueConverter> 58 internal static readonly Dictionary<Type, Type[]> SimpleConvertTypes = new Dictionary<Type, Type[]>
DataTemplateSelector.cs (1)
10 Dictionary<Type, DataTemplate> _dataTemplates = new Dictionary<Type, DataTemplate>();
DependencyService.cs (1)
20 static readonly Dictionary<Type, DependencyData> DependencyImplementations = new Dictionary<Type, DependencyData>();
DragAndDrop\DataPackagePropertySet.cs (1)
11 Dictionary<string, object> _propertyBag;
Element\Element.cs (2)
63 Dictionary<BindableProperty, (string, SetterSpecificity)> _dynamicResources; 369 Dictionary<BindableProperty, (string, SetterSpecificity)> DynamicResources => _dynamicResources ?? (_dynamicResources = new Dictionary<BindableProperty, (string, SetterSpecificity)>());
Hosting\Effects\AppHostBuilderExtensions.cs (2)
72 internal Dictionary<Type, Func<PlatformEffect>> RegisteredEffects { get; } = new Dictionary<Type, Func<PlatformEffect>>(); 103 private readonly Dictionary<Type, Func<PlatformEffect>> _registeredEffects;
Internals\NameScope.cs (2)
17 readonly Dictionary<string, object> _names = new(StringComparer.Ordinal); 18 readonly Dictionary<object, string> _values = new Dictionary<object, string>();
Layout\AbsoluteLayout.cs (1)
21 readonly Dictionary<IView, AbsoluteLayoutInfo> _viewInfo = new();
Layout\FlexLayout.cs (1)
256 readonly Dictionary<IView, FlexInfo> _viewInfo = new();
Layout\Grid.cs (1)
12 readonly Dictionary<IView, GridInfo> _viewInfo = new();
LegacyLayouts\RelativeLayout.cs (2)
70 var solveTable = new Dictionary<View, bool>(); 242 bool CanSolveView(View view, Dictionary<View, bool> solveTable)
ListProxy.cs (1)
27 Dictionary<int, object> _items;
MessagingCenter.cs (1)
107 readonly Dictionary<Sender, List<Subscription>> _subscriptions =
OrderedDictionary.cs (1)
42 readonly Dictionary<TKey, TValue> _dict;
PlatformConfigurationRegistry.cs (1)
12 readonly Dictionary<Type, object> _platformSpecifics = new Dictionary<Type, object>();
Registrar.cs (13)
45 readonly Dictionary<Type, Dictionary<Type, HandlerType>> _handlers = new Dictionary<Type, Dictionary<Type, HandlerType>>(); 62 if (!_handlers.TryGetValue(tview, out Dictionary<Type, HandlerType> visualRenderers)) 176 if (_handlers.TryGetValue(viewType, out Dictionary<Type, HandlerType> visualRenderers)) 212 if (_handlers.TryGetValue(viewType, out Dictionary<Type, HandlerType> visualRenderers)) 239 if (!_handlers.TryGetValue(viewType, out Dictionary<Type, HandlerType> visualRenderers) || 312 internal static Dictionary<string, EffectType> Effects { get; } = new(StringComparer.Ordinal); 314 internal static Dictionary<string, IList<StylePropertyAttribute>> StyleProperties => LazyStyleProperties.Value; 317 static readonly Lazy<Dictionary<string, IList<StylePropertyAttribute>>> LazyStyleProperties = new Lazy<Dictionary<string, IList<StylePropertyAttribute>>>(LoadStyleSheets); 357 static Dictionary<string, IList<StylePropertyAttribute>> LoadStyleSheets() 359 var properties = new Dictionary<string, IList<StylePropertyAttribute>>(StringComparer.Ordinal);
ResourceDictionary.cs (1)
23 readonly Dictionary<string, object> _innerDictionary = new(StringComparer.Ordinal);
ResourcesExtensions.cs (1)
11 Dictionary<string, object> resources = null;
Routing.cs (2)
13 static Dictionary<string, RouteFactory> s_routes = new(StringComparer.Ordinal); 14 static Dictionary<string, Page> s_implicitPageRoutes = new(StringComparer.Ordinal);
Shell\ShellNavigationQueryParameters.cs (1)
10 Dictionary<string, object> _internal = new Dictionary<string, object>();
Shell\ShellRouteParameters.cs (3)
90 var queryStringParameters = ParseQueryString(query); 101 static Dictionary<string, string> ParseQueryString(string query) 105 Dictionary<string, string> lookupDict = new(StringComparer.Ordinal);
StyleSheets\Style.cs (1)
18 Dictionary<KeyValuePair<string, string>, object> convertedValues = new Dictionary<KeyValuePair<string, string>, object>();
TemplatedItemsList.cs (1)
1231 readonly Dictionary<TemplatedItemsList<TView, TItem>, string> _oldNames = new Dictionary<TemplatedItemsList<TView, TItem>, string>();
VisualElement\VisualElement.cs (1)
503 readonly Dictionary<Size, SizeRequest> _measureCache = new Dictionary<Size, SizeRequest>();
Visuals\VisualTypeConverter.cs (6)
25 static Dictionary<string, IVisual> _visualTypeMappings; 28 var mappings = new Dictionary<string, IVisual>(StringComparer.OrdinalIgnoreCase); 51 void ScanAllAssemblies(Dictionary<string, IVisual> mappings) 73 static void RegisterAllIVisualTypesInAssembly(Assembly assembly, Dictionary<string, IVisual> mappings) 98 static void RegisterFromAttributes(Assembly assembly, Dictionary<string, IVisual> mappings) 116 Dictionary<string, IVisual> mappings)
Microsoft.Maui.Controls.Build.Tasks (21)
ILContext.cs (4)
28 public Dictionary<IValueNode, object> Values { get; private set; } 30 public Dictionary<IElementNode, VariableDefinition> Variables { get; private set; } 32 public Dictionary<INode, Tuple<VariableDefinition, IList<string>>> Scopes { get; private set; } 34 public Dictionary<INode, TypeReference> TypeExtensions { get; }
NodeILExtensions.cs (1)
153 var knownCompiledTypeConverters = context.Cache.GetKnownCompiledTypeConverters(module);
PerformanceProvider.cs (2)
21 readonly Dictionary<string, Statistic> _Statistics = new(StringComparer.Ordinal); 23 public Dictionary<string, Statistic> Statistics
SetPropertiesVisitor.cs (4)
764 static IEnumerable<Instruction> DigProperties(IEnumerable<(PropertyDefinition property, TypeReference propDeclTypeRef, string indexArg)> properties, Dictionary<TypeReference, VariableDefinition> locs, Func<Instruction> fallback, IXmlLineInfo lineInfo, ModuleDefinition module) 867 var locs = new Dictionary<TypeReference, VariableDefinition>(); 963 var locs = new Dictionary<TypeReference, VariableDefinition>(); 1096 var locs = new Dictionary<TypeReference, VariableDefinition>();
XamlCache.cs (10)
14 readonly Dictionary<ModuleDefinition, IList<XmlnsDefinitionAttribute>> _xmlnsDefinitions = new(); 15 readonly Dictionary<TypeReference, TypeDefinition> _resolvedTypes = new(); 16 readonly Dictionary<(ModuleDefinition module, string fieldRefKey), FieldReference> _fieldReferenceCache = new(); 17 readonly Dictionary<(ModuleDefinition module, string typeKey), TypeReference> _typeReferenceCache = new(); 18 readonly Dictionary<(ModuleDefinition module, string methodRefKey), MethodReference> _methodReferenceCache = new(); 19 readonly Dictionary<(ModuleDefinition module, (string assemblyName, string clrNamespace, string typeName)), TypeDefinition> _typeDefinitionCache = new(); 20 readonly Dictionary<VariableDefinition, ICollection<string>> _resourceNamesInUse = new(); 21 Dictionary<TypeReference, Type> _knownCompiledTypeConverters; 23 static TValue GetOrAdd<TKey, TValue>(Dictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TValue> valueFactory) 56 public Dictionary<TypeReference, Type> GetKnownCompiledTypeConverters(ModuleDefinition module) => _knownCompiledTypeConverters ??= new(TypeRefComparer.Default)
Microsoft.Maui.Controls.SourceGen (2)
src\Controls\src\Xaml\XamlNode.cs (2)
27 Dictionary<XmlName, INode> Properties { get; } 168 public Dictionary<XmlName, INode> Properties { get; }
Microsoft.Maui.Controls.Xaml (13)
ApplyPropertiesVisitor.cs (1)
39 Dictionary<INode, object> Values => Context.Values;
CreateValuesVisitor.cs (1)
24 Dictionary<INode, object> Values
ExpandMarkupsVisitor.cs (1)
26 Dictionary<INode, object> Values
FillResourceDictionariesVisitor.cs (1)
19 Dictionary<INode, object> Values => Context.Values;
HydrationContext.cs (2)
15 public Dictionary<INode, object> Values { get; } 16 public Dictionary<IElementNode, Type> Types { get; }
NamescopingVisitor.cs (1)
8 readonly Dictionary<INode, NameScopeRef> _scopes = new Dictionary<INode, NameScopeRef>();
RegisterXNamesVisitor.cs (1)
15 Dictionary<INode, object> Values { get; }
XamlLoader.cs (1)
259 static readonly Dictionary<Type, string> XamlResources = new Dictionary<Type, string>();
XamlNode.cs (2)
27 Dictionary<XmlName, INode> Properties { get; } 168 public Dictionary<XmlName, INode> Properties { get; }
XamlServiceProvider.cs (2)
14 readonly Dictionary<Type, object> services = new Dictionary<Type, object>(); 286 readonly Dictionary<string, string> namespaces = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.Maui.Essentials (4)
Types\Shared\WebUtils.shared.cs (2)
11 var parameters = new Dictionary<string, string>(StringComparer.Ordinal); 32 static void UnpackParameters(ReadOnlySpan<char> query, Dictionary<string, string> parameters)
VersionTracking\VersionTracking.shared.cs (1)
208 Dictionary<string, List<string>> versionTrail = null!;
WebAuthenticator\WebAuthenticatorResult.shared.cs (1)
76 public Dictionary<string, string> Properties { get; set; } = new(StringComparer.Ordinal);
Microsoft.Maui.Graphics (19)
Text\TextAttributeExtensions.cs (12)
16 this Dictionary<TextAttribute, string> attributes, 30 this Dictionary<TextAttribute, string> attributes, 42 this Dictionary<TextAttribute, string> attributes, 54 this Dictionary<TextAttribute, string> attributes, 66 this Dictionary<TextAttribute, string> attributes, 78 this Dictionary<TextAttribute, string> attributes, 90 this Dictionary<TextAttribute, string> attributes, 102 this Dictionary<TextAttribute, string> attributes, 111 public static void SetSuperscript(this Dictionary<TextAttribute, string> attributes, bool value) 117 public static void SetSubscript(this Dictionary<TextAttribute, string> attributes, bool value) 123 public static void SetForegroundColor(this Dictionary<TextAttribute, string> attributes, string value) 129 public static void SetBackgroundColor(this Dictionary<TextAttribute, string> attributes, string value)
Text\TextAttributesExtensions.cs (6)
24 this Dictionary<TextAttribute, string> attributes, 38 this Dictionary<TextAttribute, string> attributes, 60 this Dictionary<TextAttribute, string> attributes, 87 this Dictionary<TextAttribute, string> attributes, 116 this Dictionary<TextAttribute, string> attributes, 143 this Dictionary<TextAttribute, string> attributes,
Text\TextColors.cs (1)
9 public static Dictionary<string, string> StandardColors = new(StringComparer.OrdinalIgnoreCase)
Microsoft.Maui.Graphics.Text.Markdig (3)
Renderer\HtmlInlineRenderer.cs (1)
44 var values = SimpleCssParser.Parse(span.Style);
Renderer\SimpleCssParser.cs (2)
8 public static Dictionary<string, string> Parse(string css) 13 var values = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.Maui.Resizetizer (10)
ColorTable.cs (6)
13 static readonly Lazy<Dictionary<string, SKColor>> ColorConstants = new Lazy<Dictionary<string, SKColor>>(GetColors); 15 static Dictionary<string, SKColor> GetColors() 17 var colors = new Dictionary<string, SKColor>(StringComparer.OrdinalIgnoreCase); 34 static void FillWithProperties(Dictionary<string, SKColor> dictionary, Type typeWithColors) 43 static Dictionary<string, SKColor> Colors => ColorConstants.Value;
DetectInvalidResourceOutputFilenamesTask.cs (1)
25 var tempInvalidItems = new Dictionary<ITaskItem, string>();
ResizetizeImages.cs (2)
107 var attr = new Dictionary<string, string>(StringComparer.Ordinal); 132 var imagesPairs = new Dictionary<string, ResizeImageInfo>();
TizenSplashUpdater.cs (1)
19 static public Dictionary<(string Resolution, string Orientation), string> splashDpiMap = new Dictionary<(string, string), string>();
Microsoft.ML.AutoML (49)
ColumnInference\ColumnInformationUtil.cs (1)
147var result = new Dictionary<ColumnPurpose, int>();
EstimatorExtensions\EstimatorExtensions.cs (2)
304var pipelineNodeProperty = new Dictionary<string, object>() 329var pipelineNodeProperty = new Dictionary<string, object>()
Experiment\SuggestedTrainer.cs (1)
80var spMap = SweepParams.ToDictionary(sp => sp.Name);
SweepableEstimator\Converter\MultiModelPipelineConverter.cs (2)
19var estimators = jValue["estimator"].GetValue<Dictionary<string, SweepableEstimator>>();
SweepableEstimator\Converter\SweepablePipelineConverter.cs (2)
20var estimators = jValue["estimator"].GetValue<Dictionary<string, SweepableEstimator>>();
SweepableEstimator\MultiModelPipeline.cs (7)
17private readonly Dictionary<string, SweepableEstimator> _estimators; 26internal MultiModelPipeline(Dictionary<string, SweepableEstimator> estimators, Entity schema) 32public Dictionary<string, SweepableEstimator> Estimators { get => _estimators; } 114var estimators = _estimators.ToDictionary(x => x.Key, x => x.Value); 134private Entity CreateSweepableEntityFromEntity(Entity entity, Dictionary<string, SweepableEstimator> lookupTable) 170private Entity VisitAndReplaceSweepableEntityWithStringEntity(Entity e, ref Dictionary<string, SweepableEstimator> estimators) 195private string GetNextId(Dictionary<string, SweepableEstimator> estimators)
SweepableEstimator\SweepablePipeline.cs (8)
21private readonly Dictionary<string, SweepableEstimator> _estimators = new Dictionary<string, SweepableEstimator>(); 72internal SweepablePipeline(Dictionary<string, SweepableEstimator> estimators, Entity schema, string currentSchema = null) 79public Dictionary<string, SweepableEstimator> Estimators { get => _estimators; } 110var pipelineNodes = entity.ValueEntities() 174var estimators = _estimators.ToDictionary(x => x.Key, x => x.Value); 194private Entity CreateSweepableEntityFromEntity(Entity entity, Dictionary<string, SweepableEstimator> lookupTable) 230private Entity VisitAndReplaceSweepableEntityWithStringEntity(Entity e, ref Dictionary<string, SweepableEstimator> estimators) 255private string GetNextId(Dictionary<string, SweepableEstimator> estimators)
Sweepers\ISweeper.cs (2)
80private readonly Dictionary<string, IParameterValue> _parameterValues; 100public ParameterSet(Dictionary<string, IParameterValue> paramValues, int hash)
TrainerExtensions\BinaryTrainerExtensions.cs (1)
49Dictionary<string, object> additionalProperties = null;
TrainerExtensions\RankingTrainerExtensions.cs (1)
54var property = new Dictionary<string, object>();
TrainerExtensions\RecommendationTrainerExtensions.cs (1)
27var property = new Dictionary<string, object>();
TrainerExtensions\TrainerExtensionUtil.cs (4)
144var props = new Dictionary<string, object>(); 163Dictionary<string, object> props = null; 173var boosterProps = boosterParams.ToDictionary(p => p.Name, p => (object)p.ProcessedValue()); 282var enumDict = fi.FieldType.GetEnumValues().Cast<int>()
Tuner\AutoZeroTuner.cs (2)
22private readonly Dictionary<string, string> _pipelineStrings; 24private readonly Dictionary<int, Config> _configLookBook = new Dictionary<int, Config>();
Tuner\CostFrugalTuner.cs (2)
17private readonly Dictionary<int, SearchThread> _searchThreadPool = new Dictionary<int, SearchThread>(); 19private readonly Dictionary<int, int> _trialProposedBy = new Dictionary<int, int>();
Tuner\EciCfoTuner.cs (1)
20private readonly Dictionary<string, ITuner> _tuners;
Tuner\PipelineProposer.cs (12)
22private readonly Dictionary<EstimatorType, double> _estimatorCost; 23private readonly Dictionary<string, double> _learnerInitialCost; 26private Dictionary<string, double> _k1; 29private Dictionary<string, double> _k2; 32private Dictionary<string, double> _e1; 35private Dictionary<string, double> _e2; 38private readonly Dictionary<string, double> _eci; 223public Dictionary<string, double> K1 { get; set; } 225public Dictionary<string, double> K2 { get; set; } 227public Dictionary<string, double> E1 { get; set; } 229public Dictionary<string, double> E2 { get; set; } 231public Dictionary<string, double> Eci { get; set; }
Microsoft.ML.AutoML.SourceGenerator (8)
EstimatorTypeGenerator.cs (2)
28var flags = JsonSerializer.Deserialize<Dictionary<string, bool>>(json);
SearchSpaceGenerator.cs (2)
25var flags = JsonSerializer.Deserialize<Dictionary<string, bool>>(json);
SweepableEstimatorFactoryGenerator.cs (2)
25var flags = JsonSerializer.Deserialize<Dictionary<string, bool>>(json);
SweepableEstimatorGenerator.cs (2)
24var flags = JsonSerializer.Deserialize<Dictionary<string, bool>>(json);
Microsoft.ML.AutoML.Tests (9)
TrainerExtensionsTests.cs (2)
312var props = new Dictionary<string, object>() 343var props = new Dictionary<string, object>()
TunerTests.cs (4)
37var tunerCandidates = new Dictionary<string, ITuner>() 243var tunerCandidates = new Dictionary<string, ITuner>() 298var tunerCandidates = new Dictionary<string, ITuner>() 347var tunerCandidates = new Dictionary<string, ITuner>()
Utils\TaskAgnosticAutoFit.cs (1)
127public Dictionary<string, double> Metrics;
Utils\TaskAgnosticIterationResult.cs (2)
16internal Dictionary<string, double> MetricValues = new Dictionary<string, double>(); 72public static Dictionary<string, double> MetricValuesToDictionary<T>(T metric)
Microsoft.ML.CodeGenerator (1)
CodeGenerator\CSharp\TrainerGeneratorBase.cs (1)
19private Dictionary<string, object> _arguments;
Microsoft.ML.CodeGenerator.Tests (60)
ApprovalTests\ConsoleCodeGeneratorTests.cs (4)
545var hyperParam = new Dictionary<string, object>() 723var hyperParam = new Dictionary<string, object>() 851var mapping = new Dictionary<string, CodeGeneratorSettings.ColumnMapping>() 1019var mapping = new Dictionary<string, CodeGeneratorSettings.ColumnMapping>()
CodeGenTests.cs (5)
28var elementProperties = new Dictionary<string, object>() 48var elementProperties = new Dictionary<string, object>() 68var elementProperties = new Dictionary<string, object>(); 82var elementProperties = new Dictionary<string, object>(); 123var elementProperties = new Dictionary<string, object>()
TrainerGeneratorTests.cs (40)
30var elementProperties = new Dictionary<string, object>() 58var elementProperties = new Dictionary<string, object>() 79var elementProperties = new Dictionary<string, object>() 102var elementProperties = new Dictionary<string, object>(); 119var elementProperties = new Dictionary<string, object>() 139var elementProperties = new Dictionary<string, object>(); 156var elementProperties = new Dictionary<string, object>() 176var elementProperties = new Dictionary<string, object>(); 193var elementProperties = new Dictionary<string, object>() 213var elementProperties = new Dictionary<string, object>(); 230var elementProperties = new Dictionary<string, object>() 250var elementProperties = new Dictionary<string, object>(); 267var elementProperties = new Dictionary<string, object>() 286var elementProperties = new Dictionary<string, object>(); 300var elementProperties = new Dictionary<string, object>() 327var elementProperties = new Dictionary<string, object>(); 344var elementProperties = new Dictionary<string, object>() 364var elementProperties = new Dictionary<string, object>(); 381var elementProperties = new Dictionary<string, object>() 401var elementProperties = new Dictionary<string, object>(); 418var elementProperties = new Dictionary<string, object>() 438var elementProperties = new Dictionary<string, object>(); 455var elementProperties = new Dictionary<string, object>() 475var elementProperties = new Dictionary<string, object>(); 492var elementProperties = new Dictionary<string, object>() 512var elementProperties = new Dictionary<string, object>(); 529var elementProperties = new Dictionary<string, object>() 550var elementProperties = new Dictionary<string, object>(); 567var elementProperties = new Dictionary<string, object>() 588var elementProperties = new Dictionary<string, object>(); 605var elementProperties = new Dictionary<string, object>() 626var elementProperties = new Dictionary<string, object>(); 643var elementProperties = new Dictionary<string, object>() 664var elementProperties = new Dictionary<string, object>(); 680var elementProperties = new Dictionary<string, object>() 701var elementProperties = new Dictionary<string, object>(); 718var elementProperties = new Dictionary<string, object>() 739var elementProperties = new Dictionary<string, object>(); 756var elementProperties = new Dictionary<string, object>() 774var elementProperties = new Dictionary<string, object>();
TransformGeneratorTests.cs (11)
25var elementProperties = new Dictionary<string, object>();//categorical 39var elementProperties = new Dictionary<string, object>();//categorical 53var elementProperties = new Dictionary<string, object>(); 67var elementProperties = new Dictionary<string, object>(); 81var elementProperties = new Dictionary<string, object>();//nume to num feature 2 95var elementProperties = new Dictionary<string, object>(); 109var elementProperties = new Dictionary<string, object>();//numeric feature 123var elementProperties = new Dictionary<string, object>(); 137var elementProperties = new Dictionary<string, object>(); 151var elementProperties = new Dictionary<string, object>(); 165var elementProperties = new Dictionary<string, object>();
Microsoft.ML.Core (30)
CommandLine\CmdParser.cs (3)
468var map = new Dictionary<string, Argument>(); 1336public readonly Dictionary<string, Argument> Map; 1340public ArgumentInfo(Type type, Argument argDef, Argument[] args, Dictionary<string, Argument> map)
ComponentModel\ComponentCatalog.cs (5)
444private readonly Dictionary<LoadableClassInfo.Key, LoadableClassInfo> _classesByKey; 448private readonly Dictionary<Type, bool> _signatures; 451private readonly Dictionary<string, EntryPointInfo> _entryPointMap; 454private readonly Dictionary<string, ComponentInfo> _componentMap; 456private readonly Dictionary<(Type AttributeType, string ContractName), Type> _extensionsMap;
Data\Repository.cs (1)
448private readonly Dictionary<string, ZipArchiveEntry> _entries;
Data\RoleMappedSchema.cs (9)
155private readonly Dictionary<string, IReadOnlyList<DataViewSchema.Column>> _map; 157private RoleMappedSchema(DataViewSchema schema, Dictionary<string, IReadOnlyList<DataViewSchema.Column>> map) 196private RoleMappedSchema(DataViewSchema schema, Dictionary<string, List<DataViewSchema.Column>> map) 201private static void Add(Dictionary<string, List<DataViewSchema.Column>> map, ColumnRole role, DataViewSchema.Column column) 214private static Dictionary<string, List<DataViewSchema.Column>> MapFromNames(DataViewSchema schema, IEnumerable<KeyValuePair<ColumnRole, string>> roles, bool opt = false) 219var map = new Dictionary<string, List<DataViewSchema.Column>>(); 311private static Dictionary<string, IReadOnlyList<DataViewSchema.Column>> Copy(Dictionary<string, List<DataViewSchema.Column>> map) 313var copy = new Dictionary<string, IReadOnlyList<DataViewSchema.Column>>(map.Count);
Data\ServerChannel.cs (1)
29private Dictionary<string, Delegate> _toPublish;
EntryPoints\ModuleArgs.cs (2)
589/// The underlying C# representation is <see cref="System.Collections.Generic.Dictionary{TKey, TValue}"/> 633if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>)
Environment\HostEnvironmentBase.cs (1)
338protected Dictionary<string, object> Options { get; } = [];
Environment\TelemetryMessage.cs (1)
29public static TelemetryMessage CreateMetric(string metricName, double metricValue, Dictionary<string, string> properties = null)
Prediction\ITree.cs (1)
93Dictionary<string, object> KeyValues { get; }
Utilities\LruCache.cs (1)
18private readonly Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> _cache;
Utilities\Tree.cs (1)
31private readonly Dictionary<TKey, Tree<TKey, TValue>> _children;
Utilities\Utils.cs (4)
108public static int Size<TKey, TValue>(Dictionary<TKey, TValue> x) 122public static bool TryGetValue<TKey, TValue>(Dictionary<TKey, TValue> map, TKey key, out TValue value) 157public static void Add<TKey, TValue>(ref Dictionary<TKey, TValue> map, TKey key, TValue value) 165public static void Set<TKey, TValue>(ref Dictionary<TKey, TValue> map, TKey key, TValue value)
Microsoft.ML.Core.Tests (5)
UnitTests\ColumnTypes.cs (1)
23var dict = new Dictionary<DataViewType, string>();
UnitTests\TestEntryPoints.cs (4)
3350var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 3351var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 3402var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 3403var inputMap = new Dictionary<ParameterBinding, VariableBinding>();
Microsoft.ML.CpuMath.UnitTests (37)
UnitTests.cs (37)
31private static Dictionary<string, string> _disableAvxEnvironmentVariables; 32private static Dictionary<string, string> _disableAvxAndSseEnvironmentVariables; 138public static TheoryData<string, string, Dictionary<string, string>> AddData() 142return new TheoryData<string, string, Dictionary<string, string>>() 150return new TheoryData<string, string, Dictionary<string, string>>() 166public static TheoryData<string, string, string, Dictionary<string, string>> AddScaleData() 170return new TheoryData<string, string, string, Dictionary<string, string>>() 180return new TheoryData<string, string, string, Dictionary<string, string>>() 203public static TheoryData<string, string, string, string, Dictionary<string, string>> MatMulData() 207return new TheoryData<string, string, string, string, Dictionary<string, string>>() 216return new TheoryData<string, string, string, string, Dictionary<string, string>>() 236public void MatMulTest(string mode, string matTest, string srcTest, string dstTest, Dictionary<string, string> environmentVariables) 271public void MatMulTranTest(string mode, string matTest, string srcTest, string dstTest, Dictionary<string, string> environmentVariables) 304public void MatTimesSrcSparseTest(string mode, string matTest, string srcTest, string dstTest, Dictionary<string, string> environmentVariables) 342public void AddScalarUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 368public void ScaleTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 394public void ScaleSrcUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 421public void ScaleAddUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 448public void AddScaleUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 475public void AddScaleSUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 504public void AddScaleCopyUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 532public void AddUTest(string mode, string test, Dictionary<string, string> environmentVariables) 565public void AddSUTest(string mode, string test, Dictionary<string, string> environmentVariables) 594public void MulElementWiseUTest(string mode, string test, Dictionary<string, string> environmentVariables) 628public void SumTest(string mode, string test, Dictionary<string, string> environmentVariables) 651public void SumSqUTest(string mode, string test, Dictionary<string, string> environmentVariables) 674public void SumSqDiffUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 699public void SumAbsUTest(string mode, string test, Dictionary<string, string> environmentVariables) 722public void SumAbsDiffUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 747public void MaxAbsUTest(string mode, string test, Dictionary<string, string> environmentVariables) 775public void MaxAbsDiffUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 803public void DotUTest(string mode, string test, Dictionary<string, string> environmentVariables) 833public void DotSUTest(string mode, string test, Dictionary<string, string> environmentVariables) 867public void Dist2Test(string mode, string test, Dictionary<string, string> environmentVariables) 927public void SdcaL1UpdateUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 957public void SdcaL1UpdateSUTest(string mode, string test, string scale, Dictionary<string, string> environmentVariables) 987private void UpdateEnvVars(RemoteInvokeOptions options, Dictionary<string, string> environmentVariables)
Microsoft.ML.Data (176)
Commands\CrossValidationCommand.cs (7)
210var dict = tasks[i].Result.Metrics; 222Dictionary<string, IDataView>[] metricValues = tasks.Select(t => t.Result.Metrics).ToArray(); 312private bool TryGetOverallMetrics(Dictionary<string, IDataView>[] metrics, out List<IDataView> overallList) 319var dict = metrics[i]; 332public readonly Dictionary<string, IDataView> Metrics; 337public FoldResult(Dictionary<string, IDataView> metrics, DataViewSchema scoreSchema, RoleMappedData perInstance, RoleMappedSchema trainSchema) 557var dict = eval.Evaluate(dataEval);
Commands\DataCommand.cs (5)
139protected void SendTelemetryMetricCore(IChannelProvider prov, Dictionary<string, double> averageMetric) 153protected void SendTelemetryMetric(Dictionary<string, IDataView>[] metricValues) 155Dictionary<string, double> averageMetric = new Dictionary<string, double>(); 156foreach (Dictionary<string, IDataView> mValue in metricValues) 196Dictionary<string, double> newAverageMetric = new Dictionary<string, double>();
Commands\EvaluateCommand.cs (2)
101Dictionary<string, IDataView> Evaluate(RoleMappedData data); 245var metrics = evaluator.Evaluate(data);
Commands\TestCommand.cs (2)
122var metrics = evaluator.Evaluate(data); 130Dictionary<string, IDataView>[] metricValues = { metrics };
Commands\TrainTestCommand.cs (2)
212var metrics = evaluator.Evaluate(dataEval); 220Dictionary<string, IDataView>[] metricValues = { metrics };
Commands\TypeInfoCommand.cs (2)
84var dstToSrcMap = new Dictionary<HashSet<InternalDataKind>, HashSet<InternalDataKind>>(comp); 85var srcToDstMap = new Dictionary<InternalDataKind, HashSet<InternalDataKind>>();
Data\Conversion.cs (8)
78private readonly Dictionary<(Type src, Type dst), Delegate> _delegatesStd; 82private readonly Dictionary<(Type src, Type dst), Delegate> _delegatesAll; 85private readonly Dictionary<Type, Delegate> _isNADelegates; 88private readonly Dictionary<Type, Delegate> _hasNADelegates; 91private readonly Dictionary<Type, Delegate> _isDefaultDelegates; 95private readonly Dictionary<Type, Delegate> _hasZeroDelegates; 98private readonly Dictionary<Type, Delegate> _getNADelegates; 101private readonly Dictionary<Type, Delegate> _tryParseDelegates;
Data\DataViewTypeManager.cs (3)
39private static readonly Dictionary<TypeWithAttributes, DataViewType> _rawTypeToDataViewTypeMap = new Dictionary<TypeWithAttributes, DataViewType>(); 44private static readonly Dictionary<DataViewType, TypeWithAttributes> _dataViewTypeToRawTypeMap = new Dictionary<DataViewType, TypeWithAttributes>(); 228/// a key when using <see cref="TypeWithAttributes"/> as the key type in <see cref="Dictionary{TKey, TValue}"/>. Note that the
Data\SchemaDefinition.cs (1)
212internal Dictionary<string, AnnotationInfo> AnnotationInfos { get; }
DataLoadSave\Binary\BinaryLoader.cs (2)
129private volatile Dictionary<string, MetadataTableOfContentsEntry> _metadataMap; 330var map = new Dictionary<string, MetadataTableOfContentsEntry>();
DataLoadSave\Binary\CodecFactory.cs (2)
19private readonly Dictionary<string, GetCodecFromStreamDelegate> _loadNameToCodecCreator; 21private readonly Dictionary<Type, IValueCodec> _simpleCodecTypeMap;
DataLoadSave\Binary\UnsafeTypeOps.cs (1)
28private static readonly Dictionary<Type, object> _type2ops;
DataLoadSave\Database\DatabaseLoader.cs (1)
481var nameToInfoIndex = new Dictionary<string, int>(Infos.Length);
DataLoadSave\Text\TextLoader.cs (2)
757var nameToInfoIndex = new Dictionary<string, int>(Infos.Length); 927var nameToInfoIndex = new Dictionary<string, int>(Infos.Length);
DataLoadSave\Text\TextLoaderParser.cs (3)
693var mapOne = new Dictionary<InternalDataKind, Func<RowSet, ColumnPipe>>(); 694var mapVec = new Dictionary<InternalDataKind, Func<RowSet, ColumnPipe>>(); 714var map = vectorType != null ? mapVec : mapOne;
DataView\ArrayDataViewBuilder.cs (2)
23private readonly Dictionary<string, ValueGetter<VBuffer<ReadOnlyMemory<char>>>> _getSlotNames; 24private readonly Dictionary<string, ValueGetter<VBuffer<ReadOnlyMemory<char>>>> _getKeyValues;
DataView\InternalSchemaDefinition.cs (4)
30public Dictionary<string, AnnotationInfo> Annotations { get; } 40Dictionary<string, AnnotationInfo> metadataInfos) : 49Dictionary<string, AnnotationInfo> metadataInfos) : 54Delegate generator = null, Dictionary<string, AnnotationInfo> metadataInfos = null)
DataView\Transposer.cs (2)
35private readonly Dictionary<string, int> _nameToICol; 753var nameToCol = new Dictionary<string, int>();
Deprecated\Instances\HeaderSchema.cs (7)
71private volatile Dictionary<string, int> _lookup; 102public static FeatureNameCollection Create(int count, Dictionary<int, string> map) 212var dict = new Dictionary<int, string>(); 280var lookup = new Dictionary<string, int>(); 286protected abstract void PopulateLookup(Dictionary<string, int> lookup); 330protected override void PopulateLookup(Dictionary<string, int> lookup) 462protected override void PopulateLookup(Dictionary<string, int> lookup)
EntryPoints\EntryPointNode.cs (19)
72if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>) 205Contracts.Assert(variableType.IsGenericType && variableType.GetGenericTypeDefinition() == typeof(Dictionary<,>) 265private readonly Dictionary<string, EntryPointVariable> _vars; 298type = typeof(Dictionary<,>).MakeGenericType(typeof(string), type); 418private readonly Dictionary<string, List<ParameterBinding>> _inputBindingMap; 420private readonly Dictionary<ParameterBinding, VariableBinding> _inputMap; 424private readonly Dictionary<string, string> _outputMap; 558Dictionary<string, List<ParameterBinding>> inputBindingMap, 559Dictionary<ParameterBinding, VariableBinding> inputMap, 560Dictionary<string, string> outputMap, 593Dictionary<string, string> inputMap, 594Dictionary<string, string> outputMap, 603var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 604var inputParamBindingMap = new Dictionary<ParameterBinding, VariableBinding>(); 735public void RenameAllVariables(Dictionary<string, string> mapping) 748var toModify = new Dictionary<string, string>(); 844public Dictionary<string, List<ParameterBinding>> InputBindingMap => _inputBindingMap; 845public Dictionary<ParameterBinding, VariableBinding> InputMap => _inputMap; 846public Dictionary<string, string> OutputMap => _outputMap;
EntryPoints\InputBuilder.cs (5)
217public JObject GetJsonObject(object instance, Dictionary<string, List<ParameterBinding>> inputBindingMap, Dictionary<ParameterBinding, VariableBinding> inputMap) 338else if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>) && 593var dict = new Dictionary<string, T>(); 729public JObject GetJsonObject(Dictionary<string, string> outputMap)
Evaluators\AnomalyDetectionEvaluator.cs (5)
129out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 204var result = new Dictionary<string, IDataView>(); 601var resultDict = ((IEvaluator)this).Evaluate(roles); 664private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 827var metrics = evaluator.Evaluate(data);
Evaluators\BinaryClassifierEvaluator.cs (14)
218out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 369var result = new Dictionary<string, IDataView>(); 824var resultDict = ((IEvaluator)this).Evaluate(roles); 872var resultDict = ((IEvaluator)this).Evaluate(roles); 951var resultDict = ((IEvaluator)this).Evaluate(roles); 997var resultDict = ((IEvaluator)this).Evaluate(roles); 1355private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 1413private protected override void PrintAdditionalMetricsCore(IChannel ch, Dictionary<string, IDataView>[] metrics) 1449private bool TryGetPrMetrics(Dictionary<string, IDataView>[] metrics, out IDataView pr) 1456var dict = metrics[i]; 1516var metrics = evaluator.Evaluate(data); 1546private static IDataView ExtractWarnings(IHost host, Dictionary<string, IDataView> metrics) 1559private static IDataView ExtractOverallMetrics(IHost host, Dictionary<string, IDataView> metrics, IMamlEvaluator evaluator) 1574private static IDataView ExtractConfusionMatrix(IHost host, Dictionary<string, IDataView> metrics)
Evaluators\ClusteringEvaluator.cs (4)
81var resultDict = ((IEvaluator)this).Evaluate(rolesMappedData); 160out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 214var result = new Dictionary<string, IDataView> 872var metrics = evaluator.Evaluate(data);
Evaluators\EvaluatorBase.cs (7)
31Dictionary<string, IDataView> IEvaluator.Evaluate(RoleMappedData data) 38var dict = ProcessData(data.Data, data.Schema, activeCols, agg, dictionaries); 130private Dictionary<string, IDataView> ProcessData(IDataView data, RoleMappedSchema schema, 178Func<Dictionary<string, IDataView>> consolidate; 203out Action<uint, ReadOnlyMemory<char>, TAgg> addAgg, out Func<Dictionary<string, IDataView>> consolidate); 304public void GetWarnings(Dictionary<string, IDataView> dict, IHostEnvironment env) 398private readonly Dictionary<TStrat, TAgg> _dict;
Evaluators\EvaluatorUtils.cs (14)
30private static volatile Dictionary<string, Func<IHostEnvironment, IMamlEvaluator>> _knownEvaluatorFactories; 32public static Dictionary<string, Func<IHostEnvironment, IMamlEvaluator>> Instance 36Dictionary<string, Func<IHostEnvironment, IMamlEvaluator>> result = _knownEvaluatorFactories; 39var tmp = new Dictionary<string, Func<IHostEnvironment, IMamlEvaluator>> 68var map = DefaultEvaluatorTable.Instance; 92var map = DefaultEvaluatorTable.Instance; 466var slotNames = new Dictionary<string, int>(); 554int[] indices, Dictionary<ReadOnlyMemory<char>, int> reconciledKeyNames) 611var keyNames = new Dictionary<ReadOnlyMemory<char>, int>(); 679var keyNames = new Dictionary<ReadOnlyMemory<char>, int>(); 813var vectorSizes = new Dictionary<string, int>(); 814var firstDvSlotNames = new Dictionary<string, VBuffer<ReadOnlyMemory<char>>>(); 817var firstDvKeyNoNamesColumns = new Dictionary<string, ulong>(); 1731public static void PrintWarnings(IChannel ch, Dictionary<string, IDataView> metrics)
Evaluators\MamlEvaluator.cs (7)
27void PrintFoldResults(IChannel ch, Dictionary<string, IDataView> metrics); 41void PrintAdditionalMetrics(IChannel ch, params Dictionary<string, IDataView>[] metrics); 107Dictionary<string, IDataView> IEvaluator.Evaluate(RoleMappedData data) 155void IMamlEvaluator.PrintFoldResults(IChannel ch, Dictionary<string, IDataView> metrics) 167private protected virtual void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 202void IMamlEvaluator.PrintAdditionalMetrics(IChannel ch, params Dictionary<string, IDataView>[] metrics) 214private protected virtual void PrintAdditionalMetricsCore(IChannel ch, Dictionary<string, IDataView>[] metrics)
Evaluators\MulticlassClassificationEvaluator.cs (5)
141out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 246var result = new Dictionary<string, IDataView> 562var resultDict = ((IEvaluator)this).Evaluate(roles); 919private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 1101var metrics = evaluator.Evaluate(data);
Evaluators\MultiOutputRegressionEvaluator.cs (4)
96out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 160var result = new Dictionary<string, IDataView>(); 662private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 787var metrics = evaluator.Evaluate(data);
Evaluators\QuantileRegressionEvaluator.cs (2)
488private protected override void PrintFoldResultsCore(IChannel ch, Dictionary<string, IDataView> metrics) 572var metrics = evaluator.Evaluate(data);
Evaluators\RankingEvaluator.cs (6)
159out Action<uint, ReadOnlyMemory<char>, Aggregator> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 238var result = new Dictionary<string, IDataView>(); 264var resultDict = ((IEvaluator)this).Evaluate(roles); 900private protected override void PrintAdditionalMetricsCore(IChannel ch, Dictionary<string, IDataView>[] metrics) 918private bool TryGetGroupSummaryMetrics(Dictionary<string, IDataView>[] metrics, out IDataView gs) 1098var metrics = evaluator.Evaluate(data);
Evaluators\RegressionEvaluator.cs (2)
183var resultDict = ((IEvaluator)this).Evaluate(roles); 399var metrics = evaluator.Evaluate(data);
Evaluators\RegressionEvaluatorBase.cs (2)
51out Action<uint, ReadOnlyMemory<char>, TAgg> addAgg, out Func<Dictionary<string, IDataView>> consolidate) 108var result = new Dictionary<string, IDataView>();
Model\Pfa\BoundPfaContext.cs (1)
36private readonly Dictionary<string, string> _nameToVarName;
Prediction\CalibratorCatalog.cs (1)
124var outColumns = inputSchema.ToDictionary(x => x.Name);
Training\TrainerEstimatorBase.cs (1)
85var outColumns = inputSchema.ToDictionary(x => x.Name);
Transforms\ColumnBindingsBase.cs (1)
256private readonly Dictionary<string, int> _nameToInfoIndex;
Transforms\ColumnConcatenatingEstimator.cs (1)
148var result = inputSchema.ToDictionary(x => x.Name);
Transforms\ColumnCopying.cs (1)
76var resultDic = inputSchema.ToDictionary(x => x.Name);
Transforms\ColumnSelecting.cs (1)
566var columnDict = new Dictionary<string, List<int>>();
Transforms\FeatureContributionCalculationTransformer.cs (1)
349var result = inputSchema.ToDictionary(x => x.Name);
Transforms\Hashing.cs (1)
1956var result = inputSchema.ToDictionary(x => x.Name);
Transforms\InvertHashUtils.cs (1)
153private readonly Dictionary<int, HashSet<Pair>> _slotToValueSet;
Transforms\KeyToValue.cs (1)
637var result = inputSchema.ToDictionary(x => x.Name);
Transforms\KeyToVector.cs (1)
821var result = inputSchema.ToDictionary(x => x.Name);
Transforms\NAFilter.cs (1)
77private readonly Dictionary<int, int> _srcIndexToInfoIndex;
Transforms\Normalizer.cs (1)
347var result = inputSchema.ToDictionary(x => x.Name);
Transforms\OneToOneTransformerBase.cs (1)
93protected readonly Dictionary<int, int> ColMapNewToOld;
Transforms\TypeConverting.cs (1)
625var result = inputSchema.ToDictionary(x => x.Name);
Transforms\ValueMapping.cs (5)
93var resultDic = inputSchema.ToDictionary(x => x.Name); 319Dictionary<TValue, uint> keyTypeValueMapping = new Dictionary<TValue, uint>(); 837private readonly Dictionary<TKey, TValue> _mapping; 840private Dictionary<TKey, TValue> CreateDictionary() 843return new Dictionary<ReadOnlyMemory<char>, TValue>(new ReadOnlyMemoryUtils.ReadonlyMemoryCharComparer()) as Dictionary<TKey, TValue>;
Transforms\ValueToKeyMappingEstimator.cs (1)
181var result = inputSchema.ToDictionary(x => x.Name);
Microsoft.ML.DataView (2)
DataViewSchema.cs (2)
22private readonly Dictionary<string, int> _nameMap; 431var nameMap = new Dictionary<string, int>();
Microsoft.ML.Ensemble (1)
Selector\SubModelSelector\BaseSubModelSelector.cs (1)
93var metricsDict = evaluator.Evaluate(scoredTestData);
Microsoft.ML.EntryPoints (23)
CrossValidationMacro.cs (7)
179var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 180var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 185var outputMap = new Dictionary<string, string>(); 208var mapping = new Dictionary<string, string>(); 318var combineInputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 319var combineInputMap = new Dictionary<ParameterBinding, VariableBinding>(); 337var combineOutputMap = new Dictionary<string, string>();
MacroUtils.cs (6)
124var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 125var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 135var outputMap = new Dictionary<string, string>(); 147var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 148var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 158var outputMap = new Dictionary<string, string>();
OneVersusAllMacro.cs (7)
60var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 61var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 66var outputMap = new Dictionary<string, string>(); 78var mapping = new Dictionary<string, string>(); 172var inputBindingMap = new Dictionary<string, List<ParameterBinding>>(); 173var inputMap = new Dictionary<ParameterBinding, VariableBinding>(); 182var outputMap = new Dictionary<string, string>();
TrainTestMacro.cs (3)
159Dictionary<string, List<ParameterBinding>> inputBindingMap; 160Dictionary<ParameterBinding, VariableBinding> inputMap; 162Dictionary<string, string> outputMap;
Microsoft.ML.Fairlearn (10)
Metrics\FairlearnMetricCatalog.cs (9)
85var res = GroupIds.Select((id, i) => 96var groupMetric = res.Select(kv => (kv.Key, _context.BinaryClassification.EvaluateNonCalibrated(kv.Value))) 113public Dictionary<string, double> Overall() 118Dictionary<string, double> metricsDict = new Dictionary<string, double> 187var groupMetric = new Dictionary<object, RegressionMetrics>(); 242public Dictionary<string, double> DifferenceBetweenGroups() 244Dictionary<string, double> diffDict = new Dictionary<string, double>(); 254public Dictionary<string, double> Overall() 259Dictionary<string, double> metricsDict = new Dictionary<string, double>
Metrics\GroupMetric.cs (1)
18Dictionary<string, double> Overall();
Microsoft.ML.Fairlearn.Tests (3)
MetricTest.cs (3)
46Dictionary<string, double> metricOverall = regressionMetric.Overall(); 49Dictionary<string, double> diff = regressionMetric.DifferenceBetweenGroups(); 75var metricOverall = metrics.Overall();
Microsoft.ML.FastTree (20)
Dataset\Dataset.cs (4)
337Dictionary<string, DatasetSkeletonQueryDocData> auxData = _datasetSkeleton.AuxiliaryData; 338Dictionary<string, DatasetSkeletonQueryDocData> newAuxData = new Dictionary<string, DatasetSkeletonQueryDocData>(); 430public Dictionary<string, DatasetSkeletonQueryDocData> AuxiliaryData { get; set; } 806Dictionary<string, bool> auxNames = new Dictionary<string, bool>();
Dataset\DatasetUtils.cs (1)
48Dictionary<uint, int> uvalToOrder = new Dictionary<uint, int>();
FastTree.cs (3)
3301var keyValues = new Dictionary<string, object>(); 3343public TreeNode(Dictionary<string, object> keyValues) 3348public Dictionary<string, object> KeyValues { get; }
GamModelParameters.cs (2)
51private readonly Dictionary<int, int> _inputFeatureToShapeFunctionMap; 721var metricDict = _eval.Evaluate(_dataForEvaluator);
Training\ScoreTracker.cs (3)
144private static readonly Dictionary<int, Dictionary<int, double>> _treeMultiplierMap = new Dictionary<int, Dictionary<int, double>>();
TreeEnsemble\InternalRegressionTree.cs (4)
1168ref int evaluatorCounter, Dictionary<int, int> featureToId) 1174Dictionary<int, int> categoricalSplitNodeToId = new Dictionary<int, int>(); 1242ref int evaluatorCounter, Dictionary<int, int> featureToId, Dictionary<int, int> categoricalSplitNodeToId)
TreeEnsemble\InternalTreeEnsemble.cs (2)
119Dictionary<int, int> featureToID = new Dictionary<int, int>(); //Mapping from feature to ini input id 311internal string ToGainSummary(FeaturesToContentMap fmap, Dictionary<int, int> featureToID, int prefix, bool includeZeroGainFeatures, bool normalize, int startingCommentNumber)
TreeEnsembleFeaturizationEstimator.cs (1)
134var result = inputSchema.ToDictionary(x => x.Name);
Microsoft.ML.GenAI.Core (15)
Extension\ModuleExtension.cs (15)
18var stateDict = model.state_dict(); 28public static Dictionary<string, long> GetSizeForEachDynamicLayerInBytes(this nn.Module model) 37var dict = new Dictionary<string, long>(); 47var subDict = value.GetSizeForEachDynamicLayerInBytes(); 119Dictionary<string, string> deviceMap, 152var childrenDeviceMap = deviceMap.Where(x => x.Key.StartsWith($"{key}.")).ToDictionary(x => x.Key.Substring($"{key}.".Length), x => x.Value); 169public static Dictionary<string, string> InferDeviceMapForEachLayer( 172Dictionary<string, long> deviceSizeMapInByte) 174var layerSizeMap = model.GetSizeForEachDynamicLayerInBytes(); 176var deviceMap = new Dictionary<string, string>(); 180var remainingLayerSizeMap = layerSizeMap.Where(x => !deviceMap.ContainsKey(x.Key)).ToDictionary(x => x.Key, x => x.Value); 211public static Dictionary<string, string> InferDeviceMapForEachLayer( 219var deviceMap = new Dictionary<string, string>(); 254var stateDict = model.state_dict(); 272var stateDict = model.state_dict();
Microsoft.ML.GenAI.LLaMA (3)
LlamaForCausalLM.cs (2)
53var embeddingWeight = model.Embedding.state_dict(); 149var deviceMap = model.InferDeviceMapForEachLayer(
LlamaTokenizerHelper.cs (1)
27private static readonly Dictionary<string, int> _specialTokens = new()
Microsoft.ML.GenAI.Mistral (5)
Mistral_7B_0_3ChatTemplateBuilder.cs (1)
171var propertiesSchemas = new Dictionary<string, JsonSchema>();
MistralForCausalLM.cs (1)
99var deviceMap = model.InferDeviceMapForEachLayer(
MistralTokenizerHelper.cs (3)
61Dictionary<string, int>? additionalSpecialTokens = null) 63var specialTokens = new Dictionary<string, int> 94Dictionary<string, int> specialTokens,
Microsoft.ML.GenAI.Phi (3)
Phi2\Phi2ForCasualLM.cs (1)
62var loadedParameters = new Dictionary<string, bool>();
Phi3\Config.cs (1)
128public Dictionary<string, object>? RopeScaling { get; set; }
Phi3\Phi3ForCasualLM.cs (1)
101var deviceMap = model.InferDeviceMapForEachLayer(
Microsoft.ML.GenAI.Phi.Tests (2)
Phi3Tests.cs (2)
105var size = model.GetSizeForEachDynamicLayerInBytes(); 107var sizeInMB = size.ToDictionary(x => x.Key, x => x.Value / 1024 / 1024);
Microsoft.ML.GenAI.Samples (1)
Llama\SFT_Llama_3_2_1B.cs (1)
77var stateDict = pipeline.TypedModel.state_dict();
Microsoft.ML.ImageAnalytics (6)
ImageGrayscale.cs (1)
249var result = inputSchema.ToDictionary(x => x.Name);
ImageLoader.cs (1)
440var result = inputSchema.ToDictionary(x => x.Name);
ImagePixelExtractor.cs (1)
812var result = inputSchema.ToDictionary(x => x.Name);
ImageResizer.cs (1)
512var result = inputSchema.ToDictionary(x => x.Name);
MLImage.cs (1)
427private static readonly Dictionary<string, SKEncodedImageFormat> _extensionToEncodingFormat = new Dictionary<string, SKEncodedImageFormat>(StringComparer.OrdinalIgnoreCase)
VectorToImageTransform.cs (1)
746var result = inputSchema.ToDictionary(x => x.Name);
Microsoft.ML.IntegrationTests (2)
Common.cs (2)
29var types = new Dictionary<string, Type>(); 30var counts = new Dictionary<string, int>();
Microsoft.ML.InternalCodeAnalyzer (1)
BestFriendAnalyzer.cs (1)
63var assemblyHasAttrMap = new Dictionary<IAssemblySymbol, bool>(SymbolEqualityComparer.Default);
Microsoft.ML.LightGbm (26)
LightGbmArguments.cs (2)
37private protected static Dictionary<string, string> NameMapping = new Dictionary<string, string>() 177internal void UpdateParameters(Dictionary<string, object> res)
LightGbmBinaryTrainer.cs (2)
181internal override Dictionary<string, object> ToDictionary(IHost host) 183var res = base.ToDictionary(host);
LightGbmMulticlassTrainer.cs (2)
122internal override Dictionary<string, object> ToDictionary(IHost host) 124var res = base.ToDictionary(host);
LightGbmRankingTrainer.cs (2)
165internal override Dictionary<string, object> ToDictionary(IHost host) 167var res = base.ToDictionary(host);
LightGbmRegressionTrainer.cs (2)
150internal override Dictionary<string, object> ToDictionary(IHost host) 152var res = base.ToDictionary(host);
LightGbmTrainerBase.cs (8)
54private protected static Dictionary<string, string> NameMapping = new Dictionary<string, string>() 281internal virtual Dictionary<string, object> ToDictionary(IHost host) 284Dictionary<string, object> res = new Dictionary<string, object>(); 330private protected readonly Dictionary<string, object> GbmOptions; 415var modelParameters = Booster.GetParameters(modelText); 497var otherParams = ParallelTraining.AdditionalParams(); 549internal Dictionary<string, object> GetGbmParameters() => GbmOptions; 891Dictionary<int, float> ivPair = new Dictionary<int, float>();
Parallel\IParallel.cs (1)
68Dictionary<string, string> AdditionalParams();
Parallel\SingleTrainer.cs (1)
44Dictionary<string, string> IParallel.AdditionalParams()
WrappedLightGbmBooster.cs (4)
25public Booster(Dictionary<string, object> parameters, Dataset trainset, Dataset validset = null) 201public static Dictionary<string, string> GetParameters(string modelString) 203Dictionary<string, string> parameters = new Dictionary<string, string>(); 233Dictionary<string, string> kvPairs = new Dictionary<string, string>();
WrappedLightGbmInterface.cs (1)
250public static string JoinParameters(Dictionary<string, object> parameters)
WrappedLightGbmTraining.cs (1)
19Dictionary<string, object> parameters, Dataset dtrain, Dataset dvalid = null, int numIteration = 100,
Microsoft.ML.Mkl.Components (1)
VectorWhitening.cs (1)
893var result = inputSchema.ToDictionary(x => x.Name);
Microsoft.ML.NugetPackageVersionUpdater (1)
Program.cs (1)
27Dictionary<string, string> packageVersions = new Dictionary<string, string>();
Microsoft.ML.OnnxConverter (1)
OnnxContextImpl.cs (1)
25private readonly Dictionary<string, string> _columnNameMap;
Microsoft.ML.OnnxTransformer (11)
OnnxTransform.cs (4)
247var shapeDictionary = new Dictionary<string, int[]>(); 665public Dictionary<string, DisposableNamedOnnxValue> Outputs; 1052var result = inputSchema.ToDictionary(x => x.Name); 1053var resultDic = inputSchema.ToDictionary(x => x.Name);
OnnxUtils.cs (7)
262var inputTypePool = new Dictionary<string, DataViewType>(); 266var initializerTypePool = new Dictionary<string, DataViewType>(); 270var outputTypePool = new Dictionary<string, DataViewType>(); 272var casterPool = new Dictionary<string, Func<NamedOnnxValue, object>>(); 298Dictionary<string, DataViewType> typePool, 299Dictionary<string, Func<NamedOnnxValue, object>> casterPool) 510private static readonly Dictionary<Type, InternalDataKind> _typeToKindMap =
Microsoft.ML.OnnxTransformerTest (5)
OnnxTransformTests.cs (5)
843var inputDict0 = new Dictionary<int, float> { { 0, 94.17f }, { 1, 17.36f } }; 844var inputDict1 = new Dictionary<int, float> { { 0, 12.28f }, { 1, 75.12f } }; 898var shapeDictionary = new Dictionary<string, int[]>() { { nameof(InputWithCustomShape.input), new int[] { 3, 3 } } }; 983var shapeDictionary = new Dictionary<string, int[]>() { 1068var shapeDictionary = new Dictionary<string, int[]>() { { nameof(InputWithCustomShape.input), new int[] { 3, 3 } } };
Microsoft.ML.PCA (1)
PcaTransformer.cs (1)
818var result = inputSchema.ToDictionary(x => x.Name);
Microsoft.ML.Predictor.Tests (1)
CompareBaselines.cs (1)
69var names2 = Directory.EnumerateFiles(dir2, "*.txt")
Microsoft.ML.Recommender (1)
MatrixFactorizationTrainer.cs (1)
579var outColumns = inputSchema.ToDictionary(x => x.Name);
Microsoft.ML.ResultProcessor (30)
ResultProcessor.cs (30)
55public Dictionary<string, string> DefaultSettings; 60public Dictionary<string, object> SameHeaderValues; 62public static Dictionary<string, Dictionary<string, string>> MapDefaultSettingToLearner = new Dictionary<string, Dictionary<string, string>>(); 136Dictionary<string, string> temp; 152private Dictionary<string, string> GetDefaultSettings(IHostEnvironment env, string predictorName, string[] extraAssemblies = null) 245public Dictionary<string, string> Settings; 250public Dictionary<string, ResultMetric> Results; 255public Dictionary<string, ResultMetric> PerFoldResults; 527Dictionary<string, string> predictorSettings; 581var runResults = ParseResultLines(fileResults, cmd, out metricValue, null); 583var foldResults = (cmd != null && cmd.IncludePerFoldResults ? GetPerFoldResults(lines) : null); 599var runResults = ParseResultLines(fileResults, cmd, out metricValue, null); 643var foldResults = (cmd != null && cmd.IncludePerFoldResults ? GetPerFoldResults(lines) : null); 788private static Dictionary<string, ResultMetric> ParseResultLines(List<string> fileResults, ResultProcessorArguments cmd, out Double metricValue, string metricName) 792Dictionary<string, ResultMetric> runResults = new Dictionary<string, ResultMetric>(); 888protected static Dictionary<string, ResultMetric> GetPerFoldResults(IList<string> lines) 890Dictionary<string, ResultMetric> perFoldMetrics = new Dictionary<string, ResultMetric>(); 892Dictionary<int, Dictionary<string, float>> foldResults = new Dictionary<int, Dictionary<string, float>>(); 927var metricToFoldValuesDict = new Dictionary<string, Dictionary<int, float>>(); 935Dictionary<int, float> metricDict = null; 961protected static KeyValuePair<int, Dictionary<string, float>> AddFoldResults(IList<string> lines) 968return new KeyValuePair<int, Dictionary<string, float>>(-1, null); 974return new KeyValuePair<int, Dictionary<string, float>>(-1, null); 985Dictionary<string, float> valuesDict = new Dictionary<string, float>(); 1000return new KeyValuePair<int, Dictionary<string, float>>(foldIdx, valuesDict);
Microsoft.ML.Samples (29)
Dynamic\Transforms\Conversion\MapValue.cs (3)
31var timeframeMap = new Dictionary<string, string>(); 40var timeframeKeyMap = new Dictionary<string, uint>(); 48var scoreMap = new Dictionary<int, string>();
Dynamic\Transforms\Conversion\MapValueToArray.cs (1)
35var timeframeMap = new Dictionary<string, int[]>();
Dynamic\Transforms\TimeSeries\LocalizeRootCause.cs (11)
42Dictionary<string, Object> dic1 = new Dictionary<string, Object>(); 48Dictionary<string, Object> dic2 = new Dictionary<string, Object>(); 54Dictionary<string, Object> dic3 = new Dictionary<string, Object>(); 60Dictionary<string, Object> dic4 = new Dictionary<string, Object>(); 66Dictionary<string, Object> dic5 = new Dictionary<string, Object>(); 72Dictionary<string, Object> dic6 = new Dictionary<string, Object>(); 78Dictionary<string, Object> dic7 = new Dictionary<string, Object>(); 84Dictionary<string, Object> dic8 = new Dictionary<string, Object>(); 90Dictionary<string, Object> dic9 = new Dictionary<string, Object>(); 99private static Dictionary<string, Object> GetAnomalyDimension() 101Dictionary<string, Object> dim = new Dictionary<string, Object>();
Dynamic\Transforms\TimeSeries\LocalizeRootCauseMultidimension.cs (14)
48Dictionary<string, Object> dic1 = new Dictionary<string, Object> 56Dictionary<string, Object> dic2 = new Dictionary<string, Object>(); 62Dictionary<string, Object> dic3 = new Dictionary<string, Object>(); 68Dictionary<string, Object> dic4 = new Dictionary<string, Object>(); 74Dictionary<string, Object> dic5 = new Dictionary<string, Object>(); 80Dictionary<string, Object> dic6 = new Dictionary<string, Object>(); 86Dictionary<string, Object> dic7 = new Dictionary<string, Object>(); 92Dictionary<string, Object> dic8 = new Dictionary<string, Object>(); 98Dictionary<string, Object> dic9 = new Dictionary<string, Object>(); 104Dictionary<string, Object> dic10 = new Dictionary<string, Object>(); 110Dictionary<string, Object> dic11 = new Dictionary<string, Object>(); 116Dictionary<string, Object> dic12 = new Dictionary<string, Object>(); 125private static Dictionary<string, Object> GetAnomalyDimension() 127Dictionary<string, Object> dim = new Dictionary<string, Object>();
Microsoft.ML.SearchSpace (20)
Converter\ParameterConverter.cs (1)
20var array = JsonSerializer.Deserialize<Dictionary<string, Parameter>>(ref reader, options).ToArray();
Converter\SearchSpaceConverter.cs (2)
18var optionKVPairs = JsonSerializer.Deserialize<Dictionary<string, OptionBase>>(ref reader, options);
Option\NestOption.cs (1)
18private readonly Dictionary<string, OptionBase> _options = new Dictionary<string, OptionBase>();
Parameter.cs (6)
233public int Count => ParameterType == ParameterType.Object ? (_value as Dictionary<string, Parameter>).Count : 1; 306(_value as Dictionary<string, Parameter>).Clear(); 313(_value as Dictionary<string, Parameter>).Add(key, value); 320return (_value as Dictionary<string, Parameter>).TryGetValue(key, out value); 327(_value as Dictionary<string, Parameter>).Add(item.Key, item.Value); 334return (_value as Dictionary<string, Parameter>).Contains(item);
SearchSpace.cs (10)
29private readonly Dictionary<string, OptionBase> _options; 172private Dictionary<string, OptionBase> GetOptionsFromType(Type typeInfo) 174var fieldOptions = GetOptionsFromField(typeInfo); 175var propertyOptions = GetOptionsFromProperty(typeInfo); 182var propertyOptions = GetOptionsFromProperty(typeInfo); 183var fieldOptions = GetOptionsFromField(typeInfo); 193private Dictionary<string, OptionBase> GetOptionsFromField(Type typeInfo) 196var res = new Dictionary<string, OptionBase>(); 240private Dictionary<string, OptionBase> GetOptionsFromProperty(Type typeInfo) 243var res = new Dictionary<string, OptionBase>();
Microsoft.ML.StandardTrainers (4)
FactorizationMachine\FactorizationMachineTrainer.cs (1)
647var outColumns = inputSchema.ToDictionary(x => x.Name);
Standard\LogisticRegression\LogisticRegression.cs (1)
277Dictionary<int, int> weightIndicesInvMap = null;
Standard\MulticlassClassification\MetaMulticlassTrainer.cs (1)
154var outColumns = inputSchema.ToDictionary(x => x.Name);
Standard\Simple\SimpleTrainers.cs (1)
314var outColumns = inputSchema.ToDictionary(x => x.Name);
Microsoft.ML.Sweeper (4)
Algorithms\KdoSweeper.cs (2)
356Dictionary<string, int> labelToIndex = new Dictionary<string, int>(); 399Dictionary<string, int> labelToIndex = new Dictionary<string, int>();
ISweeper.cs (2)
109private readonly Dictionary<string, IParameterValue> _parameterValues; 129public ParameterSet(Dictionary<string, IParameterValue> paramValues, int hash)
Microsoft.ML.TensorFlow (3)
TensorflowTransform.cs (3)
679public Dictionary<string, Tensor> Outputs; 1033var result = inputSchema.ToDictionary(x => x.Name); 1034var resultDic = inputSchema.ToDictionary(x => x.Name);
Microsoft.ML.Tests (3)
TextLoaderTests.cs (2)
735var irisFirstRow = new Dictionary<string, float>(); 844var irisFirstRow = new Dictionary<string, float>();
TrainerEstimators\TreeEstimators.cs (1)
519var gbmParams = gbmTrainer.GetGbmParameters();
Microsoft.ML.TimeSeries (65)
IidChangePointDetector.cs (1)
273var resultDic = inputSchema.ToDictionary(x => x.Name);
IidSpikeDetector.cs (1)
249var resultDic = inputSchema.ToDictionary(x => x.Name);
PolynomialUtils.cs (1)
285var hash = new Dictionary<Complex, FactorMultiplicity>();
RootCauseAnalyzer.cs (47)
48Tuple<PointTree, PointTree, Dictionary<Dictionary<string, object>, TimeSeriesPoint>> pointInfo = GetPointsInfo(src, dimensionInfo); 51Dictionary<Dictionary<string, Object>, TimeSeriesPoint> dimPointMapping = pointInfo.Item3; 75private DimensionInfo SeparateDimension(Dictionary<string, Object> dimensions, Object aggSymbol) 94private Tuple<PointTree, PointTree, Dictionary<Dictionary<string, object>, TimeSeriesPoint>> GetPointsInfo(RootCauseLocalizationInput src, DimensionInfo dimensionInfo) 99Dictionary<Dictionary<string, object>, TimeSeriesPoint> dimPointMapping = new Dictionary<Dictionary<string, object>, TimeSeriesPoint>(dc); 102Dictionary<string, Object> subDim = GetSubDim(src.AnomalyDimension, dimensionInfo.DetailDims); 125return new Tuple<PointTree, PointTree, Dictionary<Dictionary<string, Object>, TimeSeriesPoint>>(pointTree, anomalyTree, dimPointMapping); 128protected Dictionary<string, Object> GetSubDim(Dictionary<string, Object> dimension, List<string> keyList) 133private void LocalizeRootCausesByDimension(PointTree anomalyTree, PointTree pointTree, Dictionary<string, Object> anomalyDimension, List<string> aggDims) 202Dictionary<string, int> pointDistribution = new Dictionary<string, int>(); 251Dictionary<BestDimension, double> entroyGainRatioMap = new Dictionary<BestDimension, double>(); 290private IEnumerable<BestDimension> SelectOrderedDimensions(Dictionary<string, List<TimeSeriesPoint>> pointChildren, Dictionary<string, List<TimeSeriesPoint>> anomalyChildren, List<string> aggDim) 293Dictionary<BestDimension, double> entropyRatioMap = new Dictionary<BestDimension, double>(); 350private void GetRootCauseDirectionAndScore(Dictionary<Dictionary<string, Object>, TimeSeriesPoint> dimPointMapping, Dictionary<string, Object> anomalyRoot, RootCause dst, double beta, PointTree pointTree, AggregateType aggType, Object aggSymbol) 401private TimeSeriesPoint GetPointByDimension(Dictionary<Dictionary<string, Object>, TimeSeriesPoint> dimPointMapping, Dictionary<string, Object> dimension, PointTree pointTree, AggregateType aggType, Object aggSymbol) 411Dictionary<string, Object> subDim = GetSubDim(dimension, dimensionInfo.DetailDims); 478private IEnumerable<BestDimension> OrderDimensions(SortedDictionary<BestDimension, double> valueMap, Dictionary<BestDimension, double> valueRatioMap, double meanGain, bool isLeavesLevel = true) 535private BestDimension GetBestDimension(BestDimension best, KeyValuePair<BestDimension, double> dimension, Dictionary<BestDimension, Double> valueRatioMap) 637private static Dictionary<string, Object> UpdateDimensionValue(Dictionary<string, Object> dimension, string key, Object value) 639Dictionary<string, Object> newDim = new Dictionary<string, Object>(dimension); 669private double GetDimensionEntropy(Dictionary<string, int> pointDis, Dictionary<string, int> anomalyDis) 683private double GetDimensionIntrinsicValue(Dictionary<string, int> pointDis) 696private int GetTotalNumber(Dictionary<string, int> distribution) 706private void UpdateDistribution(Dictionary<string, int> distribution, List<TimeSeriesPoint> points, string dimKey) 722private static bool ContainsAll(Dictionary<string, Object> bigDictionary, Dictionary<string, Object> smallDictionary) 756internal Dictionary<string, List<TimeSeriesPoint>> ChildrenNodes; 769internal Dictionary<string, int> AnomalyDis; 770internal Dictionary<string, int> PointDis; 804internal class DimensionComparer : EqualityComparer<Dictionary<string, object>> 806public override bool Equals(Dictionary<string, object> x, Dictionary<string, object> y) 838public override int GetHashCode(Dictionary<string, object> obj)
RootCauseLocalizationType.cs (9)
44public Dictionary<string, Object> AnomalyDimension { get; set; } 61public RootCauseLocalizationInput(DateTime anomalyTimestamp, Dictionary<string, Object> anomalyDimension, List<MetricSlice> slices, AggregateType aggregateType, Object aggregateSymbol) 70public RootCauseLocalizationInput(DateTime anomalyTimestamp, Dictionary<string, Object> anomalyDimension, List<MetricSlice> slices, Object aggregateSymbol) 135public Dictionary<string, Object> Dimension; 141public RootCauseItem(Dictionary<string, Object> rootCause) 147public RootCauseItem(Dictionary<string, Object> rootCause, List<string> path) 206public Dictionary<string, Object> Dimension { get; set; } 212public TimeSeriesPoint(Dictionary<string, Object> dimension) 218public TimeSeriesPoint(double value, double expectedValue, bool isAnomaly, Dictionary<string, Object> dimension)
SRCNNAnomalyDetector.cs (1)
281var resultDic = inputSchema.ToDictionary(x => x.Name);
SsaChangePointDetector.cs (1)
309var resultDic = inputSchema.ToDictionary(x => x.Name);
SSaForecasting.cs (1)
339var resultDic = inputSchema.ToDictionary(x => x.Name);
SsaSpikeDetector.cs (1)
288var resultDic = inputSchema.ToDictionary(x => x.Name);
STL\InnerStl.cs (1)
281private static readonly Dictionary<int, List<double>> _xValuesPool;
STL\Loess.cs (1)
33private readonly Dictionary<int, LocalRegression> _neighbors;
Microsoft.ML.TimeSeries.Tests (31)
TimeSeriesDirectApi.cs (31)
970Dictionary<string, Object> expectedDim = new Dictionary<string, Object>(); 999Dictionary<string, Object> expectedDim = new Dictionary<string, Object>(); 1047Dictionary<string, object> expectedDim = new Dictionary<string, object> 1087Dictionary<string, Object> dic1 = new Dictionary<string, Object>(); 1093Dictionary<string, Object> dic2 = new Dictionary<string, Object>(); 1099Dictionary<string, Object> dic3 = new Dictionary<string, Object>(); 1105Dictionary<string, Object> dic4 = new Dictionary<string, Object>(); 1111Dictionary<string, Object> dic5 = new Dictionary<string, Object>(); 1117Dictionary<string, Object> dic6 = new Dictionary<string, Object>(); 1123Dictionary<string, Object> dic7 = new Dictionary<string, Object>(); 1129Dictionary<string, Object> dic8 = new Dictionary<string, Object>(); 1135Dictionary<string, Object> dic9 = new Dictionary<string, Object>(); 1141Dictionary<string, Object> dic10 = new Dictionary<string, Object>(); 1147Dictionary<string, Object> dic11 = new Dictionary<string, Object>(); 1153Dictionary<string, Object> dic12 = new Dictionary<string, Object>(); 1162private static Dictionary<string, Object> GetRootCauseAnomalyDimension(object val, object aggSymbol) 1164Dictionary<string, Object> dim = new Dictionary<string, Object>(); 1197Dictionary<string, int> expectedDim = new Dictionary<string, int> 1214Dictionary<string, object> expectedDim = GetRootCauseAnomalyDimension(10, _rootCauseAggSymbolForIntDimValue); 1231Dictionary<string, object> dic1 = new Dictionary<string, object>(); 1237Dictionary<string, object> dic2 = new Dictionary<string, object>(); 1243Dictionary<string, object> dic3 = new Dictionary<string, object>(); 1249Dictionary<string, object> dic4 = new Dictionary<string, object>(); 1255Dictionary<string, object> dic5 = new Dictionary<string, object>(); 1261Dictionary<string, object> dic6 = new Dictionary<string, object>(); 1267Dictionary<string, object> dic7 = new Dictionary<string, object>(); 1273Dictionary<string, object> dic8 = new Dictionary<string, object>(); 1279Dictionary<string, object> dic9 = new Dictionary<string, object>(); 1285Dictionary<string, object> dic10 = new Dictionary<string, object>(); 1291Dictionary<string, object> dic11 = new Dictionary<string, object>(); 1297Dictionary<string, object> dic12 = new Dictionary<string, object>();
Microsoft.ML.Tokenizers (106)
Model\BertTokenizer.cs (14)
28Dictionary<StringSpanOrdinalKey, int> vocab, 29Dictionary<int, string> vocabReverse, 702(Dictionary<StringSpanOrdinalKey, int> vocab, Dictionary<int, string> vocabReverse) = await LoadVocabAsync(vocabStream, useAsync: true, cancellationToken).ConfigureAwait(false); 743(Dictionary<StringSpanOrdinalKey, int> vocab, Dictionary<int, string> vocabReverse) = LoadVocabAsync(vocabStream, useAsync: false).GetAwaiter().GetResult(); 757Dictionary<StringSpanOrdinalKey, int> vocab, 758Dictionary<int, string> vocabReverse, 773Dictionary<string, int> tempSpecialTokens = []; 794Dictionary<string, int> tempSpecialTokens = []; 795Dictionary<string, int> notNormalizedSpecialTokens = []; 814private static void AddSpecialToken(Dictionary<StringSpanOrdinalKey, int> vocab, Dictionary<string, int> specialTokens, string token, bool lowerCase, Dictionary<string, int>? notNormalizedSpecialTokens = null)
Model\BpeOptions.cs (1)
41public Dictionary<string, int>? SpecialTokens { get; set; }
Model\BPETokenizer.cs (12)
32private readonly Dictionary<StringSpanOrdinalKey, (int, string)>? _specialTokens; 33private readonly Dictionary<int, string>? _specialTokensReverse; 130(Dictionary<StringSpanOrdinalKey, int>? vocab, Vec<(string, string)> merges) result = ReadModelDataAsync(vocabStream, mergesStream, useAsync: false).GetAwaiter().GetResult(); 147Dictionary<StringSpanOrdinalKey, int> vocab = new Dictionary<StringSpanOrdinalKey, int>(1000); 237(Dictionary<StringSpanOrdinalKey, int>? vocab, Vec<(string, string)> merges) result = ReadModelDataAsync(vocabStream, mergesStream, useAsync: false).GetAwaiter().GetResult(); 273(Dictionary<StringSpanOrdinalKey, int>? vocab, Vec<(string, string)> merges) result = await ReadModelDataAsync(vocabStream, mergesStream, useAsync: true).ConfigureAwait(false); 294Dictionary<StringSpanOrdinalKey, int>? vocab, 1095internal static async ValueTask<(Dictionary<StringSpanOrdinalKey, int>?, Vec<(string, string)>)> ReadModelDataAsync(Stream vocab, Stream? merges, bool useAsync, CancellationToken cancellationToken = default) 1097Dictionary<StringSpanOrdinalKey, int>? dic = useAsync 1109private readonly Dictionary<StringSpanOrdinalKey, int> _vocab; 1114internal Dictionary<Pair<int>, (int, int)> Merges { get; } 1171private readonly Dictionary<char, string> _charToString = new Dictionary<char, string>();
Model\Cache.cs (1)
13private readonly Dictionary<TKey, TValue> _map;
Model\CodeGenTokenizer.cs (8)
28private readonly Dictionary<StringSpanOrdinalKey, (int Id, string Token)> _vocab; 31private readonly Dictionary<StringSpanOrdinalKey, (int, string)>? _specialTokens; 32private readonly Dictionary<int, string>? _specialTokensReverse; 33private readonly Dictionary<StringSpanOrdinalKeyPair, int> _mergeRanks; 1704internal static readonly Dictionary<string, int> CodeGenSpecialTokens = new() 1747private static Dictionary<StringSpanOrdinalKey, (int, string)> GetVocabulary(Stream vocabularyStream) 1767internal static Dictionary<StringSpanOrdinalKeyPair, int> GetMergeRanks(Stream mergeStream) 1769var mergeRanks = new Dictionary<StringSpanOrdinalKeyPair, int>();
Model\EnglishRobertaTokenizer.cs (9)
23private readonly Dictionary<StringSpanOrdinalKey, int> _vocab; 24private Dictionary<string, int>? _vocabOriginal; 179private static Dictionary<StringSpanOrdinalKey, int> GetVocabulary(Stream vocabularyStream) 181Dictionary<StringSpanOrdinalKey, int>? vocab; 234private Dictionary<string, int> GetVocab() 236Dictionary<string, int>? publicVocab = Volatile.Read(ref _vocabOriginal); 239var vocab = new Dictionary<string, int>(); 1107private readonly Dictionary<int, int> _idToIndex; 1108private readonly Dictionary<string, int> _stringSymbolToIndexMapping;
Model\ModelSourceGenerationContext.cs (1)
10[JsonSerializable(typeof(Dictionary<StringSpanOrdinalKey, int>))]
Model\SentencePieceBaseModel.cs (2)
64internal Dictionary<StringSpanOrdinalKey, int>? InternalSpecialTokens { get; } 66internal Dictionary<int, string>? SpecialTokensReverse { get; }
Model\SentencePieceBpeModel.cs (9)
22private readonly Dictionary<StringSpanOrdinalKey, (int Id, float Score, byte Type)> _vocab = new(); 23private readonly Dictionary<int, string> _vocabReverse = new(); 51var vocab = new Dictionary<string, int>(); 154Dictionary<(int Index, int Len), (int LeftIndex, int LeftLen, int RightIndex, int RightLen)>? revMerge = Encode(text, symbols); 437Dictionary<(int Index, int Len), (int LeftIndex, int LeftLen, int RightIndex, int RightLen)>? revMerge = Encode(text, symbols); 705Dictionary<(int Index, int Len), (int LeftIndex, int LeftLen, int RightIndex, int RightLen)>? revMerge = Encode(text, symbols); 974Dictionary<(int Index, int Len), (int LeftIndex, int LeftLen, int RightIndex, int RightLen)>? revMerge = Encode(text, symbols); 1129private Dictionary<(int Index, int Len), (int LeftIndex, int LeftLen, int RightIndex, int RightLen)>? Encode(ReadOnlySpan<char> text, BpeSymbol[] symbols) 1153Dictionary<(int Index, int Len), (int LeftIndex, int LeftLen, int RightIndex, int RightLen)>? revMerge = null;
Model\TiktokenTokenizer.cs (27)
27private readonly Dictionary<ReadOnlyMemory<byte>, int> _encoder; 28private readonly Dictionary<int, ReadOnlyMemory<byte>> _decoder; 30private readonly Dictionary<StringSpanOrdinalKey, (int Id, string Token)> _vocab; 77Dictionary<ReadOnlyMemory<byte>, int> encoder, 78Dictionary<int, ReadOnlyMemory<byte>> decoder, 79Dictionary<StringSpanOrdinalKey, (int Id, string Token)> vocab, 157internal static async ValueTask<(Dictionary<ReadOnlyMemory<byte>, int>, Dictionary<StringSpanOrdinalKey, (int Id, string Token)>, Dictionary<int, ReadOnlyMemory<byte>>)> LoadTiktokenBpeAsync( 160Dictionary<ReadOnlyMemory<byte>, int> encoder; 161Dictionary<StringSpanOrdinalKey, (int Id, string Token)> vocab; 162Dictionary<int, ReadOnlyMemory<byte>> decoder; 1042private static readonly Dictionary<string, ModelEncoding> _modelToEncoding = 1129private static (Dictionary<string, int> SpecialTokens, Regex Regex, string VocabFile, Type? DataType, string PackageName) GetTiktokenConfigurations(string modelName) => GetTiktokenConfigurations(GetModelEncoding(modelName), modelName); 1131private static (Dictionary<string, int> SpecialTokens, Regex Regex, string VocabFile, Type? DataType, string PackageName) GetTiktokenConfigurations(ModelEncoding modelEncoding, string? modelName = null) 1215private 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); 1227(Dictionary<string, int> SpecialTokens, Regex Regex, string VocabFile, Type? DataType, string PackageName) tiktokenConfiguration = GetTiktokenConfigurations(modelEncoding, modelName); 1239out (Dictionary<ReadOnlyMemory<byte>, int> encoder, Dictionary<StringSpanOrdinalKey, (int Id, string Token)> vocab, Dictionary<int, ReadOnlyMemory<byte>> decoder) cache)) 1330(Dictionary<ReadOnlyMemory<byte>, int> encoder, Dictionary<StringSpanOrdinalKey, (int Id, string Token)> vocab, Dictionary<int, ReadOnlyMemory<byte>> decoder) = 1387(Dictionary<string, int> SpecialTokens, Regex Regex, string _, Type? __, string ___) tiktokenConfiguration = GetTiktokenConfigurations(modelName); 1427(Dictionary<string, int> SpecialTokens, Regex Regex, string _, Type? __, string ___) tiktokenConfiguration = GetTiktokenConfigurations(modelName);
Model\Word.cs (1)
100public void MergeAll(Dictionary<Pair<int>, (int, int)> merges, float? dropout, ref PriorityQueue<Merge>? priorityQueue)
Model\WordPieceTokenizer.cs (12)
29private readonly Dictionary<StringSpanOrdinalKey, int> _vocab; 30private readonly Dictionary<int, string> _vocabReverse; 33Dictionary<StringSpanOrdinalKey, int> vocab, 34Dictionary<int, string> vocabReverse, 92internal static async ValueTask<(Dictionary<StringSpanOrdinalKey, int>, Dictionary<int, string>)> LoadVocabAsync(Stream vocabStream, bool useAsync, CancellationToken cancellationToken = default) 99Dictionary<StringSpanOrdinalKey, int> vocab = new Dictionary<StringSpanOrdinalKey, int>(); 100Dictionary<int, string> vocabReverse = new Dictionary<int, string>(); 163(Dictionary<StringSpanOrdinalKey, int> vocab, Dictionary<int, string> vocabReverse) = LoadVocabAsync(vocabStream, useAsync: false).GetAwaiter().GetResult(); 227(Dictionary<StringSpanOrdinalKey, int> vocab, Dictionary<int, string> vocabReverse) = await LoadVocabAsync(vocabStream, useAsync: true, cancellationToken);
Utils\ByteToUnicodeEncoding.cs (1)
19var byteToUnicodeMapping = Enumerable.Range('!', '~' - '!' + 1)
Utils\LruCache.cs (1)
17private readonly Dictionary<StringSpanOrdinalKey, LinkedListNode<KeyValuePair<string, TValue>>> _cache = new();
Utils\StringSpanOrdinalKey.cs (5)
77private readonly Dictionary<StringSpanOrdinalKey, TValue> _map; 177public static unsafe bool TryGetValue<TValue>(this Dictionary<StringSpanOrdinalKey, TValue> map, ReadOnlySpan<char> key, out TValue value) 185public static bool TryGetValue<TValue>(this Dictionary<StringSpanOrdinalKey, TValue> map, string key, out TValue value) => 188public static unsafe bool TryGetValue<TValue>(this Dictionary<StringSpanOrdinalKeyPair, TValue> map, ReadOnlySpan<char> key1, ReadOnlySpan<char> key2, out TValue value) 197public static bool TryGetValue<TValue>(this Dictionary<StringSpanOrdinalKeyPair, TValue> map, string key1, string key2, out TValue value) =>
Utils\TokenizerExtensions.cs (2)
24public static TValue GetOrAdd<TKey, TValue>(this Dictionary<TKey, TValue> dic, TKey key, TValue setValue) where TKey : notnull 37Dictionary<TValue, TKey> dictionary = new Dictionary<TValue, TKey>();
Microsoft.ML.Tokenizers.Tests (17)
BertTokenizerTests.cs (1)
26Dictionary<string, int> specialTokens = new() {
BpeTests.cs (9)
26private static readonly Dictionary<string, int> _vocabDataWithWordPrefixAndEndOfWordSuffix = 238Dictionary<string, int> vocab, 303var reverseVocabulary = bpe.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 387Dictionary<string, int>? dictionary = JsonSerializer.Deserialize<Dictionary<string, int>>(jsonString); 576private static string WriteToVocabFile(Dictionary<string, int> dic) 579File.WriteAllText(fileName, JsonSerializer.Serialize<Dictionary<string, int>>(dic), Encoding.UTF8); 1000private static Dictionary<string, int>? GetSpecialTokens(JsonElement root) 1004Dictionary<string, int> specialTokens = new Dictionary<string, int>();
CodeGenTests.cs (2)
498var reverseVocab = codeGenTokenizer.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 499var reverseSpecialTokens = codeGenTokenizer.SpecialTokens?.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
EnglishRobertaTests.cs (1)
287var reverseVocab = robertaModel.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
LlamaTests.cs (1)
253var reverseVocabulary = bpe.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key);
src\Microsoft.ML.Tokenizers\Utils\ByteToUnicodeEncoding.cs (1)
19var byteToUnicodeMapping = Enumerable.Range('!', '~' - '!' + 1)
TiktokenTests.cs (1)
26private static readonly Dictionary<string, int> _specialTokens = new Dictionary<string, int>
WordPieceTests.cs (1)
184Dictionary<string, int> specialTokens = new Dictionary<string, int>
Microsoft.ML.TorchSharp (63)
AutoFormerV2\Attention.cs (1)
73var attentionOffsets = new Dictionary<Tuple<int, int>, int>();
AutoFormerV2\ObjectDetectionMetrics.cs (10)
99Dictionary<string, List<Tuple<float, float>>> iouDic = new(); 100Dictionary<string, int> groundTruthBoxes = new(); 118private static float AP50(Dictionary<string, List<Tuple<float, float>>> iouDic, Dictionary<string, int> groundTruthBoxes, float threshold = 0.5f) 136private static float AP50_95(Dictionary<string, List<Tuple<float, float>>> iouDic, Dictionary<string, int> groundTruthBoxes) 179private static void ImageIoU(List<ObjectLabel> objectLabel, List<ObjectLabel> annotation, Dictionary<string, List<Tuple<float, float>>> iouDic, Dictionary<string, int> groundTruthBoxes) 230private static void GenerateIOUDic(List<List<ObjectLabel>> annotations, List<List<ObjectLabel>> objectLabelList, Dictionary<string, List<Tuple<float, float>>> iouDic, Dictionary<string, int> groundTruthBoxes)
AutoFormerV2\ObjectDetectionTrainer.cs (2)
444var outColumns = inputSchema.ToDictionary(x => x.Name); 545var outColumns = inputSchema.ToDictionary(x => x.Name);
NasBert\Modules\Embedding\LearnedPositionalEmbedding.cs (1)
40public override torch.Tensor forward(torch.Tensor input, Dictionary<string, object> param = null)
NasBert\Modules\Embedding\PositionalEmbedding.cs (2)
12internal class PositionalEmbedding : torch.nn.Module<torch.Tensor, Dictionary<string, object>, torch.Tensor> 30public override torch.Tensor forward(torch.Tensor input, Dictionary<string, object> param = null)
NasBert\Modules\Embedding\SinusoidalPositionalEmbedding.cs (1)
66public override torch.Tensor forward(torch.Tensor input, Dictionary<string, object> param = null)
NasBert\Modules\IncrementalState.cs (14)
21public Dictionary<string, torch.Tensor> GetIncrementalState( 23Dictionary<string, Dictionary<string, torch.Tensor>> incrementalState, 28Dictionary<string, Dictionary<string, torch.Tensor>> incrementalState, 30Dictionary<string, torch.Tensor> value); 51private static Dictionary<string, torch.Tensor> EmptyIncrementalState => new Dictionary<string, torch.Tensor>(); 64public Dictionary<string, torch.Tensor> GetIncrementalState( 66Dictionary<string, Dictionary<string, torch.Tensor>> incrementalState, 76Dictionary<string, Dictionary<string, torch.Tensor>> incrementalState, 78Dictionary<string, torch.Tensor> value) 83if (incrementalState.TryGetValue(fullKey, out var oldState))
NasBert\Modules\Layers\EncConvLayer.cs (1)
46public override torch.Tensor forward(torch.Tensor x, Dictionary<string, object> param = null)
NasBert\Modules\Layers\FeedForwardLayer.cs (1)
66public override torch.Tensor forward(torch.Tensor x, Dictionary<string, object> param)
NasBert\Modules\Layers\IdentityLayer.cs (1)
20public override torch.Tensor forward(torch.Tensor x, Dictionary<string, object> param = null)
NasBert\Modules\Layers\Layer.cs (2)
12internal class Layer : torch.nn.Module<torch.Tensor, Dictionary<string, object>, torch.Tensor> 22public override torch.Tensor forward(torch.Tensor x, Dictionary<string, object> param = null)
NasBert\Modules\Layers\SelfAttentionLayer.cs (1)
55public override torch.Tensor forward(torch.Tensor x, Dictionary<string, object> param)
NasBert\Modules\MultiHeadAttention.cs (15)
155Dictionary<string, Dictionary<string, torch.Tensor>> incrementalState = null, 176Dictionary<string, torch.Tensor> savedState = null; 313private Dictionary<string, torch.Tensor> GetInputBuffer( 314Dictionary<string, Dictionary<string, torch.Tensor>> incrementalState) 320Dictionary<string, Dictionary<string, torch.Tensor>> incrementalState, 321Dictionary<string, torch.Tensor> buffer) 372public Dictionary<string, torch.Tensor> GetIncrementalState(torch.nn.Module module, Dictionary<string, Dictionary<string, torch.Tensor>> incrementalState, string key) 377public void SetIncrementalState(torch.nn.Module module, Dictionary<string, Dictionary<string, torch.Tensor>> incrementalState, string key, Dictionary<string, torch.Tensor> value)
NasBert\NasBertTrainer.cs (2)
323var outColumns = inputSchema.ToDictionary(x => x.Name); 433var outColumns = inputSchema.ToDictionary(x => x.Name);
Roberta\QATrainer.cs (5)
408var mapping = AlignAnswerPosition(contextToken, contextString); 438private Dictionary<int, int> AlignAnswerPosition(IReadOnlyList<string> tokens, string text) 443var mapping = new Dictionary<int, int>(); 508var outColumns = inputSchema.ToDictionary(x => x.Name); 594var outColumns = inputSchema.ToDictionary(x => x.Name);
Utils\DefaultDictionary.cs (1)
22private readonly Dictionary<TKey, TValue> _dictionary;
Utils\TorchUtils.cs (3)
16public static void DisposeDictionaryWithTensor<TKey, TResult>(Dictionary<TKey, TResult> dictionary) 26else if (kvp.Value is Dictionary<dynamic, dynamic> subDictionary) 32else if (kvp.Key is Dictionary<dynamic, dynamic> subDictionary)
Microsoft.ML.Transforms (64)
CountFeatureSelection.cs (1)
167var result = inputSchema.ToDictionary(x => x.Name);
CustomMappingTransformer.cs (1)
258var result = inputSchema.ToDictionary(x => x.Name);
Dracula\CMCountTable.cs (13)
47public Dictionary<int, float>[][] Tables { get; } 49public CMCountTable(Dictionary<int, float>[][] tables, float[] priorCounts, int depth, int width) 93Tables = new Dictionary<int, float>[LabelCardinality][]; 96Tables[i] = new Dictionary<int, float>[Depth]; 134var dict = Tables[iLabel][iDepth]; 215private readonly Dictionary<int, double>[][] _tables; // for each label and 0<=i<depth we keep a dictionary. 227_tables = new Dictionary<int, double>[LabelCardinality][]; 230_tables[iLabel] = new Dictionary<int, double>[_depth]; 241_tables = new Dictionary<int, double>[LabelCardinality][]; 246_tables[iLabel] = new Dictionary<int, double>[_depth]; 252var oldDict = table.Tables[iLabel][iDepth]; 265var tables = new Dictionary<int, float>[LabelCardinality][]; 268tables[iLabel] = new Dictionary<int, float>[_depth];
Dracula\CountTableTransformer.cs (1)
323var result = inputSchema.ToDictionary(x => x.Name);
Dracula\DictCountTable.cs (12)
44public Dictionary<long, float>[] Tables { get; } 46public DictCountTable(Dictionary<long, float>[] counts, int labelCardinality, float[] priorCounts, 74Tables = new Dictionary<long, float>[LabelCardinality]; 104foreach (var table in Tables) 168private readonly Dictionary<long, double>[] _tables; 174_tables = new Dictionary<long, double>[LabelCardinality]; 184_tables = new Dictionary<long, double>[LabelCardinality]; 202var singleTables = new Dictionary<long, float>[LabelCardinality]; 213var dest = singleTables[iTable]; 214var src = _tables[iTable]; 230private void ProcessGarbage(Dictionary<long, float>[] outputTables, out float[] outputGarbageCounts) 234foreach (var table in _tables)
Expression\KeyWordTable.cs (2)
29private readonly Dictionary<NormStr, KeyWordKind> _mpnstrtidWord; 30private readonly Dictionary<NormStr, TokKind> _mpnstrtidPunc;
Expression\LambdaParser.cs (1)
88private Dictionary<TokKind, string> _mapTidStr;
Expression\MethodGenerator.cs (1)
139private Dictionary<LocalKey, List<LocalBuilder>> _locals;
ExpressionTransformer.cs (1)
172var columnDictionary = inputSchema.ToDictionary(x => x.Name);
GcnTransform.cs (1)
913var result = inputSchema.ToDictionary(x => x.Name);
KeyToVectorMapping.cs (1)
470var result = inputSchema.ToDictionary(x => x.Name);
MissingValueDroppingTransformer.cs (1)
42var resultDic = inputSchema.ToDictionary(x => x.Name);
MissingValueIndicatorTransformer.cs (1)
537var result = inputSchema.ToDictionary(x => x.Name);
MissingValueReplacing.cs (1)
1037var result = inputSchema.ToDictionary(x => x.Name);
MissingValueReplacingUtils.cs (1)
376private readonly Dictionary<TType, int> _valueCounts;
MutualInformationFeatureSelection.cs (1)
231var result = inputSchema.ToDictionary(x => x.Name);
PermutationFeatureImportanceExtensions.cs (1)
708var output = new Dictionary<string, TResult>();
RandomFourierFeaturizing.cs (1)
725var result = inputSchema.ToDictionary(x => x.Name);
StatefulCustomMappingTransformer.cs (1)
391var result = inputSchema.ToDictionary(x => x.Name);
Text\LdaTransform.cs (1)
1323var result = inputSchema.ToDictionary(x => x.Name);
Text\NgramHashingTransformer.cs (1)
1215var result = inputSchema.ToDictionary(x => x.Name);
Text\NgramTransform.cs (1)
1080var result = inputSchema.ToDictionary(x => x.Name);
Text\StopWordsRemovingTransformer.cs (6)
137private static volatile Dictionary<ReadOnlyMemory<char>, StopWordsRemovingEstimator.Language> _langsDictionary; 164private static Dictionary<ReadOnlyMemory<char>, StopWordsRemovingEstimator.Language> LangsDictionary 168Dictionary<ReadOnlyMemory<char>, StopWordsRemovingEstimator.Language> result = _langsDictionary; 353private readonly Dictionary<int, int> _colMapNewToOld; 672var result = inputSchema.ToDictionary(x => x.Name); 1240var result = inputSchema.ToDictionary(x => x.Name);
Text\TextFeaturizingEstimator.cs (1)
642var result = inputSchema.ToDictionary(x => x.Name);
Text\TextNormalizing.cs (5)
270private static volatile Dictionary<char, char> _combinedDiacriticsMap; 304private static Dictionary<char, char> CombinedDiacriticsMap 308Dictionary<char, char> result = _combinedDiacriticsMap; 311var combinedDiacriticsMap = new Dictionary<char, char>(); 581var result = inputSchema.ToDictionary(x => x.Name);
Text\TokenizingByCharacters.cs (1)
685var result = inputSchema.ToDictionary(x => x.Name);
Text\WordEmbeddingsExtractor.cs (4)
95private static readonly Dictionary<string, WeakReference<Model>> _vocab = new Dictionary<string, WeakReference<Model>>(); 605private static readonly Dictionary<WordEmbeddingEstimator.PretrainedModelKind, string> _modelsMetaData = new Dictionary<WordEmbeddingEstimator.PretrainedModelKind, string>() 619private static readonly Dictionary<WordEmbeddingEstimator.PretrainedModelKind, int> _linesToSkipInModels = new Dictionary<WordEmbeddingEstimator.PretrainedModelKind, int>() 933var result = inputSchema.ToDictionary(x => x.Name);
Text\WordTokenizing.cs (1)
533var result = inputSchema.ToDictionary(x => x.Name);
Microsoft.ML.Vision (4)
DnnRetrainTransform.cs (4)
59private readonly Dictionary<string, string> _idvToTfMapping; 848public Dictionary<string, Tensor> Outputs; 1256var result = inputSchema.ToDictionary(x => x.Name); 1257var resultDic = inputSchema.ToDictionary(x => x.Name);
Microsoft.NET.StringTools (1)
WeakStringCacheInterner.cs (1)
59private Dictionary<string, int>? _internCallCountsByString;
Microsoft.NET.StringTools.net35 (3)
WeakStringCache.Locking.cs (2)
14private readonly Dictionary<int, StringWeakHandle> _stringsByHashCode; 15private readonly Dictionary<int, StringWeakHandle> _weakHandlesByHashCode;
WeakStringCacheInterner.cs (1)
59private Dictionary<string, int>? _internCallCountsByString;
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\Collection.vb (1)
19Private m_KeyedNodesHash As Generic.Dictionary(Of String, Node) 'Hashtable mapping key (string) -> Node, contains only items added to the collection with a key
Microsoft\VisualBasic\CompilerServices\CacheDict.vb (1)
12Private ReadOnly _dict As Dictionary(Of TKey, KeyInfo)
Microsoft.VisualStudio.LanguageServices (38)
ChangeSignature\ChangeSignatureDialogViewModel.cs (1)
109var parameterNameOverlapMap = new Dictionary<string, List<ParameterViewModel>>();
Extensions\VisualStudioWorkspaceImplExtensions.cs (2)
22private static readonly ConditionalWeakTable<IVsHierarchy, Dictionary<uint, IImageHandle>> s_hierarchyToItemIdToImageHandle = new(); 26var itemIdToImageHandle = s_hierarchyToItemIdToImageHandle.GetValue(hierarchy, static _ => []);
ExternalAccess\UnitTesting\SolutionEventMonitor.cs (1)
25private readonly Dictionary<string, IDisposable> _operations = [];
FindReferences\Contexts\AbstractTableDataSourceFindUsagesContext.cs (1)
103private readonly Dictionary<DefinitionItem, RoslynDefinitionBucket> _definitionToBucket = [];
FindReferences\RoslynDefinitionBucket.cs (1)
37private readonly Dictionary<(string? filePath, TextSpan span), DocumentSpanEntry> _locationToEntry = [];
GenerateType\GenerateTypeDialogViewModel.cs (2)
34private Dictionary<string, Accessibility> _accessListMap; 35private Dictionary<string, TypeKind> _typeKindMap;
Implementation\VsRefactorNotifyService.cs (6)
38if (TryGetRenameAPIRequiredArguments(workspace, changedDocumentIDs, symbol, out var hierarchyToItemIDsMap, out var rqnames)) 75if (TryGetRenameAPIRequiredArguments(workspace, changedDocumentIDs, symbol, out var hierarchyToItemIDsMap, out var rqnames)) 112out Dictionary<IVsHierarchy, List<uint>> hierarchyToItemIDsMap, 131out Dictionary<IVsHierarchy, List<uint>> hierarchyToItemIDsMap, 167private Dictionary<IVsHierarchy, List<uint>> GetHierarchiesAndItemIDsFromDocumentIDs(VisualStudioWorkspace visualStudioWorkspace, IEnumerable<DocumentId> changedDocumentIDs) 171var hierarchyToItemIDsMap = new Dictionary<IVsHierarchy, List<uint>>();
Interactive\VsInteractiveWindowProvider.cs (1)
164var interactiveCommandMap = new Dictionary<string, int>();
Interop\CleanableWeakComHandleTable.cs (1)
30private readonly Dictionary<TKey, WeakComHandle<TValue, TValue>> _table;
LanguageService\AbstractLanguageService`2.IVsImmediateStatementCompletion2.cs (1)
22protected Dictionary<IVsTextView, DebuggerIntelliSenseFilter> filters = [];
Library\ObjectBrowser\AbstractListItemFactory.cs (1)
595var visitedAssemblies = new Dictionary<string, AssemblyIdentity>();
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
309private readonly Dictionary<uint, ImmutableArray<string>> _folderNameMap = [];
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (1)
59private readonly Dictionary<string, (DateTime lastWriteTime, AssemblyMetadata metadata)> _metadataCache = new(StringComparer.OrdinalIgnoreCase);
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
49private readonly Dictionary<string, (ProjectId projectId, SourceTextContainer textContainer)> _monikersToProjectIdAndContainer = [];
ProjectSystem\RuleSets\RuleSetEventHandler.cs (1)
87var ruleSetRenames = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ProjectSystem\RuleSets\VisualStudioRuleSetManager.RuleSetFile.cs (1)
127var specificDiagnosticOptions = new Dictionary<string, ReportDiagnostic>();
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
92private readonly Dictionary<string, List<ProjectSystemProject>> _projectSystemNameToProjectsMap = []; 98private readonly Dictionary<string, bool> _languageToProjectExistsUIContextState = [];
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
28private readonly Dictionary<K, CacheValue> _cache;
StackTraceExplorer\StackFrameViewModel.cs (1)
42private readonly Dictionary<StackFrameSymbolPart, DefinitionItem?> _definitionCache = [];
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (2)
195Dictionary<string, Project>? projectNameToProjectMap = null; 196Dictionary<Project, ImmutableDictionary<string, Document>>? filePathToDocumentMap = null;
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
470var latestDocumentDiagnosticsMap = filterStaleDiagnostics ? new Dictionary<DocumentId, ImmutableHashSet<DiagnosticData>>() : null;
TaskList\ExternalErrorDiagnosticUpdateSource.cs (2)
318private readonly Dictionary<ProjectId, ImmutableHashSet<string>> _allDiagnosticIdMap = []; 333Dictionary<ProjectId, ImmutableHashSet<string>> diagnosticIdMap,
Telemetry\CodeMarkerLogger.cs (3)
18private static readonly Dictionary<FunctionId, List<Tuple<CodeMarkerId, CodeMarkerId>>> s_blockMap 113private static readonly Dictionary<FunctionId, List<CodeMarkerId>> s_map 150private static void FireCodeMarkers<T>(Dictionary<FunctionId, List<T>> map, FunctionId functionId, Func<T, int> getter)
Utilities\VsCodeWindowViewTracker.cs (1)
38private readonly Dictionary<IVsTextView, ITextView> _trackedTextViews = [];
Workspace\SourceGeneratedFileManager.cs (2)
62private readonly Dictionary<string, OpenSourceGeneratedFile> _openFiles = []; 73private readonly Dictionary<Guid, SourceGeneratedDocumentIdentity> _directoryInfoOnDiskByContainingDirectoryId = [];
Microsoft.VisualStudio.LanguageServices.CodeLens (1)
ReferenceCodeLensProvider.cs (1)
50private readonly Dictionary<Guid, (string version, HashSet<DataPoint> dataPoints)> _dataPoints = [];
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
90var diagnosticOptions = new Dictionary<string, ReportDiagnostic>(ruleSetSpecificDiagnosticOptions);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
DocumentOutline\DocumentOutlineTestsBase.cs (1)
102private EditorTestLspServer(EditorTestWorkspace testWorkspace, Dictionary<string, IList<LanguageServer.Protocol.Location>> locations, InitializationOptions options, AbstractLspLogger logger) : base(testWorkspace, locations, options, logger)
Microsoft.VisualStudio.LanguageServices.DevKit (1)
Logging\VSCodeTelemetryLogger.cs (1)
151var kvp = new Dictionary<string, string>
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\Razor\CSharpLspRazorProjectFactory.cs (1)
17private readonly Dictionary<string, ProjectId> _projects = [];
Microsoft.VisualStudio.LanguageServices.Xaml (5)
Implementation\LanguageServer\Handler\Completion\CompletionHandler.cs (3)
74var commitCharactersCache = new Dictionary<XamlCompletionKind, ImmutableArray<VSInternalCommitCharacter>>(); 82private static CompletionItem CreateCompletionItem(XamlCompletionItem xamlCompletion, DocumentId documentId, SourceText text, Position position, TextDocumentIdentifier textDocument, Dictionary<XamlCompletionKind, ImmutableArray<VSInternalCommitCharacter>> commitCharactersCach) 127private static SumType<string[], VSInternalCommitCharacter[]> GetCommitCharacters(XamlCompletionItem completionItem, Dictionary<XamlCompletionKind, ImmutableArray<VSInternalCommitCharacter>> commitCharactersCache)
Implementation\LanguageServer\Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
71var documentToPreviousResultId = new Dictionary<Document, string?>();
Implementation\XamlProjectService.cs (1)
37private readonly Dictionary<IVsHierarchy, ProjectSystemProject> _xamlProjects = [];
MinimalSample (2)
Program.cs (2)
79var extensions = new Dictionary<string, object?>() { { "traceId", "traceId123" } }; 81var errors = new Dictionary<string, string[]>() { { "Title", new[] { "The Title field is required." } } };
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
88[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.Dictionary<,>))]
Mvc.RoutingWebSite (3)
Controllers\ItemsController.cs (2)
11public ActionResult<Dictionary<object, object>> Index() 22public ActionResult<Dictionary<object, object>> IndexWithArgument(string arg)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
30var values = query
netstandard (1)
netstandard.cs (1)
107[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.Dictionary<,>))]
OpenIdConnectSample (1)
Startup.cs (1)
253var pairs = new Dictionary<string, string>()
PrepareTests (3)
MinimizeUtil.cs (3)
39var idToFilePathMap = initialWalk(); 46Dictionary<Guid, List<FilePathInfo>> initialWalk() 58var idToFilePathMap = directories.AsParallel()
PresentationBuildTasks (29)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (2)
177Dictionary<string, ITaskItem[]> targetOutputs = new Dictionary<string, ITaskItem[]>(); 292Dictionary<string, ITaskItem[]> targetOutputs = new Dictionary<string, ITaskItem[]>();
src\Microsoft.DotNet.Wpf\src\Common\src\System\LocalAppContext.cs (1)
16private static readonly Dictionary<string, bool> s_switchMap = new();
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (2)
926Dictionary<string, SpecialBracketCharacters> bracketCharacterCache = _parserContext.InitBracketCharacterCacheForType(extensionType); 1476private SpecialBracketCharacters GetBracketCharacterForProperty(string propertyName, Dictionary<string, SpecialBracketCharacters> bracketCharacterCache)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (9)
195internal Dictionary<string, SpecialBracketCharacters> InitBracketCharacterCacheForType(Type type) 199Dictionary<string, SpecialBracketCharacters> map = BuildBracketCharacterCacheForType(type); 696internal Dictionary<Type, Dictionary<string, SpecialBracketCharacters>> MasterBracketCharacterCache 702_masterBracketCharacterCache = new Dictionary<Type, Dictionary<string, SpecialBracketCharacters>>(); 821private Dictionary<Type, Dictionary<string, SpecialBracketCharacters>> _masterBracketCharacterCache; 840private Dictionary<string, SpecialBracketCharacters> BuildBracketCharacterCacheForType(Type extensionType) 842Dictionary<string, SpecialBracketCharacters> cache = new Dictionary<string, SpecialBracketCharacters>(StringComparer.OrdinalIgnoreCase);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
4163private Dictionary<string, string> _piReverseTable = new Dictionary<string, string>();
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (2)
406private Dictionary<string, string> _compatTable = null; 409private Dictionary<string, string> _compatTableReverse = null;
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (2)
51private static Dictionary<string, Assembly> _cachedMetadataLoadContextAssemblies = null; 52private static Dictionary<string, Assembly> _cachedMetadataLoadContextAssembliesByNameNoExtension = null;
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (10)
1653private Dictionary<string, object> _ignorables; 1654private Dictionary<string, ProcessContentSet> _processContents; 1655private Dictionary<string, PreserveItemSet> _preserveElements; 1656private Dictionary<string, PreserveItemSet> _preserveAttributes; 2008private Dictionary<string, string> _names; 2063private Dictionary<string, object> _knownNamespaces; 2064private Dictionary<string, string> _namespaceMap = new Dictionary<string, string>(); 2065private Dictionary<string, object> _subsumingNamespaces; 2066private Dictionary<string, HandleElementCallback> _elementHandler = new Dictionary<string, HandleElementCallback>(); 2067private Dictionary<string, HandleAttributeCallback> _attributeHandler = new Dictionary<string, HandleAttributeCallback>();
PresentationCore (74)
MS\Internal\Automation\EventMap.cs (1)
272private static Dictionary<int, EventInfo> _eventsTable; // key=event id, data=listener count
MS\Internal\DeferredElementTreeState.cs (2)
122private Dictionary<DependencyObject, DependencyObject> _oldCoreParents = new Dictionary<DependencyObject, DependencyObject>(); 123private Dictionary<DependencyObject, DependencyObject> _oldLogicalParents = new Dictionary<DependencyObject, DependencyObject>();
MS\Internal\FontCache\FamilyCollection.cs (2)
473Dictionary<string, Text.TextInterface.Font> faces = new Dictionary<string, Text.TextInterface.Font>(StringComparer.OrdinalIgnoreCase); 490Dictionary<string, Text.TextInterface.Font>.AlternateLookup<ReadOnlySpan<char>> alternateLookup = faces.GetAlternateLookup<ReadOnlySpan<char>>();
MS\Internal\FontCache\FontFaceLayoutInfo.cs (2)
577private Dictionary<int, ushort> _cmap; 585private Dictionary<int, ushort> CMap
MS\Internal\FontCache\FontResourceCache.cs (6)
24private static void ConstructFontResourceCache(Assembly entryAssembly, Dictionary<string, List<string>> folderResourceMap) 76Dictionary<string, List<string>> folderResourceMap; 108private static void AddResourceToFolderMap(Dictionary<string, List<string>> folderResourceMap, string resourceFullName) 145private static Dictionary<Assembly, Dictionary<string, List<string>>> _assemblyCaches 146= new Dictionary<Assembly, Dictionary<string, List<string>>>(1);
MS\Internal\FontFace\CompositeFontInfo.cs (2)
22private Dictionary<XmlLanguage, ushort[]> _familyMapRangesByLanguage; 146Dictionary<XmlLanguage, ushort[]> table = new Dictionary<XmlLanguage, ushort[]>(_familyMapRangesByLanguage.Count);
MS\Internal\FontFace\FontDifferentiator.cs (1)
31Dictionary<XmlLanguage, string> faceNames = new Dictionary<XmlLanguage, string>(1);
MS\Internal\FontFace\PhysicalFontFamily.cs (1)
41Dictionary<XmlLanguage, string> convertedDictionary = new Dictionary<XmlLanguage, string>();
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (1)
2687private System.Collections.Generic.Dictionary<Stroke, StrokeLookupEntry> _strokeLookupTable = null;
MS\Internal\Ink\Renderer.cs (2)
691private Dictionary<Stroke, StrokeVisual> _visuals; 694private Dictionary<Color, HighlighterContainerVisual> _highlighters = null;
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (3)
250Dictionary<Edge, EdgeInfo> adjInformation = new Dictionary<Edge, EdgeInfo>(); 427Dictionary<Edge, EdgeInfo> adjInformation, 820Dictionary<Edge, EdgeInfo> adjInformation)
src\Microsoft.DotNet.Wpf\src\Common\src\System\LocalAppContext.cs (1)
16private static readonly Dictionary<string, bool> s_switchMap = new();
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
155private static readonly Dictionary<string, ContentType> _fileExtensionToMimeType = new Dictionary<string, ContentType>(4);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
89private static Dictionary<object, AssemblyName> _assemblies; // get key via GetKeyForAssembly
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SizeLimitedCache.cs (1)
280private readonly Dictionary<K, Node> _nodeLookup;
System\Windows\Ink\StrokeCollection2.cs (1)
353Dictionary<Color, List<Stroke>> highLighters = new Dictionary<Color, List<Stroke>>();
System\Windows\Input\ManipulationDevice.cs (1)
517private static Dictionary<UIElement, ManipulationDevice> _manipulationDevices;
System\Windows\Input\ManipulationLogic.cs (3)
514var temp = _removedManipulators; 702private Dictionary<int, Manipulator2D> _currentManipulators = new Dictionary<int, Manipulator2D>(2); 705private Dictionary<int, Manipulator2D> _removedManipulators = new Dictionary<int, Manipulator2D>(2);
System\Windows\Input\Stylus\Common\StylusLogic.cs (1)
172private readonly Dictionary<DpiScale2, Matrix> _transformToDeviceMatrices = new Dictionary<DpiScale2, Matrix>();
System\Windows\Input\Stylus\Common\StylusPointPropertyId.cs (4)
195private static Dictionary<HidUsagePage, Dictionary<HidUsage, Guid>> _hidToGuidMap = new Dictionary<HidUsagePage, Dictionary<HidUsage, Guid>>() 244Dictionary<HidUsage, Guid> pageMap = null;
System\Windows\Input\Stylus\Common\StylusPointPropertyUnit.cs (1)
63private static Dictionary<uint, StylusPointPropertyUnit> _pointerUnitMap = new Dictionary<uint, StylusPointPropertyUnit>()
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (1)
108internal Dictionary<PresentationSource, PointerStylusPlugInManager> PlugInManagers
System\Windows\Input\Stylus\Pointer\PointerStylusPointPropertyInfoHelper.cs (1)
27private static Dictionary<byte, short> _hidExponentMap = new Dictionary<byte, short>()
System\Windows\Input\Stylus\Pointer\PointerTabletDevice.cs (1)
29private Dictionary<uint, PointerStylusDevice> _stylusDeviceMap = new Dictionary<uint, PointerStylusDevice>();
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceCollection.cs (2)
21private Dictionary<IntPtr, PointerTabletDevice> _tabletDeviceMap = new Dictionary<IntPtr, PointerTabletDevice>(); 75Dictionary<IntPtr, PointerTabletDevice> oldTablets = _tabletDeviceMap;
System\Windows\Input\Stylus\Wisp\WispLogic.cs (4)
3707private Dictionary<object, PenContexts> __penContextsMap = new Dictionary<object, PenContexts>(2); 3710private Dictionary<int, StylusDevice> __stylusDeviceMap = new Dictionary<int, StylusDevice>(2); 3733private Dictionary<StylusDeviceBase, RawStylusInputReport> _lastMovesQueued = new Dictionary<StylusDeviceBase, RawStylusInputReport>(); 3737private Dictionary<StylusDeviceBase, RawStylusInputReport> _coalescedMoves = new Dictionary<StylusDeviceBase, RawStylusInputReport>();
System\Windows\Media\FontEmbeddingManager.cs (5)
24_collectedGlyphTypefaces = new Dictionary<Uri, Dictionary<ushort, bool>>(_uriComparer); 47Dictionary<ushort, bool> glyphSet; 84Dictionary<ushort, bool> glyphsUsed = _collectedGlyphTypefaces[glyphTypeface]; 125private Dictionary<Uri, Dictionary<ushort, bool>> _collectedGlyphTypefaces;
System\Windows\Media\HostVisual.cs (1)
557private Dictionary<DUCE.Channel, Dispatcher> _connectedChannels = new Dictionary<DUCE.Channel, Dispatcher>();
System\Windows\Media\Knowncolors.cs (1)
833private static Dictionary<uint, SolidColorBrush> s_solidColorBrushCache = new Dictionary<uint, SolidColorBrush>();
System\Windows\Media\SolidColorBrush.cs (3)
296public Dictionary<TKey, TValue>.Enumerator GetEnumerator() 304private Dictionary<TKey, TValue> fwdDictionary; 305private Dictionary<TValue, List<TKey>> revDictionary;
System\Windows\Media\textformatting\TextFormatterContext.cs (3)
27private static Dictionary<char,bool> _specialCharacters; // special characters 404Dictionary<char,bool> dict = new Dictionary<char,bool>(); 460System.Threading.Interlocked.CompareExchange<Dictionary<char,bool>>(ref _specialCharacters, dict, null);
System\Windows\Media\UniqueEventHelper.cs (3)
80protected Dictionary<TEventHandler, int> _delegates; 92if (_delegates is Dictionary<TEventHandler, int> delegates) 112if (_delegates is Dictionary<TEventHandler, int> delegates &&
System\Windows\Media\Visual.cs (10)
649Dictionary<DUCE.Channel, int> channelsToCyclicBrushMap = 821Dictionary<DUCE.Channel, int> channelsToCyclicBrushMap = 851Dictionary<ICyclicBrush, int> cyclicBrushToChannelsMap = 888Dictionary<ICyclicBrush, int> cyclicBrushToChannelsMap = 911Dictionary<DUCE.Channel, int> channelsToCyclicBrushMap = 5213Dictionary<ICyclicBrush, int> cyclicBrushToChannelsMap = 5323private static readonly UncommonField<Dictionary<ICyclicBrush, int>> CyclicBrushToChannelsMapField 5324= new UncommonField<Dictionary<ICyclicBrush, int>>(); 5330private static readonly UncommonField<Dictionary<DUCE.Channel, int>> ChannelsToCyclicBrushMapField 5331= new UncommonField<Dictionary<DUCE.Channel, int>>();
System\Windows\Media3D\Visual3DCollection.cs (1)
540Dictionary<Visual3D, string> duplicates = new Dictionary<Visual3D, string>();
PresentationCore.Tests (1)
System\Windows\Media\Animation\KeySplineConverter.Tests.cs (1)
309yield return new object[] { new KeySpline(0.0, 0.1, 0.2, 0.3), typeof(Dictionary<int, string>), CultureInfo.InvariantCulture };
PresentationFramework (154)
MS\Internal\Annotations\AnnotationMap.cs (1)
105private Dictionary<Guid, List<IAttachedAnnotation>> _annotationIdToAttachedAnnotations = new Dictionary<Guid, List<IAttachedAnnotation>>();
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (2)
553private static readonly Dictionary<Type, int> s_ZLevel = new(); 558private static readonly Dictionary<int, ZRange> s_ZRanges = new();
MS\Internal\Annotations\Component\AnnotationComponentManager.cs (1)
288private Dictionary<IAttachedAnnotation, IList<IAnnotationComponent>> _attachedAnnotations = new Dictionary<IAttachedAnnotation, IList<IAnnotationComponent>>();
MS\Internal\Annotations\ObservableDictionary.cs (1)
367private Dictionary<string, string> _nameValues;
MS\Internal\Annotations\Storage\StoreAnnotationsMap.cs (6)
104public Dictionary<Guid, Annotation> FindAnnotations(ContentLocator anchorLocator) 108Dictionary<Guid, Annotation> annotations = new Dictionary<Guid, Annotation>(); 113Dictionary<Guid, CachedAnnotation>.ValueCollection.Enumerator annotationsEnumerator = _currentAnnotations.Values.GetEnumerator(); 167public Dictionary<Guid, Annotation> FindAnnotations() 169Dictionary<Guid, Annotation> annotations = new Dictionary<Guid, Annotation>(); 282private Dictionary<Guid, CachedAnnotation> _currentAnnotations = new Dictionary<Guid, CachedAnnotation>();
MS\Internal\Annotations\XmlElementCollection.cs (1)
252private Dictionary<XmlDocument, int> _xmlDocsRefCounts;
MS\Internal\AppModel\MimeObjectFactory.cs (2)
74private static readonly Dictionary<ContentType, StreamToObjectFactoryDelegate> _objectConverters = new Dictionary<ContentType, StreamToObjectFactoryDelegate>(9, new ContentType.WeakComparer()); 75private static readonly Dictionary<ContentType, StreamToObjectFactoryDelegateCore> _objectConvertersCore = new Dictionary<ContentType, StreamToObjectFactoryDelegateCore>(9, new ContentType.WeakComparer());
MS\Internal\AppModel\ResourceContainer.cs (2)
322private static readonly Dictionary<string, ResourceManagerWrapper> s_registeredResourceManagers = new(StringComparer.Ordinal); 323private static readonly Dictionary<string, ResourceManagerWrapper>.AlternateLookup<ReadOnlySpan<char>> s_registeredResourceManagersLookup = s_registeredResourceManagers.GetAlternateLookup<ReadOnlySpan<char>>();
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (2)
878private static Dictionary<XmlToken, string> s_xmlTokeFullNames; // A dictionary for the names of the xml elements 880private Dictionary<XmlToken, object> _cachedXmlElements; // A dictionary for caching the data object
MS\Internal\Data\AccessorTable.cs (1)
167private readonly Dictionary<AccessorTableKey, AccessorInfo> _table = new Dictionary<AccessorTableKey, AccessorInfo>();
MS\Internal\Data\CollectionViewGroupInternal.cs (1)
739private Dictionary<object, WeakReference> _nameToGroupMap; // To cache the mapping between name and subgroup
MS\Internal\Data\DataBindEngine.cs (1)
696private Dictionary<ValueConverterTableKey, IValueConverter> _valueConverterTable = new Dictionary<ValueConverterTableKey, IValueConverter>();
MS\Internal\Data\LiveShapingList.cs (1)
96internal Dictionary<string, DependencyProperty> ObservedProperties
MS\Internal\Globalization\BamlResourceDeserializer.cs (1)
389private readonly Dictionary<string, Stack<ILocalizabilityInheritable>> _propertyInheritanceTreeStack = new(8);
MS\Internal\Globalization\BamlTreeMap.cs (4)
264private Dictionary<BamlLocalizableResourceKey, int> _keyToBamlNodeIndexMap; 265private Dictionary<string, int> _uidToBamlNodeIndexMap; 286private Dictionary<string, ElementLocalizability> _classAttributeTable; 287private Dictionary<string, LocalizabilityAttribute> _propertyAttributeTable;
MS\Internal\Globalization\BamlTreeUpdater.cs (3)
680private readonly Dictionary<string, int> _uidToNewBamlNodeIndexMap; 683private readonly Dictionary<BamlLocalizableResourceKey, int> _keyToNewBamlNodeIndexMap; 686private Dictionary<string, string> _contentPropertyTable;
MS\Internal\Ink\ClipboardProcessor.cs (2)
263Dictionary<InkCanvasClipboardFormat, ClipboardData> preferredData = new Dictionary<InkCanvasClipboardFormat, ClipboardData>(); 442private Dictionary<InkCanvasClipboardFormat, ClipboardData> _preferredClipboardData;
MS\Internal\Interop\InternalDispatchObject.cs (1)
53private Dictionary<int, MethodInfo> _dispId2MethodMap;
MS\Internal\IO\Packaging\XamlFilter.cs (1)
1023private Dictionary<string, uint> _lcidDictionary;
MS\Internal\WindowsRuntime\Generated\WinRT.cs (1)
101private static Dictionary<string, DllModule> _cache = new System.Collections.Generic.Dictionary<string, DllModule>();
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (4)
12private static readonly Dictionary<Type, Type> CustomTypeToHelperTypeMappings = new Dictionary<Type, Type>(); 13private static readonly Dictionary<Type, Type> CustomAbiTypeToTypeMappings = new Dictionary<Type, Type>(); 14private static readonly Dictionary<string, Type> CustomAbiTypeNameToTypeMappings = new Dictionary<string, Type>(); 15private static readonly Dictionary<Type, string> CustomTypeToAbiTypeNameMappings = new Dictionary<Type, string>();
src\Microsoft.DotNet.Wpf\src\Common\src\System\LocalAppContext.cs (1)
16private static readonly Dictionary<string, bool> s_switchMap = new();
System\Windows\Annotations\Storage\XmlStreamStore.cs (3)
645private IList<Annotation> MergeAndCacheAnnotations(Dictionary<Guid, Annotation> mapAnnotations, List<Guid> storeAnnotationsId) 689Dictionary<Guid, Annotation> annotations = null; 1044private static readonly Dictionary<Uri, IList<Uri>> _predefinedNamespaces;
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (5)
110Dictionary<DateTimeCalendarModePair, DateTimeAutomationPeer> newChildren = new Dictionary<DateTimeCalendarModePair,DateTimeAutomationPeer>(); 641private Dictionary<DateTimeCalendarModePair, DateTimeAutomationPeer> DateTimePeers 648private Dictionary<DateTimeCalendarModePair, WeakReference> WeakRefElementProxyStorage 654private Dictionary<DateTimeCalendarModePair, DateTimeAutomationPeer> _dataChildren = new Dictionary<DateTimeCalendarModePair, DateTimeAutomationPeer>(); 655private Dictionary<DateTimeCalendarModePair, WeakReference> _weakRefElementProxyStorage = new Dictionary<DateTimeCalendarModePair, WeakReference>();
System\Windows\Controls\DataGrid.cs (2)
8229Dictionary<string, StringBuilder> dataGridStringBuilders = new Dictionary<string, StringBuilder>(formats.Count); 8623private Dictionary<DataGridColumn, CellAutomationValueHolder> _editingCellAutomationValueHolders
System\Windows\Controls\DataGridColumnCollection.cs (2)
471Dictionary<int, int> assignedDisplayIndexMap = new Dictionary<int, int>(); // <DisplayIndex, ColumnIndex> 2535private Dictionary<DataGridColumn, DataGridLength> _originalWidthsForResize; // Dictionary to hold the original widths of columns for resize operation
System\Windows\Controls\DataGridHelper.cs (6)
424var transferEnabledMap = GetPropertyTransferEnabledMapForObject(d); 430private static Dictionary<DependencyProperty, bool> GetPropertyTransferEnabledMapForObject(DependencyObject d) 432Dictionary<DependencyProperty, bool> propertyTransferEnabledForObject; 445Dictionary<DependencyProperty, bool> propertyTransferEnabledForObject; 463private static ConditionalWeakTable<DependencyObject, Dictionary<DependencyProperty, bool>> _propertyTransferEnabledMap = new ConditionalWeakTable<DependencyObject, Dictionary<DependencyProperty, bool>>();
System\Windows\Controls\DataGridItemAttachedStorage.cs (8)
13var map = EnsureItem(item); 20Dictionary<DependencyProperty, object> map; 33Dictionary<DependencyProperty, object> map; 57_itemStorageMap = new Dictionary<object, Dictionary<DependencyProperty, object>>(); 61private Dictionary<DependencyProperty, object> EnsureItem(object item) 63Dictionary<DependencyProperty, object> map; 78private Dictionary<object, Dictionary<DependencyProperty, object>> _itemStorageMap;
System\Windows\Controls\Primitives\Selector.cs (1)
2897private Dictionary<ItemInfo, ItemInfo> _set;
System\Windows\Data\BindingGroup.cs (1)
1538private Dictionary<WeakReference, List<ValidationError>> _notifyDataErrors = new Dictionary<WeakReference, List<ValidationError>>();
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (2)
268private static Dictionary<Uri, List<WeakReference<ResourceDictionary>>> _dictionariesFromUri; 534private static Dictionary<WeakReferenceKey<StaticResourceExtension>, WeakReference<ResourceDictionary>>
System\Windows\Documents\FixedDocument.cs (2)
791internal Dictionary<FixedPage, ArrayList> Highlights 1288private Dictionary<FixedPage, ArrayList> _highlights;
System\Windows\Documents\FixedDSBuilder.cs (1)
253private Dictionary<String, NameHashFixedNode> _nameHashTable;
System\Windows\Documents\FixedSchema.cs (1)
330private static readonly Dictionary<ContentType, XpsSchema> _schemas = new Dictionary<ContentType, XpsSchema>(new ContentType.StrongComparer());
System\Windows\Documents\FixedTextContainer.cs (1)
389internal void GetMultiHighlights(FixedTextPointer start, FixedTextPointer end, Dictionary<FixedPage, ArrayList> highlights, FixedHighlightType t,
System\Windows\Documents\FixedTextView.cs (1)
236Dictionary<FixedPage, ArrayList> highlights = new Dictionary<FixedPage,ArrayList>();
System\Windows\Documents\MsSpellCheckLib\SpellChecker\SpellChecker.cs (1)
640private static readonly Dictionary<bool, List<Type>> SuppressedExceptions = new Dictionary<bool, List<Type>>
System\Windows\Documents\MsSpellCheckLib\SpellCheckerFactory\SpellCheckerCreationHelper.cs (1)
37private static Dictionary<string, SpellCheckerCreationHelper> _instances =
System\Windows\Documents\MsSpellCheckLib\SpellCheckerFactory\SpellCheckerFactory.cs (1)
52private static Dictionary<bool, List<Type>> SuppressedExceptions = new Dictionary<bool, List<Type>>
System\Windows\Documents\Speller.cs (2)
416private Dictionary<Uri, DictionaryInfo> UriMap 2036private Dictionary<Uri, DictionaryInfo> _uriMap;
System\Windows\Documents\Tracing\SpellerCOMActionTraceLogger.cs (3)
85private static readonly Dictionary<Actions, long> _timeLimits100Ns = new Dictionary<Actions, long> 99public Dictionary<Actions, long> CumulativeCallTime100Ns { get; set; } 100public Dictionary<Actions, long> NumCallsMeasured { get; set; }
System\Windows\Documents\WinRTSpellerInterop.cs (2)
821private Dictionary<CultureInfo, Tuple<WordsSegmenter, SpellChecker>> _spellCheckers; 831private Dictionary<string, List<string>> _customDictionaryFiles;
System\Windows\FrameworkTemplate.cs (2)
1477internal Dictionary<int, Type> ChildTypeFromChildIndex 1515private Dictionary<int, Type> _childTypeFromChildIndex = new Dictionary<int, Type>();
System\Windows\Markup\Baml2006\Baml2006Reader.cs (3)
33private Dictionary<int, TypeConverter> _typeConverterMap = new Dictionary<int, TypeConverter>(); 34private Dictionary<Type, TypeConverter> _enumTypeConverterMap = new Dictionary<Type, TypeConverter>(); 35private Dictionary<string, Freezable> _freezeCache;
System\Windows\Markup\Baml2006\Baml2006ReaderFrame.cs (2)
11protected Dictionary<string, string> _namespaces; 49public void SetNamespaces(Dictionary<string, string> namespaces)
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
658private readonly Dictionary<string, short[]> _bamlXmlnsMappings = new Dictionary<string, short[]>();
System\Windows\Markup\Baml2006\WpfKnownType.cs (2)
313private Dictionary<int, Baml6ConstructorInfo> _constructors; 315public Dictionary<int, Baml6ConstructorInfo> Constructors
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (1)
33private Dictionary<Type, XamlType> _masterTypeTable;
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (1)
59private Dictionary<Type, XamlType> _masterTypeTable = new Dictionary<Type, XamlType>();
System\Windows\Markup\BamlReader.cs (1)
2864private Dictionary<String, List<String>> _reverseXmlnsTable;
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (3)
125public Dictionary<BamlLocalizableResourceKey, BamlLocalizableResource>.Enumerator GetEnumerator() => _dictionary.GetStructEnumerator(); 147internal Dictionary<BamlLocalizableResourceKey, BamlLocalizableResource>.Enumerator GetStructEnumerator() 409private readonly Dictionary<BamlLocalizableResourceKey, BamlLocalizableResource> _dictionary;
System\Windows\Markup\MarkupExtensionParser.cs (2)
926Dictionary<string, SpecialBracketCharacters> bracketCharacterCache = _parserContext.InitBracketCharacterCacheForType(extensionType); 1476private SpecialBracketCharacters GetBracketCharacterForProperty(string propertyName, Dictionary<string, SpecialBracketCharacters> bracketCharacterCache)
System\Windows\Markup\ParserContext.cs (10)
195internal Dictionary<string, SpecialBracketCharacters> InitBracketCharacterCacheForType(Type type) 199Dictionary<string, SpecialBracketCharacters> map = BuildBracketCharacterCacheForType(type); 696internal Dictionary<Type, Dictionary<string, SpecialBracketCharacters>> MasterBracketCharacterCache 702_masterBracketCharacterCache = new Dictionary<Type, Dictionary<string, SpecialBracketCharacters>>(); 821private Dictionary<Type, Dictionary<string, SpecialBracketCharacters>> _masterBracketCharacterCache; 840private Dictionary<string, SpecialBracketCharacters> BuildBracketCharacterCacheForType(Type extensionType) 842Dictionary<string, SpecialBracketCharacters> cache = new Dictionary<string, SpecialBracketCharacters>(StringComparer.OrdinalIgnoreCase); 946private Dictionary<string, Freezable> _freezeCache;
System\Windows\Markup\Primitives\ElementMarkupObject.cs (2)
69Dictionary<string, string> constructorArguments = null; 680private static Dictionary<Type, Type> _keyTypeMap;
System\Windows\Markup\Primitives\MarkupWriter.cs (12)
490Dictionary<string, string> writtenAttributes = new Dictionary<string, string>(); 927private bool IsDeferredProperty (MarkupProperty property, Dictionary<string, string> writtenAttributes, 1305private Dictionary<string, string> _uriToPrefix; 1306private Dictionary<string, string> _prefixToUri; 1550private static Dictionary<Assembly, Dictionary<string, string>> XmlnsDefinitions = new Dictionary<Assembly, Dictionary<string, string>>(); 1551private static Dictionary<string, string> DefaultPrefixes = new Dictionary<string, string>(); 1554private static Dictionary<string, string> GetMappingsFor(Assembly assembly) 1556Dictionary<string, string> namespaceToUri; 1596Dictionary<string, string> assembliesNamespacetoUri = GetMappingsFor(referencedAssembly); 1617Dictionary<string, string> namespaceToUri = GetMappingsFor(type.Assembly);
System\Windows\Markup\RoutedEventValueSerializer.cs (1)
38private static Dictionary<Type, Type> initializedTypes = new Dictionary<Type, Type>();
System\Windows\Markup\XamlTypeMapper.cs (4)
308private Dictionary<string, string> CloneStringDictionary(Dictionary<string, string> dict) 310Dictionary<string, string> newDict = new Dictionary<string, string>(); 4163private Dictionary<string, string> _piReverseTable = new Dictionary<string, string>();
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (3)
18private Dictionary<string, FrugalObjectList<string>> _nsDefinitions; 24private Dictionary<string, string> _piNamespaces; 26private Dictionary<Type, XamlType> _allowedInternalTypes;
System\Windows\Markup\XmlnsCache.cs (2)
406private Dictionary<string, string> _compatTable = null; 409private Dictionary<string, string> _compatTableReverse = null;
System\Windows\ResourceDictionary.cs (1)
2626private Dictionary<object, WeakReferenceList> _weakDeferredResourceReferencesMap = null;
System\Windows\Shell\JumpList.cs (1)
252private static readonly Dictionary<Application, JumpList> s_applicationMap = new Dictionary<Application, JumpList>();
System\Windows\Standard\MessageWindow.cs (1)
23private static readonly Dictionary<IntPtr, MessageWindow> s_windowLookup = new Dictionary<IntPtr, MessageWindow>();
System\Windows\SystemResources.cs (3)
1664[ThreadStatic] private static Dictionary<DpiUtil.HwndDpiInfo, HwndWrapper> _hwndNotify; 1665[ThreadStatic] private static Dictionary<DpiUtil.HwndDpiInfo, HwndWrapperHook> _hwndNotifyHook; 1669private static Dictionary<Assembly, ResourceDictionaries> _dictionaries;
System\Windows\TemplateContent.cs (2)
1539internal Dictionary<string, XamlType> _namedTypes; 1540internal Dictionary<string, XamlType> NamedTypes
System\Windows\VisualStateManager.cs (8)
375Dictionary<TimelineDataToken, Timeline> currentAnimations = FlattenTimelines(group.CurrentStoryboards); 376Dictionary<TimelineDataToken, Timeline> transitionAnimations = FlattenTimelines(transition?.Storyboard); 377Dictionary<TimelineDataToken, Timeline> newStateAnimations = FlattenTimelines(newState.Storyboard); 665private static Dictionary<TimelineDataToken, Timeline> FlattenTimelines(Storyboard storyboard) 667Dictionary<TimelineDataToken, Timeline> result = new Dictionary<TimelineDataToken, Timeline>(); 674private static Dictionary<TimelineDataToken, Timeline> FlattenTimelines(Collection<Storyboard> storyboards) 676Dictionary<TimelineDataToken, Timeline> result = new Dictionary<TimelineDataToken, Timeline>(); 686private static void FlattenTimelines(Storyboard storyboard, Dictionary<TimelineDataToken, Timeline> result)
PresentationFramework.Tests (1)
System\Windows\Controls\VirtualizationCacheLengthConverter.Tests.cs (1)
295yield return new object[] { new VirtualizationCacheLength(0.2, 0.3), typeof(Dictionary<int, string>), CultureInfo.InvariantCulture };
PresentationUI (3)
MS\Internal\Documents\Application\TransactionalPackage.cs (1)
572private Dictionary<Uri, WriteableOnDemandPackagePart> _activeParts =
MS\Internal\Documents\DigitalSignatureProvider.cs (1)
334Dictionary<X509Certificate2, CertificatePriorityStatus> certificateStatusTable =
MS\Internal\Documents\RightsManagementProvider.cs (1)
681Dictionary<RightsManagementUser, RightsManagementLicense> rights =
RazorBuildWebSite (1)
UpdateableFileProvider.cs (1)
15private readonly Dictionary<string, TestFileInfo> _content = new Dictionary<string, TestFileInfo>()
ReachFramework (49)
packaging\XpsDigitalSignature.cs (9)
65Dictionary<Uri, Uri> dependentList = new Dictionary<Uri,Uri>(); 315Dictionary<Uri, Uri> hashTable = new Dictionary<Uri, Uri>(); 364Dictionary<Uri, Dictionary<string, int>> uriHashTable = new Dictionary<Uri, Dictionary<string, int>>(); 370Dictionary<string, int> relHash = null; 404Dictionary<string, int> relHash = uriHashTable[selector.SourceUri]; 416private Dictionary<string, string> OptionalSignedParts 444private static Dictionary<string, string> _optionalSignedTypes;
Packaging\XpsDocument.cs (2)
737Dictionary<Uri,Uri> dependentList, 854Dictionary<Uri,Uri> dependentList = new Dictionary<Uri,Uri> ();
Packaging\XpsFixedDocumentReaderWriter.cs (2)
704Dictionary<Uri,Uri> dependentList, 808Dictionary<Uri,Uri> dependents,
Packaging\XpsFixedDocumentSequenceReaderWriter.cs (2)
436Dictionary<Uri,Uri> dependentList, 574Dictionary<Uri,Uri> dependents,
Packaging\XpsFixedPageReaderWriter.cs (8)
1352Dictionary<Uri,Uri> dependentList, 1403Dictionary<Uri,Uri> dependents 1517Dictionary<Uri,PackageRelationship> restictedFontRels = new Dictionary<Uri,PackageRelationship>(MS.Internal.UriComparer.Default); 1962private Dictionary<Uri,XpsImage> _imageCache; 1963private Dictionary<Uri,XpsFont> _fontCache; 1964private Dictionary<Uri,XpsColorContext> _colorContextCache; 1965private Dictionary<Uri,XpsResourceDictionary> _resourceDictionaryCache; 1966private Dictionary<Uri,XpsResource> _resourceCache;
Packaging\XpsManager.cs (4)
767Dictionary<Uri,Uri> dependents, 1320private Dictionary<string, int> _contentTypes; 1321private Dictionary<Uri, PackagePart> _cachedParts; 1325internal static Dictionary<Uri, int> _packageCache;
Packaging\XpsResourcePolicy.cs (15)
181Dictionary<UInt32, Uri> 195Dictionary<int, Uri> 212Dictionary<int, Uri> 226Dictionary<int, Uri> 240Dictionary<int, Uri> 254Dictionary<int, Uri> 268Dictionary<int, Uri> 286Dictionary<UInt32, Uri> _imageCrcTable; 289Dictionary<int,Uri> _imageUriHashTable; 292Dictionary<int, Uri> _currentPageImageTable; 295Dictionary<int, Uri> _colorContextTable; 298Dictionary<int, Uri> _currentPageColorContextTable; 301Dictionary<int, Uri> _resourceDictionaryTable; 304Dictionary<int, Uri> _currentPageResourceDictionaryTable; 310Dictionary<Type, object> _objDict = new Dictionary<Type, object>();
PrintConfig\PrtTicket_Public_Simple.cs (1)
1643private Dictionary<CapabilityName, object> _setterCache;
Serialization\ColorTypeConverter.cs (2)
282Dictionary<int, Uri> colorContextTable = manager.ResourcePolicy.ColorContextTable; 283Dictionary<int, Uri> currentPageColorContextTable = manager.ResourcePolicy.CurrentPageColorContextTable;
Serialization\ImageSourceTypeConverter.cs (3)
176Dictionary<int, Uri> currentPageImageTable = manager.ResourcePolicy.CurrentPageImageTable; 452Dictionary<int, Uri> imageUriHashTable = manager.ResourcePolicy.ImageUriHashTable; 472Dictionary<UInt32, Uri> imageCrcTable = manager.ResourcePolicy.ImageCrcTable;
Serialization\VisualTreeFlattener.cs (1)
300private Dictionary<String, int> _nameList;
Roslyn.Compilers.Extension (1)
CompilerPackage.cs (1)
68var filesToWrite = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Roslyn.Diagnostics.Analyzers (139)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (2)
94using var collisionMapPool = (isCaseSensitive ? SharedPools.Default<Dictionary<string, bool>>() : SharedPools.StringIgnoreCaseDictionary<bool>()).GetPooledObject(); 95var collisionMap = collisionMapPool.Object;
Roslyn.Diagnostics.CSharp.Analyzers (18)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (2)
17private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new(); 22var dictionary = DeclarationFinder.GetAllDeclarations(member);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (2)
16private readonly Dictionary<string, List<SyntaxToken>> _map = []; 23public static Dictionary<string, List<SyntaxToken>> GetAllDeclarations(SyntaxNode syntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.LocalDeclarationMap.cs (2)
16private readonly Dictionary<string, ImmutableArray<SyntaxToken>> _dictionary; 18internal LocalDeclarationMap(Dictionary<string, ImmutableArray<SyntaxToken>> dictionary)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\AggregatedFormattingResult.cs (1)
20protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\FormattingResult.cs (1)
24protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (4)
24private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _trailingTriviaMap = []; 25private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _leadingTriviaMap = []; 30Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, 47Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (2)
15private static readonly Dictionary<SyntaxKind, int> s_kindPrecedenceMap = new(SyntaxFacts.EqualityComparer) 36private static readonly Dictionary<SyntaxKind, int> s_operatorPrecedenceMap = new(SyntaxFacts.EqualityComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (4)
645var map = DetermineTypeParameterMapping(type, method.ReturnType); 662private static Dictionary<ITypeParameterSymbol, ITypeSymbol> DetermineTypeParameterMapping(ITypeSymbol inferredType, ITypeSymbol returnType) 664var result = new Dictionary<ITypeParameterSymbol, ITypeSymbol>(); 669private static void DetermineTypeParameterMapping(ITypeSymbol inferredType, ITypeSymbol returnType, Dictionary<ITypeParameterSymbol, ITypeSymbol> result)
Roslyn.Test.PdbUtilities (6)
Reader\Token2SourceLineExporter.cs (6)
1193private static Dictionary<uint, PdbTokenLine> LoadTokenToSourceMapping(Stream read) 1195var tokenToSourceMapping = new Dictionary<uint, PdbTokenLine>(); 1202Dictionary<string, int> nameIndex = LoadNameIndex(bits); 1233private static Dictionary<string, int> LoadNameIndex(BitAccess bits) 1235Dictionary<string, int> result = []; 1288BitAccess bits, DbiModuleInfo module, IntHashTable names, Dictionary<uint, PdbTokenLine> tokenToSourceMapping)
Roslyn.VisualStudio.DiagnosticsWindow (1)
PerfMargin\DataModel.cs (1)
27var features = new Dictionary<string, ActivityLevel>();
Roslyn.VisualStudio.Next.UnitTests (18)
Services\PerformanceTrackerServiceTests.cs (3)
173private static IEnumerable<AnalyzerPerformanceInfo> CreateSnapshots(Dictionary<string, double[]> matrix, int index) 187private static (Dictionary<string, double[]> matrix, int dataCount) CreateMatrix(string testFile) 189var matrix = new Dictionary<string, double[]>();
Services\ServiceHubServicesTests.cs (1)
121private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, Workspace remoteWorkspace, Solution solution, Dictionary<Checksum, object> map = null)
Services\SolutionServiceTests.cs (12)
554var map = new Dictionary<Checksum, object>(); 595var map = new Dictionary<Checksum, object>(); 637var map = new Dictionary<Checksum, object>(); 670var map = new Dictionary<Checksum, object>(); 712var map = new Dictionary<Checksum, object>(); 752var map = new Dictionary<Checksum, object>(); 790var map = new Dictionary<Checksum, object>(); 823var map = new Dictionary<Checksum, object>(); 878var map = new Dictionary<Checksum, object>(); 947var map = new Dictionary<Checksum, object>(); 1282var map = new Dictionary<Checksum, object>(); 1315private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, RemoteWorkspace remoteWorkspace, Solution solution, Dictionary<Checksum, object>? map = null)
UnifiedSettings\UnifiedSettingsTests.cs (2)
133var propertyToCategory = categories.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Deserialize<Category>()); 234var propertyToCategory = categories.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Deserialize<Category>());
RulesetToEditorconfigConverter (3)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
RunTests (4)
ProcessRunner.cs (2)
64Dictionary<string, string>? environmentVariables = null, 186Dictionary<string, string>? environmentVariables = null)
ProcessTestExecutor.cs (1)
130var environmentVariables = new Dictionary<string, string>();
TestHistoryManager.cs (1)
82Dictionary<string, TimeSpan> testInfos = new();
Sample (1)
Transformers\AddBearerSecuritySchemeTransformer.cs (1)
16var requirements = new Dictionary<string, IOpenApiSecurityScheme>
ScenarioTests.Common.Tests (5)
ScenarioTestTypes.cs (2)
596private Dictionary<string, string> _headers; 625public Dictionary<string, string> Headers
ServiceInterfaces.cs (3)
70Dictionary<string, string> GetIncomingMessageHeaders(); 91Dictionary<string, string> GetRequestHttpHeaders(); 289Dictionary<string, string> ValidateMessagePropertyHeaders();
Security.TransportSecurity.IntegrationTests (2)
Http\ClientCredentialTypeTests.4.1.0.cs (1)
103Dictionary<string, string> requestHeaders = null;
Https\HttpsTests.4.1.0.cs (1)
433Dictionary<string, string> requestHeaders = serviceProxy.GetRequestHttpHeaders();
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
95var referencesByName = References.ToDictionary(r => Path.GetFileNameWithoutExtension(r.ItemSpec), r => r.ItemSpec);
Shared (10)
JsonSchemaExporter\JsonSchemaExporter.cs (2)
486private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new(); 579private static readonly Dictionary<Type, Func<JsonNumberHandling, JsonSchema>> _simpleTypeSchemaFactories = new()
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
157Dictionary<ParameterLookupKey, ParameterInfo> dict = new(parameters.Length);
JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (2)
28private readonly Dictionary<Module, NotAnnotatedStatus> _publicOnlyModules = new(); 29private readonly Dictionary<MemberInfo, NullabilityState> _context = new();
Pools\PooledDictionaryPolicy.cs (3)
14internal sealed class PooledDictionaryPolicy<TKey, TValue> : PooledObjectPolicy<Dictionary<TKey, TValue>> 24public override Dictionary<TKey, TValue> Create() => new(_comparer); 26public override bool Return(Dictionary<TKey, TValue> obj)
Pools\PoolFactory.cs (2)
141/// Creates an object pool of <see cref="Dictionary{TKey, TValue}"/> instances. 152public static ObjectPool<Dictionary<TKey, TValue>> CreateDictionaryPool<TKey, TValue>(IEqualityComparer<TKey>? comparer = null, int maxCapacity = DefaultCapacity)
Shared.Tests (11)
EmptyCollections\EmptyCollectionExtensionsTests.cs (1)
49var dictionary = new Dictionary<T, T>();
JsonSchemaExporter\JsonSchemaExporterTests.cs (1)
54[InlineData(typeof(Dictionary<string, int>), "object")]
JsonSchemaExporter\TestTypes.cs (7)
814yield return new TestData<Dictionary<string, int>>( 826yield return new TestData<Dictionary<string, SimplePoco>>( 849yield return new TestData<Dictionary<string, object>>( 1018public Dictionary<string, object>? ExtensionData { get; set; } 1294[JsonSerializable(typeof(Dictionary<string, int>))] 1296[JsonSerializable(typeof(Dictionary<string, SimplePoco>))] 1297[JsonSerializable(typeof(Dictionary<string, object>))]
Pools\PoolTests.cs (2)
166var d = pool.Get(); 170var d2 = pool.Get();
SocialSample (1)
Startup.cs (1)
322var pairs = new Dictionary<string, string>()
SocialWeather (5)
FormatterResolver.cs (5)
10private readonly Dictionary<string, Dictionary<Type, Type>> _formatters 11= new Dictionary<string, Dictionary<Type, Type>>(); 21Dictionary<Type, Type> typeFormatters; 31Dictionary<Type, Type> typeFormatters;
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (1)
49public static Dictionary<string, Func<ListenOptions>> ConnectionMiddlewareData { get; } = new Dictionary<string, Func<ListenOptions>>
Swaggatherer (2)
SwaggathererApplication.cs (1)
82var routesByPrecedence = new Dictionary<decimal, List<RouteEntry>>();
Template.cs (1)
15var templatesVisited = new Dictionary<string, (int ControllerIndex, int ActionIndex)>(
System.CodeDom (3)
System\CodeDom\CodeNamespaceImportCollection.cs (1)
12private readonly Dictionary<string, CodeNamespaceImport> _keys = new Dictionary<string, CodeNamespaceImport>(StringComparer.OrdinalIgnoreCase);
System\CodeDom\Compiler\CodeDomProvider.cs (2)
16private static readonly Dictionary<string, CompilerInfo> s_compilerLanguages = new Dictionary<string, CompilerInfo>(StringComparer.OrdinalIgnoreCase); 17private static readonly Dictionary<string, CompilerInfo> s_compilerExtensions = new Dictionary<string, CompilerInfo>(StringComparer.OrdinalIgnoreCase);
System.Collections (3)
artifacts\obj\System.Collections\Debug\net10.0\System.Collections.Forwards.cs (1)
6[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.Dictionary<,>))]
System\Collections\Generic\OrderedDictionary.cs (2)
24/// class, except with lookups by key similar in complexity to that of <see cref="Dictionary{TKey, TValue}"/>. 44/// Unlike <see cref="Dictionary{TKey, TValue}"/>, removed entries are actually removed rather than left as holes
System.Collections.Concurrent (2)
System\Collections\Concurrent\ConcurrentDictionary.cs (2)
2570/// Removes the value with the specified alternate key from the <see cref="Dictionary{TKey, TValue}"/>, 2581/// Removes the value with the specified alternate key from the <see cref="Dictionary{TKey, TValue}"/>,
System.Collections.Immutable (23)
System\Collections\Frozen\DefaultFrozenDictionary.cs (1)
15internal DefaultFrozenDictionary(Dictionary<TKey, TValue> source)
System\Collections\Frozen\FrozenDictionary.cs (7)
54Dictionary<TKey, TValue> d = new(source.Length, comparer); 75GetExistingFrozenOrNewDictionary(source, comparer, out Dictionary<TKey, TValue>? uniqueValues) ?? 105/// Extracts from the source either an existing <see cref="FrozenDictionary{TKey,TValue}"/> instance or a <see cref="Dictionary{TKey,TValue}"/> 116out Dictionary<TKey, TValue>? newDictionary) 131newDictionary = source as Dictionary<TKey, TValue>; 157private static FrozenDictionary<TKey, TValue> CreateFromDictionary<TKey, TValue>(Dictionary<TKey, TValue> source) 194return (FrozenDictionary<TKey, TValue>)(object)new Int32FrozenDictionary<TValue>((Dictionary<int, TValue>)(object)source);
System\Collections\Frozen\Int32\Int32FrozenDictionary.cs (1)
21internal Int32FrozenDictionary(Dictionary<int, TValue> source) : base(EqualityComparer<int>.Default)
System\Collections\Frozen\Integer\DenseIntegralFrozenDictionary.cs (3)
29public static FrozenDictionary<TKey, TValue>? CreateIfValid<TKey, TValue>(Dictionary<TKey, TValue> source) 44private static FrozenDictionary<TKey, TValue>? CreateIfValid<TKey, TKeyUnderlying, TValue>(Dictionary<TKey, TValue> source) 50Dictionary<TKey, TValue>.Enumerator e = source.GetEnumerator();
System\Collections\Frozen\KeysAndValuesFrozenDictionary.cs (1)
18protected KeysAndValuesFrozenDictionary(Dictionary<TKey, TValue> source, bool keysAreHashCodes = false) : base(source.Comparer)
System\Collections\Frozen\SmallFrozenDictionary.cs (1)
24internal SmallFrozenDictionary(Dictionary<TKey, TValue> source) : base(source.Comparer)
System\Collections\Frozen\SmallValueTypeComparableFrozenDictionary.cs (1)
25internal SmallValueTypeComparableFrozenDictionary(Dictionary<TKey, TValue> source) : base(EqualityComparer<TKey>.Default)
System\Collections\Frozen\SmallValueTypeDefaultComparerFrozenDictionary.cs (1)
18internal SmallValueTypeDefaultComparerFrozenDictionary(Dictionary<TKey, TValue> source) : base(EqualityComparer<TKey>.Default)
System\Collections\Frozen\ValueTypeDefaultComparerFrozenDictionary.cs (1)
16internal ValueTypeDefaultComparerFrozenDictionary(Dictionary<TKey, TValue> source) : base(source, Constants.KeysAreHashCodes<TKey>())
System\Linq\ImmutableArrayExtensions.cs (6)
545public static Dictionary<TKey, T> ToDictionary<TKey, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector) where TKey : notnull 560public static Dictionary<TKey, TElement> ToDictionary<TKey, TElement, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector, Func<T, TElement> elementSelector) where TKey : notnull 574public static Dictionary<TKey, T> ToDictionary<TKey, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 578var result = new Dictionary<TKey, T>(immutableArray.Length, comparer); 598public static Dictionary<TKey, TElement> ToDictionary<TKey, TElement, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector, Func<T, TElement> elementSelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 603var result = new Dictionary<TKey, TElement>(immutableArray.Length, comparer);
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\UIHintAttribute.cs (2)
162private Dictionary<string, object?> BuildControlParametersDictionary() 164var controlParameters = new Dictionary<string, object?>();
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (3)
171private Dictionary<string, PropertyStoreItem>? _propertyStoreItems; 211private Dictionary<string, PropertyStoreItem> CreatePropertyStoreItems() 213var propertyStoreItems = new Dictionary<string, PropertyStoreItem>();
System\ComponentModel\DataAnnotations\ValidationContext.cs (1)
34private readonly Dictionary<object, object?> _items;
System.ComponentModel.Composition (43)
System\ComponentModel\Composition\AttributedModelServices.cs (1)
120var metadata = new Dictionary<string, object?>();
System\ComponentModel\Composition\ContractNameServices.cs (2)
29private static Dictionary<Type, string>? typeIdentityCache; 31private static Dictionary<Type, string> TypeIdentityCache
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (1)
39private readonly Dictionary<ComposablePartDefinition, CatalogPart> _activatedParts = new Dictionary<ComposablePartDefinition, CatalogPart>();
System\ComponentModel\Composition\Hosting\CompositionServices.cs (2)
187var dictionary = new Dictionary<string, object?>(StringComparers.MetadataKeyNames); 497Dictionary<string, object?>? metadata = null;
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (1)
34private Dictionary<string, AssemblyCatalog> _assemblyCatalogs;
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependenciesTraversal.cs (1)
18private Dictionary<string, List<ComposablePartDefinition>>? _exportersIndex;
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependentsTraversal.cs (1)
24private Dictionary<string, List<ComposablePartDefinition>>? _importersIndex;
System\ComponentModel\Composition\Hosting\ImportEngine.PartManager.cs (2)
20private Dictionary<ImportDefinition, List<IDisposable>>? _importedDisposableExports; 21private Dictionary<ImportDefinition, Export[]?>? _importCache;
System\ComponentModel\Composition\Hosting\ImportEngine.RecompositionManager.cs (1)
22private readonly Dictionary<string, WeakReferenceCollection<PartManager>> _partManagerIndex = new Dictionary<string, WeakReferenceCollection<PartManager>>();
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (7)
32private readonly Lazy<Dictionary<string, List<ComposablePartDefinition>>> _contractPartIndex; 81_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 109_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 138_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 171_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 316private Dictionary<string, List<ComposablePartDefinition>> CreateIndex() 318Dictionary<string, List<ComposablePartDefinition>> index = new Dictionary<string, List<ComposablePartDefinition>>(StringComparers.ContractName);
System\ComponentModel\Composition\MetadataViewGenerator.cs (1)
69private static readonly Dictionary<Type, MetadataViewFactory> _metadataViewFactories = new Dictionary<Type, MetadataViewFactory>();
System\ComponentModel\Composition\ReflectionModel\GenericSpecializationPartCreationInfo.cs (13)
27private Dictionary<LazyMemberInfo, MemberInfo[]>? _membersTable; 28private Dictionary<Lazy<ParameterInfo>, ParameterInfo>? _parametersTable; 100var originalMetadata = new Dictionary<string, object?>(_originalPartCreationInfo.GetMetadata()!, StringComparers.MetadataKeyNames); 153Dictionary<LazyMemberInfo, MemberInfo[]> membersTable = BuildMembersTable(members!); 154Dictionary<Lazy<ParameterInfo>, ParameterInfo>? parametersTable = BuildParametersTable(parameters); 171private Dictionary<LazyMemberInfo, MemberInfo[]> BuildMembersTable(List<LazyMemberInfo> members) 175Dictionary<LazyMemberInfo, MemberInfo[]> membersTable = new Dictionary<LazyMemberInfo, MemberInfo[]>(); 176Dictionary<int, MemberInfo> specializedPartMembers = new Dictionary<int, MemberInfo>(); 236private Dictionary<Lazy<ParameterInfo>, ParameterInfo>? BuildParametersTable(List<Lazy<ParameterInfo>>? parameters) 240Dictionary<Lazy<ParameterInfo>, ParameterInfo> parametersTable = new Dictionary<Lazy<ParameterInfo>, ParameterInfo>(); 437Dictionary<string, object?> metadata = new Dictionary<string, object?>(originalImport.Metadata, StringComparers.MetadataKeyNames); 452private Dictionary<string, object?> TranslateExportMetadata(ReflectionMemberExportDefinition originalExport) 454Dictionary<string, object?> metadata = new Dictionary<string, object?>(originalExport.Metadata, StringComparers.MetadataKeyNames);
System\ComponentModel\Composition\ReflectionModel\ImportType.cs (2)
25internal static Dictionary<Type, Func<Export, object>?>? _castSingleValueCache; 27private static Dictionary<Type, Func<Export, object>?> CastSingleValueCache
System\ComponentModel\Composition\ReflectionModel\PartCreatorExportDefinition.cs (1)
35var metadata = new Dictionary<string, object?>(_productDefinition.Metadata);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (7)
19private volatile Dictionary<ImportDefinition, object?>? _importValues; 20private volatile Dictionary<ImportDefinition, ImportingItem>? _importsCache; 21private volatile Dictionary<int, ExportingMember>? _exportsCache; 60private Dictionary<ImportDefinition, object?> ImportValues 64var value = _importValues; 81private Dictionary<ImportDefinition, ImportingItem> ImportsCache 85var value = _importsCache;
System.ComponentModel.Composition.Registration (3)
System\ComponentModel\Composition\Registration\PartBuilderOfT.cs (1)
73private Dictionary<ParameterInfo, Action<ImportBuilder>> _importBuilders;
System\ComponentModel\Composition\Registration\RegistrationBuilder.cs (2)
26private readonly Dictionary<MemberInfo, List<Attribute>> _memberInfos = new Dictionary<MemberInfo, List<Attribute>>(); 27private readonly Dictionary<ParameterInfo, List<Attribute>> _parameters = new Dictionary<ParameterInfo, List<Attribute>>();
System.ComponentModel.TypeConverter (18)
src\libraries\Common\src\System\Drawing\ColorTable.cs (6)
12private static readonly Lazy<Dictionary<string, Color>> s_colorConstants = new Lazy<Dictionary<string, Color>>(GetColors); 14private static Dictionary<string, Color> GetColors() 16var colors = new Dictionary<string, Color>(StringComparer.OrdinalIgnoreCase); 23Dictionary<string, Color> dictionary, 33internal static Dictionary<string, Color> Colors => s_colorConstants.Value;
System\ComponentModel\AttributeCollection.cs (1)
23private static Dictionary<Type, Attribute?>? s_defaultAttributes;
System\ComponentModel\ComponentResourceManager.cs (1)
20private Dictionary<CultureInfo, SortedList<string, object?>?>? _resourceSets;
System\ComponentModel\CultureInfoConverter.cs (3)
268private static readonly Dictionary<string, string> s_cultureInfoNameMap = CreateMap(); 270private static Dictionary<string, string> CreateMap() 273var result = new Dictionary<string, string>(Count)
System\ComponentModel\Design\Serialization\MemberRelationshipService.cs (1)
29private readonly Dictionary<RelationshipEntry, RelationshipEntry> _relationships = new Dictionary<RelationshipEntry, RelationshipEntry>();
System\ComponentModel\LicenseManager.LicenseInteropHelper.cs (1)
65private readonly Dictionary<string, string> _savedLicenseKeys = new Dictionary<string, string>();
System\ComponentModel\MemberDescriptor.cs (1)
345var map = new Dictionary<object, int>();
System\ComponentModel\ReflectTypeDescriptionProvider.cs (2)
37private static Dictionary<object, IntrinsicTypeConverterData>? s_intrinsicTypeConverters; 145private static Dictionary<object, IntrinsicTypeConverterData> IntrinsicTypeConverters
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (2)
444Dictionary<string, EventDescriptor> eventList = new Dictionary<string, EventDescriptor>(16); 479Dictionary<string, PropertyDescriptor> propertyList = new Dictionary<string, PropertyDescriptor>(10);
System.Composition.Convention (3)
System\Composition\Convention\ConventionBuilder.cs (2)
19private readonly Dictionary<MemberInfo, List<Attribute>> _memberInfos = new Dictionary<MemberInfo, List<Attribute>>(); 20private readonly Dictionary<ParameterInfo, List<Attribute>> _parameters = new Dictionary<ParameterInfo, List<Attribute>>();
System\Composition\Convention\PartConventionBuilderOfT.cs (1)
129private Dictionary<ParameterInfo, Action<ImportConventionBuilder>> _importBuilders;
System.Composition.Hosting (3)
System\Composition\Hosting\Core\ExportDescriptorRegistry.cs (2)
13private volatile Dictionary<CompositionContract, ExportDescriptor[]> _partDefinitions = new Dictionary<CompositionContract, ExportDescriptor[]>(); 29var updatedDefinitions = new Dictionary<CompositionContract, ExportDescriptor[]>(_partDefinitions);
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
15private readonly Dictionary<CompositionContract, UpdateResult> _updateResults = new Dictionary<CompositionContract, UpdateResult>();
System.Composition.Runtime (1)
System\Composition\Hosting\Core\CompositionContract.cs (1)
164var remainingConstraints = new Dictionary<string, object>(_metadataConstraints);
System.Composition.TypedParts (7)
System\Composition\Hosting\SinglePartExportDescriptorProvider.cs (1)
30var subsetOfConstraints = contract.MetadataConstraints.Where(c => Metadata.ContainsKey(c.Key)).ToDictionary(c => c.Key, c => Metadata[c.Key]);
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
67var propertyDependencies = dependencies
System\Composition\TypedParts\ContractHelpers.cs (1)
32Dictionary<string, object> importMetadata = null;
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (2)
174var partActivatorDependencies = dependencies 210var partMetadata = new Dictionary<string, object>();
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (2)
16private readonly Dictionary<CompositionContract, ICollection<DiscoveredExport>> _discoveredParts = new Dictionary<CompositionContract, ICollection<DiscoveredExport>>(); 89var subsettedConstraints = contract.MetadataConstraints.Where(c => export.Metadata.ContainsKey(c.Key)).ToDictionary(c => c.Key, c => export.Metadata[c.Key]);
System.Configuration.ConfigurationManager (2)
System\Configuration\BaseConfigurationRecord.cs (1)
386Dictionary<string, List<SectionInput>> indirectLocationInputs = null;
System\Configuration\ConfigurationElement.cs (1)
43private static volatile Dictionary<Type, ConfigurationValidatorBase> s_perTypeValidators;
System.Console (5)
System\IO\KeyParser.cs (1)
65Dictionary<string, ConsoleKeyInfo>.AlternateLookup<ReadOnlySpan<char>> terminfoDb = // the most important source of truth
System\TerminalFormatStrings.cs (1)
54public readonly Dictionary<string, ConsoleKeyInfo> KeyFormatToConsoleKey = new(StringComparer.Ordinal);
System\TermInfo.Database.cs (3)
37private readonly Dictionary<string, string>? _extendedStrings; 165private static Dictionary<string, string>? ParseExtendedStrings(byte[] data, int extendedBeginning, bool readAs32Bit) 254var extendedStrings = new Dictionary<string, string>(extendedStringCount);
System.Data.Common (28)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (10)
100private readonly Dictionary<string, string?> _parsetable; 154static partial void DebugTraceKeyValuePair(string keyname, string? keyvalue, Dictionary<string, string>? synonyms); 432private static Dictionary<string, string> SplitConnectionString(string connectionString, Dictionary<string, string>? synonyms, bool firstKey) 434var parsetable = new Dictionary<string, string>(); 493private static void ParseComparison(Dictionary<string, string?> parsetable, string connectionString, Dictionary<string, string>? synonyms, bool firstKey, Exception? e) 497var parsedvalues = SplitConnectionString(connectionString, synonyms, firstKey); 545private static NameValuePair? ParseInternal(Dictionary<string, string?> parsetable, string connectionString, bool buildChain, Dictionary<string, string>? synonyms, bool firstKey)
System\Data\Common\AdapterUtil.Common.cs (2)
782Dictionary<string, int> hash = new Dictionary<string, int>(columnNameArray.Length); 825private static int GenerateUniqueName(Dictionary<string, int> hash, ref string columnName, int index, int uniqueIndex)
System\Data\Common\DbConnectionOptions.cs (3)
36public DbConnectionOptions(string? connectionString, Dictionary<string, string>? synonyms, bool useOdbcRules) 51internal Dictionary<string, string?> Parsetable => _parsetable; 166static partial void DebugTraceKeyValuePair(string keyname, string? keyvalue, Dictionary<string, string>? synonyms)
System\Data\Common\DbConnectionStringBuilder.cs (3)
28private Dictionary<string, object>? _currentValues; 58private Dictionary<string, object> CurrentValues 62Dictionary<string, object>? values = _currentValues;
System\Data\Common\ObjectStorage.cs (3)
552private static Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>? s_tempAssemblyCache; 592Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer>? cache = s_tempAssemblyCache; 609Dictionary<KeyValuePair<Type, XmlRootAttribute>, XmlSerializer> tmp =
System\Data\DataColumnCollection.cs (1)
27private readonly Dictionary<string, DataColumn?> _columnFromName; // Links names to columns
System\Data\DataView.cs (5)
30private Dictionary<string, Index>? _findIndexes; 74private Dictionary<DataRow, DataRowView> _rowViewCache = new Dictionary<DataRow, DataRowView>(DataRowReferenceComparer.s_default); 79private readonly Dictionary<DataRow, DataRowView> _rowViewBuffer = new Dictionary<DataRow, DataRowView>(DataRowReferenceComparer.s_default); 1451Dictionary<DataRow, DataRowView> rvc = new Dictionary<DataRow, DataRowView>(CountFromIndex, DataRowReferenceComparer.s_default); 1558Dictionary<string, Index> indexes = _findIndexes;
System\Data\XMLSchema.cs (1)
148private Dictionary<DataTable, List<DataTable>>? _tableDictionary;
System.Data.Odbc (27)
Common\System\Data\Common\DbConnectionOptions.cs (2)
44public DbConnectionOptions(string connectionString, Dictionary<string, string>? synonyms, bool useOdbcRules) 102internal Dictionary<string, string?> Parsetable
Common\System\Data\Common\DBConnectionString.cs (4)
29private readonly Dictionary<string, string?> _parsetable; 51internal DBConnectionString(string value, string restrictions, KeyRestrictionBehavior behavior, Dictionary<string, string> synonyms, bool useOdbcRules) 65private DBConnectionString(DbConnectionOptions connectionOptions, string? restrictions, KeyRestrictionBehavior behavior, Dictionary<string, string>? synonyms, bool mustCloneDictionary) 465private static string[]? ParseRestrictions(string restrictions, Dictionary<string, string>? synonyms)
src\libraries\Common\src\System\Data\Common\BasicFieldNameLookup.cs (2)
14private Dictionary<string, int>? _fieldNameLookup; 130Dictionary<string, int> hash = new Dictionary<string, int>(length);
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (10)
100private readonly Dictionary<string, string?> _parsetable; 154static partial void DebugTraceKeyValuePair(string keyname, string? keyvalue, Dictionary<string, string>? synonyms); 432private static Dictionary<string, string> SplitConnectionString(string connectionString, Dictionary<string, string>? synonyms, bool firstKey) 434var parsetable = new Dictionary<string, string>(); 493private static void ParseComparison(Dictionary<string, string?> parsetable, string connectionString, Dictionary<string, string>? synonyms, bool firstKey, Exception? e) 497var parsedvalues = SplitConnectionString(connectionString, synonyms, firstKey); 545private static NameValuePair? ParseInternal(Dictionary<string, string?> parsetable, string connectionString, bool buildChain, Dictionary<string, string>? synonyms, bool firstKey)
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionFactory.cs (8)
15private Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> _connectionPoolGroups; 46Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> connectionPoolGroups = _connectionPoolGroups; 68Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> connectionPoolGroups = _connectionPoolGroups; 123Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> connectionPoolGroups = _connectionPoolGroups; 179Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> connectionPoolGroups = _connectionPoolGroups; 221Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> newConnectionPoolGroups = new Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup>(1 + connectionPoolGroups.Count); 302Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> connectionPoolGroups = _connectionPoolGroups; 303Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup> newConnectionPoolGroups = new Dictionary<DbConnectionPoolKey, DbConnectionPoolGroup>(connectionPoolGroups.Count);
System\Data\Odbc\OdbcConnectionStringbuilder.cs (1)
28private static readonly Dictionary<string, Keywords> s_keywords = new Dictionary<string, Keywords>(2, StringComparer.OrdinalIgnoreCase)
System.Diagnostics.DiagnosticSource (6)
System\Diagnostics\Activity.cs (1)
113private Dictionary<string, object>? _customProperties;
System\Diagnostics\DsesActivitySourceListener.cs (2)
14private Dictionary<SpecLookupKey, DsesFilterAndTransform>? _specsBySourceNameAndActivityName; 73var specs = _specsBySourceNameAndActivityName ??= new(SpecLookupKeyComparer.Instance);
System\Diagnostics\Metrics\AggregationManager.cs (1)
27private Dictionary<Instrument, bool> _instruments = new();
System\Diagnostics\Metrics\Meter.cs (1)
20private Dictionary<string, List<Instrument>> _nonObservableInstrumentsCache = new();
System\Diagnostics\Metrics\MeterListener.cs (1)
254Dictionary<Instrument, object?>? callbacksArguments = null;
System.Diagnostics.Process (5)
System\Collections\Specialized\DictionaryWrapper.cs (2)
10private readonly Dictionary<string, string?> _contents; 12public DictionaryWrapper(Dictionary<string, string?> contents)
System\Diagnostics\ProcessWaitState.Unix.cs (3)
86private static readonly Dictionary<int, ProcessWaitState> s_processWaitStates = 92private static readonly Dictionary<int, ProcessWaitState> s_childProcessWaitStates = 164Dictionary<int, ProcessWaitState> waitStates = _isChild ? s_childProcessWaitStates : s_processWaitStates;
System.Drawing.Common.Tests (5)
System\Drawing\ImageAnimator.ManualTests.cs (3)
39Dictionary<string, EventHandler> handlers = []; 40Dictionary<string, int> frameIndexes = []; 41Dictionary<string, Bitmap> bitmaps = [];
System\Drawing\Imaging\ImageCodecInfoTests.cs (2)
45private readonly Dictionary<Guid, ImageCodecInfo> _decoders; 46private readonly Dictionary<Guid, ImageCodecInfo> _encoders;
System.Drawing.Primitives (7)
src\libraries\Common\src\System\Drawing\ColorTable.cs (6)
12private static readonly Lazy<Dictionary<string, Color>> s_colorConstants = new Lazy<Dictionary<string, Color>>(GetColors); 14private static Dictionary<string, Color> GetColors() 16var colors = new Dictionary<string, Color>(StringComparer.OrdinalIgnoreCase); 23Dictionary<string, Color> dictionary, 33internal static Dictionary<string, Color> Colors => s_colorConstants.Value;
System\Drawing\ColorTranslator.cs (1)
22private static Dictionary<string, Color>? s_htmlSysColorTable;
System.Formats.Nrbf (5)
System\Formats\Nrbf\ClassInfo.cs (3)
25private ClassInfo(SerializationRecordId id, string rawName, Dictionary<string, int> memberNames) 43internal Dictionary<string, int> MemberNames { get; } 55Dictionary<string, int> memberNames = new(StringComparer.Ordinal);
System\Formats\Nrbf\RecordMap.cs (1)
14private readonly Dictionary<SerializationRecordId, SerializationRecord> _map = new();
System\Formats\Nrbf\SystemClassWithMembersAndTypesRecord.cs (1)
51Collections.Generic.Dictionary<string, int>.Enumerator structEnumerator = classInfo.MemberNames.GetEnumerator();
System.Formats.Tar (11)
System\Formats\Tar\TarHeader.cs (2)
77private Dictionary<string, string>? _ea; 78internal Dictionary<string, string> ExtendedAttributes => _ea ??= new Dictionary<string, string>();
System\Formats\Tar\TarHeader.Read.cs (1)
100internal void ReplaceNormalAttributesWithExtended(Dictionary<string, string>? dictionaryFromExtendedAttributesHeader)
System\Formats\Tar\TarHeader.Write.cs (5)
495private void WriteAsPaxExtendedAttributes(Stream archiveStream, Span<byte> buffer, Dictionary<string, string> extendedAttributes, bool isGea, int globalExtendedAttributesEntryNumber) 503private Task WriteAsPaxExtendedAttributesAsync(Stream archiveStream, Memory<byte> buffer, Dictionary<string, string> extendedAttributes, bool isGea, int globalExtendedAttributesEntryNumber, CancellationToken cancellationToken) 512private void WriteAsPaxExtendedAttributesShared(bool isGea, int globalExtendedAttributesEntryNumber, Dictionary<string, string> extendedAttributes) 865private static MemoryStream? GenerateExtendedAttributesDataStream(Dictionary<string, string> extendedAttributes) 1004static void TryAddStringField(Dictionary<string, string> extendedAttributes, string key, string? value, int maxLength)
System\Formats\Tar\TarHelpers.cs (1)
149internal static bool TryGetDateTimeOffsetFromTimestampString(Dictionary<string, string>? dict, string fieldName, out DateTimeOffset dateTimeOffset)
System\Formats\Tar\TarWriter.Unix.cs (2)
15private readonly Dictionary<uint, string> _userIdentifiers = new Dictionary<uint, string>(); 16private readonly Dictionary<uint, string> _groupIdentifiers = new Dictionary<uint, string>();
System.IO.Compression (1)
System\IO\Compression\ZipArchive.cs (1)
23private readonly Dictionary<string, ZipArchiveEntry> _entriesDictionary;
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
281private readonly Dictionary<int, WatchedDirectory> _wdToPathMap = new Dictionary<int, WatchedDirectory>();
System.IO.Packaging (20)
System\IO\Packaging\ContentType.cs (3)
143internal Dictionary<string, string>.Enumerator ParameterValuePairs => 191Dictionary<string, string>.Enumerator contentTypeEnumerator; 509private Dictionary<string, string>? _parameterDictionary;
System\IO\Packaging\OrderedDictionary.cs (1)
17private readonly Dictionary<TKey, LinkedListNode<TValue>> _dictionary;
System\IO\Packaging\Package.cs (2)
417Dictionary<string, KeyValuePair<PackUriHelper.ValidatedPartUri, PackagePart>> partDictionary = new(parts.Length); 1203private void CopyPartDictionaryToPartList(Dictionary<string, KeyValuePair<PackUriHelper.ValidatedPartUri, PackagePart>> partDictionary, List<string> partIndex)
System\IO\Packaging\PartBasedPackageProperties.cs (1)
838private readonly Dictionary<PackageXmlEnum, object> _propertyDictionary = new Dictionary<PackageXmlEnum, object>(NumCoreProperties);
System\IO\Packaging\XmlCompatibilityReader.cs (9)
1471private Dictionary<string, object?>? _ignorables; 1472private Dictionary<string, ProcessContentSet>? _processContents; 1473private Dictionary<string, PreserveItemSet>? _preserveElements; 1474private Dictionary<string, PreserveItemSet>? _preserveAttributes; 1832private Dictionary<string, object?>? _knownNamespaces; 1833private readonly Dictionary<string, string> _namespaceMap = new Dictionary<string, string>(); 1834private Dictionary<string, object?>? _subsumingNamespaces; 1835private readonly Dictionary<string, HandleElementCallback> _elementHandler = new Dictionary<string, HandleElementCallback>(); 1836private readonly Dictionary<string, HandleAttributeCallback> _attributeHandler = new Dictionary<string, HandleAttributeCallback>();
System\IO\Packaging\ZipPackage.cs (4)
1293private Dictionary<PackUriHelper.ValidatedPartUri, ContentType>? _overrideDictionary; 1294private readonly Dictionary<string, ContentType> _defaultDictionary; 1353private readonly Dictionary<string, List<string>> _ignoredItemDictionary; 1358private readonly Dictionary<string, List<string>> _extensionDictionary;
System.IO.Pipes (1)
System\IO\Pipes\NamedPipeServerStream.Unix.cs (1)
236private static readonly Dictionary<string, SharedServer> s_servers = new Dictionary<string, SharedServer>();
System.Linq (32)
System\Linq\AggregateBy.cs (4)
117static Dictionary<TKey, TAccumulate> PopulateDictionary(IEnumerator<TSource> enumerator, Func<TSource, TKey> keySelector, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) 119Dictionary<TKey, TAccumulate> dict = new(keyComparer); 149static Dictionary<TKey, TAccumulate> PopulateDictionary(IEnumerator<TSource> enumerator, Func<TSource, TKey> keySelector, Func<TKey, TAccumulate> seedSelector, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) 151Dictionary<TKey, TAccumulate> dict = new(keyComparer);
System\Linq\CountBy.cs (2)
54private static Dictionary<TKey, int> BuildCountDictionary<TSource, TKey>(IEnumerator<TSource> enumerator, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 56Dictionary<TKey, int> countsBy = new(keyComparer);
System\Linq\ToCollection.cs (26)
74/// Creates a <see cref="Dictionary{TKey,TValue}"/> from an <see cref="IEnumerable{T}"/> according to the default comparer for the key type. 78/// <param name="source">The <see cref="IEnumerable{T}"/> to create a <see cref="Dictionary{TKey,TValue}"/> from.</param> 79/// <returns>A <see cref="Dictionary{TKey,TValue}"/> that contains keys and values from <paramref name="source"/> and uses default comparer for the key type.</returns> 82public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source) where TKey : notnull => 86/// Creates a <see cref="Dictionary{TKey,TValue}"/> from an <see cref="IEnumerable{T}"/> according to specified key comparer. 90/// <param name="source">The <see cref="IEnumerable{T}"/> to create a <see cref="Dictionary{TKey,TValue}"/> from.</param> 92/// <returns>A <see cref="Dictionary{TKey,TValue}"/> that contains keys and values from <paramref name="source"/>.</returns> 98public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IEqualityComparer<TKey>? comparer) where TKey : notnull 109/// Creates a <see cref="Dictionary{TKey,TValue}"/> from an <see cref="IEnumerable{T}"/> according to the default comparer for the key type. 113/// <param name="source">The <see cref="IEnumerable{T}"/> to create a <see cref="Dictionary{TKey,TValue}"/> from.</param> 114/// <returns>A <see cref="Dictionary{TKey,TValue}"/> that contains keys and values from <paramref name="source"/> and uses default comparer for the key type.</returns> 117public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<(TKey Key, TValue Value)> source) where TKey : notnull => 121/// Creates a <see cref="Dictionary{TKey,TValue}"/> from an <see cref="IEnumerable{T}"/> according to specified key comparer. 125/// <param name="source">The <see cref="IEnumerable{T}"/> to create a <see cref="Dictionary{TKey,TValue}"/> from.</param> 127/// <returns>A <see cref="Dictionary{TKey,TValue}"/> that contains keys and values from <paramref name="source"/>.</returns> 133public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(this IEnumerable<(TKey Key, TValue Value)> source, IEqualityComparer<TKey>? comparer) where TKey : notnull => 136public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) where TKey : notnull => 139public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 170Dictionary<TKey, TSource> d = new Dictionary<TKey, TSource>(capacity, comparer); 179private static Dictionary<TKey, TSource> SpanToDictionary<TSource, TKey>(ReadOnlySpan<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 181Dictionary<TKey, TSource> d = new Dictionary<TKey, TSource>(source.Length, comparer); 189public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) where TKey : notnull => 192public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 228Dictionary<TKey, TElement> d = new Dictionary<TKey, TElement>(capacity, comparer); 237private static Dictionary<TKey, TElement> SpanToDictionary<TSource, TKey, TElement>(ReadOnlySpan<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 239Dictionary<TKey, TElement> d = new Dictionary<TKey, TElement>(source.Length, comparer);
System.Linq.AsyncEnumerable (40)
System\Linq\AggregateBy.cs (4)
64Dictionary<TKey, TAccumulate> dict = new(keyComparer); 135Dictionary<TKey, TAccumulate> dict = new(keyComparer); 202Dictionary<TKey, TAccumulate> dict = new(keyComparer); 271Dictionary<TKey, TAccumulate> dict = new(keyComparer);
System\Linq\CountBy.cs (2)
42Dictionary<TKey, int> countsBy = new(keyComparer); 93Dictionary<TKey, int> countsBy = new(keyComparer);
System\Linq\ToDictionaryAsync.cs (34)
14/// Creates a <see cref="Dictionary{TKey,TValue}"/> from an <see cref="IAsyncEnumerable{T}"/> according to specified key comparer. 18/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey,TValue}"/> from.</param> 21/// <returns>A <see cref="Dictionary{TKey,TValue}"/> that contains keys and values from <paramref name="source"/>.</returns> 24public static ValueTask<Dictionary<TKey, TValue>> ToDictionaryAsync<TKey, TValue>( 33static async ValueTask<Dictionary<TKey, TValue>> Impl( 37Dictionary<TKey, TValue> d = new Dictionary<TKey, TValue>(comparer); 48/// Creates a <see cref="Dictionary{TKey,TValue}"/> from an <see cref="IAsyncEnumerable{T}"/> according to specified key comparer. 52/// <param name="source">The <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey,TValue}"/> from.</param> 55/// <returns>A <see cref="Dictionary{TKey,TValue}"/> that contains keys and values from <paramref name="source"/>.</returns> 58public static ValueTask<Dictionary<TKey, TValue>> ToDictionaryAsync<TKey, TValue>( 63/// Creates a <see cref="Dictionary{TKey, TValue}"/> from an <see cref="IAsyncEnumerable{T}"/> 68/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey, TValue}"/> from.</param> 72/// <returns>A <see cref="Dictionary{TKey, TValue}"/> that contains keys and values.</returns> 76public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAsync<TSource, TKey>( 87static async ValueTask<Dictionary<TKey, TSource>> Impl( 92Dictionary<TKey, TSource> d = new(comparer); 102/// Creates a <see cref="Dictionary{TKey, TValue}"/> from an <see cref="IAsyncEnumerable{T}"/> 107/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey, TValue}"/> from.</param> 111/// <returns>A <see cref="Dictionary{TKey, TValue}"/> that contains keys and values.</returns> 115public static ValueTask<Dictionary<TKey, TSource>> ToDictionaryAsync<TSource, TKey>( 126static async ValueTask<Dictionary<TKey, TSource>> Impl( 132Dictionary<TKey, TSource> d = new(comparer); 142/// Creates a <see cref="Dictionary{TKey, TValue}"/> from an <see cref="IAsyncEnumerable{T}"/>"/> 148/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey, TValue}"/> from.</param> 153/// <returns>A <see cref="Dictionary{TKey, TValue}"/> that contains values of type <typeparamref name="TElement"/> selected from the input sequence.</returns> 158public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAsync<TSource, TKey, TElement>( 171static async ValueTask<Dictionary<TKey, TElement>> Impl( 177Dictionary<TKey, TElement> d = new(comparer); 188/// Creates a <see cref="Dictionary{TKey, TValue}"/> from an <see cref="IAsyncEnumerable{T}"/>"/> 194/// <param name="source">An <see cref="IAsyncEnumerable{T}"/> to create a <see cref="Dictionary{TKey, TValue}"/> from.</param> 199/// <returns>A <see cref="Dictionary{TKey, TValue}"/> that contains values of type <typeparamref name="TElement"/> selected from the input sequence.</returns> 204public static ValueTask<Dictionary<TKey, TElement>> ToDictionaryAsync<TSource, TKey, TElement>( 217static async ValueTask<Dictionary<TKey, TElement>> Impl( 224Dictionary<TKey, TElement> d = new(comparer);
System.Linq.Expressions (49)
System\Dynamic\ExpandoClass.cs (1)
17private Dictionary<int, List<WeakReference>>? _transitions; // cached transitions
System\Dynamic\Utils\Helpers.cs (1)
34internal static void IncrementCount<T>(T key, Dictionary<T, int> dict) where T : notnull
System\Linq\Expressions\Common\CachedReflectionInfo.cs (3)
83s_DictionaryOfStringInt32_Add_String_Int32 ??= typeof(Dictionary<string, int>).GetMethod(nameof(Dictionary<string, int>.Add), new[] { typeof(string), typeof(int) })!; 87s_DictionaryOfStringInt32_Ctor_Int32 ??= typeof(Dictionary<string, int>).GetConstructor(new[] { typeof(int) })!;
System\Linq\Expressions\Compiler\AnalyzedTree.cs (2)
10internal readonly Dictionary<object, CompilerScope> Scopes = new Dictionary<object, CompilerScope>(); 11internal readonly Dictionary<LambdaExpression, BoundConstants> Constants = new Dictionary<LambdaExpression, BoundConstants>();
System\Linq\Expressions\Compiler\BoundConstants.cs (3)
60private readonly Dictionary<object, int> _indexes = new Dictionary<object, int>(ReferenceEqualityComparer.Instance); 65private readonly Dictionary<TypedConstant, int> _references = new Dictionary<TypedConstant, int>(); 70private readonly Dictionary<TypedConstant, LocalBuilder> _cache = new Dictionary<TypedConstant, LocalBuilder>();
System\Linq\Expressions\Compiler\CompilerScope.cs (3)
64internal readonly Dictionary<ParameterExpression, VariableStorageKind> Definitions = new Dictionary<ParameterExpression, VariableStorageKind>(); 70internal Dictionary<ParameterExpression, int>? ReferenceCount; 94private readonly Dictionary<ParameterExpression, Storage> _locals = new Dictionary<ParameterExpression, Storage>();
System\Linq\Expressions\Compiler\DelegateHelpers.Generated.cs (1)
65public Dictionary<Type, TypeInfo> TypeChain;
System\Linq\Expressions\Compiler\HoistedLocals.cs (1)
69Dictionary<Expression, int> indexes = new Dictionary<Expression, int>(vars.Count);
System\Linq\Expressions\Compiler\KeyedStack.cs (1)
14private readonly Dictionary<TKey, Stack<TValue>> _data = new Dictionary<TKey, Stack<TValue>>();
System\Linq\Expressions\Compiler\LabelInfo.cs (1)
329private Dictionary<LabelTarget, LabelInfo>? _labels; // lazily allocated, we typically use this only once every 6th-7th block
System\Linq\Expressions\Compiler\LambdaCompiler.cs (1)
49private readonly Dictionary<LabelTarget, LabelInfo> _labelInfo = new Dictionary<LabelTarget, LabelInfo>();
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (2)
688MemberExpression dictField = CreateLazyInitializedField<Dictionary<string, int>>("dictionarySwitch"); 752[DynamicDependency("TryGetValue", typeof(Dictionary<,>))]
System\Linq\Expressions\DebugViewWriter.cs (4)
42private Dictionary<LambdaExpression, int>? _lambdaIds; 47private Dictionary<ParameterExpression, int>? _paramIds; 52private Dictionary<LabelTarget, int>? _labelIds; 76private static int GetId<T>(T e, ref Dictionary<T, int>? ids) where T : notnull
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
21private Dictionary<object, int>? _ids;
System\Linq\Expressions\Interpreter\ControlFlowInstructions.cs (4)
741private readonly Dictionary<T, int> _cases; 743internal IntSwitchInstruction(Dictionary<T, int> cases) 761private readonly Dictionary<string, int> _cases; 764internal StringSwitchInstruction(Dictionary<string, int> cases, StrongBox<int> nullCase)
System\Linq\Expressions\Interpreter\InstructionList.cs (3)
851private static readonly Dictionary<FieldInfo, Instruction> s_loadFields = new Dictionary<FieldInfo, Instruction>(); 1092public void EmitIntSwitch<T>(Dictionary<T, int> cases) where T : notnull 1097public void EmitStringSwitch(Dictionary<string, int> cases, StrongBox<int> nullCase)
System\Linq\Expressions\Interpreter\Interpreter.cs (1)
44internal Dictionary<ParameterExpression, LocalVariable>? ClosureVariables { get; }
System\Linq\Expressions\Interpreter\LightCompiler.cs (4)
1634var caseDict = new Dictionary<T, int>(); 1676var caseDict = new Dictionary<string, int>(); 2775var mapping = new Dictionary<ParameterExpression, LocalVariable>(); 2788private readonly Dictionary<ParameterExpression, int> _definedParameters = new Dictionary<ParameterExpression, int>();
System\Linq\Expressions\Interpreter\LightLambda.cs (3)
39private readonly Dictionary<int, int> _tryStart = new Dictionary<int, int>(); 40private readonly Dictionary<int, string> _handlerEnter = new Dictionary<int, string>(); 41private readonly Dictionary<int, int> _handlerExit = new Dictionary<int, int>();
System\Linq\Expressions\Interpreter\LocalVariables.cs (2)
69private Dictionary<ParameterExpression, LocalVariable>? _closureVariables; 156internal Dictionary<ParameterExpression, LocalVariable>? ClosureVariables => _closureVariables;
System\Linq\Expressions\Interpreter\TypeOperations.cs (4)
468private readonly Dictionary<ParameterExpression, LocalVariable>? _hoistedVariables; 470public QuoteInstruction(Expression operand, Dictionary<ParameterExpression, LocalVariable>? hoistedVariables) 499private readonly Dictionary<ParameterExpression, LocalVariable> _variables; 507internal ExpressionQuoter(Dictionary<ParameterExpression, LocalVariable> hoistedVariables, InterpretedFrame frame)
System\Linq\Expressions\Interpreter\Utilities.cs (1)
173private Dictionary<TKey, TValue>? _dict;
System\Runtime\CompilerServices\CallSiteBinder.cs (2)
24internal Dictionary<Type, object>? Cache; 211var cache = Cache;
System.Linq.Parallel (11)
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (1)
283var leftLookup =
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (1)
234private Dictionary<Wrapper<TInputOutput>, Pair<TInputOutput, TLeftKey>>? _hashLookup; // The hash lookup, used to produce the intersection.
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (1)
341Dictionary<Wrapper<TInputOutput>, Pair<TInputOutput, ConcatKey<TLeftKey, TRightKey>>> union =
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (1)
194private readonly Dictionary<Wrapper<TInputOutput>, TKey> _hashLookup; // The hash lookup, used to produce the distinct set.
System\Linq\Parallel\Utils\Lookup.cs (1)
39private readonly Dictionary<TKey, IGrouping<TKey, TElement>> _dict;
System\Linq\ParallelEnumerable.cs (6)
4929public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>( 4958public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>( 4965Dictionary<TKey, TSource> result = new Dictionary<TKey, TSource>(comparer); 5020public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>( 5055public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>( 5063Dictionary<TKey, TElement> result = new Dictionary<TKey, TElement>(comparer);
System.Linq.Queryable (2)
System\Linq\EnumerableRewriter.cs (2)
20private Dictionary<LabelTarget, LabelTarget>? _targetCache; 22private Dictionary<Type, Type>? _equivalentTypeCache;
System.Net.Http (20)
src\libraries\Common\src\System\Collections\Generic\BidirectionalDictionary.cs (3)
13private readonly Dictionary<T1, T2> _forward; 14private readonly Dictionary<T2, T1> _backward; 48public Dictionary<T1, T2>.Enumerator GetEnumerator()
src\libraries\Common\src\System\Net\CredentialCacheKey.cs (1)
104public static bool TryGetCredential(Dictionary<CredentialCacheKey, NetworkCredential> cache, Uri uriPrefix, string authType, [NotNullWhen(true)] out Uri? mostSpecificMatchUri, [NotNullWhen(true)] out NetworkCredential? mostSpecificMatch)
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\H3StaticTable.Http3.cs (1)
11private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int>
System\Net\Http\Headers\HttpHeaders.cs (8)
417: ref CollectionsMarshal.GetValueRefOrNullRef((Dictionary<HeaderDescriptor, object>)_headerStore, entry.Key); 1448var dictionary = (Dictionary<HeaderDescriptor, object>)_headerStore!; 1490valueRef = ref CollectionsMarshal.GetValueRefOrNullRef((Dictionary<HeaderDescriptor, object>)store, key); 1553var dictionary = new Dictionary<HeaderDescriptor, object>(ArrayThreshold); 1565var dictionary = (Dictionary<HeaderDescriptor, object>)_headerStore!; 1635removed = ((Dictionary<HeaderDescriptor, object>)store).Remove(key);
System\Net\Http\HttpRequestOptions.cs (1)
17private Dictionary<string, object?> Options { get; } = new Dictionary<string, object?>();
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (1)
238internal readonly Dictionary<string, string> Parameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (2)
53private volatile Dictionary<HttpAuthority, Exception?>? _altSvcBlocklist; 812Dictionary<HttpAuthority, Exception?>? altSvcBlocklist = _altSvcBlocklist;
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
41private readonly Dictionary<int, Http2Stream> _httpStreams;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (1)
29private readonly Dictionary<QuicStream, Http3RequestStream> _activeRequests = new Dictionary<QuicStream, Http3RequestStream>();
System\Net\Http\SocketsHttpHandler\PreAuthCredentialCache.cs (1)
14private Dictionary<CredentialCacheKey, NetworkCredential>? _cache;
System.Net.HttpListener (14)
System\Net\Managed\HttpEndPointListener.cs (4)
46private Dictionary<ListenerPrefix, HttpListener> _prefixes; 191Dictionary<ListenerPrefix, HttpListener> localPrefixes = _prefixes; 348Dictionary<ListenerPrefix, HttpListener> prefs, p2; 392Dictionary<ListenerPrefix, HttpListener> prefs, p2;
System\Net\Managed\HttpEndPointManager.cs (6)
40private static readonly Dictionary<IPAddress, Dictionary<int, HttpEndPointListener>> s_ipEndPoints = new Dictionary<IPAddress, Dictionary<int, HttpEndPointListener>>(); 137Dictionary<int, HttpEndPointListener>? p; 138if (s_ipEndPoints.TryGetValue(addr, out Dictionary<int, HttpEndPointListener>? value)) 173Dictionary<int, HttpEndPointListener>? p = null;
System\Net\Managed\HttpListener.Managed.cs (4)
15private readonly Dictionary<HttpListenerContext, HttpListenerContext> _listenerContexts = new Dictionary<HttpListenerContext, HttpListenerContext>(); 18private readonly Dictionary<HttpConnection, HttpConnection> _connections = new Dictionary<HttpConnection, HttpConnection>(); 220Dictionary<HttpListenerContext, HttpListenerContext>.KeyCollection keys = _listenerContexts.Keys; 230Dictionary<HttpConnection, HttpConnection>.KeyCollection keys = _connections.Keys;
System.Net.Mail (11)
System\Net\Mail\MailHeaderInfo.cs (3)
69private static readonly Dictionary<string, int> s_headerDictionary = CreateHeaderDictionary(); 71private static Dictionary<string, int> CreateHeaderDictionary() 74var headers = new Dictionary<string, int>((int)MailHeaderID.ZMaxEnumValue + 1, StringComparer.OrdinalIgnoreCase);
System\Net\Mail\SmtpLoginAuthenticationModule.cs (1)
11private readonly Dictionary<object, NetworkCredential> _sessions = new Dictionary<object, NetworkCredential>();
System\Net\Mail\SmtpNegotiateAuthenticationModule.cs (1)
15private readonly Dictionary<object, NegotiateAuthentication> _sessions = new Dictionary<object, NegotiateAuthentication>();
System\Net\Mail\SmtpNtlmAuthenticationModule.cs (1)
12private readonly Dictionary<object, NegotiateAuthentication> _sessions = new Dictionary<object, NegotiateAuthentication>();
System\Net\Mime\ContentDisposition.cs (1)
42private static readonly Dictionary<string, TrackingValidationObjectDictionary.ValidateAndParseValue> s_validators =
System\Net\Mime\SmtpDateTime.cs (1)
62internal static readonly Dictionary<string, TimeSpan> s_timeZoneOffsetLookup = new Dictionary<string, TimeSpan>()
System\Net\TrackingValidationObjectDictionary.cs (3)
23private readonly Dictionary<string, ValidateAndParseValue> _validators; 24private Dictionary<string, object>? _internalObjects; 31internal TrackingValidationObjectDictionary(Dictionary<string, ValidateAndParseValue> validators)
System.Net.NameResolution (1)
System\Net\Dns.cs (1)
712private static readonly Dictionary<object, Task> s_tasks = new Dictionary<object, Task>();
System.Net.NetworkInformation (5)
System\Net\NetworkInformation\LinuxNetworkInterface.cs (1)
93Dictionary<int, LinuxNetworkInterface> interfacesByIndex = new Dictionary<int, LinuxNetworkInterface>(interfaceCount);
System\Net\NetworkInformation\NetworkAddressChange.cs (2)
13private static readonly Dictionary<NetworkAddressChangedEventHandler, ExecutionContext?> s_addressChangedSubscribers = 17private static readonly Dictionary<NetworkAvailabilityChangedEventHandler, ExecutionContext?> s_availabilityChangedSubscribers =
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (2)
264Dictionary<NetworkAddressChangedEventHandler, ExecutionContext?>? addressChangedSubscribers = null; 296Dictionary<NetworkAvailabilityChangedEventHandler, ExecutionContext?>? availabilityChangedSubscribers = null;
System.Net.Ping (2)
src\libraries\Common\src\System\Net\Sockets\SocketErrorPal.Unix.cs (2)
34private static readonly Dictionary<Interop.Error, SocketError> s_nativeErrorToSocketError = new Dictionary<Interop.Error, SocketError>(NativeErrorToSocketErrorCount) 80private static readonly Dictionary<SocketError, Interop.Error> s_socketErrorToNativeError = new Dictionary<SocketError, Interop.Error>(SocketErrorToNativeErrorCount)
System.Net.Primitives (9)
src\libraries\Common\src\System\Net\CredentialCacheKey.cs (1)
104public static bool TryGetCredential(Dictionary<CredentialCacheKey, NetworkCredential> cache, Uri uriPrefix, string authType, [NotNullWhen(true)] out Uri? mostSpecificMatchUri, [NotNullWhen(true)] out NetworkCredential? mostSpecificMatch)
src\libraries\Common\src\System\Net\Sockets\SocketErrorPal.Unix.cs (2)
34private static readonly Dictionary<Interop.Error, SocketError> s_nativeErrorToSocketError = new Dictionary<Interop.Error, SocketError>(NativeErrorToSocketErrorCount) 80private static readonly Dictionary<SocketError, Interop.Error> s_socketErrorToNativeError = new Dictionary<SocketError, Interop.Error>(SocketErrorToNativeErrorCount)
System\Net\CredentialCache.cs (6)
16private Dictionary<CredentialCacheKey, NetworkCredential>? _cache; 17private Dictionary<CredentialHostKey, NetworkCredential>? _cacheForHosts; 246private Dictionary<TKey, NetworkCredential>.ValueCollection.Enumerator _enumerator; // mutable struct field deliberately not readonly. 248public SingleTableCredentialEnumerator(CredentialCache cache, Dictionary<TKey, NetworkCredential> table) : base(cache) 270private Dictionary<CredentialHostKey, NetworkCredential>.ValueCollection.Enumerator _enumerator; // mutable struct field deliberately not readonly. 310internal static bool MoveNext<TKey, TValue>(ref Dictionary<TKey, TValue>.ValueCollection.Enumerator enumerator, out TValue current) where TKey : notnull
System.Net.Security (1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (1)
73private Dictionary<string, IntPtr>? _sslSessions;
System.Net.Sockets (2)
src\libraries\Common\src\System\Net\Sockets\SocketErrorPal.Unix.cs (2)
34private static readonly Dictionary<Interop.Error, SocketError> s_nativeErrorToSocketError = new Dictionary<Interop.Error, SocketError>(NativeErrorToSocketErrorCount) 80private static readonly Dictionary<SocketError, Interop.Error> s_socketErrorToNativeError = new Dictionary<SocketError, Interop.Error>(SocketErrorToNativeErrorCount)
System.ObjectModel (1)
System\Collections\ObjectModel\KeyedCollection.cs (1)
19private Dictionary<TKey, TItem>? dict; // Do not rename (binary serialization)
System.Private.CoreLib (170)
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (2)
24private static readonly Dictionary<string, IsolatedComponentLoadContext> s_assemblyLoadContexts = new Dictionary<string, IsolatedComponentLoadContext>(StringComparer.InvariantCulture); 25private static readonly Dictionary<IntPtr, Delegate> s_delegates = new Dictionary<IntPtr, Delegate>();
src\libraries\System.Private.CoreLib\src\System\AppContext.AnyOS.cs (1)
70static void LogDataStore(RuntimeEventSource ev, Dictionary<string, bool>? switches)
src\libraries\System.Private.CoreLib\src\System\AppContext.cs (2)
18private static Dictionary<string, object?>? s_dataStore 23private static Dictionary<string, bool>? s_switches;
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (31)
117if (enumerable.GetType() == typeof(Dictionary<TKey, TValue>)) 119Dictionary<TKey, TValue> source = (Dictionary<TKey, TValue>)enumerable; 639/// Gets an instance of a type that may be used to perform operations on the current <see cref="Dictionary{TKey, TValue}"/> 661/// Gets an instance of a type that may be used to perform operations on the current <see cref="Dictionary{TKey, TValue}"/> 686/// Provides a type that may be used to perform operations on a <see cref="Dictionary{TKey, TValue}"/> 693internal AlternateLookup(Dictionary<TKey, TValue> dictionary) 700/// <summary>Gets the <see cref="Dictionary{TKey, TValue}"/> against which this instance performs operations.</summary> 701public Dictionary<TKey, TValue> Dictionary { get; } 728internal static bool IsCompatibleKey(Dictionary<TKey, TValue> dictionary) 736internal static IAlternateEqualityComparer<TAlternateKey, TKey> GetAlternateComparer(Dictionary<TKey, TValue> dictionary) 789/// <summary>Determines whether the <see cref="Dictionary{TKey, TValue}"/> contains the specified alternate key.</summary> 802Dictionary<TKey, TValue> dictionary = Dictionary; 855/// <summary>Removes the value with the specified alternate key from the <see cref="Dictionary{TKey, TValue}"/>.</summary> 863/// Removes the value with the specified alternate key from the <see cref="Dictionary{TKey, TValue}"/>, 873Dictionary<TKey, TValue> dictionary = Dictionary; 958/// <inheritdoc cref="CollectionsMarshal.GetValueRefOrAddDefault{TKey, TValue}(Dictionary{TKey, TValue}, TKey, out bool)"/> 963Dictionary<TKey, TValue> dictionary = Dictionary; 1065/// the additional overhead on each <see cref="Dictionary{TKey, TValue}"/> instantiation, especially in AOT scenarios. 1069/// <inheritdoc cref="CollectionsMarshal.GetValueRefOrAddDefault{TKey, TValue}(Dictionary{TKey, TValue}, TKey, out bool)"/> 1070public static ref TValue? GetValueRefOrAddDefault(Dictionary<TKey, TValue> dictionary, TKey key, out bool exists) 1767private readonly Dictionary<TKey, TValue> _dictionary; 1776internal Enumerator(Dictionary<TKey, TValue> dictionary, int getEnumeratorRetType) 1887private readonly Dictionary<TKey, TValue> _dictionary; 1889public KeyCollection(Dictionary<TKey, TValue> dictionary) 2012private readonly Dictionary<TKey, TValue> _dictionary; 2017internal Enumerator(Dictionary<TKey, TValue> dictionary) 2082private readonly Dictionary<TKey, TValue> _dictionary; 2084public ValueCollection(Dictionary<TKey, TValue> dictionary) 2206private readonly Dictionary<TKey, TValue> _dictionary; 2211internal Enumerator(Dictionary<TKey, TValue> dictionary)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\InsertionBehavior.cs (1)
7/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\DiagnosticCounter.cs (2)
106private Dictionary<string, string?>? _metadata; 126Dictionary<string, string?>.Enumerator enumerator = _metadata.GetEnumerator();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
36private readonly Dictionary<EventListener, EventListenerSubscription> m_subscriptions = new Dictionary<EventListener, EventListenerSubscription>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
1322Dictionary<string, string?>? args = null;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (20)
230internal volatile Dictionary<int, EventMetadata>? m_eventData; // None per-event data 2898Dictionary<int, bool> eventEnabled = new Dictionary<int, bool>(m_eventData.Count); 3159Dictionary<int, EventMetadata>? eventData = null; 3160Dictionary<string, string>? eventsByName = null; 3506[NotNull] ref Dictionary<int, EventMetadata> eventData, 3573Dictionary<int, bool>? enabledDict = null; 3589private static void DebugCheckEvent(ref Dictionary<string, string>? eventsByName, 3590Dictionary<int, EventMetadata> eventData, MethodInfo method, EventAttribute eventAttribute, 3905private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>(); 3907private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>(); 4515Dictionary<EventListener, bool> allListeners = new Dictionary<EventListener, bool>(); 5235internal EventDispatcher(EventDispatcher? next, Dictionary<int, bool>? eventEnabled, EventListener listener) 5244internal Dictionary<int, bool>? m_EventEnabled; // For every event in a the eventSource, is it enabled? 6178private readonly Dictionary<int, string> opcodeTab; 6179private Dictionary<int, string>? taskTab; 6180private Dictionary<int, ChannelInfo>? channelTab; 6181private Dictionary<ulong, string>? keywordTab; 6182private Dictionary<string, Type>? mapsTab; 6183private readonly Dictionary<string, string> stringTab; // Maps unlocalized strings to localized ones 6201private readonly Dictionary<string, List<int>> perEventByteArrayArgIndices; // "event_name" -> List_of_Indices_of_Byte[]_Arg
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingTypeInfo.cs (2)
138private static Dictionary<Type, TraceLoggingTypeInfo>? threadCache; 143Dictionary<Type, TraceLoggingTypeInfo> cache = threadCache ??= new Dictionary<Type, TraceLoggingTypeInfo>();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\XplatEventLogger.cs (1)
51private static readonly Dictionary<char, string> seq_mapping = new Dictionary<char, string>()
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (1)
961private static readonly Dictionary<string, IntPtr> s_sortNameToSortHandleCache = new Dictionary<string, IntPtr>();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (6)
150private static Dictionary<string, string> RegionNames => 412private static volatile Dictionary<string, CultureData>? s_cachedRegions; 413private static Dictionary<string, string>? s_regionNames; 441Dictionary<string, CultureData>? tempHashTable = s_cachedRegions; 665private static volatile Dictionary<string, CultureData>? s_cachedCultures; 687Dictionary<string, CultureData>? tempHashTable = s_cachedCultures;
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (9)
129private static Dictionary<string, CultureInfo>? s_cachedCulturesByName; 130private static Dictionary<int, CultureInfo>? s_cachedCulturesByLcid; 997Dictionary<int, CultureInfo> lcidTable = CachedCulturesByLcid; 1034Dictionary<string, CultureInfo> nameTable = CachedCulturesByName; 1074Dictionary<string, CultureInfo> nameTable = CachedCulturesByName; 1120private static Dictionary<string, CultureInfo> CachedCulturesByName 1124Dictionary<string, CultureInfo>? cache = s_cachedCulturesByName; 1135private static Dictionary<int, CultureInfo> CachedCulturesByLcid 1139Dictionary<int, CultureInfo>? cache = s_cachedCulturesByLcid;
src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (3)
686private static Dictionary<ulong, char> InitializeLookupTable() 945var dictionary = new Dictionary<ulong, char>(tableData.Length / (sizeof(ulong) + sizeof(char))); 957private static readonly Dictionary<ulong, char> s_lookupTable = InitializeLookupTable();
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
19private static readonly Dictionary<string, Assembly> s_loadfile = new Dictionary<string, Assembly>();
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (2)
22private readonly Dictionary<Module, NotAnnotatedStatus> _publicOnlyModules = new(); 23private readonly Dictionary<MemberInfo, NullabilityState> _context = new();
src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (1)
27public ResourceSet? GrovelForResourceSet(CultureInfo culture, Dictionary<string, ResourceSet> localResourceSets, bool tryParents, bool createIfNotExists)
src\libraries\System.Private.CoreLib\src\System\Resources\IResourceGroveler.cs (1)
14ResourceSet? GrovelForResourceSet(CultureInfo culture, Dictionary<string, ResourceSet> localResourceSets, bool tryParents,
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (1)
35public ResourceSet? GrovelForResourceSet(CultureInfo culture, Dictionary<string, ResourceSet> localResourceSets, bool tryParents, bool createIfNotExists)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (6)
104private Dictionary<string, ResourceSet>? _resourceSets; 290Dictionary<string, ResourceSet> localResourceSets = _resourceSets; 357Dictionary<string, ResourceSet>? localResourceSets = _resourceSets; 396Dictionary<string, ResourceSet>? localResourceSets = _resourceSets; 433Dictionary<string, ResourceSet> localResourceSets = _resourceSets; 498private static void AddResourceSet(Dictionary<string, ResourceSet> localResourceSets, string cultureName, ref ResourceSet rs)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (1)
27internal ResourceReader(Stream stream, Dictionary<string, ResourceLocator> resCache, bool permitDeserialization)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
69internal Dictionary<string, ResourceLocator>? _resCache;
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (6)
23private Dictionary<object, object?>? _table; 24private Dictionary<string, object?>? _caseInsensitiveTable; // For case-insensitive lookups. 126Dictionary<object, object?> table = _table ?? throw new ObjectDisposedException(null, SR.ObjectDisposed_ResourceSet); // Avoid a race with Dispose 204Dictionary<object, object?> copyOfTable = _table ?? throw new ObjectDisposedException(null, SR.ObjectDisposed_ResourceSet); // Avoid a race with Dispose 212Dictionary<object, object?> copyOfTable = _table ?? throw new ObjectDisposedException(null, SR.ObjectDisposed_ResourceSet); // Avoid a race with Dispose 214Dictionary<string, object?>? caseTable = _caseInsensitiveTable; // Avoid a race condition with Close
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (4)
163private Dictionary<string, ResourceLocator>? _resCache; 175private Dictionary<string, ResourceLocator>? _caseInsensitiveTable; 272Dictionary<string, ResourceLocator>? cache = _resCache; 314Dictionary<string, ResourceLocator>? caseInsensitiveTable = _caseInsensitiveTable;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CollectionsMarshal.cs (13)
68/// Gets either a ref to a <typeparamref name="TValue"/> in the <see cref="Dictionary{TKey, TValue}"/> or a ref null if it does not exist in the <paramref name="dictionary"/>. 75/// Items should not be added or removed from the <see cref="Dictionary{TKey, TValue}"/> while the ref <typeparamref name="TValue"/> is in use. 78public static ref TValue GetValueRefOrNullRef<TKey, TValue>(Dictionary<TKey, TValue> dictionary, TKey key) where TKey : notnull 82/// Gets either a ref to a <typeparamref name="TValue"/> in the <see cref="Dictionary{TKey, TValue}"/> or a ref null if it does not exist in the <paramref name="dictionary"/>. 90/// Items should not be added or removed from the <see cref="Dictionary{TKey, TValue}"/> while the ref <typeparamref name="TValue"/> is in use. 93public static ref TValue GetValueRefOrNullRef<TKey, TValue, TAlternateKey>(Dictionary<TKey, TValue>.AlternateLookup<TAlternateKey> dictionary, TAlternateKey key) 99/// Gets a ref to a <typeparamref name="TValue"/> in the <see cref="Dictionary{TKey, TValue}"/>, adding a new entry with a default value if it does not exist in the <paramref name="dictionary"/>. 106/// <remarks>Items should not be added to or removed from the <see cref="Dictionary{TKey, TValue}"/> while the ref <typeparamref name="TValue"/> is in use.</remarks> 107public static ref TValue? GetValueRefOrAddDefault<TKey, TValue>(Dictionary<TKey, TValue> dictionary, TKey key, out bool exists) where TKey : notnull 108=> ref Dictionary<TKey, TValue>.CollectionsMarshalHelper.GetValueRefOrAddDefault(dictionary, key, out exists); 111/// Gets a ref to a <typeparamref name="TValue"/> in the <see cref="Dictionary{TKey, TValue}.AlternateLookup{TAlternateKey}"/>, adding a new entry with a default value if it does not exist in the <paramref name="dictionary"/>. 119/// <remarks>Items should not be added to or removed from the <see cref="Dictionary{TKey, TValue}.AlternateLookup{TAlternateKey}"/> while the ref <typeparamref name="TValue"/> is in use.</remarks> 120public static ref TValue? GetValueRefOrAddDefault<TKey, TValue, TAlternateKey>(Dictionary<TKey, TValue>.AlternateLookup<TAlternateKey> dictionary, TAlternateKey key, out bool exists)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (1)
1286private readonly Dictionary<IntPtr, GCHandle> _cache = [];
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\PosixSignalRegistration.Unix.cs (2)
12private static readonly Dictionary<int, List<Token>> s_registrations = Initialize(); 14private static unsafe Dictionary<int, List<Token>> Initialize()
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\TypeMapLazyDictionary.cs (2)
313private readonly Dictionary<int, DelayedType> _lazyData = new(); 367private readonly Dictionary<int, DelayedTypeCollection> _lazyData = new();
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (1)
29private readonly Dictionary<string, string> _assemblyPaths;
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (6)
33private static Dictionary<long, WeakReference<AssemblyLoadContext>>? s_allContexts; 37private static Dictionary<long, WeakReference<AssemblyLoadContext>> AllContexts => 106Dictionary<long, WeakReference<AssemblyLoadContext>> allContexts = AllContexts; 159Dictionary<long, WeakReference<AssemblyLoadContext>> allContexts = AllContexts; 278Dictionary<long, WeakReference<AssemblyLoadContext>>? allContexts = s_allContexts; 472Dictionary<long, WeakReference<AssemblyLoadContext>>? allContexts = s_allContexts;
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (1)
22private readonly Dictionary<string, int> _nameToIndex;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (6)
40Debug.Assert(children is int[] || children is Dictionary<char, int>); 56return Unsafe.As<Dictionary<char, int>>(children).TryGetValue(c, out index); 77((Dictionary<char, int>)_children).Add(c, index); 87if (_children is Dictionary<char, int> children) 103if (_children is Dictionary<char, int> children) 131static bool TryCreateJumpTable(Dictionary<char, int> children, [NotNullWhen(true)] out int[]? table)
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\TeddyBucketizer.cs (1)
86Dictionary<int, int> prefixToBucket = new(bucketCount);
src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (3)
72/// when passed to <see cref="Dictionary{String, TValue}.Dictionary"/> or <see cref="HashSet{String}.HashSet"/>. 74/// a <see cref="Dictionary{String, TValue}"/> given <see cref="EqualityComparer{String}.Default"/> as a constructor 75/// argument will behave identically to a <see cref="Dictionary{String, TValue}"/> given <see cref="Ordinal"/>
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (1)
319Dictionary<int, EncodingInfo>? result = EncodingProvider.GetEncodingListFromProviders();
src\libraries\System.Private.CoreLib\src\System\Text\EncodingProvider.cs (2)
96internal static Dictionary<int, EncodingInfo>? GetEncodingListFromProviders() 102Dictionary<int, EncodingInfo> result = new Dictionary<int, EncodingInfo>();
src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
135internal static EncodingInfo[] GetEncodings(Dictionary<int, EncodingInfo> encodingInfoList)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (3)
179private static Dictionary<int, Task>? s_currentActiveTasks; 187Dictionary<int, Task> activeTasks = 203Dictionary<int, Task>? activeTasks = s_currentActiveTasks;
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (6)
667private static Dictionary<string, LocalDataStoreSlot>? s_nameToSlotMap; 674private static Dictionary<string, LocalDataStoreSlot> EnsureNameToSlotMap() 676Dictionary<string, LocalDataStoreSlot>? nameToSlotMap = s_nameToSlotMap; 689Dictionary<string, LocalDataStoreSlot> nameToSlotMap = EnsureNameToSlotMap(); 699Dictionary<string, LocalDataStoreSlot> nameToSlotMap = EnsureNameToSlotMap(); 713Dictionary<string, LocalDataStoreSlot> nameToSlotMap = EnsureNameToSlotMap();
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (1)
618private readonly Dictionary<int, bool> _usedIdToTracksAllValuesMap = new Dictionary<int, bool>();
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (2)
135public Dictionary<string, TimeZoneInfo>? _systemTimeZones; 138public Dictionary<string, TimeZoneInfo>? _timeZonesUsingAlternativeIds;
src\System\Attribute.CoreCLR.cs (4)
35Dictionary<Type, AttributeUsageAttribute> types = new Dictionary<Type, AttributeUsageAttribute>(11); 141Dictionary<Type, AttributeUsageAttribute> types = new Dictionary<Type, AttributeUsageAttribute>(11); 367private static void CopyToAttributeList(List<Attribute> attributeList, Attribute[] attributes, Dictionary<Type, AttributeUsageAttribute> types) 397private static void AddAttributesToList(List<Attribute> attributeList, Attribute[] attributes, Dictionary<Type, AttributeUsageAttribute> types)
src\System\GC.CoreCLR.cs (2)
869internal Dictionary<string, object> Configurations; 887Dictionary<string, object> configurationDictionary = context.Configurations!;
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (1)
49private readonly Dictionary<string, Type> _typeBuilderDict;
src\System\RuntimeType.CoreCLR.cs (4)
1117Dictionary<string, RuntimeEventInfo>? csEventInfos = filter.CaseSensitive() ? null : 1146Filter filter, RuntimeType declaringType, Dictionary<string, RuntimeEventInfo>? csEventInfos, ref ListBuilder<RuntimeEventInfo> list) 1222Dictionary<string, List<RuntimePropertyInfo>>? csPropertyInfos = filter.CaseSensitive() ? null : 1250Dictionary<string, List<RuntimePropertyInfo>>? csPropertyInfos,
System.Private.CoreLib.Generators (12)
NativeRuntimeEventSourceGenerator.cs (12)
40Dictionary<string, HashSet<string>> inclusionList = ParseInclusionListFromString(inclusionText); 61private static Dictionary<string, HashSet<string>> ParseInclusionListFromString(string? inclusionText) 63Dictionary<string, HashSet<string>> inclusionList = []; 112private static bool IncludeEvent(Dictionary<string, HashSet<string>> inclusionList, string providerName, string eventName) 132private static string GenerateEventSourceClass(XElement providerNode, string className, Dictionary<string, HashSet<string>> inclusionList) 159private static void GenerateKeywordsClass(XElement providerNode, StringWriter writer, Dictionary<string, HashSet<string>> inclusionList) 222private static void GenerateEventMethods(XElement providerNode, StringWriter writer, Dictionary<string, HashSet<string>> inclusionList) 239var templateDict = new Dictionary<string, XElement>(); 253Dictionary<string, string> latestEventVersions = []; 390private static readonly Dictionary<string, string> manifestsToGenerate = new() 395private static readonly Dictionary<string, string> providerNameToClassNameMap = new() 400private static readonly Dictionary<string, string> manifestTypeToCSharpTypeMap = new()
System.Private.DataContractSerialization (105)
System\Runtime\Serialization\ClassDataContract.cs (8)
15using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 114public override DataContractDictionary? KnownDataContracts 256internal static void CheckAndAddMember(List<DataMember> members, DataMember memberContract, Dictionary<string, DataMember> memberNamesTable) 596private DataContractDictionary? _knownDataContracts; 804Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>(); 1206internal override DataContractDictionary? KnownDataContracts 1314internal override DataContract BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract>? boundContracts = null) 1421Dictionary<string, DataMember> membersDictionary = new Dictionary<string, DataMember>(Members.Count);
System\Runtime\Serialization\CollectionDataContract.cs (5)
15using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 252public override DataContractDictionary? KnownDataContracts 414private DataContractDictionary? _knownDataContracts; 692internal override DataContractDictionary? KnownDataContracts 1382internal override DataContract BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract>? boundContracts = null)
System\Runtime\Serialization\DataContract.cs (14)
20using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 226public virtual DataContractDictionary? KnownDataContracts 284internal virtual DataContract BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract>? boundContracts = null) 305private static Dictionary<XmlQualifiedName, DataContract?>? s_nameToBuiltInContract; 306private static Dictionary<string, DataContract?>? s_typeNameToBuiltInContract; 308private static Dictionary<string, XmlDictionaryString>? s_clrTypeStrings; 992internal virtual DataContractDictionary? KnownDataContracts 1932internal static DataContractDictionary? ImportKnownTypeAttributes(Type type) 1934DataContractDictionary? knownDataContracts = null; 1935Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 1942private static void ImportKnownTypeAttributes(Type? type, Dictionary<Type, Type> typesChecked, ref DataContractDictionary? knownDataContracts) 2048internal static void CheckAndAdd(Type type, Dictionary<Type, Type> typesChecked, [NotNullIfNotNull(nameof(nameToDataContractTable))] ref DataContractDictionary? nameToDataContractTable)
System\Runtime\Serialization\DataContractSerializer.cs (3)
12using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 28internal DataContractDictionary? _knownDataContracts; 173internal override DataContractDictionary? KnownDataContracts
System\Runtime\Serialization\DataContractSet.cs (14)
11using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 17private DataContractDictionary? _contracts; 18private Dictionary<DataContract, object>? _processedContracts; 22private DataContractDictionary? _knownTypesForObject; 58public DataContractDictionary Contracts => 61public Dictionary<DataContract, object> ProcessedContracts => 66public DataContractDictionary? KnownTypesForObject 203private void AddKnownDataContracts(DataContractDictionary? knownDataContracts) 309private Dictionary<XmlQualifiedName, object>? _referencedTypesDictionary; 310private Dictionary<XmlQualifiedName, object>? _referencedCollectionTypesDictionary; 314private Dictionary<XmlQualifiedName, object> GetReferencedTypes() 338private Dictionary<XmlQualifiedName, object> GetReferencedCollectionTypes() 361private void AddReferencedType(Dictionary<XmlQualifiedName, object> referencedTypes, Type type) 576Dictionary<XmlQualifiedName, object> referencedTypes = useReferencedCollectionTypes ? GetReferencedCollectionTypes() : GetReferencedTypes();
System\Runtime\Serialization\DataMember.cs (1)
293internal DataMember BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract>? boundContracts = null)
System\Runtime\Serialization\EnumDataContract.cs (3)
78private static readonly Dictionary<Type, XmlQualifiedName> s_typeToName = new Dictionary<Type, XmlQualifiedName>(); 79private static readonly Dictionary<XmlQualifiedName, Type> s_nameToType = new Dictionary<XmlQualifiedName, Type>(); 219Dictionary<string, DataMember> memberValuesTable = new Dictionary<string, DataMember>();
System\Runtime\Serialization\GenericParameterDataContract.cs (1)
46internal override DataContract BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract>? boundContracts = null)
System\Runtime\Serialization\Globals.cs (1)
298s_typeOfDictionaryGeneric ??= typeof(Dictionary<,>);
System\Runtime\Serialization\HybridObjectCache.cs (2)
13private Dictionary<string, object?>? _objectDictionary; 14private Dictionary<string, object?>? _referencedObjectDictionary;
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (3)
18using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 25internal DataContractDictionary? knownDataContracts; 127internal override DataContractDictionary? KnownDataContracts
System\Runtime\Serialization\Json\JsonClassDataContract.cs (1)
158Dictionary<string, object?> memberTable = new Dictionary<string, object?>(memberCount);
System\Runtime\Serialization\Json\JsonDataContract.cs (6)
14using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 40private DataContractDictionary? KnownDataContracts => _helper.KnownDataContracts; 156private DataContractDictionary? _knownDataContracts; 169internal DataContractDictionary? KnownDataContracts => _knownDataContracts; 317private static readonly Dictionary<DataContract, JsonReadWriteDelegates> s_jsonDelegates = new Dictionary<DataContract, JsonReadWriteDelegates>(); 319public static Dictionary<DataContract, JsonReadWriteDelegates> GetJsonDelegates()
System\Runtime\Serialization\Json\JsonXmlDataContract.cs (3)
11using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 68DataContractDictionary[] entries = context.scopedKnownTypes.dataContractDictionaries; 73DataContractDictionary entry = entries[i];
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (1)
219Dictionary<object, object?> genericDictionaryObj = new Dictionary<object, object?>(dictionaryObj.Count);
System\Runtime\Serialization\ObjectReferenceStack.cs (1)
19private Dictionary<object, object?>? _objectDictionary;
System\Runtime\Serialization\SchemaHelper.cs (4)
9using SchemaObjectDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.SchemaObjectInfo>; 51internal static XmlSchemaType? GetSchemaType(SchemaObjectDictionary schemaInfo, XmlQualifiedName typeName) 83internal static XmlSchemaElement? GetSchemaElement(SchemaObjectDictionary schemaInfo, XmlQualifiedName elementName) 174internal static XmlSchema? GetSchemaWithType(SchemaObjectDictionary schemaInfo, XmlSchemaSet schemas, XmlQualifiedName typeName)
System\Runtime\Serialization\SchemaImporter.cs (9)
16using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 17using SchemaObjectDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.SchemaObjectInfo>; 29private SchemaObjectDictionary _schemaObjects = null!; // Not directly referenced. Always lazy initialized by property getter. 151private SchemaObjectDictionary SchemaObjects 187Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>(); 225DataContractDictionary knownDataContracts = new DataContractDictionary(); 241internal SchemaObjectDictionary CreateSchemaObjects() 243SchemaObjectDictionary schemaObjects = new SchemaObjectDictionary(); 912DataContractDictionary knownDataContracts = ancestorDataContract.KnownDataContracts!; // Might be .Count == 0, but always non-null for ClassDataContract
System\Runtime\Serialization\ScopedKnownTypes.cs (6)
8using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 14internal DataContractDictionary[] dataContractDictionaries; 16internal void Push(DataContractDictionary dataContractDictionary) 20dataContractDictionaries = new DataContractDictionary[4]; 24Array.Resize<DataContractDictionary>(ref dataContractDictionaries, dataContractDictionaries.Length * 2); 39DataContractDictionary dataContractDictionary = dataContractDictionaries[i];
System\Runtime\Serialization\XmlDataContract.cs (4)
16using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 35public override DataContractDictionary? KnownDataContracts 125private DataContractDictionary? _knownDataContracts; 182internal override DataContractDictionary? KnownDataContracts
System\Runtime\Serialization\XmlObjectSerializer.cs (2)
15using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 112internal virtual DataContractDictionary? KnownDataContracts
System\Runtime\Serialization\XmlObjectSerializerContext.cs (8)
13using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 22protected DataContractDictionary? serializerKnownDataContracts; 161internal virtual DataContractDictionary? SerializerKnownDataContracts 181DataContractDictionary? serializerKnownDataContracts = this.SerializerKnownDataContracts; 190internal static DataContractDictionary? GetDataContractsForKnownTypes(IList<Type> knownTypeList) 193DataContractDictionary dataContracts = new DataContractDictionary(); 194Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 208internal bool IsKnownType(DataContract dataContract, DataContractDictionary? knownDataContracts, Type? declaredType)
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
15using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 199private bool ReplaceScopedKnownTypesTop(DataContractDictionary? knownDataContracts, bool knownTypesAddedInCurrentScope)
System\Xml\XmlBinaryReaderSession.cs (1)
17private Dictionary<int, XmlDictionaryString>? _stringDict;
System\Xml\XmlBinaryWriterSession.cs (1)
103private Dictionary<K, V>? _dictionary;
System\Xml\XmlDictionary.cs (1)
19private readonly Dictionary<string, XmlDictionaryString> _lookup;
System.Private.Windows.Core (11)
System\Private\Windows\BinaryFormat\Deserializer\DefaultTypeResolver.cs (2)
15private readonly Dictionary<string, Assembly> _assemblies = []; 16private readonly Dictionary<string, Type> _types = [];
System\Private\Windows\BinaryFormat\Deserializer\Deserializer.cs (3)
60private readonly Dictionary<SerializationRecordId, object> _deserializedObjects = []; 64private readonly Dictionary<Type, ISerializationSurrogate?>? _surrogates; 84private Dictionary<SerializationRecordId, HashSet<SerializationRecordId>>? _incompleteDependencies;
System\Private\Windows\BinaryFormat\Serializer\RecordMap.cs (1)
11private readonly Dictionary<int, IRecord> _recordMap = [];
System\Private\Windows\BinaryFormat\Support\StringRecordsCollection.cs (2)
14private readonly Dictionary<string, int> _strings = []; 15private readonly Dictionary<int, MemberReference> _memberReferences = [];
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (1)
17private static Dictionary<TypeName, Type>? s_knownTypes;
System\Private\Windows\Ole\DataStore.cs (1)
12private readonly Dictionary<string, DataStoreEntry> _mappedData = new(BackCompatibleStringComparer.Default);
System\Private\Windows\Ole\TypeBinder.cs (1)
38private Dictionary<FullyQualifiedTypeName, TypeName>? _cachedTypeNames;
System.Private.Windows.Core.Tests (7)
System\Reflection\Metadata\TypeNameComparerTests.cs (7)
26Dictionary<TypeName, Type> types = new(TypeNameComparer.FullyQualifiedMatch) 53Dictionary<TypeName, Type> types = new(TypeNameComparer.FullyQualifiedMatch) 67Dictionary<TypeName, Type> types = new(TypeNameComparer.FullyQualifiedMatch) 119var types = new Dictionary<TypeName, Type>(TypeNameComparer.FullNameMatch) 145var types = new Dictionary<TypeName, Type>(TypeNameComparer.FullNameMatch) 169var types = new Dictionary<TypeName, Type>(TypeNameComparer.FullNameAndAssemblyNameMatch) 200var types = new Dictionary<TypeName, Type>(TypeNameComparer.FullNameAndAssemblyNameMatch)
System.Private.Xml (127)
System\Xml\BinaryXml\XmlBinaryReader.cs (2)
302private readonly Dictionary<string, NamespaceDecl> _namespaces; 1815Dictionary<string, string> nstable = new Dictionary<string, string>();
System\Xml\Core\QueryOutputWriter.cs (1)
25private readonly Dictionary<XmlQualifiedName, int>? _lookupCDataElems;
System\Xml\Core\QueryOutputWriterV1.cs (1)
27private readonly Dictionary<XmlQualifiedName, XmlQualifiedName?>? _lookupCDataElems;
System\Xml\Core\XmlTextWriter.cs (1)
174private Dictionary<string, int>? _nsHashtable;
System\Xml\Core\XmlWellFormedWriter.cs (2)
32private Dictionary<string, int>? _nsHashtable; 42private Dictionary<string, int>? _attrHashTable;
System\Xml\Dom\XmlNodeReader.cs (1)
987Dictionary<string, string> dict = new Dictionary<string, string>();
System\Xml\Resolvers\XmlPreloadedResolver.cs (1)
129private readonly Dictionary<Uri, PreloadedData> _mappings;
System\Xml\Schema\ContentValidator.cs (4)
42private readonly Dictionary<XmlQualifiedName, int> _names; 43private Dictionary<string, int>? _wildcards; 1445Dictionary<BitSet, int> stateTable = new(); 2113private readonly Dictionary<XmlQualifiedName, int> _elements; // unique terminal names to positions in Bitset mapping
System\Xml\Schema\DtdParser.cs (1)
195private Dictionary<string, UndeclaredNotation>? _undeclaredNotations;
System\Xml\Schema\SchemaElementDecl.cs (4)
13private readonly Dictionary<XmlQualifiedName, SchemaAttDef> _attdefs = new Dictionary<XmlQualifiedName, SchemaAttDef>(); 22private readonly Dictionary<XmlQualifiedName, XmlQualifiedName> _prohibitedAttributes = new Dictionary<XmlQualifiedName, XmlQualifiedName>(); 222internal Dictionary<XmlQualifiedName, SchemaAttDef> AttDefs 227internal Dictionary<XmlQualifiedName, XmlQualifiedName> ProhibitedAttributes
System\Xml\Schema\SchemaInfo.cs (17)
27private readonly Dictionary<XmlQualifiedName, SchemaElementDecl> _elementDecls = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 28private readonly Dictionary<XmlQualifiedName, SchemaElementDecl> _undeclaredElementDecls = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 30private Dictionary<XmlQualifiedName, SchemaEntity>? _generalEntities; 31private Dictionary<XmlQualifiedName, SchemaEntity>? _parameterEntities; 38private readonly Dictionary<string, bool> _targetNamespaces = new Dictionary<string, bool>(); 39private readonly Dictionary<XmlQualifiedName, SchemaAttDef> _attributeDecls = new Dictionary<XmlQualifiedName, SchemaAttDef>(); 42private readonly Dictionary<XmlQualifiedName, SchemaElementDecl> _elementDeclsByType = new Dictionary<XmlQualifiedName, SchemaElementDecl>(); 43private Dictionary<string, SchemaNotation>? _notations; 63internal Dictionary<XmlQualifiedName, SchemaElementDecl> ElementDecls 68internal Dictionary<XmlQualifiedName, SchemaElementDecl> UndeclaredElementDecls 73internal Dictionary<XmlQualifiedName, SchemaEntity> GeneralEntities => 76internal Dictionary<XmlQualifiedName, SchemaEntity> ParameterEntities => 85internal Dictionary<string, bool> TargetNamespaces 90internal Dictionary<XmlQualifiedName, SchemaElementDecl> ElementDeclsByType 95internal Dictionary<XmlQualifiedName, SchemaAttDef> AttributeDecls 100internal Dictionary<string, SchemaNotation> Notations => 331Dictionary<XmlQualifiedName, SchemaElementDecl> elements = _elementDecls;
System\Xml\Schema\XmlAtomicValue.cs (1)
71Dictionary<string, string> dict = new Dictionary<string, string>(1);
System\Xml\Schema\XmlSchemaObjectTable.cs (1)
12private readonly Dictionary<XmlQualifiedName, XmlSchemaObject> _table = new Dictionary<XmlQualifiedName, XmlSchemaObject>();
System\Xml\Schema\XmlSchemaValidator.cs (1)
2099Dictionary<XmlQualifiedName, SchemaAttDef> attributeDefs = currentElementDecl.AttDefs;
System\Xml\Serialization\CodeGenerator.cs (5)
36private Dictionary<string, ArgBuilder>? _argList; 40private Dictionary<(Type, string), Queue<LocalBuilder>>? _freeLocals; 149private readonly Dictionary<Type, LocalBuilder> _tmpLocals = new Dictionary<Type, LocalBuilder>(); 1530private readonly Dictionary<string, LocalBuilder> _locals; 1580public void AddToFreeLocals(Dictionary<(Type, string), Queue<LocalBuilder>> freeLocals)
System\Xml\Serialization\Compilation.cs (8)
442var scopeTable = new Dictionary<TypeScope, XmlMapping>(); 513var serializers = new Dictionary<string, string>(); 692private readonly ConditionalWeakTable<Assembly, Dictionary<TempAssemblyCacheKey, TempAssembly>> _collectibleCaches = new ConditionalWeakTable<Assembly, Dictionary<TempAssemblyCacheKey, TempAssembly>>(); 693private Dictionary<TempAssemblyCacheKey, TempAssembly> _fastCache = new Dictionary<TempAssemblyCacheKey, TempAssembly>(); 705if (_collectibleCaches.TryGetValue(t.Assembly, out var cCache)) 722Dictionary<TempAssemblyCacheKey, TempAssembly>? cache; 726cache = _collectibleCaches.TryGetValue(t.Assembly, out var c) // Clone or create
System\Xml\Serialization\Models.cs (2)
21private readonly Dictionary<Type, TypeModel> _models = new Dictionary<Type, TypeModel>(); 22private readonly Dictionary<Type, TypeModel> _arrayModels = new Dictionary<Type, TypeModel>();
System\Xml\Serialization\NameTable.cs (1)
41private readonly Dictionary<NameKey, object?> _table = new Dictionary<NameKey, object?>();
System\Xml\Serialization\Types.cs (4)
1050internal static MemberMapping[] GetAllMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos) 1120internal static MemberMapping[] GetSettableMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos) 1128private static void PopulateMemberInfos(StructMapping structMapping, MemberMapping[] mappings, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos) 1148Dictionary<string, MemberInfo>? replaceList = null;
System\Xml\Serialization\XmlAttributeOverrides.cs (5)
19private readonly Dictionary<Type, Dictionary<string, XmlAttributes?>> _types = new Dictionary<Type, Dictionary<string, XmlAttributes?>>(); 34Dictionary<string, XmlAttributes?>? members; 65Dictionary<string, XmlAttributes?>? members;
System\Xml\Serialization\XmlSerializationILGen.cs (8)
19private readonly Dictionary<TypeMapping, string> _methodNames = new Dictionary<TypeMapping, string>(); 21private readonly Dictionary<string, MethodBuilderInfo> _methodBuilders = new Dictionary<string, MethodBuilderInfo>(); 23internal Dictionary<string, Type> CreatedTypes = new Dictionary<string, Type>(); 25internal Dictionary<string, MemberInfo> memberInfos = new Dictionary<string, MemberInfo>(); 59internal Dictionary<TypeMapping, string> MethodNames { get { return _methodNames; } } 408private FieldBuilder GenerateTypedSerializers(Dictionary<string, string> serializers, TypeBuilder serializerContractTypeBuilder) 434private void GenerateGetSerializer(Dictionary<string, string> serializers, XmlMapping[] xmlMappings, TypeBuilder serializerContractTypeBuilder) 479internal void GenerateSerializerContract(XmlMapping[] xmlMappings, Type[] types, string readerType, string[] readMethods, string writerType, string[] writerMethods, Dictionary<string, string> serializers)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (4)
23private readonly Dictionary<string, string> _idNames = new Dictionary<string, string>(); 25private readonly Dictionary<string, FieldBuilder> _idNameFields = new Dictionary<string, FieldBuilder>(); 26private Dictionary<string, EnumMapping>? _enums; 29internal Dictionary<string, EnumMapping> Enums => _enums ??= new Dictionary<string, EnumMapping>();
System\Xml\Serialization\XmlSerializer.cs (4)
165private static readonly ContextAwareTables<Dictionary<XmlSerializerMappingKey, XmlSerializer>> s_xmlSerializerTable = new ContextAwareTables<Dictionary<XmlSerializerMappingKey, XmlSerializer>>(); 708Dictionary<XmlSerializerMappingKey, XmlSerializer>? typedMappingTable = null; 715var pendingKeys = new Dictionary<XmlSerializerMappingKey, int>();
System\Xml\Serialization\XmlSerializerNamespaces.cs (3)
20private Dictionary<string, XmlQualifiedName>? _namespaces; 101internal Dictionary<string, XmlQualifiedName>.ValueCollection Namespaces => NamespacesInternal.Values; 103private Dictionary<string, XmlQualifiedName> NamespacesInternal => _namespaces ??= new Dictionary<string, XmlQualifiedName>();
System\Xml\XmlNamespacemanager.cs (3)
43private Dictionary<string, int>? _hashTable; 210Dictionary<string, string> prefixes = new Dictionary<string, string>(_lastDecl + 1); 248Dictionary<string, string> dict = new Dictionary<string, string>(_lastDecl - i + 1);
System\Xml\XPath\Internal\XPathParser.cs (6)
811private static readonly Dictionary<string, ParamInfo> s_functionTable = CreateFunctionTable(); 812private static Dictionary<string, ParamInfo> CreateFunctionTable() 814Dictionary<string, ParamInfo> table = new Dictionary<string, ParamInfo>(36); 845private static readonly Dictionary<string, Axis.AxisType> s_AxesTable = CreateAxesTable(); 846private static Dictionary<string, Axis.AxisType> CreateAxesTable() 848Dictionary<string, Axis.AxisType> table = new Dictionary<string, Axis.AxisType>(13);
System\Xml\XPath\XPathDocument.cs (2)
23private Dictionary<XPathNodeRef, XPathNodeRef>? _mapNmsp; 24private Dictionary<string, XPathNodeRef>? _idValueMap;
System\Xml\XPath\XPathNavigator.cs (1)
481Dictionary<string, string> dict = new Dictionary<string, string>();
System\Xml\Xsl\IlGen\GenerateHelper.cs (1)
440public static readonly Dictionary<Type, XmlILStorageMethods> StorageMethods = new Dictionary<Type, XmlILStorageMethods>(13)
System\Xml\Xsl\IlGen\StaticDataManager.cs (1)
20private readonly Dictionary<T, int> _lookup = new Dictionary<T, int>();
System\Xml\Xsl\QIL\QilVisitor.cs (1)
439private readonly Dictionary<QilNode, bool> _visitedRef = new Dictionary<QilNode, bool>();
System\Xml\Xsl\Runtime\XmlExtensionFunction.cs (1)
21private readonly Dictionary<XmlExtensionFunction, XmlExtensionFunction> _table;
System\Xml\Xsl\Runtime\XmlILIndex.cs (1)
17private readonly Dictionary<string, XmlQueryNodeSequence> _table;
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (2)
48private Dictionary<string, string>? _conflictPrefixes; // Remembers prefixes that were auto-generated previously in case they can be reused 55private readonly Dictionary<string, string> _usedPrefixes = new Dictionary<string, string>(); //The prefies that used in the current scope
System\Xml\Xsl\Runtime\XsltLibrary.cs (1)
82private Dictionary<XmlQualifiedName, DecimalFormat>? _decimalFormats;
System\Xml\Xsl\XPath\XPathBuilder.cs (3)
787public static Dictionary<string, FunctionInfo> FunctionTable = CreateFunctionTable(); 788private static Dictionary<string, FunctionInfo> CreateFunctionTable() 790Dictionary<string, FunctionInfo> table = new Dictionary<string, FunctionInfo>(36);
System\Xml\Xsl\Xslt\Compiler.cs (7)
54public Dictionary<QilName, VarPar> AllGlobalVarPars = new Dictionary<QilName, VarPar>(); 55public Dictionary<QilName, Template> NamedTemplates = new Dictionary<QilName, Template>(); 56public Dictionary<QilName, AttributeSet> AttributeSets = new Dictionary<QilName, AttributeSet>(); 57public Dictionary<string, NsAlias> NsAliases = new Dictionary<string, NsAlias>(); 59private readonly Dictionary<string, int> _moduleOrder = new Dictionary<string, int>(); 360private readonly Dictionary<string, int> _moduleOrder; 362public CompilerErrorComparer(Dictionary<string, int> moduleOrder)
System\Xml\Xsl\Xslt\MatcherBuilder.cs (1)
261public Dictionary<QilName, List<Pattern>> FixedNamePatterns = new Dictionary<QilName, List<Pattern>>();
System\Xml\Xsl\Xslt\QilGenerator.cs (2)
473Dictionary<VarPar, Template>? paramToTemplate = null; 474Dictionary<VarPar, QilFunction>? paramToFunction = null;
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (3)
300public static Dictionary<string, FunctionInfo> FunctionTable = CreateFunctionTable(); 301private static Dictionary<string, FunctionInfo> CreateFunctionTable() 303Dictionary<string, FunctionInfo> table = new Dictionary<string, FunctionInfo>(16);
System\Xml\Xsl\Xslt\Scripts.cs (1)
51private readonly Dictionary<string, Type?> _backingDictionary = new Dictionary<string, Type?>();
System\Xml\Xsl\Xslt\Stylesheet.cs (4)
21public Dictionary<QilName, XslFlags> ModeFlags = new Dictionary<QilName, XslFlags>(); 23public Dictionary<QilName, List<QilFunction>> ApplyFunctions = new Dictionary<QilName, List<QilFunction>>(); 33public Dictionary<QilName, AttributeSet>? AttributeSets = new Dictionary<QilName, AttributeSet>(); 47public Dictionary<QilName, List<TemplateMatch>> TemplateMatches = new Dictionary<QilName, List<TemplateMatch>>();
System\Xml\Xsl\Xslt\XslAstAnalyzer.cs (4)
40private Dictionary<Template, Stylesheet>? _fwdApplyImportsGraph = new Dictionary<Template, Stylesheet>(); 41private Dictionary<QilName, List<ProtoTemplate>>? _revApplyTemplatesGraph = new Dictionary<QilName, List<ProtoTemplate>>(); 47private readonly Dictionary<ModeName, VarPar> _applyTemplatesParams = new Dictionary<ModeName, VarPar>(); 265private static void FillModeFlags(Dictionary<QilName, XslFlags> parentModeFlags, Stylesheet sheet)
System.Reflection.DispatchProxy (6)
System\Reflection\DispatchProxyGenerator.cs (6)
109private readonly Dictionary<Type, Dictionary<Type, GeneratedTypeInfo>> _baseTypeAndInterfaceToGeneratedProxyType = new Dictionary<Type, Dictionary<Type, GeneratedTypeInfo>>(); 151if (!_baseTypeAndInterfaceToGeneratedProxyType.TryGetValue(baseType, out Dictionary<Type, GeneratedTypeInfo>? interfaceToProxy)) 322var propertyMap = new Dictionary<MethodInfo, PropertyAccessorInfo>(); 332var eventMap = new Dictionary<MethodInfo, EventAccessorInfo>();
System.Reflection.Emit (11)
System\Reflection\Emit\ILGeneratorImpl.cs (3)
31private Dictionary<Label, LabelInfo> _labelTable = new(2); 35private Dictionary<SymbolDocumentWriter, List<SequencePoint>> _documentToSequencePoints = new(); 56internal Dictionary<SymbolDocumentWriter, List<SequencePoint>> DocumentToSequencePoints => _documentToSequencePoints;
System\Reflection\Emit\ModuleBuilderImpl.cs (7)
22private readonly Dictionary<Assembly, AssemblyReferenceHandle> _assemblyReferences = new(); 23private readonly Dictionary<Type, EntityHandle> _typeReferences = new(); 24private readonly Dictionary<object, EntityHandle> _memberReferences = new(); 27private Dictionary<string, ModuleReferenceHandle>? _moduleReferences; 29private Dictionary<SymbolDocumentWriter, DocumentHandle> _docHandles = new(); 422Dictionary<SymbolDocumentWriter, List<SequencePoint>>.Enumerator enumerator = il.DocumentToSequencePoints.GetEnumerator(); 446private BlobHandle PopulateMultiDocSequencePointsBlob(Dictionary<SymbolDocumentWriter, List<SequencePoint>>.Enumerator enumerator, StandaloneSignatureHandle localSignature)
System\Reflection\Emit\TypeBuilderImpl.cs (1)
42internal Dictionary<Type, List<(MethodInfo ifaceMethod, MethodInfo targetMethod)>>? _methodOverrides;
System.Reflection.Metadata (25)
System\Reflection\Metadata\Ecma335\BlobDictionary.cs (2)
17private readonly Dictionary<int, KeyValuePair<ImmutableArray<byte>, BlobHandle>> _dictionary; 106public Dictionary<int, KeyValuePair<ImmutableArray<byte>, BlobHandle>>.Enumerator GetEnumerator() =>
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (4)
35private readonly Dictionary<string, UserStringHandle> _userStrings = new Dictionary<string, UserStringHandle>(256); 40private readonly Dictionary<string, StringHandle> _strings = new Dictionary<string, StringHandle>(256); 50private readonly Dictionary<Guid, GuidHandle> _guids = new Dictionary<Guid, GuidHandle>(); 536Dictionary<string, StringHandle> strings,
System\Reflection\Metadata\Internal\NamespaceCache.cs (11)
15private volatile Dictionary<NamespaceDefinitionHandle, NamespaceData>? _namespaceTable; 114var namespaceBuilderTable = new Dictionary<NamespaceDefinitionHandle, NamespaceDataBuilder>(); 134Dictionary<string, NamespaceDataBuilder> stringTable; 140var namespaceTable = new Dictionary<NamespaceDefinitionHandle, NamespaceData>(); 167private static void MergeDuplicateNamespaces(Dictionary<NamespaceDefinitionHandle, NamespaceDataBuilder> table, out Dictionary<string, NamespaceDataBuilder> stringTable) 169var namespaces = new Dictionary<string, NamespaceDataBuilder>(); 243private void LinkChildToParentNamespace(Dictionary<string, NamespaceDataBuilder> existingNamespaces, 313private void ResolveParentChildRelationships(Dictionary<string, NamespaceDataBuilder> namespaces, out List<NamespaceDataBuilder>? virtualNamespaces) 325private void PopulateTableWithTypeDefinitions(Dictionary<NamespaceDefinitionHandle, NamespaceDataBuilder> table) 357private void PopulateTableWithExportedTypes(Dictionary<NamespaceDefinitionHandle, NamespaceDataBuilder> table)
System\Reflection\Metadata\Internal\VirtualHeap.cs (5)
39private Dictionary<uint, PinnedBlob>? _blobs; 56var blobs = Interlocked.Exchange(ref _blobs, null); 68private Dictionary<uint, PinnedBlob> GetBlobs() 70var blobs = _blobs; 93var blobs = GetBlobs();
System\Reflection\Metadata\MetadataReader.cs (3)
29private Dictionary<TypeDefinitionHandle, ImmutableArray<TypeDefinitionHandle>>? _lazyNestedTypesMap; 1439var groupedNestedTypes = new Dictionary<TypeDefinitionHandle, ImmutableArray<TypeDefinitionHandle>.Builder>(); 1469var nestedTypesMap = new Dictionary<TypeDefinitionHandle, ImmutableArray<TypeDefinitionHandle>>();
System.Reflection.MetadataLoadContext (1)
System\Reflection\PathAssemblyResolver.cs (1)
25private readonly Dictionary<string, List<string>> _fileToPaths = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
System.Resources.Extensions (13)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
41private Dictionary<string, object?> _caseInsensitiveDups; 42private Dictionary<string, PrecannedResource>? _preserializedData;
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
69internal Dictionary<string, ResourceLocator>? _resCache;
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (4)
163private Dictionary<string, ResourceLocator>? _resCache; 175private Dictionary<string, ResourceLocator>? _caseInsensitiveTable; 272Dictionary<string, ResourceLocator>? cache = _resCache; 314Dictionary<string, ResourceLocator>? caseInsensitiveTable = _caseInsensitiveTable;
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.TypeResolver.cs (2)
24private readonly Dictionary<string, Assembly> _assemblies = []; 25private readonly Dictionary<string, Type> _types = [];
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (3)
63private readonly Dictionary<SerializationRecordId, object> _deserializedObjects = []; 67private readonly Dictionary<Type, ISerializationSurrogate?>? _surrogates; 87private Dictionary<SerializationRecordId, HashSet<SerializationRecordId>>? _incompleteDependencies;
System\Resources\Extensions\PreserializedResourceWriter.cs (1)
39private static readonly Dictionary<string, Type> s_primitiveTypes = new Dictionary<string, Type>(16, TypeNameComparer.Instance)
System.Resources.Writer (2)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
41private Dictionary<string, object?> _caseInsensitiveDups; 42private Dictionary<string, PrecannedResource>? _preserializedData;
System.Runtime.Caching (4)
System\Runtime\Caching\MemoryCache.cs (2)
497Dictionary<string, object> h = new Dictionary<string, object>(); 781Dictionary<string, object> values = null;
System\Runtime\Caching\MemoryCacheEntry.cs (2)
35internal Dictionary<MemoryCacheEntryChangeMonitor, MemoryCacheEntryChangeMonitor> _dependents; // dependents must be notified when this entry is removed 244Dictionary<MemoryCacheEntryChangeMonitor, MemoryCacheEntryChangeMonitor>.KeyCollection deps = null;
System.Runtime.Serialization.Formatters (1)
System\Runtime\Serialization\SerializationObjectManager.cs (1)
14private readonly Dictionary<object, object> _objectSeenTable; // Table to keep track of objects [OnSerializing] has been called on
System.Runtime.Serialization.Schema (20)
System\Runtime\Serialization\Schema\CodeExporter.cs (20)
21using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, System.Runtime.Serialization.DataContracts.DataContract>; 38private readonly Dictionary<string, string> _namespaces; 39private readonly Dictionary<string, string?> _clrNamespaces; 196private Dictionary<string, string> Namespaces 201private Dictionary<string, string?> ClrNamespaces 260private void ExportClassDataContractHierarchy(XmlQualifiedName typeName, DataContract classContract, ContractCodeDomInfo contractCodeDomInfo, Dictionary<XmlQualifiedName, object?> contractNamesInHierarchy) 385get { return DataContract.GetXmlName(typeof(Dictionary<,>)); } 391get { return _dataContractSet.GetDataContract(typeof(Dictionary<,>)); } 655Type? type = _dataContractSet.GetReferencedType(GenericDictionaryName, GenericDictionaryContract, out DataContract? _, out object[]? _) ?? typeof(Dictionary<,>); 898DataContractDictionary? knownTypeDictionary = GetKnownTypeContracts(dataContract); 902DataContractDictionary.ValueCollection? knownTypeContracts = knownTypeDictionary.Values; 915private DataContractDictionary? GetKnownTypeContracts(DataContract dataContract) 933private DataContractDictionary? GetKnownTypeContracts(DataContract classDataContract, Dictionary<DataContract, object?> handledContracts) 966private static void AddKnownTypeContracts(DataContract classDataContract, DataContractDictionary? knownContracts) 987DataContractDictionary? knownContractDictionary = GetKnownTypeContracts(classDataContract, new Dictionary<DataContract, object?>()); 1519Dictionary<string, object?> fragments = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 1550private static void AddToNamespace(StringBuilder builder, string? fragment, Dictionary<string, object?> fragments) 1584int fragmentLength, Dictionary<string, object?> fragments) 1612Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>();
System.Security.Claims (1)
System\Security\Claims\Claim.cs (1)
34private Dictionary<string, string>? _properties;
System.Security.Cryptography (25)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
23var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\ECDomainParameters.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (1)
27var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLDsaPrivateKeyAsn.xml.cs (1)
21var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\MLKemPrivateKeyAsn.xml.cs (1)
21var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
23var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\CryptoConfig.cs (6)
39private static volatile Dictionary<string, string>? s_defaultOidHT; 40private static volatile Dictionary<string, object>? s_defaultNameHT; 44private static Dictionary<string, string> DefaultOidHT 54Dictionary<string, string> ht = new Dictionary<string, string>(capacity, StringComparer.OrdinalIgnoreCase); 107private static Dictionary<string, object> DefaultNameHT 118Dictionary<string, object> ht = new Dictionary<string, object>(capacity: capacity, comparer: StringComparer.OrdinalIgnoreCase);
System\Security\Cryptography\OidLookup.cs (3)
98private static readonly Dictionary<string, string> s_friendlyNameToOid = 101private static readonly Dictionary<string, string> s_oidToFriendlyName = 104private static readonly Dictionary<string, string> s_compatOids =
System\Security\Cryptography\X509Certificates\Asn1\DistributionPointNameAsn.xml.cs (1)
21var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\X509Certificates\Asn1\TimeAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\X509Certificates\FindPal.cs (1)
15private static readonly Dictionary<string, X509KeyUsageFlags> s_keyUsages =
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (5)
33private static readonly Lazy<Dictionary<string, EncodingRules>> s_lazyEncodingRulesLookup = new(CreateEncodingRulesLookup); 586private static Dictionary<string, EncodingRules> CreateEncodingRulesLookup() 594Dictionary<string, EncodingRules> lookup = new(LookupDictionarySize, StringComparer.Ordinal) 666Dictionary<string, EncodingRules> lookup = s_lazyEncodingRulesLookup.Value; 667Dictionary<string, EncodingRules>.AlternateLookup<ReadOnlySpan<char>> alternateLookup =
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
18private readonly Dictionary<CoseHeaderLabel, CoseHeaderValue> _headerParameters = new Dictionary<CoseHeaderLabel, CoseHeaderValue>();
System.Security.Cryptography.Pkcs (19)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
23var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (1)
27var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (1)
23var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerIdentifierAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\KeyAgreeRecipientIdentifierAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\OriginatorIdentifierOrKeyAsn.xml.cs (1)
21var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\RecipientIdentifierAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\RecipientInfoAsn.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\Asn1\SignedAttributesSet.xml.cs (1)
20var usedTags = new System.Collections.Generic.Dictionary<Asn1Tag, string>();
System\Security\Cryptography\Pkcs\CmsSignature.cs (5)
16private static readonly Dictionary<string, CmsSignature> s_lookup = 27static partial void PrepareRegistrationRsa(Dictionary<string, CmsSignature> lookup); 28static partial void PrepareRegistrationDsa(Dictionary<string, CmsSignature> lookup); 29static partial void PrepareRegistrationECDsa(Dictionary<string, CmsSignature> lookup); 30static partial void PrepareRegistrationSlhDsa(Dictionary<string, CmsSignature> lookup);
System\Security\Cryptography\Pkcs\CmsSignature.DSA.cs (1)
14static partial void PrepareRegistrationDsa(Dictionary<string, CmsSignature> lookup)
System\Security\Cryptography\Pkcs\CmsSignature.ECDsa.cs (1)
14static partial void PrepareRegistrationECDsa(Dictionary<string, CmsSignature> lookup)
System\Security\Cryptography\Pkcs\CmsSignature.RSA.cs (1)
16static partial void PrepareRegistrationRsa(Dictionary<string, CmsSignature> lookup)
System\Security\Cryptography\Pkcs\CmsSignature.SlhDsa.cs (1)
14static partial void PrepareRegistrationSlhDsa(Dictionary<string, CmsSignature> lookup)
System.ServiceModel.NetFramingBase (5)
System\ServiceModel\Channels\ConnectionPool.cs (3)
23private readonly Dictionary<TKey, EndpointConnectionPool> _endpointPools; 682readonly Dictionary<Uri, string> _forwardTable = new Dictionary<Uri, string>(); 683readonly Dictionary<string, ICollection<Uri>> _reverseTable = new Dictionary<string, ICollection<Uri>>();
System\ServiceModel\Channels\ConnectionPoolRegistry.cs (1)
13private Dictionary<string, List<ConnectionPool>> _registry;
System\ServiceModel\Channels\IdlingCommunicationPool.cs (1)
96private Dictionary<TItem, IdlingConnectionSettings> _connectionMapping;
System.ServiceModel.Primitives (1)
netstandard.cs (1)
2311public System.Collections.Generic.Dictionary<System.Uri, System.Security.Cryptography.X509Certificates.X509Certificate2> ScopedCertificates { get { return default; } }
System.ServiceModel.Primitives.Tests (3)
ServiceModel\MessageContractTest.4.4.0.cs (3)
146Dictionary<string, string> properties = new Dictionary<string, string>(); 147Dictionary<string, List<string>> headers = new Dictionary<string, List<string>>(); 301private static void ValidateHeader(Dictionary<string, List<string>> headers, string name, params string[] values)
System.ServiceModel.Syndication (15)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (1)
537Dictionary<XmlQualifiedName, string> attrs = null;
System\ServiceModel\Syndication\CategoriesDocument.cs (1)
18public Dictionary<XmlQualifiedName, string> AttributeExtensions => _extensions.AttributeExtensions;
System\ServiceModel\Syndication\ExtensibleSyndicationObject.cs (2)
12private Dictionary<XmlQualifiedName, string> _attributeExtensions; 39public Dictionary<XmlQualifiedName, string> AttributeExtensions
System\ServiceModel\Syndication\IExtensibleSyndicationObject.cs (1)
11Dictionary<XmlQualifiedName, string> AttributeExtensions { get; }
System\ServiceModel\Syndication\ResourceCollectionInfo.cs (1)
66public Dictionary<XmlQualifiedName, string> AttributeExtensions => _extensions.AttributeExtensions;
System\ServiceModel\Syndication\ServiceDocument.cs (1)
31public Dictionary<XmlQualifiedName, string> AttributeExtensions => _extensions.AttributeExtensions;
System\ServiceModel\Syndication\SyndicationCategory.cs (1)
39public Dictionary<XmlQualifiedName, string> AttributeExtensions => _extensions.AttributeExtensions;
System\ServiceModel\Syndication\SyndicationContent.cs (2)
13private Dictionary<XmlQualifiedName, string> _attributeExtensions; 21public Dictionary<XmlQualifiedName, string> AttributeExtensions
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
108public Dictionary<XmlQualifiedName, string> AttributeExtensions => _extensions.AttributeExtensions;
System\ServiceModel\Syndication\SyndicationItem.cs (1)
75public Dictionary<XmlQualifiedName, string> AttributeExtensions => _extensions.AttributeExtensions;
System\ServiceModel\Syndication\SyndicationLink.cs (1)
51public Dictionary<XmlQualifiedName, string> AttributeExtensions => _extensions.AttributeExtensions;
System\ServiceModel\Syndication\SyndicationPerson.cs (1)
40public Dictionary<XmlQualifiedName, string> AttributeExtensions => _extensions.AttributeExtensions;
System\ServiceModel\Syndication\Workspace.cs (1)
36public Dictionary<XmlQualifiedName, string> AttributeExtensions => _extensions.AttributeExtensions;
System.Text.Encoding.CodePages (6)
System\Text\CodePagesEncodingProvider.cs (1)
14private readonly Dictionary<int, Encoding> _encodings = new Dictionary<int, Encoding>();
System\Text\EncodingTable.cs (5)
12private static readonly Dictionary<string, int> s_nameToCodePageCache = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); 13private static readonly Dictionary<int, string> s_codePageToWebNameCache = new Dictionary<int, string>(); 14private static readonly Dictionary<int, string> s_codePageToEnglishNameCache = new Dictionary<int, string>(); 15private static readonly Dictionary<int, (ushort FamilyCodePage, byte CodePageFlags)> s_codePageToItemCache = new Dictionary<int, (ushort FamilyCodePage, byte CodePageFlags)>(); 181private static string? GetNameFromCodePage(int codePage, string names, ReadOnlySpan<int> indices, Dictionary<int, string> cache)
System.Text.Json (38)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
114var nodeIndex = new Dictionary<T, int>(comparer) { [entryNode] = 0 }; // the node-to-integer mapping
System\Text\Json\Document\JsonElement.cs (1)
1367Dictionary<string, ValueQueue<JsonElement>> properties2 = new(capacity: remainingProps, StringComparer.Ordinal);
System\Text\Json\JsonHelpers.cs (3)
219this Dictionary<string, TValue> dictionary, 226Dictionary<string, TValue>.AlternateLookup<ReadOnlySpan<char>> spanLookup = 256public static Dictionary<TKey, TValue> CreateDictionaryFromCollection<TKey, TValue>(
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
401private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new();
System\Text\Json\Serialization\Converters\Collection\DictionaryOfTKeyTValueConverter.cs (3)
15where TCollection : Dictionary<TKey, TValue> 43Dictionary<TKey, TValue>.Enumerator enumerator; 55enumerator = (Dictionary<TKey, TValue>.Enumerator)state.Current.CollectionEnumerator;
System\Text\Json\Serialization\Converters\Collection\IDictionaryConverter.cs (1)
109if (jsonTypeInfo.CreateObject is null && Type.IsAssignableFrom(typeof(Dictionary<string, object?>)))
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (1)
57if (jsonTypeInfo.CreateObject is null && Type.IsAssignableFrom(typeof(Dictionary<TKey, TValue>)))
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (1)
62else if ((actualTypeToConvert = typeToConvert.GetCompatibleGenericBaseClass(typeof(Dictionary<,>))) != null)
System\Text\Json\Serialization\Converters\Collection\ImmutableDictionaryOfTKeyTValueConverter.cs (3)
17Dictionary<TKey, TValue> dictionary = (Dictionary<TKey, TValue>)state.Current.ReturnValue!; 46state.Current.ReturnValue = creator((Dictionary<TKey, TValue>)state.Current.ReturnValue!);
System\Text\Json\Serialization\Converters\Collection\IReadOnlyDictionaryOfTKeyTValueConverter.cs (3)
14private readonly bool _isDeserializable = typeof(TDictionary).IsAssignableFrom(typeof(Dictionary<TKey, TValue>)); 18Dictionary<TKey, TValue> dictionary = (Dictionary<TKey, TValue>)state.Current.ReturnValue!;
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (3)
38private readonly Dictionary<string, EnumFieldInfo> _enumFieldInfoIndex; 306Dictionary<string, EnumFieldInfo>.AlternateLookup<ReadOnlySpan<char>> lookup = _enumFieldInfoIndex.GetAlternateLookup<ReadOnlySpan<char>>(); 525Dictionary<string, string>? enumMemberAttributes = null;
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (3)
15private static Dictionary<Type, JsonConverter>? s_defaultSimpleConverters; 41private static Dictionary<Type, JsonConverter> GetDefaultSimpleConverters() 44var converters = new Dictionary<Type, JsonConverter>(NumberOfSimpleConverters);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
276private static bool PropertyIsOverriddenAndIgnored(PropertyInfo propertyInfo, Dictionary<string, JsonPropertyInfo>? ignoredMembers)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Collections.cs (2)
46/// Creates serialization metadata for types assignable to <see cref="Dictionary{TKey, TValue}"/>. 58where TCollection : Dictionary<TKey, TValue>
System\Text\Json\Serialization\Metadata\JsonTypeInfo.Cache.cs (2)
55internal Dictionary<string, JsonPropertyInfo> PropertyIndex 64private Dictionary<string, JsonPropertyInfo>? _propertyIndex;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (6)
1035private protected Dictionary<ParameterLookupKey, JsonParameterInfoValues>? _parameterInfoValuesIndex; 1051public Dictionary<string, (JsonPropertyInfo, int index)> AddedProperties = new(options.PropertyNameCaseInsensitive ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal); 1052public Dictionary<string, JsonPropertyInfo>? IgnoredProperties; 1074Dictionary<string, JsonPropertyInfo> propertyIndex = new(properties.Count, comparer); 1152Dictionary<ParameterLookupKey, JsonParameterInfoValues> parameterIndex = new(parameterInfoValues.Length); 1190Dictionary<ParameterLookupKey, JsonParameterInfo> parameterIndex = new(ParameterCount);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
19private readonly Dictionary<object, DerivedJsonTypeInfo>? _discriminatorIdtoType;
System\Text\Json\Serialization\PreserveReferenceResolver.cs (2)
15private readonly Dictionary<string, object>? _referenceIdToObjectMap; 16private readonly Dictionary<object, string>? _objectToReferenceIdMap;
System.Text.Json.SourceGeneration (9)
Helpers\KnownTypeSymbols.cs (1)
40public INamedTypeSymbol? DictionaryOfTKeyTValueType => GetOrResolveType(typeof(Dictionary<,>), ref _DictionaryOfTKeyTValueType);
JsonSourceGenerator.Emitter.cs (2)
81private readonly Dictionary<TypeRef, TypeGenerationSpec> _typeIndex = new(); 88private readonly Dictionary<string, string> _propertyNames = new();
JsonSourceGenerator.Parser.cs (4)
47private readonly Dictionary<ITypeSymbol, TypeGenerationSpec> _generatedTypes = new(SymbolEqualityComparer.Default); 1023bool PropertyIsOverriddenAndIgnored(IPropertySymbol property, Dictionary<string, ISymbol>? ignoredMembers) 1035public Dictionary<string, (PropertyGenerationSpec, ISymbol, int index)> AddedProperties = new(options?.PropertyNameCaseInsensitive == true ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal); 1036public Dictionary<string, ISymbol>? IgnoredMembers;
src\libraries\System.Text.Json\Common\JsonHelpers.cs (2)
18public static bool TryAdd<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue value) where TKey : notnull 114var nodeIndex = new Dictionary<T, int>(comparer) { [entryNode] = 0 }; // the node-to-integer mapping
System.Text.RegularExpressions (20)
System\Text\RegularExpressions\RegexCharClass.cs (1)
116private static readonly Dictionary<string, string> s_definedCategories = new Dictionary<string, string>(DefinedCategoriesCapacity)
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
714var combined = new Dictionary<int, (RegexCharClass Set, int Count)>();
System\Text\RegularExpressions\RegexWriter.cs (1)
23private readonly Dictionary<string, int> _stringTable;
System\Text\RegularExpressions\Symbolic\BDD.cs (1)
202var idmap = new Dictionary<BDD, long>
System\Text\RegularExpressions\Symbolic\BDDRangeConverter.cs (1)
17private readonly Dictionary<BDD, (uint, uint)[]> _rangeCache = new Dictionary<BDD, (uint, uint)[]>();
System\Text\RegularExpressions\Symbolic\CharSetSolver.cs (3)
33private readonly Dictionary<(int ordinal, BDD? one, BDD? zero), BDD> _bddCache = new(); 39private readonly Dictionary<(int op, BDD a, BDD? b), BDD> _operationCache = new(); // op is BooleanOperation; using int to reuse generic instantiation with _bddCache 369BDD ReplaceTrueImpl(BDD bdd, BDD leaf, Dictionary<BDD, BDD> cache)
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (1)
24private Dictionary<string, BDD>? _setBddCache;
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (5)
57private readonly Dictionary<TSet, SymbolicRegexNode<TSet>> _singletonCache = new(); 64internal readonly Dictionary<NodeCacheKey, SymbolicRegexNode<TSet>> _nodeCache = new(); 112internal readonly Dictionary<(SymbolicRegexNode<TSet>, TSet elem, uint context), SymbolicRegexNode<TSet>> _derivativeCache = new(); 120internal readonly Dictionary<(SymbolicRegexNode<TSet>, uint), SymbolicRegexNode<TSet>> _pruneLowerPriorityThanNullabilityCache = new(); 128internal readonly Dictionary<(SymbolicRegexNode<TSet>, SymbolicRegexNode<TSet>), bool> _subsumptionCache = new();
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Automata.cs (2)
29private readonly Dictionary<(SymbolicRegexNode<TSet> Node, uint PrevCharKind), MatchingState<TSet>> _stateCache = []; 81private readonly Dictionary<int, int> _nfaIdByCoreId = [];
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Dgml.cs (3)
24Dictionary<(int Source, int Target), (TSet Rule, List<int> NfaTargets)> transitions = GatherTransitions(this); 144static Dictionary<(int Source, int Target), (TSet Rule, List<int> NfaTargets)> GatherTransitions(SymbolicRegexMatcher<TSet> matcher) 146Dictionary<(int Source, int Target), (TSet Rule, List<int> NfaTargets)> result = new();
System\Text\RegularExpressions\Symbolic\UnicodeCategoryRangesGenerator.cs (1)
41var catMap = new Dictionary<UnicodeCategory, Ranges>();
System.Text.RegularExpressions.Generator (20)
RegexGenerator.cs (5)
104Dictionary<string, string[]> requiredHelpers = new(); 165var emittedExpressions = new Dictionary<(string Pattern, RegexOptions Options, int? Timeout), RegexMethod>(); 171Dictionary<string, string[]> requiredHelpers = new(); 180else if (result is ValueTuple<RegexMethod, string, Dictionary<string, string[]>, CompilationData> regexImpl) 245else if (result is ValueTuple<RegexMethod, string, Dictionary<string, string[]>, CompilationData> regexImpl)
RegexGenerator.Emitter.cs (13)
205private static void EmitRegexDerivedTypeRunnerFactory(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 306private static void AddIsWordCharHelper(Dictionary<string, string[]> requiredHelpers) 346private static void AddIsBoundaryHelper(Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 371private static void AddIsECMABoundaryHelper(Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 397private static string EmitSearchValuesOrLiteral(ReadOnlySpan<char> chars, Dictionary<string, string[]> requiredHelpers) 411private static string EmitSearchValues(char[] chars, Dictionary<string, string[]> requiredHelpers, string? fieldName = null) 506private static string EmitIndexOfAnyCustomHelper(string set, Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 713private static void EmitTryFindNextPossibleStartingPosition(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 1448private static void EmitTryMatchAtCurrentPosition(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 1479Dictionary<string, int> usedNames = new(); 1492Dictionary<string, string[]> additionalLocalFunctions = new(); 4932Dictionary<string, string[]> requiredHelpers, 5007private static string MatchCharacterClass(string chExpr, string charClass, bool negate, HashSet<string> additionalDeclarations, Dictionary<string, string[]> requiredHelpers)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (1)
116private static readonly Dictionary<string, string> s_definedCategories = new Dictionary<string, string>(DefinedCategoriesCapacity)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (1)
714var combined = new Dictionary<int, (RegexCharClass Set, int Count)>();
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (1)
19private readonly Dictionary<TKey, Lazy<RateLimiter>> _limiters;
System.Threading.Tasks.Dataflow (4)
Internal\QueuedMap.cs (1)
156private readonly Dictionary<TKey, int> _mapKeyToIndex;
Internal\ReorderingBuffer.cs (2)
44private readonly Dictionary<long, KeyValuePair<bool, TOutput>> _reorderingBuffer = new Dictionary<long, KeyValuePair<bool, TOutput>>(); 193public Dictionary<long, KeyValuePair<bool, TOutput>> ItemsBuffered { get { return _buffer._reorderingBuffer; } }
Internal\TargetRegistry.cs (1)
62private readonly Dictionary<ITargetBlock<T>, LinkedTargetInfo> _targetInformation;
System.Windows.Controls.Ribbon (19)
Microsoft\Windows\Controls\Generated\PropertyHelper.cs (6)
112var transferEnabledMap = GetPropertyTransferEnabledMapForObject(d); 118private static Dictionary<DependencyProperty, bool> GetPropertyTransferEnabledMapForObject(DependencyObject d) 120var propertyTransferEnabledForObject = _propertyTransferEnabledMap[d] as Dictionary<DependencyProperty, bool>; 133var propertyTransferEnabledForObject = _propertyTransferEnabledMap[d] as Dictionary<DependencyProperty, bool>;
Microsoft\Windows\Controls\KeyTipService.cs (5)
269Dictionary<DependencyObject, bool> processedElements = new Dictionary<DependencyObject, bool>(); 320private void ReevaluateScopes(DependencyObject scopedParent, Dictionary<DependencyObject, bool> processedElements) 331Dictionary<DependencyObject, DependencyObject> elementToScopeMap = null; 908Dictionary<XmlLanguage, CultureInfo> cultureCache = Current._cultureCache; 1743private Dictionary<XmlLanguage, CultureInfo> _cultureCache = null; // cache of culture infos.
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupItemsPanel.cs (1)
468private Dictionary<int, int> _childIndexToStarLayoutIndexMap = new Dictionary<int, int>();
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabHeadersPanel.cs (3)
181Dictionary<object, List<RibbonTabHeaderAndIndex>> contextualTabHeaders = new Dictionary<object, List<RibbonTabHeaderAndIndex>>(); 660Dictionary<object, List<RibbonTabHeaderAndIndex>> contextualTabHeaders, 706Dictionary<object, List<RibbonTabHeaderAndIndex>> contextualTabHeaders,
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (4)
62private Dictionary<int, int> _tabIndexToDisplayIndexMap = new Dictionary<int, int>(); // A map from collection index to display index of tab items. 63private Dictionary<int, int> _tabDisplayIndexToIndexMap = new Dictionary<int, int>(); // A map from display index to collection index of tab items. 689internal Dictionary<int, int> TabIndexToDisplayIndexMap 700internal Dictionary<int, int> TabDisplayIndexToIndexMap
System.Windows.Forms (79)
System\Resources\ResXResourceReader.cs (2)
28private Dictionary<string, object>? _resData; 29private Dictionary<string, object>? _resMetadata;
System\Resources\ResXResourceReader.ReaderAliasResolver.cs (1)
12private readonly Dictionary<string, AssemblyName> _cachedAliases;
System\Resources\ResXResourceWriter.cs (1)
30private Dictionary<string, string?>? _cachedAliases;
System\Windows\Forms\Accessibility\AccessibleRoleControlTypeMap.cs (1)
13private static readonly Dictionary<AccessibleRole, UIA_CONTROLTYPE_ID> s_map = new()
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
34private Dictionary<Control, ExtenderProxy>? _extenderCache;
System\Windows\Forms\ActiveX\AxHost.cs (3)
127private Dictionary<string, PropertyDescriptor>? _properties; 128private Dictionary<string, PropertyInfo>? _propertyInfos; 164private Dictionary<PROPCAT, CategoryAttribute>? _objectDefinedCategoryNames;
System\Windows\Forms\Application.ComponentManager.cs (2)
31private Dictionary<nuint, ComponentHashtableEntry>? _oleComponents; 37private Dictionary<nuint, ComponentHashtableEntry> OleComponents => _oleComponents ??= [];
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (3)
53private static Dictionary<string, Type>? s_builtEnums; 54private static Dictionary<Guid, CachedProperties>? s_processedLibraries; 403Dictionary<string, PropertyInfo> propertyInfo = [];
System\Windows\Forms\Control.cs (1)
289private Dictionary<int, Font>? _dpiFonts;
System\Windows\Forms\Control.Ime.cs (2)
954private static volatile Dictionary<ImeMode, ImeModeConversion>? s_imeModeConversionBits; 1061public static Dictionary<ImeMode, ImeModeConversion> ImeModeConversionBits
System\Windows\Forms\Controls\ComboBox\ComboBox.ACNativeWindow.cs (1)
16private static readonly Dictionary<HWND, ACNativeWindow?> s_acWindows = [];
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
355private readonly Dictionary<Type, TypeConverter> _converters;
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (1)
18private readonly Dictionary<ItemArray.Entry, ListBoxItemAccessibleObject> _itemAccessibleObjects;
System\Windows\Forms\Controls\ListView\ListView.cs (1)
136private readonly Dictionary<int, ListViewItem> _listItemsTable = []; // elements are ListViewItem's
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
14private readonly Dictionary<int, AccessibleObject> _listViewSubItemAccessibleObjects;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
48private Dictionary<string, GridEntry>? _viewTabProperties; 65private Dictionary<int, int>? _designerSelections;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MergePropertyDescriptor.MergedAttributeCollection.cs (1)
15private Dictionary<Type, Attribute>? _foundAttributes;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
250Dictionary<string, List<GridEntry>> categories = [];
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (9)
11private Dictionary<KnownColors, Color>? _professionalRGB; 31private Dictionary<KnownColors, Color> ColorTable 336private static void InitCommonColors(ref Dictionary<KnownColors, Color> rgbTable) 364private void InitSystemColors(ref Dictionary<KnownColors, Color> rgbTable) 668private static void InitOliveLunaColors(ref Dictionary<KnownColors, Color> rgbTable) 914private static void InitSilverLunaColors(ref Dictionary<KnownColors, Color> rgbTable) 1156private static void InitRoyaleColors(ref Dictionary<KnownColors, Color> rgbTable) 1370private void InitThemedColors(ref Dictionary<KnownColors, Color> rgbTable) 1438private static void InitBlueLunaColors(ref Dictionary<KnownColors, Color> rgbTable)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
51private Dictionary<Keys, ToolStripMenuItem>? _shortcuts; 1646internal Dictionary<Keys, ToolStripMenuItem> Shortcuts
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.StubSite.cs (1)
21private Dictionary<object, object>? _dictionary;
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (5)
101Dictionary<string, ToolStrip> itemLocationHash = BuildItemOriginationHash(); 104Dictionary<object, List<SettingsStub>> toolStripPanelDestinationHash = []; 174private static void ApplyToolStripSettings(ToolStrip? toolStrip, SettingsStub settings, Dictionary<string, ToolStrip> itemLocationHash) 210private Dictionary<string, ToolStrip> BuildItemOriginationHash() 212Dictionary<string, ToolStrip> itemLocationHash = [];
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
129internal Dictionary<IntPtr, TreeNode> _nodesByHandle = [];
System\Windows\Forms\Controls\WebBrowser\HtmlShim.cs (1)
21private Dictionary<EventHandler, HtmlToClrEventProxy>? _attachedEventList;
System\Windows\Forms\Controls\WebBrowser\HtmlShimManager.cs (3)
17private Dictionary<HtmlWindow, HtmlWindow.HtmlWindowShim>? _htmlWindowShims; 18private Dictionary<HtmlElement, HtmlElement.HtmlElementShim>? _htmlElementShims; 19private Dictionary<HtmlDocument, HtmlDocument.HtmlDocumentShim>? _htmlDocumentShims;
System\Windows\Forms\DataBinding\BindingContext.cs (1)
16private readonly Dictionary<HashKey, WeakReference> _listManagers;
System\Windows\Forms\DataBinding\BindingSource.cs (1)
55private Dictionary<string, BindingSource>? _relatedBindingSources;
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (1)
57private Dictionary<int, TaskDialogButton>? _boundStandardButtonsByID;
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (3)
25private readonly Dictionary<Control, ControlItem> _items = []; 26private readonly Dictionary<Control, ErrorWindow> _windows = []; 473Dictionary<Control, string> controlError = new(bindingsCount);
System\Windows\Forms\Form.cs (1)
167private Dictionary<int, Size>? _dpiFormSizes;
System\Windows\Forms\Help\HelpProvider.cs (4)
20private readonly Dictionary<Control, string?> _helpStrings = []; 21private readonly Dictionary<Control, bool> _showHelp = []; 23private readonly Dictionary<Control, string?> _keywords = []; 24private readonly Dictionary<Control, HelpNavigator> _navigators = [];
System\Windows\Forms\Input\KeysConverter.cs (11)
17private Dictionary<CultureInfo, List<string>>? _cultureToDisplayOrder; 18private Dictionary<CultureInfo, Dictionary<string, Keys>>? _cultureToKeyName; 38Dictionary<string, Keys> localizedNames = new(34); 99private Dictionary<CultureInfo, Dictionary<string, Keys>> CultureToKeyName 112private Dictionary<CultureInfo, List<string>> CultureToDisplayOrder 159Dictionary<string, Keys> keyNames = GetKeyNames(culture); 238Dictionary<string, Keys> keyNames = GetKeyNames(culture); 286Dictionary<string, Keys> keyNames = GetKeyNames(culture); 344private Dictionary<string, Keys> GetKeyNames(CultureInfo? culture)
System\Windows\Forms\Layout\TableLayout.cs (1)
1392Dictionary<IArrangedElement, LayoutInfo> oldLayoutInfo = [];
System\Windows\Forms\NativeWindow.cs (2)
38private static readonly Dictionary<HWND, GCHandle> s_windowHandles = []; 39private static readonly Dictionary<short, HWND> s_windowIds = [];
System\Windows\Forms\Nrbf\WinFormsNrbfSerializer.cs (1)
17private static Dictionary<TypeName, Type>? s_knownTypes;
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.TableLayoutSettingsStub.cs (1)
16private Dictionary<object, ControlInformation>? _controlsInfo;
System\Windows\Forms\PropertyStore.cs (1)
21private readonly Dictionary<int, Value> _values = [];
System\Windows\Forms\ToolTip\ToolTip.cs (2)
36private readonly Dictionary<Control, TipInfo> _tools = []; 50private readonly Dictionary<HWND, Control> _owners = [];
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
19private static Dictionary<string, ThemeHandle>? t_themeHandles; // per-thread cache of ThemeHandle objects.
System.Windows.Forms.Analyzers.CSharp.Tests (7)
ProjectFileReaderTests.cs (7)
44Dictionary<string, string> properties = new() 70Dictionary<string, string> properties = new() 108Dictionary<string, string> properties = new() 145Dictionary<string, string> properties = new() 167Dictionary<string, string> properties = new() 187Dictionary<string, string> properties = new() 205Dictionary<string, string> properties = new()
System.Windows.Forms.Design (103)
System\ComponentModel\Design\ComponentDesigner.cs (2)
16private Dictionary<string, InheritedPropertyDescriptor>? _inheritedProps; 404Dictionary<string, InheritedPropertyDescriptor> props = [];
System\ComponentModel\Design\ComponentDesigner.ShadowPropertyCollection.cs (2)
14private Dictionary<string, object?>? _properties; 15private Dictionary<string, PropertyDescriptor>? _descriptors;
System\ComponentModel\Design\DesignerActionPanel.cs (8)
208private static void AddToCategories(StandardLineInfo lineInfo, Dictionary<string, Dictionary<DesignerActionList, List<LineInfo>>> categories) 213if (!categories.TryGetValue(categoryName, out Dictionary<DesignerActionList, List<LineInfo>>? category)) 549private void ProcessLists(DesignerActionListCollection? lists, Dictionary<string, Dictionary<DesignerActionList, List<LineInfo>>> categories) 817Dictionary<string, Dictionary<DesignerActionList, List<LineInfo>>> categories = []; 827foreach (Dictionary<DesignerActionList, List<LineInfo>> category in categories.Values)
System\ComponentModel\Design\DesignerActionService.cs (1)
17private readonly Dictionary<IComponent, DesignerActionListCollection> _designerActionLists; // this is how we store 'em. Syntax: key = object, value = DesignerActionListCollection
System\ComponentModel\Design\DesignerActionUI.cs (1)
31private readonly Dictionary<object, DesignerActionGlyph> _componentToGlyph; // used for quick reference between components and our glyphs
System\ComponentModel\Design\DesignerHost.cs (1)
55private readonly Dictionary<IComponent, IDesigner> _designers; // designer -> component mapping
System\ComponentModel\Design\DesignerHost.Site.cs (1)
16private Dictionary<object, object>? _dictionary;
System\ComponentModel\Design\InheritanceService.cs (1)
16private Dictionary<IComponent, InheritanceAttribute> _inheritedComponents;
System\ComponentModel\Design\MenuCommandService.cs (2)
19private readonly Dictionary<Guid, List<MenuCommand>> _commandGroups; 259Dictionary<string, int> buildVerbs = new(verbCount, StringComparer.OrdinalIgnoreCase);
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
22private readonly Dictionary<int, Font?> _fallbackFonts;
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomComponentSerializationState.cs (2)
26public readonly Dictionary<string, object?>? Resources; 42Dictionary<string, object?>? resources,
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (10)
19private readonly Dictionary<string, OrderedCodeStatementCollection?> _statementsTable = []; 20private readonly Dictionary<string, List<CodeExpression>> _expressions = []; 21private Dictionary<string, CodeDomComponentSerializationState>? _objectState; // only used during deserialization 30private static void PopulateCompleteStatements(object? data, string name, CodeStatementCollection completeStatements, Dictionary<string, List<CodeExpression>> expressions) 68internal void Deserialize(IDesignerSerializationManager manager, Dictionary<string, CodeDomComponentSerializationState> objectState, List<string> objectNames, bool applyDefaults) 172private static void DeserializeDesignTimeProperties(IDesignerSerializationManager manager, string name, Dictionary<string, object?>? state) 460internal void SetupVariableReferences(IDesignerSerializationManager manager, IContainer container, Dictionary<object, ObjectData> objectData, IList shimObjectNames) 490internal void Serialize(IDesignerSerializationManager manager, Dictionary<object, ObjectData> objectData, Dictionary<string, CodeDomComponentSerializationState> objectState, IList shimObjectNames) 507Dictionary<string, object?>? resources = null;
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (4)
40private readonly Dictionary<object, ObjectData> _objects; 45private Dictionary<string, CodeDomComponentSerializationState>? _objectState; 136Dictionary<string, CodeDomComponentSerializationState> state = new(_objects.Count); 172Dictionary<Assembly, AssemblyName> assemblies = new(_objects.Count);
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
418Dictionary<string, int> docMemberHash = new(docDeclaration.Members.Count, caseInsensitive
System\ComponentModel\Design\Serialization\CodeDomLocalizationProvider.cs (3)
21private Dictionary<MemberCodeDomSerializer, ResourcePropertyMemberCodeDomSerializer>? _memberSerializers; 22private Dictionary<MemberCodeDomSerializer, ResourcePropertyMemberCodeDomSerializer>? _nopMemberSerializers; 178Dictionary<MemberCodeDomSerializer, ResourcePropertyMemberCodeDomSerializer> map = model is CodeDomLocalizationModel.None
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (2)
2604internal static void FillStatementTable(IDesignerSerializationManager manager, IDictionary table, Dictionary<string, string>? names, CodeStatementCollection statements, string? className) 2787internal static Type? GetType(IDesignerSerializationManager manager, string name, Dictionary<string, string>? names)
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (1)
48Dictionary<object, int> originalValues = [];
System\ComponentModel\Design\Serialization\ComponentCache.cs (1)
13private Dictionary<object, Entry>? _cache;
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (3)
31private Dictionary<string, object>? _instancesByName; 32private Dictionary<object, string>? _namesByInstance; 33private Dictionary<Type, object>? _serializers;
System\ComponentModel\Design\Serialization\ExpressionTable.cs (1)
15private Dictionary<object, ExpressionInfo>? _expressions;
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (23)
30private readonly Dictionary<string, int> _nameTable; 31private Dictionary<CultureInfo, Dictionary<string, object?>?>? _resourceSets; 32private Dictionary<string, object?>? _metadata; 33private Dictionary<string, object?>? _mergedMetadata; 97private Dictionary<CultureInfo, Dictionary<string, object?>?> ResourceTable 221Dictionary<string, object?>? resourceSet = GetResourceSet(culture); 237private Dictionary<string, object?> CreateResourceSet(IResourceReader reader, CultureInfo culture) 239Dictionary<string, object?> result = []; 282Dictionary<string, object?>? metaData = GetMetadata(); 288Dictionary<string, object?>? resourceSet = GetResourceSet(CultureInfo.InvariantCulture); 309Dictionary<string, object?>? ht = GetResourceSet(culture); 316private Dictionary<string, object?>? GetMetadata() 373Dictionary<string, object?>? rs = GetResourceSet(culture); 388private Dictionary<string, object?>? GetResourceSet(CultureInfo culture) 391if (!ResourceTable.TryGetValue(culture, out Dictionary<string, object?>? resourceSet)) 472ResourceTable.TryGetValue(CultureInfo.InvariantCulture, out Dictionary<string, object?>? resourceSet); 548Dictionary<string, object?> invariant = GetResourceSet(CultureInfo.InvariantCulture)!; 549Dictionary<string, object?>? metadata; 622Dictionary<string, object?>? resourceSet = GetResourceSet(CultureInfo.InvariantCulture); 652Dictionary<string, object?>? resourceSet = GetResourceSet(CultureInfo.InvariantCulture); 690Dictionary<string, object?>? resourceSet = GetResourceSet(CultureInfo.InvariantCulture);
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (3)
19private Dictionary<string, OrderedCodeStatementCollection>? _statementTable; 87Dictionary<string, string> names = new(count); 480Dictionary<string, CodeMethodMap> methodMap = [];
System\ComponentModel\Design\UndoEngine.cs (1)
27private Dictionary<IComponent, List<ReferencingComponent>>? _refToRemovedComponent;
System\ComponentModel\Design\UndoEngine.UndoUnit.cs (2)
24private readonly Dictionary<string, IContainer>? _lastSelection; // the selection as it was before we gathered undo info 35Dictionary<string, IContainer> selectedNames = [];
System\Drawing\Design\ToolboxItem.cs (1)
555Dictionary<string, AssemblyName> parents = [];
System\Resources\Tools\StronglyTypedResourceBuilder.cs (6)
165Dictionary<string, ResourceData> resourceTypes = new(StringComparer.InvariantCultureIgnoreCase); 271Dictionary<string, ResourceData> resourceList = new(StringComparer.InvariantCultureIgnoreCase); 305Dictionary<string, ResourceData> resourceList, 322var cleanedResourceList = VerifyResourceNames(resourceList, codeProvider, errors, out Dictionary<string, string> reverseFixupTable); 860Dictionary<string, ResourceData> resourceList, 863out Dictionary<string, string> reverseFixupTable)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (1)
59private readonly Dictionary<SnapLine, Rectangle> _snapLineToBounds = [];
System\Windows\Forms\Design\Behavior\SelectionManager.cs (1)
22private readonly Dictionary<IComponent, ControlDesigner> _componentToDesigner;
System\Windows\Forms\Design\CommandSet.CommandSetItem.cs (1)
26private static readonly Dictionary<EventHandler, StatusState> s_commandStatusHash = []; // Dictionary of the command statuses we are tracking.
System\Windows\Forms\Design\ControlDesigner.cs (2)
71private Dictionary<IntPtr, bool>? _subclassedChildren; 191private Dictionary<IntPtr, bool> SubclassedChildWindows => _subclassedChildren ??= [];
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (2)
35private readonly Dictionary<DataGridViewColumn, string?> _columnsNames = []; 1279Dictionary<string, PropertyDescriptor> hash = [];
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1959private readonly Dictionary<int, ImageList> _imageListCacheByDPI = [];
System\Windows\Forms\Design\DocumentDesigner.cs (1)
55private Dictionary<string, AxToolboxItem> _axTools;
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
35private static Dictionary<IDataObject, IComponent>? s_currentDrags;
System\Windows\Forms\Design\SelectionUIService.cs (3)
45private Dictionary<object, SelectionUIItem> _selectionItems; 46private readonly Dictionary<object, ISelectionUIHandler> _selectionHandlers; // Component UI handlers 397Dictionary<object, SelectionUIItem> newSelection = new(selection.Count);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
1391private Dictionary<string, bool> _extenderProperties; 1393private Dictionary<string, bool> ExtenderProperties
System\Windows\Forms\Design\TabOrder.cs (2)
25private Dictionary<Control, int>? _tabNext; 32private readonly Dictionary<Control, PropertyDescriptor> _tabProperties;
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (2)
21private static Dictionary<Type, ToolboxItem> t_cachedToolboxItems; 32private static Dictionary<Type, Bitmap> t_cachedWinformsImages;
System.Windows.Forms.Design.Tests (28)
ControlDesignerTests.cs (2)
336Dictionary<string, object> defaultValues = new() 356Dictionary<string, object> defaultValues = new()
System\ComponentModel\Design\ComponentDesignerTests.cs (9)
74Dictionary<string, PropertyDescriptor> properties = new() 2309Dictionary<string, PropertyDescriptor> properties = new() 2329Dictionary<string, PropertyDescriptor> properties = new() 2362Dictionary<string, PropertyDescriptor> properties = new() 2436Dictionary<object, object> events = new() { { "key1", descriptor }, { "Key2", null } }; 2739Dictionary<string, PropertyDescriptor> properties = new() 2760Dictionary<string, PropertyDescriptor> properties = new() 2795Dictionary<string, PropertyDescriptor> properties = new() 2875Dictionary<object, object> events = new() { { "key1", descriptor }, { "Key2", null } };
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (12)
57private static Dictionary<string, CodeDomComponentSerializationState> GetState(SerializationInfo info) 59return Assert.IsType<Dictionary<string, CodeDomComponentSerializationState>>(info.GetValue("State", typeof(Dictionary<string, CodeDomComponentSerializationState>))); 64Assert.Null(info.GetValue("State", typeof(Dictionary<string, CodeDomComponentSerializationState>))); 142Dictionary<string, CodeDomComponentSerializationState> state = GetState(info); 245Dictionary<string, CodeDomComponentSerializationState> state = GetState(info); 347Dictionary<string, CodeDomComponentSerializationState> state = GetState(info); 392Dictionary<string, CodeDomComponentSerializationState> state = GetState(info); 443Dictionary<string, CodeDomComponentSerializationState> state = GetState(info); 489Dictionary<string, CodeDomComponentSerializationState> state = GetState(info); 533Dictionary<string, CodeDomComponentSerializationState> state = GetState(info); 582Dictionary<string, CodeDomComponentSerializationState> state = GetState(info);
System\Windows\Forms\Design\DataGridViewDesignerTests.cs (1)
145Dictionary<string, PropertyDescriptor> properties = new()
System\Windows\Forms\Design\DesignerUtilsTests.cs (1)
469typeof(Dictionary<,>),
System\Windows\Forms\Design\ParentControlDesignerTests.cs (1)
122Dictionary<string, object> defaultValues = new()
System\Windows\Forms\Design\TableLayoutPanelDesignerTests.cs (1)
167Dictionary<string, object> defaultValues = new();
ToolStripMenuItemDesignerTest.cs (1)
116Dictionary<string, PropertyDescriptor> property = new()
System.Windows.Forms.Primitives (2)
Windows\Win32\System\Ole\ClassPropertyDispatchAdapter.cs (2)
24private readonly Dictionary<int, DispatchEntry> _members = []; 25private readonly Dictionary<string, int> _reverseLookup = new(StringComparer.OrdinalIgnoreCase);
System.Windows.Forms.Primitives.TestUtilities (5)
Extensions\AssertExtensions.cs (1)
427var actualItemCountMapping = new Dictionary<T, ItemCount>(comparer);
SystemCOLORs.cs (4)
8private static readonly Dictionary<COLORREF, List<SYS_COLOR_INDEX>> s_systemColors = CreateColorDictionary(); 10private static readonly Dictionary<SYS_COLOR_INDEX, string> s_names = new() 60private static Dictionary<COLORREF, List<SYS_COLOR_INDEX>> CreateColorDictionary() 62Dictionary<COLORREF, List<SYS_COLOR_INDEX>> dictionary = [];
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (1)
203var semanticModelCache = new Dictionary<SyntaxTree, SemanticModel>();
System.Windows.Forms.Tests (21)
misc\CollectionHelperTests.cs (9)
15Dictionary<string, string> source = []; 22Dictionary<string, string> source = []; 31Dictionary<string, string> source = []; 40Dictionary<string, string> source = []; 49Dictionary<string, string> source = []; 58Dictionary<string, string> source = new() 71Dictionary<string, string> source = new() 94Dictionary<string, string> source = new() 117Dictionary<string, string> source = new()
System\Resources\ResXResourceWriterTests.cs (1)
34var dictionary = new Dictionary<object, object>();
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (1)
1355var typeDefaultValues = new Dictionary<Type, string>
System\Windows\Forms\ApplicationTests.cs (2)
393Dictionary<object, int> formClosingProcessed = new(mainMDIFormCount); 394Dictionary<object, int> formClosedProcessed = new(mainMDIFormCount);
System\Windows\Forms\ClipboardTests.cs (2)
1033private readonly Dictionary<string, byte[]> _formatToJson = []; 1034private readonly Dictionary<string, string> _formatToTypeName = [];
System\Windows\Forms\ListBindingHelperTests.cs (2)
136yield return new object[] { typeof(Dictionary<int, string>), typeof(Dictionary<int, string>) };
System\Windows\Forms\PaddingConverterTests.cs (1)
379var propertyValues = new Dictionary<string, object>
System\Windows\Forms\PropertyGridInternal\TestAccessors.PropertyGridTestAccessor.cs (1)
20internal Dictionary<int, int> _designerSelections => Dynamic._designerSelections;
System\Windows\Forms\PropertyGridTests.cs (2)
2750Dictionary<int, int> _designerSelections = propertyGridTestAccessor._designerSelections; 2782Dictionary<int, int> _designerSelections = propertyGridTestAccessor._designerSelections;
System.Windows.Input.Manipulations (1)
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
45private Dictionary<int, ManipulatorState> manipulatorStates;
System.Xaml (100)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
89private static Dictionary<object, AssemblyName> _assemblies; // get key via GetKeyForAssembly
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (10)
1653private Dictionary<string, object> _ignorables; 1654private Dictionary<string, ProcessContentSet> _processContents; 1655private Dictionary<string, PreserveItemSet> _preserveElements; 1656private Dictionary<string, PreserveItemSet> _preserveAttributes; 2008private Dictionary<string, string> _names; 2063private Dictionary<string, object> _knownNamespaces; 2064private Dictionary<string, string> _namespaceMap = new Dictionary<string, string>(); 2065private Dictionary<string, object> _subsumingNamespaces; 2066private Dictionary<string, HandleElementCallback> _elementHandler = new Dictionary<string, HandleElementCallback>(); 2067private Dictionary<string, HandleAttributeCallback> _attributeHandler = new Dictionary<string, HandleAttributeCallback>();
System\Xaml\AttachablePropertyServices.cs (7)
120private Lazy<ConditionalWeakTable<object, Dictionary<AttachableMemberIdentifier, object>>> instanceStorage = 121new Lazy<ConditionalWeakTable<object, Dictionary<AttachableMemberIdentifier, object>>>(); 127Dictionary<AttachableMemberIdentifier, object> instanceProperties; 142Dictionary<AttachableMemberIdentifier, object> instanceProperties; 162Dictionary<AttachableMemberIdentifier, object> instanceProperties; 180Dictionary<AttachableMemberIdentifier, object> instanceProperties; 216Dictionary<AttachableMemberIdentifier, object> instanceProperties;
System\Xaml\Context\NameFixupGraph.cs (4)
18private Dictionary<object, FrugalObjectList<NameFixupToken>> _dependenciesByParentObject; 21private Dictionary<object, NameFixupToken> _dependenciesByChildObject; 24private Dictionary<string, FrugalObjectList<NameFixupToken>> _dependenciesByName; 477private static void AddToMultiDict<TKey>(Dictionary<TKey, FrugalObjectList<NameFixupToken>> dict,
System\Xaml\Context\ObjectWriterContext.cs (2)
614public Dictionary<XamlMember, object> CurrentPreconstructionPropertyValues 624public Dictionary<XamlMember, object> ParentPreconstructionPropertyValues
System\Xaml\Context\ObjectWriterFrame.cs (2)
15private Dictionary<XamlMember, object> _preconstructionPropertyValues; 164public Dictionary<XamlMember, object> PreconstructionPropertyValues
System\Xaml\Context\XamlCommonFrame.cs (3)
12internal Dictionary<string, string> _namespaces; 14public Dictionary<string, string> Namespaces 54public void SetNamespaces(Dictionary<string, string> namespaces)
System\Xaml\Context\XamlParserContext.cs (2)
15private Dictionary<string, string> _prescopeNamespaces; 210internal Dictionary<string, SpecialBracketCharacters> CurrentEscapeCharacterMapForMarkupExtension
System\Xaml\Context\XamlParserFrame.cs (1)
37public Dictionary<string, SpecialBracketCharacters> EscapeCharacterMapForMarkupExtension { get; set; }
System\Xaml\InfosetObjects\XamlObjectWriter.cs (6)
34private Dictionary<object, List<PendingCollectionAdd>> _pendingCollectionAdds; 39private Dictionary<object, ObjectWriterContext> _pendingKeyConversionContexts; 213private Dictionary<object, List<PendingCollectionAdd>> PendingCollectionAdds 223private Dictionary<object, ObjectWriterContext> PendingKeyConversionContexts 1460return openGeneric == typeof(Dictionary<,>) || 1546Dictionary<XamlMember, object> propertyValues = ctx.CurrentPreconstructionPropertyValues;
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
200Dictionary<string, string> xmlnsDictionary = null;
System\Xaml\InfosetObjects\XamlXmlReaderSettings.cs (1)
15internal Dictionary<string, string> _xmlnsDictionary;
System\Xaml\MS\Impl\XmlNsInfo.cs (10)
71private Dictionary<string, string> _oldToNewNs; 72internal Dictionary<string, string> OldToNewNs 85private Dictionary<string, string> _prefixes; 86internal Dictionary<string, string> Prefixes 302private Dictionary<string, string> LoadOldToNewNs() 304Dictionary<string, string> result = new Dictionary<string, string>(StringComparer.Ordinal); 340private void LoadOldToNewNsHelper(Dictionary<string, string> result, string oldns, string newns, Assembly assembly) 355private Dictionary<string, string> LoadPrefixes() 357Dictionary<string, string> result = new Dictionary<string, string>(StringComparer.Ordinal); 392private void LoadPrefixesHelper(Dictionary<string, string> result, string xmlns, string prefix, Assembly assembly)
System\Xaml\Parser\NodeStreamSorter.cs (2)
23private Dictionary<string, string> _xmlnsDictionary; 89public NodeStreamSorter(XamlParserContext context, XamlPullParser parser, XamlXmlReaderSettings settings, Dictionary<string, string> xmlnsDictionary)
System\Xaml\Runtime\DynamicMethodRuntime.cs (10)
56private Dictionary<MethodInfo, PropertyGetDelegate> _propertyGetDelegates; 57private Dictionary<MethodInfo, PropertySetDelegate> _propertySetDelegates; 58private Dictionary<MethodBase, FactoryDelegate> _factoryDelegates; 59private Dictionary<Type, object> _converterInstances; 60private Dictionary<Type, DelegateCreator> _delegateCreators; 63private Dictionary<MethodInfo, PropertyGetDelegate> PropertyGetDelegates 76private Dictionary<MethodInfo, PropertySetDelegate> PropertySetDelegates 89private Dictionary<MethodBase, FactoryDelegate> FactoryDelegates 102private Dictionary<Type, object> ConverterInstances 115private Dictionary<Type, DelegateCreator> DelegateCreators
System\Xaml\Schema\Reflector.cs (2)
151Dictionary<char, char> bracketCharacterAttributeList = new Dictionary<char, char>(); 427Dictionary<char, char> bracketCharacterList = new Dictionary<char, char>();
System\Xaml\Schema\TypeReflector.cs (16)
259internal Dictionary<int, IList<XamlType>> ReflectedPositionalParameters { get; set; } 488Dictionary<string, PropertyInfo> result = new Dictionary<string, PropertyInfo>(propList.Length); 550Dictionary<string, EventInfo> result = new Dictionary<string, EventInfo>(eventList.Length); 735private void LookupAllStaticAccessors(out Dictionary<string, List<MethodInfo>> getters, 736out Dictionary<string, List<MethodInfo>> setters, out Dictionary<string, List<MethodInfo>> adders) 754private void LookupAllStaticAccessorsHelper(MethodInfo[] allMethods, Dictionary<string, List<MethodInfo>> getters, 755Dictionary<string, List<MethodInfo>> setters, Dictionary<string, List<MethodInfo>> adders, bool isUnderlyingTypePublic) 866private static void AddToMultiDict(Dictionary<string, List<MethodInfo>> dict, string name, MethodInfo value, bool isUnderlyingTypePublic) 991Dictionary<string, List<MethodInfo>> getters; 992Dictionary<string, List<MethodInfo>> setters; 993Dictionary<string, List<MethodInfo>> adders; 1002Dictionary<string, List<MethodInfo>> getters, Dictionary<string, List<MethodInfo>> setters) 1045List<XamlMember> result, Dictionary<string, List<MethodInfo>> adders)
System\Xaml\Schema\XamlTypeInvoker.cs (2)
17private Dictionary<XamlType, MethodInfo> _addMethods; 165Dictionary<XamlType, MethodInfo> addMethods = new Dictionary<XamlType, MethodInfo>();
System\Xaml\XamlObjectReader.cs (4)
2429private Dictionary<object, ObjectMarkupInfo> objectGraphTable; 2433private Dictionary<object, string> serviceProviderTable; 2486private Dictionary<string, string> namespaceToPrefixMap; 2487private Dictionary<string, string> prefixToNamespaceMap;
System\Xaml\XamlSchemaContext.cs (7)
489private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > _masterBracketCharacterCache; 498private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > MasterBracketCharacterCache 503Interlocked.CompareExchange(ref _masterBracketCharacterCache, CreateDictionary<XamlType, Dictionary<string, SpecialBracketCharacters>>(), null); 566internal Dictionary<string, SpecialBracketCharacters> InitBracketCharacterCacheForType(XamlType type) 570Dictionary<string, SpecialBracketCharacters> bracketCharacterCache = null; 587private Dictionary<string, SpecialBracketCharacters> BuildBracketCharacterCacheForType(XamlType type) 589Dictionary<string, SpecialBracketCharacters> map = new Dictionary<string, SpecialBracketCharacters>(StringComparer.OrdinalIgnoreCase);
System\Xaml\XamlType.cs (3)
1680private Dictionary<int, IList<XamlType>> LookupAllPositionalParameters() 1687Dictionary<int, IList<XamlType>> result = new Dictionary<int, IList<XamlType>>(); 1694Dictionary<int, IList<XamlType>> ctorDict = new Dictionary<int, IList<XamlType>>();
System\Xaml\XamlXmlWriter.cs (4)
42private Dictionary<string, string> prefixAssignmentHistory; 678private Dictionary<string, string> namespaceMap = new Dictionary<string, string>(); // namespace to prefix map 679private Dictionary<string, string> prefixMap = new Dictionary<string, string>(); // prefix to namespace map 2189private Dictionary<XamlMember, bool> dictionary = new Dictionary<XamlMember, bool>();
System.Xaml.Tests (16)
Common\CustomAssembly.cs (1)
34public Optional<Dictionary<Type, object?[]?>> GetCustomAttributesMap { get; set; }
System\Xaml\Schema\XamlTypeInvokerTests.cs (5)
117var instance = new Dictionary<int, string>(); 148var invoker = new XamlTypeInvoker(new XamlType(typeof(Dictionary<object, int>), new XamlSchemaContext())); 273new XamlTypeInvoker(new XamlType(typeof(Dictionary<int, string>), new XamlSchemaContext())), 279new XamlTypeInvoker(new XamlType(typeof(Dictionary<int, string>), new XamlSchemaContext())), 554public Dictionary<object, object> Dictionary { get; } = new Dictionary<object, object>();
System\Xaml\XamlTypeTests.cs (10)
973public static Dictionary<int, string>? GetGetOnlyDictionaryProperty(int value) => null; 1018public static Dictionary<int, string>? GetGetOnlyDictionaryProperty(int value) => null; 1109public static Dictionary<int, string>? GetDictionaryProperty(string value1) => null; 1124internal static Dictionary<int, string>? GetDictionaryProperty(string value1) => null; 1139public static Dictionary<int, string>? GetDictionaryProperty(string value1) => null; 1260public Dictionary<int, string>? GetOnlyDictionaryProperty { get; } 1766yield return new object?[] { new SubXamlType(typeof(Dictionary<int, int>), new XamlSchemaContext()), XamlCollectionKind.Dictionary }; 2997yield return new object?[] { new SubXamlType(typeof(Dictionary<int, string>), new XamlSchemaContext()), new XamlType(typeof(string), new XamlSchemaContext()) }; 3052yield return new object?[] { new SubXamlType(typeof(Dictionary<int, string>), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) }; 3065new CustomXamlType(typeof(Dictionary<int, string>), new XamlSchemaContext())
TagHelpersWebSite (4)
Components\CopyrightViewComponent.cs (1)
12var dict = new Dictionary<string, object>
Components\GenericViewComponent.cs (1)
10public IViewComponentResult Invoke(Dictionary<string, List<string>> items)
TagHelpers\ATagHelper.cs (1)
34var methodParameters = output.Attributes.ToDictionary(attribute => attribute.Name,
TagHelpers\PrettyTagHelper.cs (1)
13private static readonly Dictionary<string, string> PrettyTagStyles =
TaskUsageLogger (5)
TaskUsageLogger.cs (5)
52private Dictionary<int, string> _targetIdsToNames; 56private Dictionary<int, string> _toolsVersionsByProjectContextId; 57private Dictionary<string, HashSet<UsingTaskData>> _defaultTasksByToolset; 58private Dictionary<int, HashSet<UsingTaskData>> _tasksByProjectContextId; 59private Dictionary<string, string> _assemblyLocationsByName;
Templates.Blazor.Tests (3)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (2)
198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
Templates.Blazor.WebAssembly.Auth.Tests (4)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (2)
198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
src\Shared\E2ETesting\E2ETestOptions.cs (1)
24var metadataAttributes = Assembly.GetExecutingAssembly()
Templates.Blazor.WebAssembly.Tests (4)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (2)
198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
src\Shared\E2ETesting\E2ETestOptions.cs (1)
24var metadataAttributes = Assembly.GetExecutingAssembly()
Templates.Mvc.Tests (4)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (2)
198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
src\Shared\E2ETesting\E2ETestOptions.cs (1)
24var metadataAttributes = Assembly.GetExecutingAssembly()
Templates.Tests (5)
IdentityUIPackageTest.cs (1)
104var packageOptions = new Dictionary<string, string>();
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
85var finalEnvironmentVariables = new Dictionary<string, string>(environmentVariables)
src\ProjectTemplates\Shared\Project.cs (2)
198var environment = new Dictionary<string, string> 214var environment = new Dictionary<string, string>
src\Shared\E2ETesting\E2ETestOptions.cs (1)
24var metadataAttributes = Assembly.GetExecutingAssembly()
Test.Utilities (135)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
Text.Analyzers (139)
src\Compilers\Core\Portable\Collections\DictionaryExtensions.cs (4)
15/// The collection of extension methods for the <see cref="Dictionary{TKey, TValue}"/> type 24this Dictionary<TKey, TValue> dictionary, 45this Dictionary<TKey, TValue> dictionary, 79public static void AddPooled<K, V>(this Dictionary<K, ArrayBuilder<V>> dictionary, K key, V value)
src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (3)
77private static readonly Dictionary<K, ValueSet> s_emptyDictionary = new(); 124public Dictionary<K, ValueSet>.Enumerator GetEnumerator() 178public Dictionary<K, ValueSet>.KeyCollection Keys
src\Compilers\Core\Portable\InternalUtilities\MultiDictionary.cs (4)
206private readonly Dictionary<K, ValueSet> _dictionary; 214public Dictionary<K, ValueSet>.KeyCollection Keys => _dictionary.Keys; 216public Dictionary<K, ValueSet>.ValueCollection Values => _dictionary.Values; 278public Dictionary<K, ValueSet>.Enumerator GetEnumerator()
src\Compilers\Core\Portable\InternalUtilities\OrderedMultiDictionary.cs (1)
14private readonly Dictionary<K, SetWithInsertionOrder<V>> _dictionary;
src\Dependencies\Collections\Extensions\ICollectionExtensions.cs (1)
67public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
698internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 701var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
757this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 857internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 885(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 919internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 920(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 931var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\Collections\Internal\InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 551var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 564var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 578var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (3)
67var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 106static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 122static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DirectiveInfo.cs (4)
11Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> directiveMap, 12Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> conditionalMap) 16public Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?> DirectiveMap { get; } = directiveMap; 19public Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>> ConditionalMap { get; } = conditionalMap;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (8)
399var nodesToReplace = nodes != null ? nodes.ToDictionary(n => n.FullSpan) : []; 400var tokensToReplace = tokens != null ? tokens.ToDictionary(t => t.FullSpan) : []; 401var triviaToReplace = trivia != null ? trivia.ToDictionary(t => t.FullSpan) : []; 403var nodeReplacements = new Dictionary<SyntaxNode, SyntaxNode>(); 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 405var triviaReplacements = new Dictionary<SyntaxTrivia, SyntaxTrivia>(); 859var directiveMap = new Dictionary<TDirectiveTriviaSyntax, TDirectiveTriviaSyntax?>( 861var conditionalMap = new Dictionary<TDirectiveTriviaSyntax, ImmutableArray<TDirectiveTriviaSyntax>>(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (2)
28private readonly Dictionary<ISymbol, PooledHashSet<IOperation>> _reachingWrites; 223private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (1)
505public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
45protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 103var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (10)
246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 448Dictionary<SyntaxToken, int> previousChangesMap, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (3)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 97var map = pooledObject.Object;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (1)
16private static readonly Dictionary<LineFormattingOptions, (Whitespace[] spaces, Whitespace[,] whitespaces)> s_optionsToWhitespace = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (3)
19var trimmedDictionary = TrimDictionary(allRawConventions); 84internal static Dictionary<string, string> TrimDictionary(AnalyzerConfigOptions allRawConventions) 86var trimmedDictionary = new Dictionary<string, string>(AnalyzerConfigOptions.KeyComparer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\Extensions.cs (12)
37public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) where TKey : notnull 38=> PooledObject<Dictionary<TKey, TValue>>.Create(pool); 74public static PooledObject<Dictionary<TKey, TValue>> GetPooledObject<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, out Dictionary<TKey, TValue> dictionary) 77var pooledObject = PooledObject<Dictionary<TKey, TValue>>.Create(pool); 141public static Dictionary<TKey, TValue> AllocateAndClear<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool) 144var map = pool.Allocate(); 283public static void ClearAndFree<TKey, TValue>(this ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> map)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (7)
81public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 84return new PooledObject<Dictionary<TKey, TValue>>( 139private static Dictionary<TKey, TValue> Allocator<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool) 143private static void Releaser<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool, Dictionary<TKey, TValue> obj)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\SharedPools.cs (2)
37public static ObjectPool<Dictionary<string, T>> StringIgnoreCaseDictionary<T>() 74public static readonly ObjectPool<Dictionary<string, T>> Instance =
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
324private readonly Dictionary<int, SymbolKeyResolution> _idToResult = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
64private readonly Dictionary<ISymbol, int> _symbolToId = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (2)
31private readonly Dictionary<TAnnotation, SyntaxAnnotation> _realAnnotationMap = []; 32private readonly Dictionary<string, TAnnotation> _annotationMap = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Builder.cs (3)
160var spilledEdges = builderNode.SpilloverEdges; 243var spilloverEdges = new Dictionary<int, int>(); 290public Dictionary<int, int>? SpilloverEdges;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (1)
572private static int GetValue(Dictionary<char, int> da, char c)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (2)
52public static TValue? GetValueOrDefault<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue? defaultValue) 232public static void RemoveAll<TKey, TValue, TArg>(this Dictionary<TKey, TValue> dictionary, Func<TKey, TValue, TArg, bool> predicate, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (4)
14public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 17var dictionary = new Dictionary<K, V>(builders.Count); 28public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 31var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
18private readonly Dictionary<TKey, ReferenceCountedDisposable<Entry>.WeakReference> _cache = [];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (1)
54var itemToItemsBefore = items.ToDictionary(item => item, item =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (3)
569Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 590Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 612Dictionary<ISymbol, int> result, INamedTypeSymbol containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.cs (3)
149public bool ReturnTypeEquals(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 164public bool Equals(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool EqualsCore(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.EquivalenceVisitor.cs (23)
22public bool AreEquivalent(ISymbol? x, ISymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 65private bool AreArrayAndReadOnlySpanEquivalent(IArrayTypeSymbol array, INamedTypeSymbol readOnlySpanType, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 73internal bool AreEquivalent(CustomModifier x, CustomModifier y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 76internal bool AreEquivalent(ImmutableArray<CustomModifier> x, ImmutableArray<CustomModifier> y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 112private bool AreEquivalentWorker(ISymbol x, ISymbol y, SymbolKind k, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 140private bool ArrayTypesAreEquivalent(IArrayTypeSymbol x, IArrayTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 152private bool FieldsAreEquivalent(IFieldSymbol x, IFieldSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 170private bool MethodsAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, bool considerReturnRefKinds = false) 281private bool NamedTypesAreEquivalent(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 301private bool NamedTypesAreEquivalentError(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 330private bool HandleNamedTypesWorker(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 418private bool HandleTupleTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 463Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies, 486internal bool ReturnTypesAreEquivalent(IMethodSymbol x, IMethodSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies = null) 492private bool TypeArgumentsAreEquivalent(ImmutableArray<ITypeSymbol> xTypeArguments, ImmutableArray<ITypeSymbol> yTypeArguments, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 511private bool HandleAnonymousTypes(INamedTypeSymbol x, INamedTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 547private bool NamespacesAreEquivalent(INamespaceSymbol x, INamespaceSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 564private bool ParametersAreEquivalent(IParameterSymbol x, IParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 574private bool PointerTypesAreEquivalent(IPointerTypeSymbol x, IPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 581private bool FunctionPointerTypesAreEquivalent(IFunctionPointerTypeSymbol x, IFunctionPointerTypeSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 584private bool PropertiesAreEquivalent(IPropertySymbol x, IPropertySymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 608private bool EventsAreEquivalent(IEventSymbol x, IEventSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies) 617private bool TypeParametersAreEquivalent(ITypeParameterSymbol x, ITypeParameterSymbol y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
23Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.SignatureTypeSymbolEquivalenceComparer.cs (1)
18public bool Equals(ITypeSymbol? x, ITypeSymbol? y, Dictionary<INamedTypeSymbol, INamedTypeSymbol>? equivalentTypesWithDifferingAssemblies)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
54var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default); 108var mapping = new Dictionary<ITypeSymbol, ITypeSymbol>(SymbolEqualityComparer.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (2)
94using var collisionMapPool = (isCaseSensitive ? SharedPools.Default<Dictionary<string, bool>>() : SharedPools.StringIgnoreCaseDictionary<bool>()).GetPooledObject(); 95var collisionMap = collisionMapPool.Object;
UnitTests.Common (5)
ServiceInterfaces.cs (1)
68Dictionary<MessageHeaderInfo, string> GetIncomingMessageHeaders();
TestTypes.cs (4)
151private static Dictionary<ErrorCode, string> s_localizedErrorCodes; 227public static void Init(Dictionary<ErrorCode, string> localizedErrorCodes) 640private Dictionary<string, string> _headers; 669public Dictionary<string, string> Headers
VBCSCompiler.UnitTests (15)
CompilerServerTests.cs (15)
129var resetVariables = new Dictionary<string, string>(); 329var files = new Dictionary<string, string> { { "hello.cs", "♕" } }; 471var files = new Dictionary<string, string> { { "c.cs", "class C {}" } }; 486var files = new Dictionary<string, string> { { "c.vb", "Class C\nEnd Class" } }; 543Dictionary<string, string> files = 571Dictionary<string, string> files = 637Dictionary<string, string> files = 679Dictionary<string, string> files = 709Dictionary<string, string> files = 739Dictionary<string, string> files = 859Dictionary<string, string> files = 1000var filesInDirectory = new Dictionary<string, string>() 1050Dictionary<string, string> files = 1099Dictionary<string, string> files = 1250Dictionary<string, string> files =
VersioningWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
30var values = query
Wasm.Performance.TestApp (1)
Person.cs (1)
14public Dictionary<string, bool> SecurityClearances { get; set; }
WindowsBase.Tests (58)
System\Windows\DependencyPropertyTests.cs (50)
17yield return new object?[] { "Register_String_Type_Type_TestData5", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null }; 61yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null, null }; 62yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null }; 63yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null }; 64yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 113yield return new object?[] { "Register_String_Type_Type_Validate_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null, null, 1 }; 114yield return new object?[] { "Register_String_Type_Type_Validate_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null, 1 }; 115yield return new object?[] { "Register_String_Type_Type_Validate_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null, 1 }; 116yield return new object?[] { "Register_String_Type_Type_Validate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>(), 2 }; 173yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null, null }; 174yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null }; 175yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null }; 176yield return new object?[] { "Register_String_Type_Type_PropertyMetadata_NullValidate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 328yield return new object?[] { "RegisterAttached_String_Type_Type_TestData5", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null }; 372yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null, null }; 373yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null }; 374yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null }; 375yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 426yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null, null }; 427yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null }; 428yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null }; 429yield return new object?[] { "RegisterAttached_String_Type_Type_Validate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 486yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null, null }; 487yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null }; 488yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null }; 489yield return new object?[] { "RegisterAttached_String_Type_Type_PropertyMetadata_NullValidate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 648yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObject), null, null }; 649yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null }; 650yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null }; 651yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 704yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObject), null, null, 4 }; 705yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null, 2 }; 706yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null, 2 }; 707yield return new object?[] { "RegisterReadOnly_String_Type_Type_Validate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>(), 2 }; 768yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObject), null, null }; 769yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null }; 770yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null }; 771yield return new object?[] { "RegisterReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 941yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null, null }; 942yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null }; 943yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null }; 944yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() }; 999yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null, null, 2 }; 1000yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null, 1 }; 1001yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null, 1 }; 1002yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_Validate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>(), 1 }; 1063yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData19", typeof(Dictionary<string, int>), typeof(DependencyObjectTests), null, null }; 1064yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData20", typeof(Dictionary<string, int>), typeof(DependencyObject), new PropertyMetadata(), null }; 1065yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData21", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata(), null }; 1066yield return new object?[] { "RegisterAttachedReadOnly_String_Type_Type_PropertyMetadata_NullValidate_TestData22", typeof(Dictionary<string, int>), typeof(SubDependencyObject), new PropertyMetadata { DefaultValue = new Dictionary<string, int>() }, new Dictionary<string, int>() };
System\Windows\Markup\Primitives\MarkupObjectTests.cs (3)
154var instance = new Dictionary<int, string> 165Assert.Equal(typeof(Dictionary<int, string>), obj.ObjectType); 346var dictionary = new Dictionary<int, string>
System\Windows\Markup\Primitives\MarkupPropertyTests.cs (5)
141var instance = new Dictionary<int, string> 152Assert.Equal(typeof(Dictionary<int, string>), obj.ObjectType); 333var dictionary = new Dictionary<int, string> 460var instance = new Dictionary<int, string> 522var dictionary = new Dictionary<int, string>
WindowsFormsIntegration (7)
System\Windows\Integration\Convert.cs (4)
25private static Dictionary<SWF.Cursor, SWI.Cursor> _toSystemWindowsInputCursorDictionary; 26private static Dictionary<SWF.Cursor, SWI.Cursor> ToSystemWindowsInputCursorDictionary 65private static Dictionary<SWI.Cursor, SWF.Cursor> _toSystemWindowsFormsCursorDictionary; 66private static Dictionary<SWI.Cursor, SWF.Cursor> ToSystemWindowsFormsCursorDictionary
System\Windows\Integration\PropertyMap.cs (3)
25private Dictionary<string, PropertyTranslator> _defaultTranslators; 26private Dictionary<String, PropertyTranslator> _wrappedDictionary; 216protected Dictionary<string, PropertyTranslator> DefaultTranslators
XmlFileLogger (2)
LogProcessNode.cs (1)
23private readonly Dictionary<Type, List<ILogNode>> _childNodes;
PropertyBag.cs (1)
27private readonly Dictionary<string, string> _properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
xunit.assert (15)
DictionaryAsserts.cs (2)
141 Dictionary<TKey, TValue> collection) 276 Dictionary<TKey, TValue> collection)
EqualityAsserts.cs (2)
37 static readonly Type typeofDictionary = typeof(Dictionary<,>); 302 [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Dictionary<,>))]
Sdk\ArgumentFormatter.cs (1)
98 static readonly Dictionary<TypeInfo, string> TypeMappings = new Dictionary<TypeInfo, string>
Sdk\AssertHelper.cs (6)
49 static readonly Dictionary<char, string> encodings = new Dictionary<char, string> 63 static readonly ConcurrentDictionary<Type, Dictionary<string, Func<object?, object?>>> gettersByType = new ConcurrentDictionary<Type, Dictionary<string, Func<object?, object?>>>(); 119 static Dictionary<string, Func<object?, object?>> GetGettersForType([DynamicallyAccessedMembers( 707 var expectedGetters = GetGettersForType(expected.GetType()); 708 var actualGetters = GetGettersForType(actual.GetType());
Sdk\CollectionTracker.cs (4)
597 var items = new Dictionary<int, T>(); 615 Dictionary<int, T> items, 840 public Dictionary<int, T> CurrentItems 844 var result = new Dictionary<int, T>();
xunit.console (11)
common\AssemblyResolution\DependencyContextAssemblyCache.cs (2)
33readonly Dictionary<string, Tuple<RuntimeLibrary, RuntimeAssetGroup>> managedAssemblyMap; 37readonly Dictionary<string, Tuple<RuntimeLibrary, RuntimeAssetGroup>> unmanagedAssemblyMap;
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (5)
65var libraryStubs = ReadLibraries(root.ValueAsJsonObject(DependencyContextStrings.LibrariesPropertyName)); 299private Dictionary<string, LibraryStub> ReadLibraries(JsonObject librariesJson) 303var libraries = new Dictionary<string, LibraryStub>(); 354private IEnumerable<Library> CreateLibraries(IEnumerable<TargetLibrary> libraries, bool runtime, Dictionary<string, LibraryStub> libraryStubs) 363private Library CreateLibrary(TargetLibrary targetLibrary, bool runtime, Dictionary<string, LibraryStub> libraryStubs)
common\DictionaryExtensions.cs (2)
34public static Dictionary<TKey, TValue> ToDictionaryIgnoringDuplicateKeys<TInput, TKey, TValue>(this IEnumerable<TInput> inputValues, 39var result = new Dictionary<TKey, TValue>(comparer);
common\Json.cs (1)
481var dictionary = new Dictionary<string, JsonValue>();
Utility\TransformFactory.cs (1)
18readonly Dictionary<string, Transform> availableTransforms = new Dictionary<string, Transform>(StringComparer.OrdinalIgnoreCase);
Xunit.NetCore.Extensions (6)
AssemblyFixtureSupport\XunitTestAssemblyRunnerWithAssemblyFixture.cs (1)
18private readonly Dictionary<Type, object> assemblyFixtureMappings = new Dictionary<Type, object>();
AssemblyFixtureSupport\XunitTestClassRunnerWithAssemblyFixture.cs (1)
18private readonly Dictionary<Type, object> assemblyFixtureMappings = new Dictionary<Type, object>();
AssemblyFixtureSupport\XunitTestCollectionRunnerWithAssemblyFixture.cs (3)
17private readonly Dictionary<Type, object> assemblyFixtureMappings; 21public XunitTestCollectionRunnerWithAssemblyFixture(Dictionary<Type, object> assemblyFixtureMappings, 41var combinedFixtures = new Dictionary<Type, object>(assemblyFixtureMappings);
AssemblyFixtureSupport\XunitTestMethodRunnerWithAssemblyFixture.cs (1)
17private readonly Dictionary<Type, object> assemblyFixtureMappings = new Dictionary<Type, object>();