60 types derived from Dictionary
Aspire.Hosting (1)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
100private class FileTree : Dictionary<string, FileTree>
Aspire.Hosting.Docker (1)
Resources\ServiceNodes\Swarm\LabelSpecs.cs (1)
13public sealed class LabelSpecs : Dictionary<string, string>
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>
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 (1)
PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
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.ServiceModel.Primitives (1)
System\ServiceModel\Dispatcher\OperationFormatter.cs (1)
975internal class MessageHeaderDescriptionTable : Dictionary<QName, MessageHeaderDescription>
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)
PooledDictionary.cs (1)
16internal sealed class PooledDictionary<K, V> : Dictionary<K, V>, IDisposable
Text.Analyzers (1)
src\Dependencies\PooledObjects\PooledDictionary.cs (1)
15internal sealed partial class PooledDictionary<K, V> : Dictionary<K, V>
9798 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 (24)
Commands\ExecCommand.cs (1)
146var env = new Dictionary<string, string>();
Commands\InitCommand.cs (1)
217var serviceDefaultsActions = new Dictionary<string, string>
Commands\PublishCommandBase.cs (3)
126var env = new Dictionary<string, string>(); 284var steps = new Dictionary<string, string>(); 391var steps = new Dictionary<string, StepInfo>();
Commands\RunCommand.cs (2)
131var env = new Dictionary<string, string>(); 463private readonly Dictionary<string, RpcResourceState> _resourceStates = new();
Configuration\ConfigurationService.cs (1)
117var allConfig = new Dictionary<string, string>();
DotNet\DotNetCliRunner.cs (8)
264finalEnv = new Dictionary<string, string>(env ?? new Dictionary<string, string>()) 276finalEnv = new Dictionary<string, string>(env ?? new Dictionary<string, string>()); 292finalEnv = new Dictionary<string, string>(env ?? new Dictionary<string, string>()); 384env: new Dictionary<string, string> 736var env = new Dictionary<string, string>
Packaging\NuGetConfigMerger.cs (2)
193var urlToExistingKey = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 852var urlToExistingKey = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Projects\ProjectUpdater.cs (3)
707var mappings = new Dictionary<string, List<string>>(); 848public Dictionary<string, List<string>> OriginalMappings { get; set; } = new(); 849public Dictionary<string, List<string>> ProposedMappings { get; set; } = new();
Utils\ConsoleActivityLogger.cs (3)
23private readonly Dictionary<string, string> _stepColors = new(); 24private readonly Dictionary<string, ActivityState> _stepStates = new(); // Track final state per step for summary 25private readonly Dictionary<string, string> _displayNames = new(); // Optional friendly display names for step keys
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 (45)
Caching\DiskCacheTests.cs (1)
16var values = new Dictionary<string,string?>();
Commands\ConfigCommandTests.cs (1)
437return Task.FromResult(new Dictionary<string, string>
Commands\PublishCommandPromptingIntegrationTests.cs (1)
772private readonly Dictionary<string, TaskCompletionSource> _promptCompletionSources = new();
Commands\RunCommandTests.cs (7)
815env: new Dictionary<string, string>(), 867env: new Dictionary<string, string>(), 923env: new Dictionary<string, string>(), 974env: new Dictionary<string, string>(), 1026env: new Dictionary<string, string>(), 1078env: new Dictionary<string, string>(), 1131env: new Dictionary<string, string>(),
DotNet\DotNetCliRunnerTests.cs (14)
70env: new Dictionary<string, string>(), 129configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 203env: new Dictionary<string, string>(), 253env: new Dictionary<string, string>(), 298var existingEnv = new Dictionary<string, string> 397env: new Dictionary<string, string>(), 447env: new Dictionary<string, string>(), 492var userEnv = new Dictionary<string, string> 919env: new Dictionary<string, string>(), 976env: new Dictionary<string, string>(), 1030env: new Dictionary<string, string>(), 1093env: new Dictionary<string, string>(), 1151env: new Dictionary<string, string>(), 1208env: new Dictionary<string, string>(),
DotNetSdkInstallerTests.cs (1)
387private readonly Dictionary<string, bool> _features = new();
Hosting\CliOrphanDetectorTests.cs (6)
36.AddInMemoryCollection(new Dictionary<string, string?> { { "ASPIRE_CLI_PID", "1111" } }) 58.AddInMemoryCollection(new Dictionary<string, string?> 79.AddInMemoryCollection(new Dictionary<string, string?> 102.AddInMemoryCollection(new Dictionary<string, string?> 146.AddInMemoryCollection(new Dictionary<string, string?> 172.AddInMemoryCollection(new Dictionary<string, string?> { { "ASPIRE_CLI_PID", "1111" } })
Packaging\PackagingServiceTests.cs (5)
26private readonly Dictionary<string, bool> _features = new(); 89.AddInMemoryCollection(new Dictionary<string, string?> 134.AddInMemoryCollection(new Dictionary<string, string?> 167.AddInMemoryCollection(new Dictionary<string, string?> 196.AddInMemoryCollection(new Dictionary<string, string?>
Projects\ProjectLocatorTests.cs (2)
692return Task.FromResult(new Dictionary<string, string>()); 709private readonly Dictionary<string, bool> _features = new();
Utils\CliHostEnvironmentTests.cs (6)
57.AddInMemoryCollection(new Dictionary<string, string?> 77.AddInMemoryCollection(new Dictionary<string, string?> 100.AddInMemoryCollection(new Dictionary<string, string?> 122.AddInMemoryCollection(new Dictionary<string, string?> 143.AddInMemoryCollection(new Dictionary<string, string?> 161.AddInMemoryCollection(new Dictionary<string, string?>
Utils\CliTestHelper.cs (1)
41var configurationValues = new Dictionary<string, string?>();
Aspire.Confluent.Kafka (1)
MetricsService.cs (1)
15private readonly Dictionary<string, Statistics> _state = new();
Aspire.Dashboard (42)
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\Controls\ResourceDetails.razor.cs (1)
161_valueComponents = new Dictionary<string, ComponentMetadata>
Components\Controls\SpanDetails.razor.cs (1)
167_valueComponents = new Dictionary<string, ComponentMetadata>
Components\Controls\StructuredLogDetails.razor.cs (1)
109_valueComponents = new Dictionary<string, ComponentMetadata>
Components\Dialogs\InteractionsInputDialog.razor.cs (1)
45_elementRefs = new();
Components\Layout\AspirePageContentLayout.razor.cs (1)
52public Dictionary<string, Func<Task>> DialogCloseListeners { get; } = new();
Components\Pages\ComponentTelemetryContext.cs (1)
113return new Dictionary<string, AspireTelemetryProperty>
Components_Controls_AspireMenu_razor.g.cs (1)
386var additionalMenuItemAttributes = new Dictionary<string, object>(item.AdditionalAttributes ?? ImmutableDictionary<string, object>.Empty)
Components_Controls_AspireMenuButton_razor.g.cs (1)
185var additionalButtonAttributes = new Dictionary<string, object>(AdditionalAttributes ?? ImmutableDictionary<string, object>.Empty)
DashboardWebApplication.cs (1)
545var initialValues = new Dictionary<string, string?>();
Extensions\FluentUIExtensions.cs (1)
15var attributes = new Dictionary<string, object>(StringComparers.HtmlAttribute)
GenAIMessagesContext.DictionaryStringJsonElement.g.cs (1)
29ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>(),
Model\Assistant\AssistantChatViewModel.cs (1)
973properties: new Dictionary<string, AspireTelemetryProperty>
Model\Assistant\PromptContext.cs (1)
11private readonly Dictionary<string, string> _promptValueMap = new Dictionary<string, string>();
Model\ConnectionStringParser.cs (2)
16private static readonly Dictionary<string, int> s_schemeDefaultPorts = new(StringComparer.OrdinalIgnoreCase) 426var result = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Model\DashboardCommandExecutor.cs (1)
44new Dictionary<string, AspireTelemetryProperty>
Model\ResourceMenuItems.cs (1)
144AdditionalAttributes = new Dictionary<string, object>
Model\SpanDetailsViewModel.cs (1)
40var traceCache = new Dictionary<string, OtlpTrace>(StringComparer.Ordinal);
Model\TraceHelpers.cs (2)
19var spanLookup = new Dictionary<OtlpSpan, List<OtlpSpan>>(); 67var resourceFirstTimes = new Dictionary<OtlpResource, OrderedResource>();
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\Model\OtlpResource.cs (2)
33private readonly Dictionary<string, OtlpScope> _meters = new(); 34private readonly Dictionary<OtlpInstrumentKey, OtlpInstrument> _instruments = new();
Otlp\Storage\TelemetryRepository.cs (7)
43private readonly Dictionary<string, OtlpScope> _logScopes = new(); 47private readonly Dictionary<ResourceKey, int> _resourceUnviewedErrorLogs = new(); 50private readonly Dictionary<string, OtlpScope> _traceScopes = new(); 731var attributesValues = new Dictionary<string, int>(StringComparers.OtlpAttribute); 767var attributesValues = new Dictionary<string, int>(StringComparers.OtlpAttribute); 980var updatedTraces = new Dictionary<ReadOnlyMemory<byte>, OtlpTrace>(); 1342var 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\TelemetryErrorRecorder.cs (1)
38new Dictionary<string, AspireTelemetryProperty>
Utils\GlobalizationHelpers.cs (1)
37var dict = new Dictionary<string, List<CultureInfo>>(StringComparers.CultureName);
Aspire.Dashboard.Components.Tests (3)
Pages\ResourcesTests.cs (3)
237new Dictionary<string, bool> { { "Type1", true }, { "Type2", false } }, 239new Dictionary<string, bool> { { "Running", true }, { "Finished", false } }, 241new Dictionary<string, bool> { { "Healthy", true }, { "Unhealthy", false } },
Aspire.Dashboard.Tests (34)
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)
166.AddInMemoryCollection(new Dictionary<string, string?> { [dashboardFileConfigDirectoryNameKey] = fileConfigDirectory.FullName }) 201.AddInMemoryCollection(new Dictionary<string, string?> { [DashboardConfigNames.DashboardFileConfigDirectoryName.ConfigKey] = fileConfigDirectory.FullName })
Model\ApplicationsSelectHelpersTests.cs (1)
173var apps = new Dictionary<string, OtlpResource>();
Model\ResourceGraphMapperTests.cs (4)
24var resources = new Dictionary<string, ResourceViewModel> 45var resources = new Dictionary<string, ResourceViewModel> 66var resources = new Dictionary<string, ResourceViewModel> 84var resources = new Dictionary<string, ResourceViewModel>
Model\ResourceIconHelpersTests.cs (1)
118var properties = new Dictionary<string, ResourcePropertyViewModel>
Model\ResourceSourceViewModelTests.cs (1)
18var properties = new Dictionary<string, ResourcePropertyViewModel>();
Model\ResourceStateViewModelTests.cs (1)
72var propertiesDictionary = new Dictionary<string, ResourcePropertyViewModel>();
ResourceOutgoingPeerResolverTests.cs (21)
30var resources = new Dictionary<string, ResourceViewModel> 43var resources = new Dictionary<string, ResourceViewModel> 56var resources = new Dictionary<string, ResourceViewModel> 69var resources = new Dictionary<string, ResourceViewModel> 88var resources = new Dictionary<string, ResourceViewModel> 102var resources = new Dictionary<string, ResourceViewModel> 116var resources = new Dictionary<string, ResourceViewModel> 195var resources = new Dictionary<string, ResourceViewModel> 209var resources = new Dictionary<string, ResourceViewModel> 233var resources = new Dictionary<string, ResourceViewModel> 248var resources = new Dictionary<string, ResourceViewModel> 262var resources = new Dictionary<string, ResourceViewModel> 277var resources = new Dictionary<string, ResourceViewModel> 290var resources = new Dictionary<string, ResourceViewModel> 304var resources = new Dictionary<string, ResourceViewModel> 319var resources = new Dictionary<string, ResourceViewModel> 331var properties = new Dictionary<string, ResourcePropertyViewModel> 349var properties = new Dictionary<string, ResourcePropertyViewModel> 369var resources = new Dictionary<string, ResourceViewModel> 384var resources = new Dictionary<string, ResourceViewModel> 401var 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 (38)
ApplicationModel\EnvironmentCallbackContext.cs (1)
35public Dictionary<string, object> EnvironmentVariables { get; } = environmentVariables ?? new();
ApplicationModel\ProjectResource.cs (1)
18internal 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)
540var versionsSeen = new Dictionary<string, long>();
ConnectionPropertiesExtensions.cs (1)
24var dict = new Dictionary<string, ReferenceExpression>(StringComparer.OrdinalIgnoreCase);
Dashboard\DashboardEventHandlers.cs (1)
669var dashboardResourceTasks = new Dictionary<string, Task>();
Dcp\DcpExecutor.cs (1)
280var resourceLogState = new Dictionary<string, (bool logsAvailable, bool hasSubscribers)>();
Dcp\DcpHost.cs (1)
272var 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)
211_innerBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 262_innerBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 361new Dictionary<string, string?> 375new Dictionary<string, string?> 386new Dictionary<string, string?> 537var switchMappings = new Dictionary<string, string>() 555var switchMappings = new Dictionary<string, string>()
Health\ResourceHealthCheckService.cs (1)
16private readonly Dictionary<string, ResourceMonitorState> _resourceMonitoringStates = new();
IInteractionService.cs (1)
363var inputsByName = new Dictionary<string, InteractionInput>(StringComparers.InteractionInputName);
LaunchSettingsSerializerContext.DictionaryStringLaunchProfile.g.cs (1)
29ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>(),
LaunchSettingsSerializerContext.DictionaryStringString.g.cs (1)
29ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, string>(),
Orchestrator\ParameterProcessor.cs (1)
83var referencedParameters = new Dictionary<string, ParameterResource>();
Pipelines\DistributedApplicationPipeline.cs (2)
206var stepCompletions = new Dictionary<string, TaskCompletionSource>(steps.Count, StringComparer.Ordinal); 391var visitStates = new Dictionary<string, VisitState>(steps.Count, StringComparer.Ordinal);
Publishing\ManifestPublishingContext.cs (2)
534var env = new Dictionary<string, (object, string)>(); 765formats = new Dictionary<string, string>(StringComparer.Ordinal);
Publishing\PodmanContainerRuntime.cs (1)
60var environmentVariables = new Dictionary<string, string>();
Publishing\ResourceContainerImageBuilder.cs (2)
371var resolvedBuildArguments = new Dictionary<string, string?>(); 378var resolvedBuildSecrets = new Dictionary<string, string?>();
src\Shared\SecretsStore.cs (1)
107new Dictionary<string, string?>
Utils\DotnetSdkUtils.cs (1)
10private static readonly Dictionary<string, string> s_dotnetCliEnvVars = new()
Aspire.Hosting.Azure (8)
AzureBicepResource.cs (2)
50public Dictionary<string, object?> Outputs { get; } = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 55public Dictionary<string, string?> SecretOutputs { get; } = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
AzureEnvironmentResource.cs (1)
319var resourcesByRegistry = new Dictionary<IContainerRegistry, List<IResource>>();
AzurePublishingContext.cs (2)
152var moduleMap = new Dictionary<AzureBicepResource, ModuleImport>(); 292var outputs = new Dictionary<string, BicepOutputReference>();
AzureResourcePreparer.cs (2)
105var globalRoleAssignments = new Dictionary<AzureProvisioningResource, HashSet<RoleDefinition>>(); 245var 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)
156var endpointIndexMap = new Dictionary<string, int>();
ContainerAppEnvironmentContext.cs (1)
26private readonly Dictionary<IResource, BaseContainerAppContext> _containerApps = new(new ResourceNameComparer());
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceEnvironmentContext.cs (1)
24private readonly Dictionary<IResource, AzureAppServiceWebsiteContext> _appServices = new(new ResourceNameComparer());
Aspire.Hosting.Azure.Functions (2)
LaunchSettingsSerializerContext.DictionaryStringLaunchProfile.g.cs (1)
29ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>(),
LaunchSettingsSerializerContext.DictionaryStringString.g.cs (1)
29ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, string>(),
Aspire.Hosting.Azure.Kusto.Tests (1)
AddAzureKustoTests.cs (1)
127Assert.Equivalent(new Dictionary<string, object>() { { "ACCEPT_EULA", "Y" } }, env);
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)
19private readonly Dictionary<string, AzureSqlDatabaseResource> _databases = new Dictionary<string, AzureSqlDatabaseResource>(StringComparers.ResourceName);
Aspire.Hosting.Azure.Tests (55)
AzureContainerAppsTests.cs (1)
1726Profiles = new Dictionary<string, LaunchProfile>
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>
AzureDeployerTests.cs (15)
140var armClientProvider = new TestArmClientProvider(new Dictionary<string, object> 187var armClientProvider = new TestArmClientProvider(new Dictionary<string, object> 235var armClientProvider = new TestArmClientProvider(new Dictionary<string, object> 292var armClientProvider = new TestArmClientProvider(new Dictionary<string, object> 353string name when name.StartsWith("aca-env") => new Dictionary<string, object> 361string name when name.StartsWith("aas-env") => new Dictionary<string, object> 564var armClientProvider = new TestArmClientProvider(new Dictionary<string, object> 617var armClientProvider = new TestArmClientProvider(new Dictionary<string, object> 775string name when name.StartsWith("env") => new Dictionary<string, object> 783string name when name.StartsWith("funcstorage") => new Dictionary<string, object> 790string name when name.StartsWith("hoststorage") => new Dictionary<string, object> 797string name when name.StartsWith("funcapp-identity") => new Dictionary<string, object> 801string name when name.StartsWith("funcapp") => new Dictionary<string, object> 932var armClientProvider = new TestArmClientProvider(new Dictionary<string, object> 991Profiles = new Dictionary<string, LaunchProfile>
AzureEnvironmentResourceTests.cs (1)
247public IDictionary<string, object?> Parameters { get; } = new Dictionary<string, object?>();
AzureEventHubsExtensionsTests.cs (1)
560var target = new Dictionary<string, object>();
AzureFunctionsTests.cs (7)
432Profiles = new Dictionary<string, LaunchProfile> 449Profiles = new Dictionary<string, LaunchProfile> 466Profiles = new Dictionary<string, LaunchProfile> 483Profiles = new Dictionary<string, LaunchProfile> 499Profiles = new Dictionary<string, LaunchProfile> 516Profiles = new Dictionary<string, LaunchProfile> 533Profiles = 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)
546public TestProjectWithLaunchSettings() => Profiles = new() 553EnvironmentVariables = new() 563EnvironmentVariables = new()
Aspire.Hosting.Kubernetes (7)
Extensions\ResourceExtensions.cs (1)
395Capacity = 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>(), 129var paramValues = new Dictionary<string, string>();
KubernetesResource.cs (1)
114Labels = new()
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
71private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.MongoDB (1)
MongoDBServerResource.cs (1)
114private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.MySql (1)
MySqlServerResource.cs (1)
14private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.MySql.Tests (6)
MySqlFunctionalTests.cs (6)
88hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 164hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 233hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 336hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 422hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 492hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.OpenAI (1)
OpenAIHealthCheck.cs (1)
111var data = new Dictionary<string, object>
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
90private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.PostgreSQL (1)
PostgresServerResource.cs (1)
90private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.PostgreSQL.Tests (5)
PostgresFunctionalTests.cs (5)
117hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 239hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 301hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 396hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 482hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.Qdrant.Tests (3)
QdrantFunctionalTests.cs (3)
42hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 127hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 172hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.Redis.Tests (7)
RedisFunctionalTests.cs (7)
104hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 210hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 246hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 293hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 328hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 377hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 407hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
122private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.SqlServer.Tests (2)
SqlServerFunctionalTests.cs (2)
186hb1.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 271hb2.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.Testing (4)
DistributedApplicationFactory.cs (2)
201var additionalConfig = new Dictionary<string, string?>(); 266var additionalConfig = new Dictionary<string, string?>();
LaunchSettingsSerializerContext.DictionaryStringLaunchProfile.g.cs (1)
29ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>(),
LaunchSettingsSerializerContext.DictionaryStringString.g.cs (1)
29ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, string>(),
Aspire.Hosting.Tests (82)
AddParameterTests.cs (9)
48appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 77appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 129appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 193appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 263appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 511appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 534appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 558appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 584appBuilder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
ConnectionPropertiesExtensionsTests.cs (1)
25var dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Dashboard\DashboardLifecycleHookTests.cs (2)
163configurationBuilder.AddInMemoryCollection(new Dictionary<string, string?> 176var envVars = new Dictionary<string, object>();
Dashboard\DashboardOptionsTests.cs (1)
22builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Dashboard\DashboardResourceTests.cs (7)
29builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 94builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 209builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 250builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 286builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 323builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 369builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Dashboard\DashboardServiceTests.cs (2)
490configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 553configBuilder.AddInMemoryCollection(new Dictionary<string, string?>
Dcp\DcpExecutorTests.cs (23)
126configurationBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1292configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1327configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1363configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1403configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1434configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1465configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1495configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1524configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 1556var configDict = new Dictionary<string, string?> 1602var configDict = new Dictionary<string, string?> 1641var configDict = new Dictionary<string, string?> 1680var configDict = new Dictionary<string, string?> 1716var configDict = new Dictionary<string, string?> 1758var configDict = new Dictionary<string, string?> 1800var configDict = new Dictionary<string, string?> 1842var configDict = new Dictionary<string, string?> 1879var configDict = new Dictionary<string, string?> 1916var configDict = new Dictionary<string, string?> 1959var configDict = new Dictionary<string, string?> 2005builder.AddInMemoryCollection(new Dictionary<string, string?> 2072EnvironmentVariables = new Dictionary<string, string> 2082EnvironmentVariables = new Dictionary<string, string>
Devcontainers\SshRemoteOptionsTests.cs (4)
16.AddInMemoryCollection(new Dictionary<string, string?> 38.AddInMemoryCollection(new Dictionary<string, string?> 59.AddInMemoryCollection(new Dictionary<string, string?> 80.AddInMemoryCollection(new Dictionary<string, string?>
ExpressionResolverTests.cs (1)
227Expressions = new()
InteractionServiceTests.cs (5)
207configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 234configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 256configBuilder.AddInMemoryCollection(new Dictionary<string, string?> 995LoadCallback = c => Task.FromResult<IReadOnlyList<KeyValuePair<string, string>>>(new Dictionary<string, string> 1028LoadCallback = c => Task.FromResult<IReadOnlyList<KeyValuePair<string, string>>>(new Dictionary<string, string>
KestrelConfigTests.cs (1)
384Profiles = new()
Orchestrator\ApplicationOrchestratorTests.cs (2)
356new ChildResourceWithConnectionString("child", new Dictionary<string, string> { { "Namespace", "ns" } }, parentResource.Resource) 359new ChildResourceWithConnectionString("grand-child", new Dictionary<string, string> { { "Database", "db" } }, childResource.Resource)
Orchestrator\ParameterProcessorTests.cs (2)
806.AddInMemoryCollection(new Dictionary<string, string?> { [$"Parameters:{name}"] = value }) 827.AddInMemoryCollection(new Dictionary<string, string?> { ["Parameters:generatedParam"] = "existingValue" })
Pipelines\DistributedApplicationPipelineTests.cs (1)
1075var executionTimes = new Dictionary<string, DateTime>();
ProjectResourceTests.cs (10)
759protected Dictionary<string, LaunchProfile>? Profiles { get; set; } = new(); 773Profiles = new() 781EnvironmentVariables = new() 794Profiles = new() 802EnvironmentVariables = new() 815Profiles = new() 823EnvironmentVariables = new() 836Profiles = new() 857Profiles = new() 878Profiles = new()
PublishAsDockerfileTests.cs (1)
469Profiles = 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 (6)
49configurationManager.AddInMemoryCollection(new Dictionary<string, string?> 76configurationManager.AddInMemoryCollection(new Dictionary<string, string?> 111configurationManager.AddInMemoryCollection(new Dictionary<string, string?> 151configurationManager.AddInMemoryCollection(new Dictionary<string, string?> 195configurationManager.AddInMemoryCollection(new Dictionary<string, string?> 223configurationManager.AddInMemoryCollection(new Dictionary<string, string?>
WithUrlsTests.cs (1)
864Profiles = new Dictionary<string, LaunchProfile>
Aspire.Hosting.Valkey.Tests (3)
ValkeyFunctionalTests.cs (3)
34hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 97hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 148hb.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
Aspire.Hosting.Yarp (2)
ConfigurationBuilder\YarpCluster.cs (1)
58Destinations = new Dictionary<string, DestinationConfig>(StringComparer.OrdinalIgnoreCase)
ConfigurationBuilder\YarpRoute.cs (1)
163var transform = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Aspire.Hosting.Yarp.Tests (12)
YarpConfigGeneratorTests.cs (12)
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>(); 248var variables = new Dictionary<string, object>(); 281.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)
308builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?> 336builder.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>()
AzureFunctionsEndToEnd.Functions (1)
GeneratedFunctionExecutor.g.cs (1)
17private readonly Dictionary<string, Type> types = new Dictionary<string, Type>()
BasicWebSite (2)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
47routeValues = 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)
183var map = new Dictionary<Guid, AssemblyInfo>();
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>();
containerize (3)
ContainerizeCommand.cs (3)
260Dictionary<string, string> _labels = parseResult.GetValue(LabelsOption) ?? new Dictionary<string, string>(); 262Dictionary<string, string> _envVars = parseResult.GetValue(EnvVarsOption) ?? new Dictionary<string, string>(); 310Dictionary<string, string> parsed = new();
Crossgen2Tasks (1)
CommonFilePulledFromSdkRepo\TaskBase.cs (1)
52(BuildEngine as IBuildEngine5)?.LogTelemetry(eventName, new Dictionary<string, string> {
csc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
DemoConsole (1)
DesignSurfaceExtended.cs (1)
216initializer.InitializeNewComponent(new Dictionary<object, object>());
dotnet (73)
BuildServerConnection.cs (1)
492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
CliSchema.cs (4)
77var telemetryProperties = new Dictionary<string, string> { { "command", commandString } }; 119var dict = new Dictionary<string, ArgumentDetails>(); 133var dict = new Dictionary<string, OptionDetails>(); 147var dict = new Dictionary<string, CommandDetails>();
CommandFactory\CommandResolution\CompositeCommandResolver.cs (1)
41TelemetryEventEntry.TrackEvent(CommandResolveEvent, new Dictionary<string, string>()
CommandFactory\CommandResolution\MSBuildProject.cs (2)
79return new Dictionary<string, string> 108var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Commands\MSBuild\MSBuildLogger.cs (2)
187properties ??= new Dictionary<string, string>(eventProperties); 197properties ??= new Dictionary<string, string>(eventProperties);
Commands\New\BuiltInTemplatePackageProvider.cs (2)
75var versionFileInfo = new Dictionary<string, SemanticVersion>(); 90IDictionary<string, (string path, SemanticVersion version)> bestVersionsByBucket = new Dictionary<string, (string path, SemanticVersion version)>();
Commands\New\MSBuildEvaluation\MSBuildEvaluator.cs (3)
198Dictionary<string, string?> properties = new() 206Dictionary<string, double> measurements = new() 228var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Commands\New\MSBuildEvaluation\MultiTargetEvaluationResult.cs (1)
15internal IReadOnlyDictionary<string, MSBuildProject?> EvaluatedProjects { get; private set; } = new Dictionary<string, MSBuildProject?>();
Commands\New\NewCommandParser.cs (1)
166var preferences = new Dictionary<string, string>
Commands\Package\Add\PackageAddCommand.cs (1)
180msbuildArgs: MSBuildArgs.FromProperties(new Dictionary<string, string>(2)
Commands\Restore\RestoringCommand.cs (1)
21new(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Commands\Run\CommonRunHelpers.cs (1)
19var globalProperties = msbuildArgs.GlobalProperties?.ToDictionary() ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Commands\Run\LaunchSettings\LaunchSettingsManager.cs (1)
19_providers = new Dictionary<string, ILaunchSettingsProvider>
Commands\Run\LaunchSettings\ProjectLaunchSettingsModel.cs (1)
20public Dictionary<string, string> EnvironmentVariables { get; } = new Dictionary<string, string>(StringComparer.Ordinal);
Commands\Run\RunCommand.cs (1)
837var globalProperties = MSBuildArgs.GlobalProperties?.ToDictionary() ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Commands\Run\RunTelemetry.cs (1)
46var properties = new Dictionary<string, string?>
Commands\Run\VirtualProjectBuildingCommand.cs (4)
113MSBuildArgs = msbuildArgs.CloneWithAdditionalProperties(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 696var cacheEntry = new RunFileBuildCacheEntry(MSBuildArgs.GlobalProperties?.ToDictionary(StringComparer.OrdinalIgnoreCase) ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)) 1054globalProperties = new Dictionary<string, string>(projectCollection.GlobalProperties, StringComparer.OrdinalIgnoreCase); 2028GlobalProperties = new(GlobalPropertiesComparer);
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.Help.cs (2)
163var modulesWithMissingOptions = new Dictionary<bool, List<(string[], string[])>>(); 169var missingOptionsToModules = new Dictionary<string, List<string>>();
Commands\Test\MTP\SolutionAndProjectUtility.cs (2)
187globalProperties = new Dictionary<string, string>(capacity: 1) 198if (!(globalProperties ??= new Dictionary<string, string>()).ContainsKey(property.Key))
Commands\Test\MTP\Terminal\TestProgressState.cs (1)
11private readonly Dictionary<string, TestNodeInfoEntry> _testUidToResults = new();
Commands\Test\MTP\TestApplication.cs (2)
30private readonly Dictionary<NamedPipeServer, HandshakeMessage> _handshakes = new(); 286new HandshakeMessage(new Dictionary<byte, string>(capacity: 5)
Commands\Test\MTP\TestApplicationHandler.cs (1)
15private readonly Dictionary<string, (int TestSessionStartCount, int TestSessionEndCount)> _testSessionEventCountPerSessionUid = new();
Commands\Test\VSTest\TestCommand.cs (1)
316Dictionary<string, string> globalProperties = new(StringComparer.OrdinalIgnoreCase);
Commands\Test\VSTest\VSTestArgumentConverter.cs (2)
22= new Dictionary<string, string>() 41= new Dictionary<string, string>()
Commands\Test\VSTest\VSTestForwardingApp.cs (1)
48return new()
Commands\Tool\Install\LocalToolsResolverCacheExtensions.cs (1)
36new Dictionary<RestoredCommandIdentifier, ToolCommand>
Commands\Workload\GlobalJsonWorkloadSetFile.cs (1)
73foreach (var kvp in new Dictionary<string, string>(globalJsonWorkloadSetVersions))
Commands\Workload\List\InstalledWorkloadsCollection.cs (1)
27_workloads = new Dictionary<string, string>(workloadIds.Select(id => new KeyValuePair<string, string>(id.ToString(), installationSource)));
Commands\Workload\List\VisualStudioWorkloads.cs (1)
61Dictionary<string, string> visualStudioComponentWorkloads = new(StringComparer.OrdinalIgnoreCase);
Commands\Workload\Restore\WorkloadRestoreCommand.cs (1)
71var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Commands\Workload\Search\WorkloadSearchVersionsCommand.cs (2)
99Reporter.WriteLine(JsonSerializer.Serialize(versions.Select(version => new Dictionary<string, string>() 136Reporter.WriteLine(JsonSerializer.Serialize(new Dictionary<string, Dictionary<string, string>>()
CommonOptions.cs (2)
56var dictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 356var result = new Dictionary<string, string>(
MsbuildProject.cs (1)
217new Dictionary<string, string>
Program.cs (2)
288TelemetryClient.TrackEvent("command/finish", properties: new Dictionary<string, string> 292measurements: new Dictionary<string, double>());
ReleasePropertyProjectLocator.cs (4)
75return new Dictionary<string, string>(1, StringComparer.OrdinalIgnoreCase) { [EnvironmentVariableNames.DISABLE_PUBLISH_AND_PACK_RELEASE] = "true" }.AsReadOnly(); // Don't throw error if publish* conflicts but global config specified. 86var newConfigurationArgs = new Dictionary<string, string>(2, StringComparer.OrdinalIgnoreCase); 291return new(new Dictionary<string, string>() { [MSBuildPropertyNames.TARGET_FRAMEWORK] = _options.FrameworkOption }); 300var newDictionary = new Dictionary<string, string>(globalProperties, StringComparer.OrdinalIgnoreCase);
ShellShim\ShellShimRepository.cs (1)
118var files = new Dictionary<string, string>();
Telemetry\AllowListToSendFirstAppliedOptions.cs (1)
30new Dictionary<string, string>
Telemetry\AllowListToSendFirstArgument.cs (1)
36new Dictionary<string, string>
Telemetry\AllowListToSendVerbSecondVerbFirstArgument.cs (1)
34new Dictionary<string, string>
Telemetry\PersistenceChannel\SnapshottingDictionary.cs (2)
12: base(new Dictionary<TKey, TValue>()) 69return new Dictionary<TKey, TValue>(collection);
Telemetry\Telemetry.cs (4)
183eventProperties ??= new Dictionary<string, string>(); 233(null, not null) => _commonMeasurements == FrozenDictionary<string, double>.Empty ? null : new Dictionary<string, double>(_commonMeasurements), 244(null, not null) => _commonProperties == FrozenDictionary<string, string>.Empty ? null : new Dictionary<string, string>(_commonProperties), 252IDictionary<TKey, TValue> eventMeasurements = new Dictionary<TKey, TValue>(capacity: common.Count + specific.Count);
Telemetry\TelemetryCommonProperties.cs (1)
62return new Dictionary<string, string>
Telemetry\TelemetryFilter.cs (5)
49Dictionary<string, string> properties = new() 77new Dictionary<string, string> { { "exeName", installerSuccessReport.ExeName } } 84new Dictionary<string, string> 154new Dictionary<string, string>() 174new Dictionary<string, string>()
Telemetry\TopLevelCommandNameAndOptionToLog.cs (1)
35new Dictionary<string, string>
dotnet.Tests (83)
CommandFactoryTests\GivenALocalToolsCommandResolver.cs (3)
96new Dictionary<RestoredCommandIdentifier, ToolCommand> 129new Dictionary<RestoredCommandIdentifier, ToolCommand> 194new Dictionary<RestoredCommandIdentifier, ToolCommand>
CommandTests\MSBuild\GivenForwardingApp.cs (1)
67var startInfo = new ForwardingApp("<apppath>", new string[0], environmentVariables: new Dictionary<string, string>
CommandTests\MSBuild\GivenMSBuildLogger.cs (6)
20Properties = new Dictionary<string, string> 38Properties = new Dictionary<string, string> 60Properties = new Dictionary<string, string> 82Properties = new Dictionary<string, string> 105Properties = new Dictionary<string, string> 117fakeTelemetry.LogEntry.Properties.Should().BeEquivalentTo(new Dictionary<string, string>
CommandTests\New\DotnetAddPostActionTests.cs (5)
162var args = new Dictionary<string, string>() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "project" }, { "reference", "./OldName.csproj" } }; 190var args = new Dictionary<string, string>() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "project" }, { "reference", "./Reference.csproj" } }; 225var args = new Dictionary<string, string>() 259var args = new Dictionary<string, string>() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "package" }, { "reference", "System.Net.Json" } }; 285var args = new Dictionary<string, string>() { { "targetFiles", "MyApp.csproj" }, { "referenceType", "package" }, { "reference", "System.Net.Json" } };
CommandTests\New\DotnetRestorePostActionTests.cs (2)
29var args = new Dictionary<string, string>() { { "files", "[\"MyApp.csproj\"]" } }; 54var args = new Dictionary<string, string>() { { "files", "MyApp.csproj" } };
CommandTests\New\DotnetSlnPostActionTests.cs (10)
71Args = new Dictionary<string, string>() 91Args = new Dictionary<string, string>() 120Args = new Dictionary<string, string>() 140Args = new Dictionary<string, string>() 174Args = new Dictionary<string, string>() 205var args = new Dictionary<string, string>() { { "projectFiles", "[\"MyApp.csproj\"]" } }; 234var args = new Dictionary<string, string>() { { "projectFiles", "MyApp.csproj" } }; 263var args = new Dictionary<string, string>() { 295var args = new Dictionary<string, string>() { 327var args = new Dictionary<string, string>() {
CommandTests\Test\GivenDotnetTestBuildsAndRunsArtifactPostProcessing.cs (1)
203var dataCollectionAttributes = new Dictionary<string, string>
CommandTests\Tool\Run\ToolRunCommandTests.cs (1)
89new Dictionary<RestoredCommandIdentifier, ToolCommand>
CommandTests\VSTest\VSTestArgumentConverterTests.cs (1)
107= new Dictionary<string, string>()
CommandTests\Workload\Install\GivenFileBasedWorkloadInstall.cs (1)
44installer.SaveInstallStateManifestVersions(sdkFeatureBand, new Dictionary<string, string>()
CommandTests\Workload\Install\GivenWorkloadManifestUpdater.cs (3)
439var rollbackDefContent = JsonSerializer.Serialize(new Dictionary<string, string>() { { "test-manifest-1", "4.0.0" }, { "test-manifest-2", "2.0.0" } }); 481var rollbackDefContent = JsonSerializer.Serialize(new Dictionary<string, string>() { { "test-manifest-1", "4.0.0" }, { "test-manifest-2", "2.0.0" } }); 520var rollbackDefContent = JsonSerializer.Serialize(new Dictionary<string, string>() {
CommandTests\Workload\Install\MockManifestProvider.cs (1)
32public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
CommandTests\Workload\Install\MockPackWorkloadInstaller.cs (1)
245return new();
CommandTests\Workload\List\GivenWorkloadInstallerAndWorkloadsInstalled.cs (3)
60new WorkloadCollection 76new WorkloadCollection 90new WorkloadCollection
CommandTests\Workload\Search\GivenDotnetWorkloadSearch.cs (1)
88Dictionary<string, string> workloadSets = new()
CommandTests\Workload\Update\GivenDotnetWorkloadUpdate.cs (3)
249oldInstallState.Manifests = new Dictionary<string, string>() 311workloadSetContents: new Dictionary<string, string>() { { "8.0.302", workloadSetContents } }) 364Dictionary<string, string> workloadSets = new()
ConfigurerTests\GivenADotnetFirstTimeUseConfigurer.cs (2)
269Dictionary<string, double> measurements = new(); 309Dictionary<string, double> measurements = new();
GivenThatTheUserIsRunningDotNetForTheFirstTime.cs (1)
53public Dictionary<string, string> ExtraEnvironmentVariables = new();
ParserTests\CommonOptionsTests.cs (5)
21.BeEquivalentTo(new Dictionary<string, string> { ["A"] = "2" }); 34var expected = new Dictionary<string, string>(); 63.BeEquivalentTo(new Dictionary<string, string> 83.BeEquivalentTo(new Dictionary<string, string> { ["A"] = "" }); 98.BeEquivalentTo(new Dictionary<string, string> { ["A"] = " X Y \t\n\r\u2002" });
TelemetryCommonPropertiesTests.cs (21)
229new object[] { new Dictionary<string, string> { { "CLAUDECODE", "1" } }, "claude" }, 230new object[] { new Dictionary<string, string> { { "CURSOR_EDITOR", "1" } }, "cursor" }, 231new object[] { new Dictionary<string, string> { { "CLAUDECODE", "1" }, { "CURSOR_EDITOR", "1" } }, "claude, cursor" }, 232new object[] { new Dictionary<string, string>(), null }, 236new object[] { new Dictionary<string, string> { { "TF_BUILD", "true" } }, true }, 237new object[] { new Dictionary<string, string> { { "GITHUB_ACTIONS", "true" } }, true }, 238new object[] { new Dictionary<string, string> { { "APPVEYOR", "true"} }, true }, 239new object[] { new Dictionary<string, string> { { "CI", "true"} }, true }, 240new object[] { new Dictionary<string, string> { { "TRAVIS", "true"} }, true }, 241new object[] { new Dictionary<string, string> { { "CIRCLECI", "true"} }, true }, 243new object[] { new Dictionary<string, string> { { "CODEBUILD_BUILD_ID", "hi" }, { "AWS_REGION", "hi" } }, true }, 244new object[] { new Dictionary<string, string> { { "CODEBUILD_BUILD_ID", "hi" } }, false }, 245new object[] { new Dictionary<string, string> { { "BUILD_ID", "hi" }, { "BUILD_URL", "hi" } }, true }, 246new object[] { new Dictionary<string, string> { { "BUILD_ID", "hi" } }, false }, 247new object[] { new Dictionary<string, string> { { "BUILD_ID", "hi" }, { "PROJECT_ID", "hi" } }, true }, 248new object[] { new Dictionary<string, string> { { "BUILD_ID", "hi" } }, false }, 250new object[] { new Dictionary<string, string> { { "TEAMCITY_VERSION", "hi" } }, true }, 251new object[] { new Dictionary<string, string> { { "TEAMCITY_VERSION", "" } }, false }, 252new object[] { new Dictionary<string, string> { { "JB_SPACE_API_URL", "hi" } }, true }, 253new object[] { new Dictionary<string, string> { { "JB_SPACE_API_URL", "" } }, false }, 255new object[] { new Dictionary<string, string> { { "SomethingElse", "hi" } }, false },
TelemetryFilterTest.cs (11)
45TelemetryEventEntry.SendFiltered(Tuple.Create(parseResult, new Dictionary<string, double>() { { "Startup Time", 12345 } })); 58TelemetryEventEntry.SendFiltered(Tuple.Create(parseResult, new Dictionary<string, double>(), globalJsonState)); 71TelemetryEventEntry.SendFiltered(Tuple.Create(parseResult, new Dictionary<string, double>() { { "Startup Time", 0 } })); 82TelemetryEventEntry.SendFiltered(Tuple.Create(parseResult, new Dictionary<string, double>() { { "Startup Time", 0 }, { "Parse Time", 23456 } })); 110TelemetryEventEntry.SendFiltered(Tuple.Create(parseResult, new Dictionary<string, double>() { { "Startup Time", 34567 } })); 124TelemetryEventEntry.SendFiltered(Tuple.Create(parseResult, new Dictionary<string, double>() { { "Startup Time", 0 } })); 137TelemetryEventEntry.SendFiltered(Tuple.Create(parseResult, new Dictionary<string, double>() { { "Startup Time", 0 }, { "Parse Time", 45678 } })); 154new Dictionary<string, double>() { { "Startup Time", 0 }, { "Parse Time", 23456 } })); 170new Dictionary<string, double>() { { "Startup Time", 0 }, { "Parse Time", 23456 } })); 186new Dictionary<string, double>() { { "Startup Time", 0 }, { "Parse Time", 23456 } })); 202new Dictionary<string, double>() { { "Startup Time", 0 }, { "Parse Time", 23456 } }));
dotnet-format (6)
Analyzers\AnalyzerReferenceInformationProvider.cs (2)
13private static readonly Dictionary<string, Assembly> s_pathsToAssemblies = new(StringComparer.OrdinalIgnoreCase); 14private static readonly Dictionary<string, Assembly> s_namesToAssemblies = new(StringComparer.OrdinalIgnoreCase);
Analyzers\CodeAnalysisResult.cs (1)
9private readonly Dictionary<Project, List<Diagnostic>> _dictionary = new();
Analyzers\CodeStyleInformationProvider.cs (1)
35var analyzersByLanguage = new Dictionary<string, AnalyzersAndFixers>();
Logging\SimpleConsoleLogger.cs (1)
19private static ImmutableDictionary<LogLevel, ConsoleColor> LogLevelColorMap => new Dictionary<LogLevel, ConsoleColor>
Workspaces\MSBuildWorkspaceLoader.cs (1)
22var properties = new Dictionary<string, string>(StringComparer.Ordinal)
dotnet-format.UnitTests (35)
Analyzers\CodeStyleAnalyzerFormatterTests.cs (1)
47var editorConfig = new Dictionary<string, string>()
Analyzers\FilterDiagnosticsTests.cs (1)
192var analyzersByLanguage = new Dictionary<string, AnalyzersAndFixers>();
Analyzers\ThirdPartyAnalyzerFormatterTests.cs (3)
99var editorConfig = new Dictionary<string, string>() 152var editorConfig = new Dictionary<string, string>() 199var editorConfig = new Dictionary<string, string>()
Formatters\AbstractFormatterTests.cs (1)
267public Dictionary<string, string> XmlReferences { get; } = new Dictionary<string, string>();
Formatters\CharsetFormatterTests.cs (2)
45var editorConfig = new Dictionary<string, string>() 64var editorConfig = new Dictionary<string, string>()
Formatters\EndOfLineFormatterTests.cs (3)
32var editorConfig = new Dictionary<string, string>() 56var editorConfig = new Dictionary<string, string>() 72var editorConfig = new Dictionary<string, string>();
Formatters\FinalNewlineFormatterTests.cs (11)
24var editorConfig = new Dictionary<string, string>() 41var editorConfig = new Dictionary<string, string>() 56var editorConfig = new Dictionary<string, string>() 72var editorConfig = new Dictionary<string, string>() 88var editorConfig = new Dictionary<string, string>() 105var editorConfig = new Dictionary<string, string>() 121var editorConfig = new Dictionary<string, string>() 137var editorConfig = new Dictionary<string, string>() 153var editorConfig = new Dictionary<string, string>() 170var editorConfig = new Dictionary<string, string>() 184var editorConfig = new Dictionary<string, string>()
Formatters\FormattedFilesTests.cs (1)
18private Dictionary<string, string> EditorConfig => new Dictionary<string, string>()
Formatters\OrganizeImportsFormatterTests.cs (5)
37var editorConfig = new Dictionary<string, string>() 68var editorConfig = new Dictionary<string, string>() 100var editorConfig = new Dictionary<string, string>() 132var editorConfig = new Dictionary<string, string>() 154var editorConfig = new Dictionary<string, string>()
Formatters\UnnecessaryImportsFormatterTests.cs (6)
36var editorConfig = new Dictionary<string, string>(); 51var editorConfig = new Dictionary<string, string>(); 72var editorConfig = new Dictionary<string, string>() 101var editorConfig = new Dictionary<string, string>() 130var editorConfig = new Dictionary<string, string>() 154var editorConfig = new Dictionary<string, string>()
Utilities\XmlReferenceResolver.cs (1)
12new Dictionary<string, string>();
dotnet-MsiInstallation.Tests (4)
Framework\VMStateTree.cs (3)
13public Dictionary<SerializedVMAction, (VMActionResult actionResult, VMStateTree resultingState)> Actions { get; set; } = new(); 15public Dictionary<SerializedVMAction, VMActionResult> ReadOnlyActions { get; set; } = new(); 87public Dictionary<string, VMStateTree> VMStates { get; set; } = new Dictionary<string, VMStateTree>();
MsiInstallerTests.cs (1)
324Dictionary<string, List<(string version, string sdkFeatureBand)>> installedManifestVersions = new();
dotnet-new.IntegrationTests (8)
CommonTemplatesTests.cs (3)
59Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() }; 203Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() }; 397Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() };
DotnetClassTemplateTests.cs (4)
50Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() }; 130Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() }; 187IDictionary<string, string> languageToProjectExtMap = new Dictionary<string, string> 193IDictionary<string, string> languageToClassExtMap = new Dictionary<string, string>
TemplateEngineSamplesTest.cs (1)
48Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() };
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>();
dotnet-watch (14)
Build\EvaluationResult.cs (1)
87var fileItems = new Dictionary<string, FileItem>();
Build\FilePathExclusions.cs (1)
19var globs = new Dictionary<(string fixedDirectoryPart, string wildcardDirectoryPart, string filenamePart), (MSBuildGlob glob, string value, string projectDir)>();
FileWatcher\FileWatcher.cs (2)
14protected readonly Dictionary<string, DirectoryWatcher> _directoryTreeWatchers = new(PathUtilities.OSSpecificPathComparer); 18protected readonly Dictionary<string, DirectoryWatcher> _directoryWatchers = new(PathUtilities.OSSpecificPathComparer);
FileWatcher\PollingDirectoryWatcher.cs (3)
16private Dictionary<string, DateTime> _currentSnapshot = new(PathUtilities.OSSpecificPathComparer); 19private Dictionary<string, DateTime> _snapshotBuilder = new(PathUtilities.OSSpecificPathComparer); 20private readonly Dictionary<string, ChangeKind> _changesBuilder = new(PathUtilities.OSSpecificPathComparer);
HotReload\CompilationHandler.cs (1)
481var updates = new Dictionary<RunningProject, List<(string filePath, string relativeUrl, string assemblyName, bool isApplicationProject)>>();
HotReload\StaticFileHandler.cs (1)
15var refreshRequests = new Dictionary<BrowserRefreshServer, List<string>>();
Process\ProcessSpec.cs (1)
11public Dictionary<string, string> EnvironmentVariables { get; } = new();
Process\ProjectLauncher.cs (1)
79var environmentBuilder = new Dictionary<string, string>();
SocketConnectionManager.cs (1)
22private readonly Dictionary<string, WebSocketConnection> _webSocketConnections = new(StringComparer.Ordinal);
Watch\DotNetWatcher.cs (1)
24var environmentBuilder = new Dictionary<string, string>();
Watch\MsBuildFileSetFactory.cs (1)
86var fileItems = new Dictionary<string, FileItem>();
dotnet-watch.Tests (17)
Build\EvaluationTests.cs (4)
94new("EmbeddedResource", new() { { "Include", "*.resx" }, { "Watch", "false" } }), 95new("Compile", new() { { "Include", "Program.cs" } }), 96new("Compile", new() { { "Include", "Class*.cs" }, { "Watch", "false" } }), 337new("Compile", new() { { "Include", "Lib.fs" } })
Build\FileSetSerializerTests.cs (9)
44Projects = new() 50StaticFileSetBuilder = new() { { "path1", "path2" } } 57StaticFileSetBuilder = new() { { "path2", "path3" } } 118new MockTaskItem("file1.cs", new() 123new MockTaskItem("file1.cs", new() 128new MockTaskItem("ProjectA.csproj", new() 133new MockTaskItem("ProjectA.csproj", new() 138new MockTaskItem("ProjectB.csproj", new() 143new MockTaskItem("file.css", new()
MockBuildEngine.cs (1)
78public Dictionary<object, object> RegisteredTaskObjects { get; } = new Dictionary<object, object>();
MockTaskItem.cs (1)
17private Dictionary<string, string> _metadata = new(StringComparer.OrdinalIgnoreCase);
Watch\BuildEvaluatorTests.cs (2)
10private static readonly MSBuildFileSetFactory.EvaluationResult s_emptyEvaluationResult = new(new Dictionary<string, FileItem>(), projectGraph: null); 97new Dictionary<string, FileItem>()
DotNetWatchTasks (1)
FileSetSerializer.cs (1)
22var projectItems = new Dictionary<string, ProjectItems>();
EndToEnd.Tests (2)
ProjectBuildTests.cs (1)
261var languageExtensionMap = new Dictionary<string, string>()
Utilities\TestProjectCreator.cs (1)
21public Dictionary<string, string> AdditionalProperties { get; } = new Dictionary<string, string>();
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 (5)
ArrayBuilder.cs (4)
391var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 399return new Dictionary<K, ImmutableArray<T>>(comparer); 404var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 418var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
ReleaseTrackingHelper.cs (1)
44var releaseTrackingDataByRulesBuilder = new Dictionary<string, ReleaseTrackingDataForRuleBuilder>();
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
47routeValues = 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)
HelixTasks (1)
SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs (1)
166partitionedWorkItem.Add(new Microsoft.Build.Utilities.TaskItem(assemblyPartitionInfo.DisplayName + testIdentityDifferentiator, new Dictionary<string, string>()
HelixTestRunner (1)
TestRunner.cs (1)
17EnvironmentVariables = new Dictionary<string, string>();
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>
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)
573var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 608var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 679var 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)
573var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 608var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 679var 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)
573var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 608var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 679var 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)
573var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 608var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 679var 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 (75)
ILLink.RoslynAnalyzer (18)
DataFlowAnalyzerContext.cs (1)
42var enabledAnalyzers = new Dictionary<RequiresAnalyzerBase, ImmutableArray<ISymbol>>();
DynamicallyAccessedMembersAnalyzer.cs (1)
372Dictionary<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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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)
211public readonly Dictionary<string, AuthenticationTicket> Store = new Dictionary<string, AuthenticationTicket>();
GoogleTests.cs (3)
231return context.ChallengeAsync("Google", new AuthenticationProperties(new Dictionary<string, string>() 283return context.ChallengeAsync("Google", new GoogleChallengeProperties(new Dictionary<string, string> 1268var properties = new AuthenticationProperties(new Dictionary<string, string>()
OAuthTests.cs (1)
565var 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)
407var content = new Dictionary<string, string>() 476var 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 (37)
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)
21private readonly Dictionary<string, byte[]> _currentState = new(StringComparer.Ordinal);
PersistentState\PersistentServicesRegistry.cs (1)
167_underlyingAccessors = new Dictionary<string, (PropertySetter, PropertyGetter, RestoreOptions)>(StringComparer.OrdinalIgnoreCase);
Reflection\ComponentProperties.cs (3)
127unmatched ??= new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); 148unmatched ??= new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); 284_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); 302_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 (2)
25= new Dictionary<string, object>(); 424new RouteData(componentType, 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 (26)
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>
ImportMapSerializerContext.IReadOnlyDictionaryStringIReadOnlyDictionaryStringString.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IReadOnlyDictionary<string, string>>(),
ImportMapSerializerContext.IReadOnlyDictionaryStringString.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, string>(),
PrerenderComponentApplicationStoreSerializerContext.DictionaryStringByteArray.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, byte[]>(),
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 (162)
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\BrowserFileFromFormFileTests.cs (2)
52var reader = new FormDataReader(new Dictionary<FormKey, StringValues>(), culture, buffer, formFileCollection.Object); 89var reader = new FormDataReader(new Dictionary<FormKey, StringValues>(), culture, buffer, formFileCollection.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.QuickGrid.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.Server (11)
CircuitPersistenceManagerSerializerContext.DictionaryInt32ComponentMarker.g.cs (1)
30ObjectCreator = () => new global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>(),
Circuits\CircuitPersistenceManager.cs (1)
193var 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();
PrerenderComponentApplicationStoreSerializerContext.DictionaryStringByteArray.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, byte[]>(),
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 (49)
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 (15)
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() 705await AddComponentAsync<DynamicallyAddedComponent>(circuitHost, 0, new Dictionary<string, object> 709await AddComponentAsync<DynamicallyAddedComponent>(circuitHost, 1, new Dictionary<string, object> 716new Dictionary<string, byte[]> { ["test"] = [1, 2, 3] }); 724Marker = CreateMarker(typeof(DynamicallyAddedComponent), "2", new Dictionary<string, object> 730parameters: CreateWebRootComponentParameters(new Dictionary<string, object> 746Marker = CreateMarker(typeof(DynamicallyAddedComponent), "1", new Dictionary<string, object> 752parameters: CreateWebRootComponentParameters(new Dictionary<string, object>
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] }, 661ApplicationState = 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)
220ParameterView.FromDictionary(new Dictionary<string, object> 283ParameterView.FromDictionary(new Dictionary<string, object> 346ParameterView.FromDictionary(new Dictionary<string, object> 403ParameterView.FromDictionary(new Dictionary<string, object> 557var parameters = new Dictionary<string, object> { ["Name"] = "value" }; 596var 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 (213)
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>
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\ComponentStatePersistenceManagerTest.cs (11)
44var state = new Dictionary<string, byte[]> 66var state = new Dictionary<string, byte[]> 88var state = new Dictionary<string, byte[]>(); 140var state = new Dictionary<string, byte[]>(); 167var state = new Dictionary<string, byte[]>(); 189var state = new Dictionary<string, byte[]>(); 219var state = new Dictionary<string, byte[]>(); 255var state = new Dictionary<string, byte[]>(); 283var state = new Dictionary<string, byte[]>(); 311var state = new Dictionary<string, byte[]>(); 360var state = new Dictionary<string, byte[]>();
PersistentState\PersistentComponentStateTest.cs (25)
18var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 19var existingState = new Dictionary<string, byte[]> 36var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 37var existingState = new Dictionary<string, byte[]> 52var currentState = new Dictionary<string, byte[]>(); 66var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 67var existingState = new Dictionary<string, byte[]> 85var currentState = new Dictionary<string, byte[]>(); 104var currentState = new Dictionary<string, byte[]>(); 121var currentState = new Dictionary<string, byte[]>(); 140var currentState = new Dictionary<string, byte[]>(); 160var existingState = new Dictionary<string, byte[]>() { ["MyState"] = serialized }; 161var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 178var existingState = new Dictionary<string, byte[]>() { ["MyState"] = serialized }; 179var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 195var currentState = new Dictionary<string, byte[]>(); 198applicationState.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 214var currentState = new Dictionary<string, byte[]>(); 217applicationState.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 233var currentState = new Dictionary<string, byte[]>(); 236applicationState.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 252var currentState = new Dictionary<string, byte[]>(); 255applicationState.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 271var currentState = new Dictionary<string, byte[]>(); 274applicationState.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue);
PersistentState\PersistentServicesRegistryTest.cs (23)
32var testStore = new TestStore(new Dictionary<string, byte[]>()); 36await persistenceManager.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue); 77var testStore = new TestStore(new Dictionary<string, byte[]>()); 79await persistenceManagerOne.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue); 113var testStore = new TestStore(new Dictionary<string, byte[]>()); 146var testStore = new TestStore(new Dictionary<string, byte[]>()); 147await persistenceManager.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue); 176var testStore = new TestStore(new Dictionary<string, byte[]>()); 216var testStore = new TestStore(new Dictionary<string, byte[]>()); 218await persistenceManagerOne.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue); 252var testStore = new TestStore(new Dictionary<string, byte[]>()); 332var testStore = new TestStore(new Dictionary<string, byte[]>()); 334await persistenceManager.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue); 379var testStore = new TestStore(new Dictionary<string, byte[]>()); 380await persistenceManager.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue); 420var testStore = new TestStore(new Dictionary<string, byte[]>()); 422await persistenceManager.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue); 456var testStore = new TestStore(new Dictionary<string, byte[]>()); 458await persistenceManager.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue); 492var initialStore = new TestStore(new Dictionary<string, byte[]>()); 494await persistenceManager.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue); 505var updatedStore = new TestStore(new Dictionary<string, byte[]>()); 507await updatedManager.RestoreStateAsync(new TestStore(new Dictionary<string, byte[]>()), RestoreContext.InitialValue);
PersistentStateValueProviderKeyResolverTests.cs (8)
52var state = new Dictionary<string, byte[]>(); 90var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 107var state = new Dictionary<string, byte[]>(); 145var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 160var state = new Dictionary<string, byte[]>(); 210var state = new Dictionary<string, byte[]>(); 248var state = new Dictionary<string, byte[]>(); 287var state = new Dictionary<string, byte[]>();
PersistentStateValueProviderTests.cs (4)
21new Dictionary<string, byte[]>(), 52new Dictionary<string, byte[]>(), 78new Dictionary<string, byte[]>(), 104var dictionary = new Dictionary<string, byte[]>();
PersistentValueProviderComponentSubscriptionTests.cs (23)
23var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 24state.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 45var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 46state.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 69var initialState = new Dictionary<string, byte[]>(); 99var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 100state.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 129var initialState = new Dictionary<string, byte[]>(); 159var initialState = new Dictionary<string, byte[]>(); 189var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 190state.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 209var initialState = new Dictionary<string, byte[]>(); 243var appState = new Dictionary<string, byte[]>(); 276var newState = new Dictionary<string, byte[]> 296var initialState = new Dictionary<string, byte[]>(); 336var initialState = new Dictionary<string, byte[]>(); 396var initialState = new Dictionary<string, byte[]>(); 649var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 650state.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 672var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 673state.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue); 695var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 696state.InitializeExistingState(new Dictionary<string, byte[]>(), RestoreContext.InitialValue);
RendererTest.cs (49)
239await renderer.Dispatcher.InvokeAsync(() => renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 241[EventActionsName] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 258[WhatToRenderName] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 283renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 299renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 398await renderer.Dispatcher.InvokeAsync(() => renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 400[EventActionsName] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 417[WhatToRenderName] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 442await renderer.Dispatcher.InvokeAsync(() => renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 444[EventActionsName] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 461[WhatToRenderName] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 486await renderer.Dispatcher.InvokeAsync(() => renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 488[EventActionsName] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 519[WhatToRenderName] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 2633ChildParameters = new Dictionary<string, object> 2760ChildParameters = new Dictionary<string, object> 3553var task = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3555[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3566[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3586var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3588[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3599[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3619var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3621[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3632[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3653var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3655[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3670[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3750var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3752[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3780[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3808var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3810[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3836[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3863var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3865[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3891[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 3917var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 3919[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 3947[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 4047var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 4049[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 4060[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 4081var renderTask = renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 4083[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 4094[nameof(NestedAsyncComponent.WhatToRender)] = new Dictionary<int, Func<NestedAsyncComponent, RenderFragment>> 4118await renderer.RenderRootComponentAsync(componentId, ParameterView.FromDictionary(new Dictionary<string, object> 4120[nameof(NestedAsyncComponent.EventActions)] = new Dictionary<int, IList<NestedAsyncComponent.ExecutionAction>> 4136[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 (10)
189var parameters = new Dictionary<string, object> 209var parameters = new Dictionary<string, object> 235var parameters = new Dictionary<string, object> 256var parameters = new Dictionary<string, object> 289var parameters = new Dictionary<string, object> 323var parameters = new Dictionary<string, object> 370var parameters = new Dictionary<string, object> 422var parameters = new Dictionary<string, object> 459var parameters = new Dictionary<string, object> 474var 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 (12)
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);
Media\FileDownload.cs (1)
79var copy = new Dictionary<string, object>(AdditionalAttributes.Count);
WebRendererSerializerContext.DictionaryStringJSComponentParameterArray.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>(),
WebRendererSerializerContext.DictionaryStringListString.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>(),
Microsoft.AspNetCore.Components.Web.Tests (32)
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>
Media\FileDownloadTest.cs (4)
33await renderer.RenderRootComponentAsync(id, ParameterView.FromDictionary(new Dictionary<string, object?> 127var attrs = new Dictionary<string, object?> { ["href"] = "https://example.org/real", ["class"] = "btn" }; 128await renderer.RenderRootComponentAsync(id, ParameterView.FromDictionary(new Dictionary<string, object?> 145private static ParameterView Params(string key, string fileName) => ParameterView.FromDictionary(new Dictionary<string, object?>
Media\ImageTest.cs (8)
41await renderer.RenderRootComponentAsync(id, ParameterView.FromDictionary(new Dictionary<string, object?> 58await renderer.RenderRootComponentAsync(id, ParameterView.FromDictionary(new Dictionary<string, object?> 64await renderer.RenderRootComponentAsync(id, ParameterView.FromDictionary(new Dictionary<string, object?> 82await renderer.RenderRootComponentAsync(id, ParameterView.FromDictionary(new Dictionary<string, object?> 100await renderer.RenderRootComponentAsync(id, ParameterView.FromDictionary(new Dictionary<string, object?> 105await renderer.RenderRootComponentAsync(id, ParameterView.FromDictionary(new Dictionary<string, object?> 121await renderer.RenderRootComponentAsync(id, ParameterView.FromDictionary(new Dictionary<string, object?> 127await renderer.RenderRootComponentAsync(id, 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 (6)
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);
PrerenderComponentApplicationStoreSerializerContext.DictionaryStringByteArray.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, byte[]>(),
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 (7)
FileExtensionContentTypeProvider.cs (1)
28: this(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
SourceGenerationContext.DictionaryStringStaticWebAssetNode.g.cs (1)
30ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>(),
SourceGenerationContext.IDictionaryStringStaticWebAssetNode.g.cs (1)
30ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>(),
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.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)
58public IDictionary<string, DataClassification> RouteParameterDataClasses { get; set; } = new Dictionary<string, DataClassification>(StringComparer.OrdinalIgnoreCase); 67public IDictionary<string, DataClassification> RequestHeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>(StringComparer.OrdinalIgnoreCase); 76public IDictionary<string, DataClassification> ResponseHeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>(StringComparer.OrdinalIgnoreCase);
Logging\RequestHeadersLogEnricherOptions.cs (1)
26public 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)
192var 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)
22public IDictionary<string, StringValues> DefaultValues { get; set; } = new Dictionary<string, StringValues>(StringComparer.OrdinalIgnoreCase); 40public 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 (4)
SourceGenerationContext.DictionaryStringStaticWebAssetNode.g.cs (1)
30ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>(),
SourceGenerationContext.IDictionaryStringStaticWebAssetNode.g.cs (1)
30ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>(),
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 (45)
HostingApplicationDiagnosticsTests.cs (3)
47new Dictionary<string, string> 156new Dictionary<string, string> 1189var tags = new Dictionary<string, object>();
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)
296var data = new Dictionary<string, string> 511var settings = new Dictionary<string, string> 537var settings = new Dictionary<string, string> 563var settings = new Dictionary<string, string> 572var overrideSettings = new Dictionary<string, string> 598var vals = new Dictionary<string, string> 627var vals = new Dictionary<string, string> 648var vals = new Dictionary<string, string> 1481var vals = new Dictionary<string, string> 1507var 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)
54var data = new Dictionary<string, string> 73var data = new Dictionary<string, string> 92var data = new Dictionary<string, string> 124var data = new Dictionary<string, string> 198var data = new Dictionary<string, string> 237var data = new Dictionary<string, string> 273var data = new Dictionary<string, string> 815var vals = new Dictionary<string, string> 838var 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 (11)
ProblemDetailsJsonContext.IDictionaryStringObject.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, object>(),
ProblemDetailsJsonContext.IDictionaryStringStringArray.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, string[]>(),
RequestDelegateFactory.cs (1)
2269var 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.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>(), 164var routeValues = new RouteValueDictionary(new Dictionary<string, string>() 179var routeValues = new RouteValueDictionary(new Dictionary<string, string>() 196var 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>(), 136routeValues: new Dictionary<string, object>(), 151routeValues: new Dictionary<string, object>(), 167routeValues: new Dictionary<string, object>(),
CreatedAtRouteResultTests.cs (4)
25new Dictionary<string, string>() { { "hello", "world" } } 29new RouteValueDictionary(new Dictionary<string, string>() { 65routeValues: new Dictionary<string, object>()); 117routeValues: 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)
92new 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)
71private 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)
1739private 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)
75_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>()); 1455var actionParameters = new Dictionary<string, object> { { "input", inputParam }, }; 1480var actionParameters = new Dictionary<string, object> { { "input", inputParam }, }; 1504var actionParameters = new Dictionary<string, object>(); 1528var actionParameters = new Dictionary<string, object>(); 1687arguments = 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)
175var 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)
121var 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)
425_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> 1152items: 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 (3)
CustomJsonSerializerContext.IDictionaryStringString.g.cs (1)
30ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, string>(),
DeferredHostBuilder.cs (1)
13public IDictionary<object, object> Properties { get; } = new Dictionary<object, object>();
WebApplicationFactory.cs (1)
281config.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 (27)
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)
21document.Components.Schemas ??= new Dictionary<string, IOpenApiSchema>();
Schemas\OpenApiJsonSchema.Helpers.cs (6)
69var values = new Dictionary<string, T>(); 326schema.Discriminator.Mapping ??= new Dictionary<string, OpenApiSchemaReference>(); 333schema.Metadata ??= new Dictionary<string, object>(); 338schema.Metadata ??= new Dictionary<string, object>(); 350schema.Metadata ??= new Dictionary<string, object>(); 355schema.Metadata ??= new Dictionary<string, object>();
Services\OpenApiDocumentService.cs (13)
93document.Components.Schemas = new Dictionary<string, IOpenApiSchema>( 271var operations = new Dictionary<HttpMethod, OpenApiOperation>(); 275operation.Metadata ??= new Dictionary<string, object>(); 415Content = new Dictionary<string, OpenApiMediaType>() 573Content = new Dictionary<string, OpenApiMediaType>() 576var schema = new OpenApiSchema { Type = JsonSchemaType.Object, Properties = new Dictionary<string, IOpenApiSchema>() }; 613Properties = new Dictionary<string, IOpenApiSchema> 621schema.Properties ??= new Dictionary<string, IOpenApiSchema>(); 653Properties = new Dictionary<string, IOpenApiSchema> 673schema.Properties ??= new Dictionary<string, IOpenApiSchema>(); 683var propertySchema = new OpenApiSchema { Type = JsonSchemaType.Object, Properties = new Dictionary<string, IOpenApiSchema>() }; 695schema.Properties ??= new Dictionary<string, IOpenApiSchema>(); 747Content = 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.Tests (23)
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (1)
951public IDictionary<string, Parent> SelfReferenceDictionary { get; set; } = new Dictionary<string, Parent>();
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (1)
908builder.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 (5)
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);
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 (11)
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);
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 (21)
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\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)
417builder.AddInMemoryCollection(new Dictionary<string, string> 425builder.AddInMemoryCollection(new Dictionary<string, string> 433builder.AddInMemoryCollection(new Dictionary<string, string> 441builder.AddInMemoryCollection(new Dictionary<string, string> 449builder.AddInMemoryCollection(new Dictionary<string, string> 457builder.AddInMemoryCollection(new Dictionary<string, string> 1084builder.AddInMemoryCollection(new Dictionary<string, string> 1125config.AddInMemoryCollection(new Dictionary<string, string>() 1134config.AddInMemoryCollection(new Dictionary<string, string>() 1147config.AddInMemoryCollection(new Dictionary<string, string>() 1184config.AddInMemoryCollection(new Dictionary<string, string>() 1194config.AddInMemoryCollection(new Dictionary<string, string>() 1203builder.Configuration.AddInMemoryCollection(new Dictionary<string, string>() 1229config.AddInMemoryCollection(new Dictionary<string, string>() 1247builder.Configuration.AddInMemoryCollection(new Dictionary<string, string>() 1524builder.Configuration.AddInMemoryCollection(new Dictionary<string, string> 2309builder.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)
131return new Dictionary<string, StringValues>(0, StringComparer.OrdinalIgnoreCase);
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 (290)
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);
BackEnd\BuildManager\BuildManager.cs (7)
300_buildSubmissions = new Dictionary<int, BuildSubmissionBase>(); 304_nodeIdToKnownConfigurations = new Dictionary<int, HashSet<int>>(); 305_unnamedProjectInstanceToNames = new Dictionary<ProjectInstance, string>(); 310_projectStartedEvents = new Dictionary<int, BuildEventArgs>(); 2054new ReadOnlyDictionary<ProjectGraphNode, BuildResult>(resultsPerNode ?? new Dictionary<ProjectGraphNode, BuildResult>()))); 2084var buildingNodes = new Dictionary<BuildSubmissionBase, ProjectGraphNode>(); 2085var resultsPerNode = new Dictionary<ProjectGraphNode, BuildResult>(projectGraph.ProjectNodes.Count);
BackEnd\BuildManager\CacheAggregator.cs (1)
69var configIdMapping = new Dictionary<int, int>();
BackEnd\BuildManager\LegacyThreadingData.cs (1)
28private readonly IDictionary<int, Tuple<AutoResetEvent, ManualResetEvent>> _legacyThreadingEventsById = new Dictionary<int, Tuple<AutoResetEvent, ManualResetEvent>>();
BackEnd\BuildManager\RequestedProjectState.cs (1)
135return new Dictionary<string, List<string>>(capacity, StringComparer.OrdinalIgnoreCase);
BackEnd\Client\MSBuildClient.cs (2)
123_serverEnvironmentVariables = new(); 503Dictionary<string, string> envVars = new();
BackEnd\Components\BuildComponentFactoryCollection.cs (1)
39_componentEntriesByType = new Dictionary<BuildComponentType, BuildComponentEntry>();
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (3)
147_requestsByGlobalRequestId = new Dictionary<int, BuildRequestEntry>(); 624_unresolvedConfigurationsById = new Dictionary<int, BuildRequestConfiguration>(); 625_unresolvedConfigurationsByMetadata = new Dictionary<ConfigurationMetadata, BuildRequestConfiguration>();
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (4)
369_outstandingResults ??= new Dictionary<int, BuildResult>(); 431_outstandingResults = new Dictionary<int, BuildResult>(_outstandingRequests.Count); 508_outstandingRequests ??= new Dictionary<int, BuildRequest>(); 516_unresolvedConfigurations ??= new Dictionary<int, List<BuildRequest>>();
BackEnd\Components\Communications\NodeManager.cs (1)
78_nodeIdToProvider = new Dictionary<int, INodeProvider>();
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (2)
210_nodeIdToPacketFactory = new Dictionary<int, INodePacketFactory>(); 211_nodeIdToPacketHandler = new Dictionary<int, INodePacketHandler>();
BackEnd\Components\Logging\LoggingService.cs (1)
309_eventSinkDictionary = new Dictionary<int, IBuildEventSink>();
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (2)
812Properties = properties == null ? new Dictionary<string, string>() : new Dictionary<string, string>(properties)
BackEnd\Components\Logging\ProjectTelemetry.cs (4)
42private readonly Dictionary<string, int> _msbuildTaskSubclassUsage = new(); 182Dictionary<string, string> properties = new(); 219Dictionary<string, string> properties = new(); 243Dictionary<string, string> properties = new();
BackEnd\Components\ProjectCache\ProjectCacheDescriptor.cs (1)
17PluginSettings = pluginSettings ?? new Dictionary<string, string>(0);
BackEnd\Components\ProjectCache\ProjectCacheService.cs (4)
185var pluginSettings = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 391Dictionary<string, string> globalProperties = new(configuration.GlobalProperties.Count, StringComparer.OrdinalIgnoreCase); 722var globalProperties = new Dictionary<string, string>(configuration.GlobalProperties.Count, StringComparer.OrdinalIgnoreCase); 789var globalProperties = new Dictionary<string, string>(templateGlobalProperties, StringComparer.OrdinalIgnoreCase)
BackEnd\Components\RequestBuilder\BatchingEngine.cs (2)
219var itemListsToBeBatched = new Dictionary<string, ICollection<ProjectItemInstance>>(MSBuildNameIgnoreCaseComparer.Default); 406var itemMetadataValues = new Dictionary<string, string>(consumedMetadataReferences.Count, MSBuildNameIgnoreCaseComparer.Default);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (1)
702_addTable = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default);
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
618var combinedTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BackEnd\Components\RequestBuilder\Lookup.cs (6)
510allModifies ??= new Dictionary<ProjectItemInstance, MetadataModifications>(modifies.Count); 853PrimaryModifyTable ??= new ItemTypeToItemsMetadataUpdateDictionary(MSBuildNameIgnoreCaseComparer.Default); 857modifiesOfType = new Dictionary<ProjectItemInstance, MetadataModifications>(); 890_cloneTable ??= new Dictionary<ProjectItemInstance, ProjectItemInstance>(); 1126_modifications = new Dictionary<string, MetadataModification>(MSBuildNameIgnoreCaseComparer.Default); 1136_modifications = new Dictionary<string, MetadataModification>(other._modifications, MSBuildNameIgnoreCaseComparer.Default);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
1019results = new Dictionary<int, BuildResult>();
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (6)
416itemVectorTransformsInTargetInputs = new ItemVectorPartitionCollection(MSBuildNameIgnoreCaseComparer.Default); 802itemVectors = new ItemVectorPartitionCollection(MSBuildNameIgnoreCaseComparer.Default); 803discreteItems = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 845itemVectorPartition = new ItemVectorPartition(MSBuildNameIgnoreCaseComparer.Default); 1264(s_sortInputsOutputs ? (IDictionary<string, object>)new SortedDictionary<string, object>(StringComparer.OrdinalIgnoreCase) : (IDictionary<string, object>)new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase)); 1270(s_sortInputsOutputs ? (IDictionary<string, object>)new SortedDictionary<string, object>(StringComparer.OrdinalIgnoreCase) : (IDictionary<string, object>)new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase));
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
324lookupHash ??= new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 543taskIdentityParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
988targetOutputsPerProject.Add(new Dictionary<string, ITaskItem[]>(StringComparer.OrdinalIgnoreCase)); 1166new Dictionary<string, ITaskItem[]>(StringComparer.OrdinalIgnoreCase) 1228targetOutputsPerProject?.Add(new Dictionary<string, ITaskItem[]>(StringComparer.OrdinalIgnoreCase));
BackEnd\Components\Scheduler\SchedulableRequest.cs (2)
137_requestsWeAreBlockedBy = new Dictionary<BlockingRequestKey, SchedulableRequest>(); 140_timeRecords = new Dictionary<SchedulableRequestState, ScheduleTimeRecord>(5);
BackEnd\Components\Scheduler\Scheduler.cs (3)
586_availableNodes = new Dictionary<int, NodeInfo>(8); 1344Dictionary<int, int> configurationCountsByNode = new Dictionary<int, int>(_availableNodes.Count); 2414Dictionary<int, int> availableNodeIdsToIndex = new Dictionary<int, int>(_availableNodes.Count);
BackEnd\Components\Scheduler\SchedulingData.cs (12)
24private readonly Dictionary<int, SchedulableRequest> _executingRequests = new Dictionary<int, SchedulableRequest>(32); 29private readonly Dictionary<int, SchedulableRequest> _blockedRequests = new Dictionary<int, SchedulableRequest>(32); 34private readonly Dictionary<int, SchedulableRequest> _yieldingRequests = new Dictionary<int, SchedulableRequest>(32); 39private readonly Dictionary<int, SchedulableRequest> _readyRequests = new Dictionary<int, SchedulableRequest>(32); 50private readonly Dictionary<SchedulableRequest, LinkedListNode<SchedulableRequest>> _unscheduledRequestNodesByRequest = new Dictionary<SchedulableRequest, LinkedListNode<SchedulableRequest>>(32); 59private readonly Dictionary<int, HashSet<SchedulableRequest>> _scheduledRequestsByNode = new Dictionary<int, HashSet<SchedulableRequest>>(32); 64private readonly Dictionary<int, SchedulableRequest> _executingRequestByNode = new Dictionary<int, SchedulableRequest>(32); 69private readonly Dictionary<int, HashSet<SchedulableRequest>> _readyRequestsByNode = new Dictionary<int, HashSet<SchedulableRequest>>(32); 74private readonly Dictionary<int, HashSet<int>> _configurationsByNode = new Dictionary<int, HashSet<int>>(32); 82private readonly Dictionary<int, int> _configurationToNode = new Dictionary<int, int>(32); 87private readonly Dictionary<int, HashSet<SchedulableRequest>> _configurationToRequests = new Dictionary<int, HashSet<SchedulableRequest>>(32); 105private readonly Dictionary<SchedulableRequest, List<SchedulableRequest>> _buildHierarchy = new Dictionary<SchedulableRequest, List<SchedulableRequest>>(32);
BackEnd\Components\Scheduler\SchedulingPlan.cs (4)
37private Dictionary<string, PlanConfigData> _configPathToData = new Dictionary<string, PlanConfigData>(); 42private Dictionary<int, PlanConfigData> _configIdToData = new Dictionary<int, PlanConfigData>(); 47private Dictionary<int, List<Stack<PlanConfigData>>> _configIdToPaths = new Dictionary<int, List<Stack<PlanConfigData>>>(); 110Dictionary<int, double> accumulatedTimeByConfiguration = new Dictionary<int, double>();
BackEnd\Components\SdkResolution\SdkResolverService.cs (2)
431_manifestToResolvers = new Dictionary<SdkResolverManifest, IReadOnlyList<SdkResolver>>(); 489_manifestToResolvers = new Dictionary<SdkResolverManifest, IReadOnlyList<SdkResolver>>();
BackEnd\Components\SdkResolution\SdkResult.cs (2)
90translator.TranslateDictionary(ref _propertiesToAdd, count => new Dictionary<string, string>(count, StringComparer.OrdinalIgnoreCase)); 94dictionaryCreator: count => new Dictionary<string, SdkResultItem>(count, StringComparer.OrdinalIgnoreCase));
BackEnd\Shared\BuildAbortedException.cs (1)
79return new Dictionary<string, string>()
BackEnd\Shared\BuildRequestConfiguration.cs (2)
464Dictionary<string, string> globalProperties = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 615new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase));
BackEnd\Shared\BuildResult.cs (1)
660Dictionary<string, string> additionalEntries = new();
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
158private readonly Dictionary<string, TaskFactoryWrapper> _intrinsicTasks = new Dictionary<string, TaskFactoryWrapper>(StringComparer.OrdinalIgnoreCase); 391var setParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1781Dictionary<string, string> taskHostParameters = new Dictionary<string, string>
BuildCheck\Checks\DoubleWritesCheck.cs (1)
47private readonly Dictionary<string, (string projectFilePath, string taskName)> _filesWritten = new(StringComparer.CurrentCultureIgnoreCase);
BuildCheck\Checks\PreferProjectReferenceCheck.cs (2)
37private readonly Dictionary<string, (string, string)> _projectsPerReferencePath = new(MSBuildNameIgnoreCaseComparer.Default); 38private readonly Dictionary<string, string> _projectsPerOutputPath = new(MSBuildNameIgnoreCaseComparer.Default);
BuildCheck\Checks\PropertiesUsageCheck.cs (5)
121private Dictionary<string, IMSBuildElementLocation?> _writenProperties = new(MSBuildNameIgnoreCaseComparer.Default); 126private Dictionary<string, IMSBuildElementLocation> _uninitializedReadsInScope = new(MSBuildNameIgnoreCaseComparer.Default); 127private Dictionary<string, IMSBuildElementLocation> _uninitializedReadsOutOfScope = new(MSBuildNameIgnoreCaseComparer.Default); 239_writenProperties = new Dictionary<string, IMSBuildElementLocation?>(MSBuildNameIgnoreCaseComparer.Default); 240_uninitializedReadsInScope = new Dictionary<string, IMSBuildElementLocation>(MSBuildNameIgnoreCaseComparer.Default);
BuildCheck\Checks\SharedOutputPathCheck.cs (1)
36private readonly Dictionary<string, string> _projectsPerOutputPath = new(MSBuildNameIgnoreCaseComparer.Default);
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (2)
29_eventHandlersFull = new() 47_eventHandlersRestore = new()
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
546private readonly Dictionary<int, HashSet<string>> _deferredProjectEvalIdToImportedProjects = new(); 660private readonly Dictionary<int, List<BuildEventArgs>> _deferredEvalDiagnostics = new();
BuildCheck\Infrastructure\BuildEventsProcessor.cs (2)
53Dictionary<string, string> propertiesLookup = new Dictionary<string, string>(); 152Dictionary<string, TaskInvocationCheckData.TaskParameter> taskParameters = new();
BuildCheck\Infrastructure\ConfigurationProvider.cs (1)
164var filteredConfig = new Dictionary<string, string>();
BuildCheck\Infrastructure\EditorConfig\EditorConfigParser.cs (1)
81var resultingDictionary = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
BuildCheck\Infrastructure\TracingReporter.cs (1)
32=> new Dictionary<string, TimeSpan>()
Collections\ItemDictionary.cs (6)
56_itemLists = new Dictionary<string, LinkedList<T>>(MSBuildNameIgnoreCaseComparer.Default); 57_nodes = new Dictionary<T, LinkedListNode<T>>(); 67_itemLists = new Dictionary<string, LinkedList<T>>(initialItemTypesCapacity, MSBuildNameIgnoreCaseComparer.Default); 68_nodes = new Dictionary<T, LinkedListNode<T>>(initialItemsCapacity); 77_itemLists = new Dictionary<string, LinkedList<T>>(MSBuildNameIgnoreCaseComparer.Default); 78_nodes = new Dictionary<T, LinkedListNode<T>>();
Collections\ItemDictionarySlim.cs (1)
19_itemLists = new Dictionary<string, List<ProjectItemInstance>>(MSBuildNameIgnoreCaseComparer.Default);
Collections\LookasideStringInterner.cs (1)
49_stringToIdsMap = new Dictionary<string, int>(defaultCollectionSize, comparer);
Collections\MultiDictionary.cs (2)
68_backing = new Dictionary<K, SmallList<V>>(keyComparer); 158_backing = new Dictionary<K, SmallList<V>>();
Collections\PropertyDictionary.cs (1)
569var dictionary = new Dictionary<string, string>(((ICollection<T>)_properties).Count, MSBuildNameIgnoreCaseComparer.Default);
Collections\WeakValueDictionary.cs (1)
47_dictionary = new Dictionary<K, WeakReference<V>>(_capacity, keyComparer);
CommunicationsUtilities.cs (2)
482Dictionary<string, string> table = new(200, StringComparer.OrdinalIgnoreCase); // Razzle has 150 environment variables 625Dictionary<string, string> table = new(vars.Count, StringComparer.OrdinalIgnoreCase);
Construction\ProjectTaskElement.cs (1)
149var parametersClone = new Dictionary<string, string>(_parameters.Count, StringComparer.OrdinalIgnoreCase);
Construction\Solution\ProjectInSolution.cs (1)
146_projectConfigurations = new Dictionary<string, ProjectConfigurationInSolution>(StringComparer.OrdinalIgnoreCase);
Construction\Solution\SolutionFile.cs (8)
355_projectsByGuid = new Dictionary<string, ProjectInSolution>(StringComparer.OrdinalIgnoreCase); 356_solutionFoldersByGuid = new Dictionary<string, ProjectInSolution>(StringComparer.OrdinalIgnoreCase); 361_solutionConfigurationsByFullName = new Dictionary<string, SolutionConfigurationInSolution>(); 766_projectsByGuid = new Dictionary<string, ProjectInSolution>(StringComparer.OrdinalIgnoreCase); 767_solutionFoldersByGuid = new Dictionary<string, ProjectInSolution>(StringComparer.OrdinalIgnoreCase); 772_solutionConfigurationsByFullName = new Dictionary<string, SolutionConfigurationInSolution>(); 827var projectsByUniqueName = new Dictionary<string, ProjectInSolution>(StringComparer.OrdinalIgnoreCase); 1710var rawProjectConfigurationsEntries = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Construction\Solution\SolutionProjectGenerator.cs (3)
182_globalProperties = globalProperties ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 249new Dictionary<string, string> 2076var properties = new Dictionary<string, string>(_metaprojectGlobalProperties.Length, StringComparer.OrdinalIgnoreCase);
CoreCLRAssemblyLoader.cs (2)
22private readonly Dictionary<string, Assembly> _pathsToAssemblies = new Dictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase); 23private readonly Dictionary<string, Assembly> _namesToAssemblies = new Dictionary<string, Assembly>();
Definition\Project.cs (3)
2158var dictionary = new Dictionary<string, string>(_data.GlobalPropertiesDictionary.Count, MSBuildNameIgnoreCaseComparer.Default); 2596var removeElementCache = new Dictionary<string, CumulativeRemoveElementData>(projectItemElements.Count); 4292ConditionedProperties = new Dictionary<string, List<string>>(MSBuildNameIgnoreCaseComparer.Default);
Definition\ProjectCollection.cs (4)
601dictionary = new Dictionary<string, string>(_globalProperties.Count, MSBuildNameIgnoreCaseComparer.Default); 1860_toolsets = new Dictionary<string, Toolset>(StringComparer.OrdinalIgnoreCase); 1911private Dictionary<string, List<Project>> _loadedProjects = new Dictionary<string, List<Project>>(StringComparer.OrdinalIgnoreCase); 2071_loadedProjects = new Dictionary<string, List<Project>>(StringComparer.OrdinalIgnoreCase);
Definition\Toolset.cs (1)
268_subToolsets = subToolsetsAsDictionary ?? new Dictionary<string, SubToolset>(subToolsets);
Definition\ToolsetConfigurationReader.cs (3)
74_projectImportSearchPathsCache = new Dictionary<string, Dictionary<string, ProjectImportPathMatch>>(StringComparer.OrdinalIgnoreCase); 217kindToPathsCache = new Dictionary<string, ProjectImportPathMatch>(); 235var pathsTable = new Dictionary<string, ProjectImportPathMatch>();
Definition\ToolsetLocalReader.cs (1)
53return new Dictionary<string, ProjectImportPathMatch>();
Definition\ToolsetReader.cs (1)
453Dictionary<string, SubToolset> subToolsets = new Dictionary<string, SubToolset>(StringComparer.OrdinalIgnoreCase);
Errors\InternalLoggerException.cs (1)
147return new Dictionary<string, string>()
Errors\InvalidProjectFileException.cs (1)
134return new Dictionary<string, string>()
Errors\InvalidToolsetDefinitionException.cs (1)
115return new Dictionary<string, string>()
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
Evaluation\Evaluator.cs (6)
254_importsSeen = new Dictionary<string, ProjectImportElement>(StringComparer.OrdinalIgnoreCase); 256_projectSupportsReturnsAttribute = new Dictionary<ProjectRootElement, bool>(); 767Dictionary<string, List<TargetSpecification>> targetsWhichRunBeforeByTarget = new Dictionary<string, List<TargetSpecification>>(StringComparer.OrdinalIgnoreCase); 768Dictionary<string, List<TargetSpecification>> targetsWhichRunAfterByTarget = new Dictionary<string, List<TargetSpecification>>(StringComparer.OrdinalIgnoreCase); 770Dictionary<string, LinkedListNode<ProjectTargetElement>> activeTargets = new Dictionary<string, LinkedListNode<ProjectTargetElement>>(StringComparer.OrdinalIgnoreCase); 1992escapedMetadata = new Dictionary<string, string>(item.Value.Metadata.Count, StringComparer.OrdinalIgnoreCase);
Evaluation\EvaluatorMetadataTable.cs (1)
92_metadata = new Dictionary<string, string>(_capacity, MSBuildNameIgnoreCaseComparer.Default);
Evaluation\Expander.cs (3)
1863private static readonly FrozenDictionary<string, ItemTransformFunctions> s_intrinsicItemFunctions = new Dictionary<string, ItemTransformFunctions>(StringComparer.OrdinalIgnoreCase) 2452private static readonly FrozenDictionary<string, string> s_itemSpecModifiers = new Dictionary<string, string>() 2728Dictionary<string, string> directoryNameTable = new Dictionary<string, string>(itemsOfType.Count, StringComparer.OrdinalIgnoreCase);
Evaluation\ExpressionShredder.cs (1)
468pair.Metadata ??= new Dictionary<string, MetadataReference>(MSBuildNameIgnoreCaseComparer.Default);
Evaluation\IntrinsicFunctions.cs (1)
505Dictionary<string, string> parameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Evaluation\ItemSpec.cs (2)
583_children = new Dictionary<string, MetadataTrie<P, I>>(comparer); 596_children = new Dictionary<string, MetadataTrie<P, I>>(comparer);
Evaluation\LazyItemEvaluator.cs (4)
43new Dictionary<string, LazyItemList>() : 44new Dictionary<string, LazyItemList>(StringComparer.OrdinalIgnoreCase); 239_cache = new Dictionary<ISet<string>, OrderedItemDataCollection>(); 364Dictionary<string, UpdateOperation> itemsWithNoWildcards = new Dictionary<string, UpdateOperation>(StringComparer.OrdinalIgnoreCase);
Evaluation\LazyItemEvaluator.OrderedItemDataCollection.cs (1)
106_dictionaryBuilder = new Dictionary<string, ItemDataCollectionValue<I>>(StringComparer.OrdinalIgnoreCase);
Evaluation\LazyItemEvaluator.UpdateOperation.cs (1)
134capturedItemsFromReferencedItemTypes ??= new Dictionary<string, I>(StringComparer.OrdinalIgnoreCase);
Evaluation\Preprocessor.cs (2)
56private readonly Dictionary<XmlDocument, List<ResolvedImport>> _implicitImportsByProject = new Dictionary<XmlDocument, List<ResolvedImport>>(); 67_importTable = new Dictionary<XmlElement, IList<ProjectRootElement>>(imports.Count);
Evaluation\Profiler\EvaluationProfiler.cs (1)
23private readonly Dictionary<EvaluationLocation, ProfiledLocation> _timeSpent = new Dictionary<EvaluationLocation, ProfiledLocation>();
Evaluation\PropertiesUseTracker.cs (1)
94_properties = new(StringComparer.OrdinalIgnoreCase);
Evaluation\ToolsetProvider.cs (2)
39_toolsets = new Dictionary<string, Toolset>(StringComparer.OrdinalIgnoreCase); 104_toolsets = new Dictionary<string, Toolset>(StringComparer.OrdinalIgnoreCase);
FileMatcher.cs (1)
2494searchesToExcludeInSubdirs = new Dictionary<string, List<RecursionState>>(StringComparer.OrdinalIgnoreCase);
Graph\GraphBuilder.cs (5)
136Dictionary<ProjectGraphNode, HashSet<ProjectGraphNode>> transitiveReferenceCache = new(allParsedProjects.Count); 202var projectsByPath = new Dictionary<string, List<ProjectGraphNode>>(); 308Dictionary<string, ImmutableDictionary<string, string>> globalPropertiesForProjectConfiguration = new(StringComparer.OrdinalIgnoreCase); 312Dictionary<string, IReadOnlyCollection<string>> solutionDependencies = new(); 444var nodeStates = new Dictionary<ProjectGraphNode, NodeVisitationState>();
Graph\ParallelWorkSet.cs (1)
49var completedWork = new Dictionary<TKey, TResult>(_inProgressOrCompletedWork.Count);
IEnumerableExtensions.cs (1)
805var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
ImmutableArrayExtensions.cs (1)
1222var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
Instance\HostServices.cs (5)
143_hostObjectMap ??= new Dictionary<string, HostObjects>(StringComparer.OrdinalIgnoreCase); 172_hostObjectMap ??= new Dictionary<string, HostObjects>(StringComparer.OrdinalIgnoreCase); 222_projectAffinities = new Dictionary<string, NodeAffinity>(StringComparer.OrdinalIgnoreCase); 313var hostObjectMap = new Dictionary<string, HostObjects>(); 419_hostObjects = new Dictionary<TargetTaskKey, MonikerNameOrITaskHost>(1);
Instance\ProjectInstance.cs (8)
592thisAsIEvaluatorData.AfterTargets = new Dictionary<string, List<TargetSpecification>>(); 593thisAsIEvaluatorData.BeforeTargets = new Dictionary<string, List<TargetSpecification>>(); 2546translator.TranslateDictionary(ref _beforeTargets, TranslatorForTargetSpecificDictionaryKey, TranslatorForTargetSpecificDictionaryValue, count => new Dictionary<string, List<TargetSpecification>>(count)); 2547translator.TranslateDictionary(ref _afterTargets, TranslatorForTargetSpecificDictionaryKey, TranslatorForTargetSpecificDictionaryValue, count => new Dictionary<string, List<TargetSpecification>>(count)); 2631Dictionary<string, string> globalProperties = new Dictionary<string, string>(globalPropertiesInstances.Count, StringComparer.OrdinalIgnoreCase); 3110clone = new Dictionary<string, TValue>(0); 3114clone = new Dictionary<string, TValue>(dictionary, strComparer); 3406var projectItemToInstanceMap = keepEvaluationCache ? new Dictionary<ProjectItem, ProjectItemInstance>(items.Count) : null;
Instance\ProjectItemInstance.cs (2)
1609Dictionary<string, string> clonedMetadata = new Dictionary<string, string>(metadata.Count, MSBuildNameIgnoreCaseComparer.Default); 1626Dictionary<string, string> clonedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default);
Instance\ProjectTaskInstance.cs (1)
238Dictionary<string, string> filteredParameters = new Dictionary<string, string>(_parameters.Count, StringComparer.OrdinalIgnoreCase);
Instance\TaskFactories\AssemblyTaskFactory.cs (5)
281_factoryIdentityParameters = new Dictionary<string, string>(taskFactoryIdentityParameters, StringComparer.OrdinalIgnoreCase); 389mergedParameters ??= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 611mergedParameters = new Dictionary<string, string>(taskIdentityParameters, StringComparer.OrdinalIgnoreCase); 615mergedParameters = new Dictionary<string, string>(factoryIdentityParameters, StringComparer.OrdinalIgnoreCase); 630mergedParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Instance\TaskFactories\TaskHostTask.cs (2)
188_setParameters = new Dictionary<string, object>(); 321new Dictionary<string, string>(_buildComponentHost.BuildParameters.GlobalProperties),
Instance\TaskFactoryWrapper.cs (4)
294propertyInfoCache = new Dictionary<string, TaskPropertyInfo>(StringComparer.OrdinalIgnoreCase); 308namesOfPropertiesWithAmbiguousMatches = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 318namesOfPropertiesWithRequiredAttribute = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 329namesOfPropertiesWithOutputAttribute = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Instance\TaskRegistry.cs (11)
155private readonly Dictionary<string, List<RegisteredTaskRecord>> _overriddenTasks = new Dictionary<string, List<RegisteredTaskRecord>>(); 450? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 451: new Dictionary<string, string>(initialCount.Value, StringComparer.OrdinalIgnoreCase); 758? new Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>>(capacity.Value, RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact) 759: new Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>>(RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact); 813return new Dictionary<string, string>(initialState, StringComparer.OrdinalIgnoreCase); 818return new Dictionary<string, string>(initialCount.Value, StringComparer.OrdinalIgnoreCase); 821return new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1375_taskNamesCreatableByFactory ??= new Dictionary<RegisteredTaskIdentity, object>( 1808_usingTaskParameters ??= new Dictionary<string, TaskPropertyInfo>(StringComparer.OrdinalIgnoreCase); 1900translator.TranslateDictionary(ref _usingTaskParameters, TranslatorForTaskParametersKey, TranslatorForTaskParameterValue, count => new Dictionary<string, TaskPropertyInfo>(StringComparer.OrdinalIgnoreCase));
Logging\BaseConsoleLogger.cs (1)
679table = new Dictionary<string, PerformanceCounter>(StringComparer.OrdinalIgnoreCase);
Logging\BinaryLogger\BuildEventArgsReader.cs (4)
640globalProperties = ReadStringDictionary() ?? new Dictionary<string, string>(); 718var d = new Dictionary<EvaluationLocation, ProfiledLocation>(count); 1260var rawTracingData = ReadStringDictionary() ?? new Dictionary<string, string>(); 1514var result = new Dictionary<string, string>(count);
Logging\BinaryLogger\BuildEventArgsWriter.cs (2)
75private readonly Dictionary<HashKey, int> stringHashes = new Dictionary<HashKey, int>(); 80private readonly Dictionary<HashKey, int> nameValueListHashes = new Dictionary<HashKey, int>();
Logging\BinaryLogger\ExtendedDataFields.cs (1)
29new Dictionary<string, string?>(ExtendedMetadata);
Logging\ParallelLogger\ParallelConsoleLogger.cs (8)
30internal Dictionary<(int nodeId, int contextId), string> propertyOutputMap = new Dictionary<(int nodeId, int contextId), string>(); 68_deferredMessages = new Dictionary<BuildEventContext, List<BuildMessageEventArgs>>(s_compareContextNodeId); 207propertyOutputMap = new Dictionary<(int, int), string>(); 209_deferredMessages = new Dictionary<BuildEventContext, List<BuildMessageEventArgs>>(s_compareContextNodeId); 424var groupByProjectEntryPoint = new Dictionary<ErrorWarningSummaryDictionaryKey, List<BuildEventArgs>>(); 1652table = new Dictionary<string, PerformanceCounter>(StringComparer.OrdinalIgnoreCase); 1706? new Dictionary<BuildEventContext, object>() 1707: new Dictionary<BuildEventContext, object>(comparer);
Logging\ParallelLogger\ParallelLoggerHelpers.cs (4)
22private Dictionary<string, int> _projectTargetKey = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); 23private Dictionary<string, int> _projectKey = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); 32_projectStartedEvents = new Dictionary<BuildEventContext, ProjectStartedEventMinimumFields>(s_compareContextNodeId); 33_targetStartedEvents = new Dictionary<BuildEventContext, TargetStartedEventMinimumFields>(s_compareContextNodeIdTargetId);
Logging\ProfilerLogger.cs (4)
128new Dictionary<EvaluationLocation, ProfiledLocation>(EvaluationLocationIdAgnosticComparer.Singleton); 132var mergeMap = new Dictionary<long, long>(); 135var originalLocations = new Dictionary<EvaluationLocation, EvaluationLocation>(EvaluationLocationIdAgnosticComparer.Singleton); 218var result = new Dictionary<EvaluationLocation, ProfiledLocation>();
Logging\TerminalLogger\TerminalLogger.cs (2)
104private readonly Dictionary<ProjectContext, TerminalProjectInfo> _projects = new(); 106private readonly Dictionary<EvalContext, EvalProjectInfo> _evals = new();
LogMessagePacketBase.cs (1)
279private static readonly Dictionary<LoggingEventType, MethodInfo> s_writeMethodCache = new Dictionary<LoggingEventType, MethodInfo>();
NodePacketFactory.cs (1)
26_packetFactories = new Dictionary<NodePacketType, PacketFactoryRecord>();
PlatformNegotiation.cs (1)
106Dictionary<string, string> table = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
PropertyParser.cs (2)
33propertiesTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 89finalPropertiesTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ReadOnlyEmptyDictionary.cs (2)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>(); 171return new Dictionary<K, V>()[key];
SolutionConfiguration.cs (5)
51_cachedProjectElements = new Dictionary<string, XmlElement>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase); 52_cachedProjectElementsByAbsolutePath = new Dictionary<string, XmlElement>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase); 53_cachedProjectAbsolutePathsByGuid = new Dictionary<string, string>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase); 54_cachedProjectGuidsByAbsolutePath = new Dictionary<string, string>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase); 55_cachedDependencyProjectGuidsByDependingProjectGuid = new Dictionary<string, List<string>>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase);
TaskHostConfiguration.cs (3)
177_buildProcessEnvironment = new Dictionary<string, string>(buildProcessEnvironment); 199_taskParameters = new Dictionary<string, TaskParameter>(StringComparer.OrdinalIgnoreCase); 207_globalParameters = globalParameters ?? new Dictionary<string, string>();
TaskHostTaskComplete.cs (3)
120_taskOutputParameters = new Dictionary<string, TaskParameter>(StringComparer.OrdinalIgnoreCase); 133_buildProcessEnvironment = new Dictionary<string, string>(buildProcessEnvironment); 198_taskOutputParameters = new Dictionary<string, TaskParameter>(StringComparer.OrdinalIgnoreCase);
TaskParameter.cs (5)
584_customEscapedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 601_customEscapedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 713_customEscapedMetadata ??= new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 802IDictionary<string, string> clonedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 864IDictionary clonedDictionary = new Dictionary<string, string>(_customEscapedMetadata);
ToolsetElement.cs (3)
171private Dictionary<string, string> _previouslySeenOS = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 346private Dictionary<string, string> _previouslySeenPropertyNames = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 525private Dictionary<string, string> _previouslySeenToolsVersions = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Tracing.cs (1)
58s_counts = new Dictionary<string, int>();
TranslatorHelpers.cs (5)
106capacity => new Dictionary<string, string>(capacity, comparer)); 123capacity => new Dictionary<string, T>(capacity, stringComparer)); 139capacity => new Dictionary<string, string>(capacity, comparer)); 156capacity => new Dictionary<string, T>(capacity, stringComparer)); 188translator.TranslateDictionary(ref localDict, capacity => new Dictionary<string, string>(capacity, comparer));
TypeLoader.cs (2)
197Dictionary<string, string> assembliesDictionary = new(localAssemblies.Length + runtimeAssemblies.Length); 323_publicTypeNameToType = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.BuildCheck.UnitTests (28)
CheckConfiguration_Test.cs (5)
27var buildConfig = CheckConfiguration.Create(new Dictionary<string, string>()); 47var config = new Dictionary<string, string>() 67var config = new Dictionary<string, string>() 87var config = new Dictionary<string, string>() 106var config = new Dictionary<string, string>()
ConfigurationProvider_Tests.cs (1)
36configs.ShouldBe(new Dictionary<string, string>());
CustomConfigurationData_Tests.cs (9)
53var config1 = new Dictionary<string, string>() 58var config2 = new Dictionary<string, string>() 72var config = new Dictionary<string, string>() 85var config1 = new Dictionary<string, string>() 90var config2 = new Dictionary<string, string>() 104var config1 = new Dictionary<string, string>() 109var config2 = new Dictionary<string, string>() 123var config1 = new Dictionary<string, string>() 129var config2 = new Dictionary<string, string>()
DoubleWritesAnalyzer_Tests.cs (3)
41_registrationContext.TriggerTaskInvocationAction(MakeTaskInvocationData("Copy", new Dictionary<string, TaskInvocationCheckData.TaskParameter> 46_registrationContext.TriggerTaskInvocationAction(MakeTaskInvocationData("Copy", new Dictionary<string, TaskInvocationCheckData.TaskParameter> 64_registrationContext.TriggerTaskInvocationAction(MakeTaskInvocationData(taskName, new Dictionary<string, TaskInvocationCheckData.TaskParameter>
ExecCliBuildCheck_Tests.cs (2)
71_registrationContext.TriggerTaskInvocationAction(MakeTaskInvocationData("Exec", new Dictionary<string, TaskInvocationCheckData.TaskParameter> 84_registrationContext.TriggerTaskInvocationAction(MakeTaskInvocationData("Exec", new Dictionary<string, TaskInvocationCheckData.TaskParameter>
SharedOutputPathCheck_Tests.cs (7)
33evaluatedProperties ?? new Dictionary<string, string>(), 34new Dictionary<string, string>()); 44new Dictionary<string, string> { 54new Dictionary<string, string> { 73new Dictionary<string, string> { 81new Dictionary<string, string> { 112var evaluatedProperties = new Dictionary<string, string> {
TaskInvocationAnalysisDataTests.cs (1)
89var request = new BuildRequestData(testProject.ProjectFile, new Dictionary<string, string?>(), MSBuildConstants.CurrentToolsVersion, [], null, BuildRequestDataFlags.None);
Microsoft.Build.CommandLine.UnitTests (5)
CommandLineSwitches_Tests.cs (2)
1185new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), 1186new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase),
XMake_Tests.cs (3)
1609IDictionary<string, string> environmentVars = new Dictionary<string, string> 2386IDictionary<string, string> preExistingProps = new Dictionary<string, string> 2433IDictionary<string, string> preExistingProps = new Dictionary<string, string>
Microsoft.Build.Engine.OM.UnitTests (98)
Definition\DefinitionEditing_Tests.cs (2)
615Dictionary<string, string> metadata = new Dictionary<string, string>() { { "m", "m1" } }; 2532Dictionary<string, string> metadata = new Dictionary<string, string>() { { "m", "m1" } };
Definition\Project_Tests.cs (17)
812var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 829var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 960Dictionary<string, string> initial = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 988Dictionary<string, string> initial = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1071new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), 1287IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1316IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1319IDictionary<string, string> projectCollectionGlobalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1609var project = new Project(projectRootElement, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection); 2420Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 2434Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 2458Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 2528Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3254var project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection); 3284var project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection); 3575var project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection); 3770var project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
Definition\ProjectCollection_Tests.cs (5)
395var globals = new Dictionary<string, string> { { "Configuration", "Debug" } }; 411var globalProperties1 = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { { "p", "v1" } }; 418var globalProperties2 = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { { "p", "v2" } }; 456new Dictionary<string, string> { { "Configuration", "Release" }, { "Platform", "Win32" } }; 572var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { { "p", "v1" } };
Definition\ProjectItem_Tests.cs (52)
1153ObjectModelHelpers.AssertItems(expectedInclude, new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection).Items.ToList()); 1173ObjectModelHelpers.AssertItems(expectedInclude, new Project(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection).Items.ToList()); 2214var project = new Project(testProject.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, env.CreateProjectCollection().Collection); 2274var project = new Project(testProject.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, env.CreateProjectCollection().Collection); 2723new Dictionary<string, string> 2733new Dictionary<string, string> 2760var expectedInitial = new Dictionary<string, string> 2765var expectedUpdateFromTrue = new Dictionary<string, string> 2802var expectedInitial = new Dictionary<string, string> 2807var expectedUpdateFromUnconditionedElement = new Dictionary<string, string> 2835var expectedUpdate = new Dictionary<string, string> 2871Dictionary<string, string> expectedUpdatei = new Dictionary<string, string> 2875Dictionary<string, string> expectedUpdatej = new Dictionary<string, string> 2942var expectedMetadata = new Dictionary<string, string> 2972var expectedMetadata = new Dictionary<string, string> 3026var expectedMetadataX = new Dictionary<string, string> 3031var expectedMetadataA = new Dictionary<string, string> 3038var expectedMetadataB = new Dictionary<string, string> 3072var expectedMetadataA = new Dictionary<string, string> 3079var expectedMetadataB = new Dictionary<string, string> 3086var expectedMetadataC = new Dictionary<string, string> 3138? new Dictionary<string, string> 3142: new Dictionary<string, string> 3166var expectedMetadataA = new Dictionary<string, string> 3185var expectedMetadataA = new Dictionary<string, string> 3212var expectedMetadataA = new Dictionary<string, string> 3252var expectedMetadataX = new Dictionary<string, string> 3260var expectedMetadata2 = new Dictionary<string, string> 3268var expectedMetadataCCC = new Dictionary<string, string> 3276var expectedMetadata1 = new Dictionary<string, string> 3285var expectedMetadataD = new Dictionary<string, string> 3293var expectedMetadataY = new Dictionary<string, string> 3343var expectedMetadataB = new Dictionary<string, string> 3348var expectedMetadataA = new Dictionary<string, string>() 3353var expectedMetadataC = new Dictionary<string, string>(); 3408var expectedInitialMetadata = new Dictionary<string, string> 3414var expectedUpdatedMetadata = new Dictionary<string, string> 3450var expected_i1 = new Dictionary<string, string> 3456var expected_i2_a = new Dictionary<string, string> 3462var expected_i2_y = new Dictionary<string, string> 3499var expectedInitial = new Dictionary<string, string> 3505var expectedUpdated = new Dictionary<string, string> 3534var expectedUpdated = new Dictionary<string, string> 3549new Dictionary<string, string> {{"m", "contents"}}, 3550new Dictionary<string, string> {{"m", "updated"}} 3618new Dictionary<string, string> {{"m", "contents"}}, 3619new Dictionary<string, string> {{"m", "contents"}}, 3620new Dictionary<string, string> {{"m", "contents"}}, 3621new Dictionary<string, string> {{"m", "updated"}} 3658return new Project(p, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, c) 3687var expectedUpdated = new Dictionary<string, string> 3754var project = new Project(testFiles.ProjectFile, new Dictionary<string, string>(), null, projectCollection);
Definition\ProjectMetadata_Tests.cs (1)
505var metadata = new Dictionary<string, string>
Definition\ProjectProperty_Tests.cs (1)
190Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
Instance\ProjectInstance_Tests.cs (2)
202Dictionary<string, string> globals = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { { "p", "p1" } }; 1026var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Instance\ProjectItemInstance_Tests.cs (5)
108((IMetadataContainer)item).ImportMetadata(new Dictionary<string, string> 131((IMetadataContainer)item).ImportMetadata(new Dictionary<string, string> 248IDictionary<string, string> metadata = new Dictionary<string, string>(); 1137var expectedInitial = new Dictionary<string, string> 1142var expectedUpdateFromTrue = new Dictionary<string, string>
ObjectModelRemoting\Helpers\TestCollectionGroup.cs (1)
205var result = new Dictionary<ProjectCollectionLinker, HashSet<Project>>();
ObjectModelRemoting\RemoteProjectsProviderMock\CollectionsHelpers.cs (2)
112Dictionary<TKey, TValue> result = new Dictionary<TKey, TValue>(); 131Dictionary<TKey, RMock> result = new Dictionary<TKey, RMock>();
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectTaskElementLink.cs (1)
32return local == null ? local : new Dictionary<string, string>(local);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\ProjectElemetExportHelper.cs (2)
84private static Dictionary<Type, ExporterFactory> knownTypes = new Dictionary<Type, ExporterFactory>(); 126var newKnown = new Dictionary<Type, ExporterFactory>(knownTypes);
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (2)
151private Dictionary<UInt32, ExternalConnection> imported = new Dictionary<UInt32, ExternalConnection>(); 215Dictionary<UInt32, ExternalConnection> newMap = new Dictionary<uint, ExternalConnection>(imported);
ObjectModelRemoting\RemoteProjectsProviderMock\LinkedObjectsMap.cs (3)
34private static Dictionary<UInt32, LinkedObjectsMap<KeyType>> collections = new Dictionary<UInt32, LinkedObjectsMap<KeyType>>(); 36private Dictionary<UInt32, WeakHolder> activeLinks = new Dictionary<UInt32, WeakHolder>(); 37private Dictionary<KeyType, WeakHolder> indexByKey = new Dictionary<KeyType, WeakHolder>();
TransientIO.cs (1)
18private Dictionary<string, TransientIO> Children = new Dictionary<string, TransientIO>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Engine.UnitTests (627)
BackEnd\AssemblyTaskFactory_Tests.cs (26)
60taskFactory.InitializeFactory(null, "TaskToTestFactories", new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty); 72taskFactory.InitializeFactory(_loadInfo, null, new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty); 84taskFactory.InitializeFactory(_loadInfo, String.Empty, new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty); 96taskFactory.InitializeFactory(_loadInfo, "RandomTask", new Dictionary<string, TaskPropertyInfo>(), string.Empty, null, false, null, ElementLocation.Create("NONE"), String.Empty); 110taskFactory.Initialize(String.Empty, new Dictionary<string, TaskPropertyInfo>(), String.Empty, null); 124taskFactory.Initialize(String.Empty, null, new Dictionary<string, TaskPropertyInfo>(), String.Empty, null); 176IDictionary<string, string> factoryIdentityParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 182IDictionary<string, string> taskIdentityParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 196IDictionary<string, string> factoryIdentityParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 202IDictionary<string, string> taskIdentityParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 278IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 311IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 344IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 379IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 414IDictionary<string, string> factoryParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 419IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 451IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 486IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 519IDictionary<string, string> factoryParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 524IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 587IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 624IDictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 655IDictionary<string, string> factoryParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 685var taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 722factoryParameters ??= new Dictionary<string, string>(); 725_loadedType = _taskFactory.InitializeFactory(_loadInfo, "TaskToTestFactories", new Dictionary<string, TaskPropertyInfo>(), string.Empty, factoryParameters, explicitlyLaunchTaskHost, null, ElementLocation.Create("NONE"), String.Empty);
BackEnd\BinaryTranslator_Tests.cs (11)
844Dictionary<string, string> value = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 882Dictionary<string, BaseClass> value = new Dictionary<string, BaseClass>(StringComparer.OrdinalIgnoreCase); 921Dictionary<string, BaseClass> value = new Dictionary<string, BaseClass>(); 959Dictionary<string, string> value = new(StringComparer.OrdinalIgnoreCase) 964Dictionary<string, string> valueUpperCase = new(StringComparer.OrdinalIgnoreCase) 1003Dictionary<string, BaseClass> value = new(StringComparer.Ordinal) 1008Dictionary<string, BaseClass> valueUpperCase = new(StringComparer.Ordinal) 1043Dictionary<string, string> value = new(StringComparer.OrdinalIgnoreCase) 1048Dictionary<string, string> valueUpperCase = new(StringComparer.OrdinalIgnoreCase) 1090Dictionary<string, BaseClass> value = new(StringComparer.Ordinal) 1095Dictionary<string, BaseClass> valueUpperCase = new(StringComparer.Ordinal)
BackEnd\BuildManager_Logging_Tests.cs (1)
107new Dictionary<string, string>(),
BackEnd\BuildManager_Tests.cs (43)
178new Dictionary<int, int[]> 201new Dictionary<string, string>(), 496ItemFilters = new Dictionary<string, List<string>> 650var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 703var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), 773var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), 833var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), 900var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), 931var data = new BuildRequestData(project.FullPath, new Dictionary<string, string>(), 1098BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1108GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1118BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1128GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1152var globalProperties = new Dictionary<string, string>(); 1217BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1230GraphBuildRequestData data = new GraphBuildRequestData("foo", new Dictionary<string, string>(), Array.Empty<string>(), null); 1246new BuildRequestData("foo", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null); 1880var data = new BuildRequestData(projectFile, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 2411var data = new BuildRequestData(projA, new Dictionary<string, string>(), null, new[] { "Build" }, new HostServices()); 2472var data = new BuildRequestData(projA, new Dictionary<string, string>(), null, new[] { "Build" }, new HostServices()); 2530var data = new BuildRequestData(projA, new Dictionary<string, string>(), null, new[] { "Build" }, new HostServices()); 2578var data = new BuildRequestData(projA, new Dictionary<string, string>(), null, new[] { "Build" }, new HostServices()); 2667var data = new BuildRequestData(projA, new Dictionary<string, string>(), "4.0", new[] { "Build" }, new HostServices()); 2737var data = new BuildRequestData(projA, new Dictionary<string, string>(), null, 2834var data = new BuildRequestData(projA, new Dictionary<string, string>(), null, 2934var data = new BuildRequestData(projA, new Dictionary<string, string>(), null, 3020var data = new BuildRequestData(projA, new Dictionary<string, string>(), null, 3089var data = new BuildRequestData(projA, new Dictionary<string, string>(), null, 3374var data = new BuildRequestData(fileName, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, new[] { "BaseTest" }, services); 3382data = new BuildRequestData(fileName, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, new[] { "MovedTest" }, services); 3513BuildRequestData data = new BuildRequestData(fileName, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, new[] { "One", "Two", "Three" }, services); 3543Dictionary<string, string> propertiesLookup = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3650IDictionary<string, string> metadata = new Dictionary<string, string>(1); 3705var mainProject = new Project(mainRootElement, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, collection); 3729var p2pProject = new Project(p2pProjectPath, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, collection); 3799new Dictionary<string, string>(), 3856var project = new Project(root, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, 3956new Dictionary<string, string>(), 4045var buildRequestData = new BuildRequestData(entryFile, new Dictionary<string, string>(), MSBuildDefaultToolsVersion, new[] { "EntryTarget" }, null); 4101var request1 = new BuildRequestData(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, new[] { "Build" }, null); 4102var request2 = new BuildRequestData(testFiles.ProjectFile, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, new[] { "Build" }, null); 4344var graph = Helpers.CreateProjectGraph(env: _env, dependencyEdges: new Dictionary<int, int[]> { { 1, new[] { 2, 3 } } }); 4353new Dictionary<string, string>() { {"property1", "value1" } }) },
BackEnd\BuildRequestConfiguration_Tests.cs (32)
44BuildRequestData config1 = new BuildRequestData(null, new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 58BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 66BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 74BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 81BuildRequestData config1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 90BuildRequestData config1 = new BuildRequestData(null, new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 105BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 109BuildRequestData data2 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 113BuildRequestData data3 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 121BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 125BuildRequestData data2 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 129BuildRequestData data3 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 139BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 147BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 157BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 165BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 173Dictionary<string, string> props = new Dictionary<string, string>(); 182BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 196BuildRequestData data1 = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 204BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 205BuildRequestConfiguration config2 = new BuildRequestConfiguration(new BuildRequestData("File", new Dictionary<string, string>(), "ToolsVersion", Array.Empty<string>(), null), "2.0"); 206BuildRequestConfiguration config3 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 207BuildRequestConfiguration config4 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 208BuildRequestConfiguration config5 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 219BuildRequestConfiguration config1 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 221BuildRequestConfiguration config2 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 224BuildRequestConfiguration config3 = new BuildRequestConfiguration(new BuildRequestData("file2", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null), "2.0"); 227BuildRequestConfiguration config4 = new BuildRequestConfiguration(new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion2", Array.Empty<string>(), null), "2.0"); 275Dictionary<string, string> globalProperties = new(StringComparer.OrdinalIgnoreCase); 310BuildRequestConfiguration configuration = new BuildRequestConfiguration(new BuildRequestData("path", new Dictionary<string, string>(), "2.0", Array.Empty<string>(), null), "2.0"); 352new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 457Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BackEnd\BuildRequestEngine_Tests.cs (5)
330BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 361BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 389BuildRequestData data = new BuildRequestData("TestFile", new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 442BuildRequestData data = new BuildRequestData(Path.GetFullPath("TestFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null); 448BuildRequestData data2 = new BuildRequestData(Path.GetFullPath("OtherFile"), new Dictionary<string, string>(), "TestToolsVersion", Array.Empty<string>(), null);
BackEnd\BuildRequestEntry_Tests.cs (10)
23BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 44BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 92BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 114BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 144BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 181BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 197BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 214BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null); 238BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0"); 258BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string?>(), "foo", Array.Empty<string>(), null), "2.0");
BackEnd\CacheAggregator_Tests.cs (11)
76configCache.AddConfiguration(new BuildRequestConfiguration(configId: 1, new BuildRequestData("path", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "a", "b" }, null), "13")); 77configCache.AddConfiguration(new BuildRequestConfiguration(configId: 2, new BuildRequestData("path2", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "c", "d" }, null), "13")); 98configCache.AddConfiguration(new BuildRequestConfiguration(configId: 1, new BuildRequestData("path", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "a", "b" }, null), "13")); 127configCache.AddConfiguration(new BuildRequestConfiguration(configId: 1, new BuildRequestData("path", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "a", "b" }, null), "13")); 149configCache1.AddConfiguration(new BuildRequestConfiguration(configId: 1, new BuildRequestData("path", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "a", "b" }, null), "13")); 157configCache2.AddConfiguration(new BuildRequestConfiguration(configId: 1, new BuildRequestData("path", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "a", "b" }, null), "13")); 193configCache.AddConfiguration(new BuildRequestConfiguration(configId: 1, new BuildRequestData("path", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "a", "b" }, null), "13")); 211configCache1.AddConfiguration(new BuildRequestConfiguration(configId: 1, new BuildRequestData("path", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "a", "b" }, null), "13")); 212configCache1.AddConfiguration(new BuildRequestConfiguration(configId: 2, new BuildRequestData("path2", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "c", "d" }, null), "13")); 223configCache2.AddConfiguration(new BuildRequestConfiguration(configId: 1, new BuildRequestData("path3", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "e", "f" }, null), "13")); 224configCache2.AddConfiguration(new BuildRequestConfiguration(configId: 2, new BuildRequestData("path4", new Dictionary<string, string>() { ["p"] = "v" }, "13", new[] { "g", "h" }, null), "13"));
BackEnd\CacheSerialization_Tests.cs (3)
27new BuildRequestData("path1", new Dictionary<string, string> { ["a1"] = "b1" }, Constants.defaultToolsVersion, new[] { "target1", "target2" }, null), 32new BuildRequestData("path2", new Dictionary<string, string> { ["a2"] = "b2" }, Constants.defaultToolsVersion, new[] { "target2" }, null), 36new BuildRequestData("path3", new Dictionary<string, string> { ["a3"] = "b3" }, Constants.defaultToolsVersion, new[] { "target3" }, null),
BackEnd\ConfigCache_Tests.cs (6)
27new BuildRequestData("path1", new Dictionary<string, string> { ["a1"] = "b1" }, Constants.defaultToolsVersion, new[] { "target1" }, null), 37new BuildRequestData("path2", new Dictionary<string, string> { ["a2"] = "b2" }, Constants.defaultToolsVersion, new[] { "target2" }, null), 46new BuildRequestData("path3", new Dictionary<string, string> { ["a3"] = "b3" }, Constants.defaultToolsVersion, new[] { "target3" }, null), 74new BuildRequestData("path1", new Dictionary<string, string> { ["a1"] = "b1" }, Constants.defaultToolsVersion, new[] { "target1" }, null), 78new BuildRequestData("path2", new Dictionary<string, string> { ["a2"] = "b2" }, Constants.defaultToolsVersion, new[] { "target2" }, null), 82new BuildRequestData("path3", new Dictionary<string, string> { ["a3"] = "b3" }, Constants.defaultToolsVersion, new[] { "target3" }, null),
BackEnd\ConfigurationMetadata_Tests.cs (6)
60BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), "toolsVersion", Array.Empty<string>(), null); 86BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 102BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 111data = new BuildRequestData("file2", new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion, Array.Empty<string>(), null); 116data = new BuildRequestData("file", new Dictionary<string, string>(), "3.0", Array.Empty<string>(), null); 150Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BackEnd\FullyQualifiedBuildRequest_Tests.cs (4)
19BuildRequestData data1 = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null); 24BuildRequestData data3 = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null); 42FullyQualifiedBuildRequest request = new FullyQualifiedBuildRequest(new BuildRequestConfiguration(new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null), "2.0"), null, true); 48BuildRequestData data = new BuildRequestData("foo", new Dictionary<string, string>(), "tools", Array.Empty<string>(), null);
BackEnd\IntrinsicTask_Tests.cs (4)
1256Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3957BuildRequestEntry entry = new BuildRequestEntry(new BuildRequest(1 /* submissionId */, 0, 1, new string[] { "t" }, null, BuildEventContext.Invalid, null), new BuildRequestConfiguration(1, new BuildRequestData("projectFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0")); 3987var project = new Project(p, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, c); 3992var entry = new BuildRequestEntry(new BuildRequest(1 /* submissionId */, 0, 1, new string[] { targetName }, null, BuildEventContext.Invalid, null), new BuildRequestConfiguration(1, new BuildRequestData("projectFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0"));
BackEnd\LoggingService_Tests.cs (1)
963BuildRequestData buildRequestData = new BuildRequestData("projectFile", new Dictionary<string, string>(), "Current", new[] { "Build" }, null);
BackEnd\LoggingServicesLogMethod_Tests.cs (9)
840BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 866BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 905BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 946BuildRequestData data = new BuildRequestData(ProjectFile, new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null); 1261properties: new Dictionary<string, string>()); 1270IDictionary<string, string> eventProperties = new Dictionary<string, string> 1293Properties = properties == null ? new Dictionary<string, string>() : new Dictionary<string, string>(properties), 1419BuildRequestData data = new BuildRequestData("file", new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase), "toolsVersion", Array.Empty<string>(), null);
BackEnd\MockRunningObjectTable.cs (1)
15private readonly Dictionary<string, object> _dictionary = new Dictionary<string, object>();
BackEnd\NodeEndpointInProc_Tests.cs (1)
358_linkStatusTable = new Dictionary<INodeEndpoint, LinkStatusContext>();
BackEnd\NodePackets_Tests.cs (7)
81BuildSubmissionStartedEventArgs buildSubmissionStarted = new(new Dictionary<string, string> { { "Value1", "Value2" } }, ["Path1"], ["TargetName"], BuildRequestDataFlags.ReplaceExistingProjectInstance, 123); 176return new Dictionary<string, string> 296ExtendedMetadata = new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } }, 302ExtendedMetadata = new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } }, 308ExtendedMetadata = new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } }, 314ExtendedMetadata = new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } }, 320ExtendedMetadata = new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } },
BackEnd\NullMetadataTask.cs (1)
26IDictionary<string, string> metadata = new Dictionary<string, string>();
BackEnd\RequestBuilder_Tests.cs (2)
226BuildRequestConfiguration configuration = new BuildRequestConfiguration(1, new BuildRequestData("testName", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0"); 269new Dictionary<string, string>(),
BackEnd\RequestedProjectState_Tests.cs (7)
44Dictionary<string, List<string>> items = new() 66Dictionary<string, List<string>> items = new() 96state1.ItemFilters = new Dictionary<string, List<string>>() 140ItemFilters = new Dictionary<string, List<string>>() 147ItemFilters = new Dictionary<string, List<string>>() 176ItemFilters = new Dictionary<string, List<string>>() 183ItemFilters = new Dictionary<string, List<string>>()
BackEnd\Scheduler_Tests.cs (2)
551BuildRequest request1 = CreateProxyBuildRequest(1, 1, new ProxyTargets(new Dictionary<string, string> { { "foo", "bar" } }), null); 738BuildRequestData data = new(projectFullPath, new Dictionary<string, string>(), "4.0", Array.Empty<string>(), null);
BackEnd\SdkResolverService_Tests.cs (4)
411propertiesToAdd = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 416itemsToAdd = new Dictionary<string, SdkResultItem>(StringComparer.OrdinalIgnoreCase) 419new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 737return factory.IndicateSuccess("envresolver", "1.0.0", null, null, environmentVariablesToAdd: new Dictionary<string, string>
BackEnd\SdkResultItemComparison_Tests.cs (1)
33var sdkResultItem1 = new SdkResultItem("anyspec", new Dictionary<string, string>());
BackEnd\SdkResultOutOfProc_Tests.cs (2)
245propertiesToAdd: new Dictionary<string, string>() 247itemsToAdd: new Dictionary<string, SdkResultItem>()
BackEnd\TargetBuilder_Tests.cs (1)
1675BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("testFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0");
BackEnd\TargetEntry_Tests.cs (6)
86BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 101BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 115BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 767new Dictionary<string, string>(), 917BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0"); 935BuildRequestConfiguration config = new BuildRequestConfiguration(1, new BuildRequestData("foo", new Dictionary<string, string>(), "foo", Array.Empty<string>(), null), "2.0");
BackEnd\TaskExecutionHost_Tests.cs (10)
143var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 159var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 169var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 608var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 624var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 642var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 1290_bucket = new ItemBucket(FrozenSet<string>.Empty, new Dictionary<string, string>(), new Lookup(itemsByName, new PropertyDictionary<ProjectPropertyInstance>()), 0); 1294_parametersSetOnTask = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); 1295_outputsReadFromTask = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); 1486var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase);
BackEnd\TaskHost_Tests.cs (2)
76BuildRequestConfiguration configuration = new BuildRequestConfiguration(1, new BuildRequestData("Nothing", new Dictionary<string, string>(), "4.0", Array.Empty<string>(), null), "2.0"); 716Dictionary<string, string> globalProperties = new Dictionary<string, string>
BackEnd\TaskHostConfiguration_Tests.cs (8)
234IDictionary<string, object> parameters = new Dictionary<string, object>(); 261IDictionary<string, object> parameters2 = new Dictionary<string, object>(); 332var expectedGlobalProperties = new Dictionary<string, string> 455taskParameters: new Dictionary<string, object>(), 456globalParameters: new Dictionary<string, string>(), 483IDictionary<string, object> parameters = new Dictionary<string, object>(); 533IDictionary<string, object> parameters = new Dictionary<string, object>(); 581IDictionary<string, object> parameters = new Dictionary<string, object>();
BackEnd\TaskHostTaskComplete_Tests.cs (6)
73IDictionary<string, object> parameters = new Dictionary<string, object>(); 81IDictionary<string, object> parameters2 = new Dictionary<string, object>(); 136new OutOfProcTaskHostTaskResult(TaskCompleteType.Success, new Dictionary<string, object>()), 158IDictionary<string, object> parameters = new Dictionary<string, object>(); 186IDictionary<string, object> parameters = new Dictionary<string, object>(); 212IDictionary<string, object> parameters = new Dictionary<string, object>();
BackEnd\TaskRegistry_Tests.cs (7)
580Dictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 671new Dictionary<string, string>(), 1057Dictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1081taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1894new Dictionary<string, SubToolset> 1901new Dictionary<string, ProjectImportPathMatch> 2056parameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
BackEnd\TaskRouter_IntegrationTests.cs (7)
74new Dictionary<string, string>(), 119new Dictionary<string, string>(), 164new Dictionary<string, string>(), 209new Dictionary<string, string>(), 253new Dictionary<string, string>(), 307new Dictionary<string, string>(), 365new Dictionary<string, string>(),
BinaryLogger_Tests.cs (3)
259Dictionary<string, string> embedFiles1 = new(); 260Dictionary<string, string> embedFiles2 = new(); 584new BuildRequestData(entryProject.ProjectFile, new Dictionary<string, string>(), null, new string[] { "BuildSelf" }, null))
BuildEnvironmentHelper_Tests.cs (1)
508private readonly Dictionary<string, string> _mockEnvironment = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BuildEventArgsDataEnumeration.cs (6)
28GlobalProperties = new Dictionary<string, string>() { { "GlobalKey", "GlobalValue" } }, 55GlobalProperties = new Dictionary<string, string>() { { "GlobalKey", "GlobalValue" } }, 62new Dictionary<string, string>() { { "metadat1", "val1" }, { "metadat2", "val2" } })), 93GlobalProperties = new Dictionary<string, string>() { { "GlobalKey", "GlobalValue" } }, 100new Dictionary<string, string>() { { "metadat1", "val1" }, { "metadat2", "val2" } })), 104new Dictionary<string, string>() { { "metadat41", "val41" }, { "metadat42", "val42" } })),
BuildEventArgsSerialization_Tests.cs (11)
72new Dictionary<string, string> 115var globalVariables = new Dictionary<string, string> 163globalProperties: new Dictionary<string, string>() { { "GlobalKey", "GlobalValue" } }, 345ExtendedMetadata = withOptionalData ? new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } } : null, 418ExtendedMetadata = withOptionalData ? new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } } : null, 494ExtendedMetadata = withOptionalData ? new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } } : null, 557Dictionary<string, TimeSpan> stats = new() { { key1, span1 }, { key2, span2 }, { key3, span3 } }; 582ExtendedMetadata = withOptionalData ? new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } } : null, 677ExtendedMetadata = withOptionalData ? new Dictionary<string, string> { { "m1", "v1" }, { "m2", "v2" } } : null, 769GlobalProperties = new Dictionary<string, string>() { { "GlobalKey", "GlobalValue" } }, 792ProfilerResult = new ProfilerResult(new Dictionary<EvaluationLocation, ProfiledLocation>
Collections\OMcollections_tests.cs (8)
197var dictionary = new ObjectModel.ReadOnlyDictionary<string, string>(new Dictionary<string, string>(0)); 207var dictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 224var dictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 252var backing = new Dictionary<string, string>(); 268Dictionary<string, string> values = new Dictionary<string, string>(); 273Dictionary<string, int> convertedValues = new Dictionary<string, int>(); 339clone = new Dictionary<string, TValue>(0); 343clone = new Dictionary<string, TValue>(dictionary, strComparer);
CommunicationUtilities_Tests.cs (1)
23IDictionary<string, string> referenceVars2 = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ConsoleLogger_Tests.cs (1)
126_environment = new Dictionary<string, string>();
Construction\SolutionFilter_Tests.cs (1)
131ProjectGraphEntryPoint entryPoint = new(filterFile.Path, new Dictionary<string, string>());
Construction\SolutionProjectGenerator_Tests.cs (11)
1665IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 1727Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 1778IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 1796IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 1913IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 2104Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 2202Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 2290Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 2367Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 2549var globalProperties = new Dictionary<string, string> { { "ImportByWildcardBeforeSolution", "false" } }; 2790Dictionary<string, string> globalProperties = new Dictionary<string, string>();
Definition\Project_Internal_Tests.cs (1)
237using ProjectFromString projectFromString = new(projectContents, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection, ProjectLoadSettings.DoNotEvaluateElementsWithFalseCondition);
Definition\ProjectEvaluationContext_Tests.cs (4)
35new Dictionary<string, SdkResult> 121new Dictionary<string, int> 179new Dictionary<string, int> 185new Dictionary<string, int>
Definition\Toolset_Tests.cs (12)
103Dictionary<string, SubToolset> subToolsets = new Dictionary<string, SubToolset>(StringComparer.OrdinalIgnoreCase); 107subToolsets, "c:\\foo", "4.0", new Dictionary<string, ProjectImportPathMatch> 245IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 297IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 317IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 325IDictionary<string, string> explicitGlobalProperties = new Dictionary<string, string>(); 345IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 388IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 433IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 441IDictionary<string, string> explicitGlobalProperties = new Dictionary<string, string>(); 491IDictionary<string, string> properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 495Dictionary<string, SubToolset> subToolsets = new Dictionary<string, SubToolset>(StringComparer.OrdinalIgnoreCase);
Definition\ToolsetConfigurationReader_Tests.cs (1)
560Dictionary<string, Toolset> toolsets = new Dictionary<string, Toolset>(StringComparer.OrdinalIgnoreCase);
Definition\ToolsVersion_Tests.cs (1)
943_defaultTasksFileMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
EscapingInProjects_Tests.cs (1)
846ProjectItem item = project.AddItem("None", "MetadataTests", new Dictionary<string, string> {
Evaluation\Evaluator_Tests.cs (27)
65using ProjectCollection collection = new(new Dictionary<string, string>(), [logger], ToolsetDefinitionLocations.Default); 1952IDictionary<string, ProjectProperty> allEvaluatedPropertiesWithNoBackingXmlAndNoDuplicates = new Dictionary<string, ProjectProperty>(StringComparer.OrdinalIgnoreCase); 2114IDictionary<string, ProjectProperty> allEvaluatedPropertiesWithNoBackingXmlAndNoDuplicates = new Dictionary<string, ProjectProperty>(StringComparer.OrdinalIgnoreCase); 2999IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3029IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3059IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3089IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3129IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3171IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3204IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3238IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3271IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3300IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3382IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3439IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3500IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3560IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3632IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3705IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3770IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3832IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 4163IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 4223IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 4275IDictionary<string, string> globalProperties = new Dictionary<string, string>(); 4711new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 5151IDictionary<string, string> properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 5155Dictionary<string, SubToolset> subToolsets = new Dictionary<string, SubToolset>(StringComparer.OrdinalIgnoreCase);
Evaluation\Expander_Tests.cs (4)
780Dictionary<string, string> itemMetadataTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1358Dictionary<string, string> itemMetadataTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1574var itemMetadataTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 3911Dictionary<string, string> itemMetadataTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Evaluation\ExpressionShredder_Tests.cs (1)
1190Dictionary<string, MetadataReference> consumedMetadataReferences = new Dictionary<string, MetadataReference>(StringComparer.OrdinalIgnoreCase);
Evaluation\ImportFromMSBuildExtensionsPath_Tests.cs (5)
575using var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 }); 636using var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 }); 706using var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 }); 771using var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 }); 830using var projectCollection = GetProjectCollection(new Dictionary<string, string> { ["FallbackExpandDir1"] = extnDir1 });
Evaluation\ItemEvaluation_Tests.cs (23)
61var mI2_1 = new Dictionary<string, string> 70var mI2_2 = new Dictionary<string, string> 110var expectedMetadata = new Dictionary<string, string> 154new Dictionary<string, string>(), 155new Dictionary<string, string> { ["m1"] = "m1_updated" }, 156new Dictionary<string, string>(), 184var a = new Dictionary<string, string> 192var b = new Dictionary<string, string> 200var c = new Dictionary<string, string> 211var metadataForI2 = new Dictionary<string, string> 249new Dictionary<string, string> 278new Dictionary<string, string> 305new Dictionary<string, string>() 328new Dictionary<string, string>() 353new Dictionary<string, string> 422new Dictionary<string, string>(), 423new Dictionary<string, string> 428new Dictionary<string, string> 433new Dictionary<string, string> 490var i1BaseMetadata = new Dictionary<string, string> 501new Dictionary<string, string>() 510new Dictionary<string, string> 719new Dictionary<string, string>
Evaluation\ItemSpec_Tests.cs (4)
30var itemSpec = CreateItemSpecFrom("a;b*;c*;@(foo)", CreateExpander(new Dictionary<string, string[]> { { "foo", new[] { "d", "e" } } })); 51var itemSpecFromAbsolute = CreateItemSpecFrom(absoluteSpec, CreateExpander(new Dictionary<string, string[]>()), new MockElementLocation(projectFile)); 52var itemSpecFromRelative = CreateItemSpecFrom("s.cs", CreateExpander(new Dictionary<string, string[]>()), new MockElementLocation(projectFile)); 64var itemSpec = CreateItemSpecFrom("a;b*;c*;@(foo)", CreateExpander(new Dictionary<string, string[]> { { "foo", new[] { "d", "e" } } }));
Evaluation\Preprocessor_Tests.cs (5)
852var projectOptions = SdkUtilities.CreateProjectOptionsWithResolver(new SdkUtilities.FileBasedMockSdkResolver(new Dictionary<string, string> 943var propertiesToAdd = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 948var itemsToAdd = new Dictionary<string, SdkResultItem>(StringComparer.OrdinalIgnoreCase) 951new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 1059var projectOptions = SdkUtilities.CreateProjectOptionsWithResolver(new SdkUtilities.FileBasedMockSdkResolver(new Dictionary<string, string>
Evaluation\ProjectSdkImplicitImport_Tests.cs (2)
350var mapping = new Dictionary<string, string> { { SdkName, _testSdkDirectory } }; 653(projectOptions.GlobalProperties ??= new Dictionary<string, string>()).Add(name, value);
Evaluation\SdkResultEvaluation_Tests.cs (7)
60propertiesToAdd = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 65itemsToAdd = new Dictionary<string, SdkResultItem>(StringComparer.OrdinalIgnoreCase) 68new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 454Dictionary<string, string> propertiesToAdd = new Dictionary<string, string>() 459Dictionary<string, SdkResultItem> itemsToAdd = new Dictionary<string, SdkResultItem>() 463new SdkResultItem(itemSpec: "ItemValue" + specialString, new Dictionary<string, string>() 503factory.IndicateSuccess(Path.Combine(_testFolder, "Sdk"), "1.0.0", null, null, null, environmentVariablesToAdd: new Dictionary<string, string>
Evaluation\ToolsetConfigurationNet5_Tests.cs (2)
30= new Dictionary<string, string>(); 57= new Dictionary<string, string>();
ExpressionTree_Tests.cs (1)
333Dictionary<string, List<string>> conditionedProperties = new Dictionary<string, List<string>>();
ExpressionTreeExpression_Tests.cs (1)
400Dictionary<string, string> metadataDictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Graph\GetCompatiblePlatformGraph_Tests.cs (1)
431ProjectGraphEntryPoint entryPoint = new(solutionFile.Path, new Dictionary<string, string>());
Graph\GraphLoadedFromSolution_tests.cs (33)
95new Dictionary<int, int[]>() 100new Dictionary<int, int[]> 108new Dictionary<int, int[]> 117new Dictionary<int, int[]> 125new Dictionary<int, int[]> 134new Dictionary<int, int[]> 142new Dictionary<int, int[]> 151new Dictionary<int, int[]> 161new Dictionary<int, int[]> 228Projects = new Dictionary<string, string> 233ProjectConfigurations = new Dictionary<string, Dictionary<SolutionConfigurationInSolution, ProjectConfigurationInSolution>> 236"1", new Dictionary<SolutionConfigurationInSolution, ProjectConfigurationInSolution> 264new Dictionary<int, int[]> // graph nodes and ProjectReference edges 276new Dictionary<int, int[]> 288new Dictionary<int, int[]> 303new Dictionary<int, int[]> 318new Dictionary<int, int[]> 333new Dictionary<int, int[]> 344new Dictionary<int, int[]> 355new Dictionary<int, int[]> 366new Dictionary<int, int[]> 381new Dictionary<int, int[]> 396new Dictionary<int, int[]> 411new Dictionary<int, int[]> 426new Dictionary<int, int[]> 439new Dictionary<int, int[]> 452new Dictionary<int, int[]> 465new Dictionary<int, int[]> 486new Dictionary<string, string>() 590new Dictionary<int, int[]>() 609Projects = new Dictionary<string, string> 674? new Dictionary<string, string> 680: new Dictionary<string, string>();
Graph\GraphTestingUtilities.cs (3)
20public static readonly ImmutableDictionary<string, string> EmptyGlobalProperties = new Dictionary<string, string> { { PropertyNames.IsGraphBuild, "true" } }.ToImmutableDictionary(); 46additionalGlobalProperties ??= new Dictionary<string, string>(0); 92additionalGlobalProperties ??= new Dictionary<string, string>();
Graph\IsolateProjects_Tests.cs (3)
323new Dictionary<string, string>(), 325var expectedOutput = new ExpectedNodeBuildOutput(); 326var outputCaches = new OutputCacheDictionary();
Graph\ParallelWorkSet_Tests.cs (5)
23new Dictionary<string, string>(StringComparer.Ordinal); 130ExpectedCompletedWork = new Dictionary<string, string> 162ExpectedCompletedWork = new Dictionary<string, string> 195ExpectedCompletedWork = new Dictionary<string, string> 228ExpectedCompletedWork = new Dictionary<string, string>
Graph\ProjectGraph_Tests.cs (92)
76new Dictionary<int, int[]>() 357var entryPoint1 = new ProjectGraphEntryPoint(entryFile1.Path, new Dictionary<string, string> { ["B"] = "EntryPointB", ["C"] = "EntryPointC" }); 370var globalPropertiesFor1 = new Dictionary<string, string> { ["B"] = "EntryPointB", ["C"] = "EntryPointC", ["IsGraphBuild"] = "true" }; 377var globalPropertiesFor2 = new Dictionary<string, string> { ["IsGraphBuild"] = "true" }; 497new Dictionary<string, string> { { "Foo", "Bar" } }); 598var entryPoint1 = new ProjectGraphEntryPoint(entryProject.Path, new Dictionary<string, string> { { "Platform", "x86" } }); 599var entryPoint2 = new ProjectGraphEntryPoint(entryProject.Path, new Dictionary<string, string> { { "Platform", "x64" } }); 637var entryPoint1 = new ProjectGraphEntryPoint(entryProject.Path, new Dictionary<string, string> { { "Platform", "x86" } }); 638var entryPoint2 = new ProjectGraphEntryPoint(entryProject.Path, new Dictionary<string, string> { { "Platform", "x64" } }); 919TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2, 3 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { "B" } } }); 920CreateProjectFile(env: env, projectNumber: 2, projectReferences: new[] { 4 }, projectReferenceTargets: new Dictionary<string, string[]> { { "B", new[] { "C" } } }); 921CreateProjectFile(env: env, projectNumber: 3, projectReferences: new[] { 4 }, projectReferenceTargets: new Dictionary<string, string[]> { { "B", new[] { "D" } } }); 939var projectReferenceTargets = new Dictionary<string, string[]> 966var projectReferenceTargets = new Dictionary<string, string[]> 1002TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { "B" } } }, defaultTargets: "A"); 1020TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { "B" } } }, defaultTargets: "A"); 1040TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { "B" } } }, defaultTargets: string.Empty); 1063TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { " ; ; " } } }, defaultTargets: string.Empty); 1391TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2 }, new Dictionary<string, string[]> { { "A", new[] { ".default" } } }, defaultTargets: "A"); 1413projectReferenceTargets: new Dictionary<string, string[]> { { "Build", new[] { "A", ".default" } } }); 1430var projectReferenceTargets = new Dictionary<string, string[]> 1477projectReferenceTargets: new Dictionary<string, string[]> { { "Build", new[] { "Build" } } }); 1483new Dictionary<string, string[]> { { "Build", new[] { MSBuildConstants.ProjectReferenceTargetsOrDefaultTargetsMarker, "T2" } } }, 1491new Dictionary<string, string[]> { { "Build", new[] { MSBuildConstants.ProjectReferenceTargetsOrDefaultTargetsMarker, "T3" } } }, 1499new Dictionary<string, string[]> { { "Build", new[] { MSBuildConstants.ProjectReferenceTargetsOrDefaultTargetsMarker, "T4" } } }, 1522dependencyEdges: new Dictionary<int, int[]> 1526extraContentPerProjectNumber: new Dictionary<int, string> 1559expectedNodeBuildOutput: new Dictionary<ProjectGraphNode, string[]>(), 1560outputCaches: new Dictionary<ProjectGraphNode, string>(), 1574dependencyEdges: new Dictionary<int, int[]> 1578extraContentPerProjectNumber: new Dictionary<int, string> 1609expectedNodeBuildOutput: new Dictionary<ProjectGraphNode, string[]>(), 1610outputCaches: new Dictionary<ProjectGraphNode, string>(), 1644new Dictionary<int, int[]>() 1649new Dictionary<int, int[]> 1657new Dictionary<int, int[]> 1666new Dictionary<int, int[]> 1674new Dictionary<int, int[]> 1683new Dictionary<int, int[]> 1692new Dictionary<int, int[]> 1700new Dictionary<int, int[]> 1709new Dictionary<int, int[]> 1719new Dictionary<int, int[]> 1729new Dictionary<int, int[]> 1738new Dictionary<int, int[]> 1747new Dictionary<int, int[]> 1758new Dictionary<int, int[]> 1768new Dictionary<int, int[]> 1779new Dictionary<int, int[]> 1792new Dictionary<int, int[]> 1835globalProperties: new Dictionary<string, string> { { "a", "b" } }, 1840projectReferenceTargets: new Dictionary<string, string[]> 2031AssertInnerBuildEvaluation(graph.GraphRoots.First(), false, new Dictionary<string, string>()); 2044var graph = new ProjectGraph(root, new Dictionary<string, string> { { InnerBuildPropertyName, "foo" } }); 2050AssertInnerBuildEvaluation(graph.GraphRoots.First(), true, new Dictionary<string, string>()); 2125var additionalGlobalProperties = new Dictionary<string, string> { { "x", "y" } }; 2164var additionalGlobalProperties = new Dictionary<string, string> { { "x", "y" } }; 2191var additionalGlobalProperties = new Dictionary<string, string> { { "x", "y" } }; 2245new Dictionary<string, string>(), 2246new Dictionary<string, string> 2253var graph1 = new Dictionary<int, int[]> 2261var graph2 = new Dictionary<int, int[]> 2275new Dictionary<int, int[]>(), 2282new Dictionary<int, int[]> 2331var expectedGlobalProperties = new Dictionary<string, string>(globalProperties); 2348new Dictionary<int, int[]> { { 1, null } }, 2349new Dictionary<string, string> { { PropertyNames.IsGraphBuild, "xyz" } }); 2378new Dictionary<int, int[]> 2384new Dictionary<int, string>(), 2385new Dictionary<int, int[]> 2394new Dictionary<int, int[]> 2400new Dictionary<int, string> 2404new Dictionary<int, int[]> 2415new Dictionary<int, int[]> 2421new Dictionary<int, string> 2425new Dictionary<int, int[]> 2434new Dictionary<int, int[]> 2440new Dictionary<int, string> 2445new Dictionary<int, int[]> 2453new Dictionary<int, int[]> 2461new Dictionary<int, string> 2467new Dictionary<int, int[]> 2500dependencyEdges: new Dictionary<int, int[]> 2508extraContentPerProjectNumber: new Dictionary<int, string> 2563dependencyEdges: new Dictionary<int, int[]>() 2568extraContentPerProjectNumber: new Dictionary<int, string>() 2669dependencyEdges: new Dictionary<int, int[]>() 2673extraContentPerProjectNumber: new Dictionary<int, string>() 2711dependencyEdges: new Dictionary<int, int[]>() 2715extraContentPerProjectNumber: new Dictionary<int, string>() 2754dependencyEdges: new Dictionary<int, int[]>() 2758globalProperties: new Dictionary<string, string> { { "BuildProjectReferences", "false" } },
Graph\ResultCacheBasedBuilds_Tests.cs (20)
182new Dictionary<int, int[]> 190new Dictionary<int, int[]> 199new Dictionary<int, int[]> 207new Dictionary<int, int[]> 216new Dictionary<int, int[]> 225new Dictionary<int, int[]> 233new Dictionary<int, int[]> 243new Dictionary<int, int[]> 253new Dictionary<int, int[]> 262new Dictionary<int, int[]> 271new Dictionary<int, int[]> 296var expectedOutput = new ExpectedNodeBuildOutput(); 298var outputCaches = new OutputCacheDictionary(); 338dependencyEdges: new Dictionary<int, int[]> { { 1, new[] { 2, 3 } } }, 343var expectedOutput = new ExpectedNodeBuildOutput(); 345var outputCaches = new OutputCacheDictionary(); 376dependencyEdges: new Dictionary<int, int[]> { { 1, new[] { 2, 3 } } }, 381var expectedOutput = new ExpectedNodeBuildOutput(); 383var outputCaches = new OutputCacheDictionary(); 436var results = new Dictionary<string, (BuildResult Result, MockLogger Logger)>(topoSortedNodes.Count);
HashTableUtility_Tests.cs (4)
28Dictionary<string, string> h1 = new Dictionary<string, string>(); 30Dictionary<string, string> h2 = new Dictionary<string, string>(); 41Dictionary<string, string> h1 = new Dictionary<string, string>(); 42Dictionary<string, string> h2 = new Dictionary<string, string>();
Instance\HostServices_Tests.cs (2)
482using ProjectFromString projectFromString = new(contents, new Dictionary<string, string>(), ObjectModelHelpers.MSBuildDefaultToolsVersion); 502Dictionary<string, string> globals = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Instance\ProjectInstance_Internal_Tests.cs (4)
380IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 418IDictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 421IDictionary<string, string> projectCollectionGlobalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 962globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Instance\ProjectTaskInstance_Internal_Tests.cs (5)
32new Dictionary<string, (string, MockElementLocation)>(), 38new Dictionary<string, (string, MockElementLocation)> 50new Dictionary<string, (string, MockElementLocation)> 70parameters ??= new Dictionary<string, (string, MockElementLocation)>(); 72var parametersCopy = new Dictionary<string, (string, ElementLocation)>(parameters.Count);
InstanceFromRemote\FakeProjectLink.cs (2)
43public override IDictionary<string, string> GlobalProperties { get; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 61public override IDictionary<string, ProjectTargetInstance> Targets { get; } = new Dictionary<string, ProjectTargetInstance>(StringComparer.OrdinalIgnoreCase);
InstanceFromRemote\ProjectInstance_FromImmutableProjectLink_Tests.cs (6)
36var propertyValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 59var items = new Dictionary<string, ProjectItemLink[]>(StringComparer.OrdinalIgnoreCase); 70new FakeProjectItemLink(project, "Compile", "File1.cs", @"Q:\FakeFolder\Project\Project.proj", new Dictionary<string, string> { { "Metadata1", "Value1" } }), 71new FakeProjectItemLink(project, "Compile", "File2.cs", @"Q:\FakeFolder\Project\a.props", new Dictionary<string, string> { { "Metadata2", "Value2" } }) 94var items = new Dictionary<string, ProjectItemLink[]>(StringComparer.OrdinalIgnoreCase); 105new FakeProjectItemLink(project, "Compile", "File1.cs", @"Q:\FakeFolder\Project\Project.proj", new Dictionary<string, string> { { "Metadata1", "Value1" } }),
InternalEngineHelpers.cs (4)
48_resultMap = new Dictionary<string, SdkResult> { [result.SdkReference.Name] = result }; 110sdkResultItems = new Dictionary<string, SdkResultItem>(StringComparer.OrdinalIgnoreCase); 116newMetadata = new Dictionary<string, string>(item.Value.Metadata, StringComparer.OrdinalIgnoreCase); 125sdkResult.PropertiesToAdd == null ? null : new Dictionary<string, string>(sdkResult.PropertiesToAdd, StringComparer.OrdinalIgnoreCase),
ProjectCache\ProjectCacheTests.cs (39)
123NonCacheMissResults = nonCacheMissResults ?? new Dictionary<int, CacheResult>(); 137new Dictionary<string, string> 154new Dictionary<string, string> 356new Dictionary<int, int[]?> 362new Dictionary<int, int[]?> 366new Dictionary<int, CacheResult> 372new Dictionary<int, int[]?> 376new Dictionary<int, CacheResult> 382new Dictionary<int, int[]?> 388new Dictionary<int, int[]?> 392new Dictionary<int, CacheResult> 398new Dictionary<int, int[]?> 402new Dictionary<int, CacheResult> 408new Dictionary<int, int[]?> 412new Dictionary<int, CacheResult> 419new Dictionary<int, int[]?> 514var nodesToBuildResults = new Dictionary<ProjectGraphNode, BuildResult>(); 546new Dictionary<int, int[]?> 550extraContentPerProjectNumber: new Dictionary<int, string>() 566var nodesToBuildResults = new Dictionary<ProjectGraphNode, BuildResult>(); 606new Dictionary<string, string> 685graphEdges: new Dictionary<int, int[]?> 705var globalProperties = new Dictionary<string, string> 749new Dictionary<int, int[]?> 753new Dictionary<int, CacheResult> 929new Dictionary<int, int[]?> 960new Dictionary<int, int[]?> 984new Dictionary<int, int[]?> 988new Dictionary<int, CacheResult> 1000new Dictionary<string, string> 1042new Dictionary<int, int[]?> 1074dependencyEdges: new Dictionary<int, int[]?> 1078extraContentPerProjectNumber: new Dictionary<int, string> 1250new Dictionary<int, int[]?> 1381new Dictionary<int, int[]?> 1474new Dictionary<int, int[]?> 1504new Dictionary<string, string> 1537new Dictionary<int, int[]?> 1624new ProxyTargets(new Dictionary<string, string> { { proxyTarget, cacheHitTarget } })));
TaskParameter_Tests.cs (3)
365IDictionary metadata = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 398IDictionary metadata = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 445IDictionary metadata = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Telemetry\Telemetry_Tests.cs (2)
233new Dictionary<string, string?>(), 242new Dictionary<string, string?>(),
TerminalLogger_Tests.cs (5)
210return new ProjectStartedEventArgs("", "", projectFile, targetNames, new Dictionary<string, string>(), new List<DictionaryEntry>()) 347Properties = properties?.ToDictionary(k => k.Item1, v => v.Item2) ?? new Dictionary<string, string>(), 611new Dictionary<string, string?>() { { "displayName", "testName1" }, { "localizedResult", "passed" } })); 616new Dictionary<string, string?>() { { "displayName", "testName2" }, { "localizedResult", "skipped" } })); 621new Dictionary<string, string?>() { { "total", "10" }, { "passed", "7" }, { "skipped", "2" }, { "failed", "1" } }));
WarningsAsMessagesAndErrors_Tests.cs (2)
85customProperties: new Dictionary<string, string> 171customProperties: new Dictionary<string, string>
Microsoft.Build.Framework (36)
BinaryReaderExtensions.cs (2)
112data.ExtendedMetadata = new Dictionary<string, string?>(); 132var durations = new Dictionary<string, TimeSpan>(count);
BinaryTranslator.cs (5)
615count => new Dictionary<string, string>(count, comparer)); 639dictionary = new Dictionary<string, string>(count, comparer); 640additionalEntries = new(); 747dictionary = new Dictionary<string, T>(count, comparer); 813dictionary = 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)
105var properties = new Dictionary<string, string>();
Telemetry\LoggingConfigurationTelemetry.cs (1)
86var 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.Framework.UnitTests (14)
BuildCheckTracingEventArgs_Tests.cs (1)
25Dictionary<string, TimeSpan> stats = new() { { key1, span1 }, { key2, span2 }, { key3, span3 } };
BuildSubmissionStartedEventArgs_Tests.cs (1)
17var globalVariables = new Dictionary<string, string?>
CustomEventArgSerialization_Tests.cs (4)
983TelemetryEventArgs genericEvent = new TelemetryEventArgs { EventName = "Good", Properties = new Dictionary<string, string> { { "Key", "Value" } } }; 1003genericEvent.Properties = new Dictionary<string, string>(); 1013TelemetryEventArgs genericEvent = new TelemetryEventArgs { EventName = null, Properties = new Dictionary<string, string> { { "Key", "Value" } } }; 1026TelemetryEventArgs genericEvent = new TelemetryEventArgs { EventName = "Good", Properties = new Dictionary<string, string> { { "Key", null } } };
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
ExtendedBuildEventArgs_Tests.cs (5)
28ExtendedMetadata = withOptionalData ? new Dictionary<string, string?> { { "m1", "v1" }, { "m2", "v2" } } : null, 66ExtendedMetadata = withOptionalData ? new Dictionary<string, string?> { { "m1", "v1" }, { "m2", "v2" } } : null, 105ExtendedMetadata = withOptionalData ? new Dictionary<string, string?> { { "m1", "v1" }, { "m2", "v2" } } : null, 143ExtendedMetadata = withOptionalData ? new Dictionary<string, string?> { { "m1", "v1" }, { "m2", "v2" } } : null, 180ExtendedMetadata = withOptionalData ? new Dictionary<string, string?> { { "m1", "v1" }, { "m2", "v2" } } : null,
WorkerNodeTelemetryEventArgs_Tests.cs (2)
19new Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats>() 25new Dictionary<TaskOrTargetTelemetryKey, bool>() { { (TaskOrTargetTelemetryKey)"target1", false }, { (TaskOrTargetTelemetryKey)"target2", true }, });
Microsoft.Build.Tasks.CodeAnalysis (3)
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (2)
92var rootByItemSpec = new Dictionary<string, ITaskItem>(); 123var topLevelMappedPaths = new Dictionary<string, string>();
src\Compilers\Shared\BuildServerConnection.cs (1)
492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (3)
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (2)
92var rootByItemSpec = new Dictionary<string, ITaskItem>(); 123var topLevelMappedPaths = new Dictionary<string, string>();
src\Compilers\Shared\BuildServerConnection.cs (1)
492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Tasks.CodeAnalysis.Sdk.UnitTests (4)
src\Compilers\Core\MSBuildTaskTests\TestUtilities\IntegrationTestBase.cs (4)
128new Dictionary<string, string> 160new Dictionary<string, string> 199new Dictionary<string, string> 238new Dictionary<string, string>
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (59)
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" } });
IntegrationTests.cs (3)
27private Dictionary<string, string> SimpleMsBuildFiles => new Dictionary<string, string> { 335private Dictionary<string, string> ReportAnalyzerMsBuildFiles => new Dictionary<string, string> { 519new Dictionary<string, string>
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)
933addTask(proj, "WriteLinesToFile", new() 942addTask(proj, "MakeDir", new() 948addTask(proj, "Message", new()
TestUtilities\DotNetSdkTestBase.cs (1)
180EnvironmentVariables = new Dictionary<string, string>()
TestUtilities\IntegrationTestBase.cs (4)
128new Dictionary<string, string> 160new Dictionary<string, string> 199new Dictionary<string, string> 238new Dictionary<string, string>
TestUtilities\SimpleTaskItem.cs (1)
45var map = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Tasks.Core (114)
AssemblyDependency\GenerateBindingRedirects.cs (1)
363var map = new Dictionary<AssemblyName, string>();
AssemblyDependency\Node\RarNodeExecuteRequest.cs (1)
18private Dictionary<string, TaskParameter> _taskInputs = new(StringComparer.Ordinal);
AssemblyDependency\Node\RarNodeExecuteResponse.cs (1)
18private Dictionary<string, TaskParameter> _taskOutputs = new(StringComparer.Ordinal);
AssemblyDependency\Node\RarTaskParameters.cs (1)
59Dictionary<string, TaskParameter> taskParameters = new(properties.Length, StringComparer.Ordinal);
AssemblyDependency\Reference.cs (3)
27private Dictionary<string, ITaskItem> _sourceItems = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase); 76private Dictionary<string, UnificationVersion> _preUnificationVersions = new Dictionary<string, UnificationVersion>(StringComparer.OrdinalIgnoreCase); 508_preUnificationVersions = new Dictionary<string, UnificationVersion>(StringComparer.OrdinalIgnoreCase);
AssemblyDependency\ReferenceTable.cs (9)
36private static readonly Dictionary<string, Tuple<RedistList, string>> s_monikerToHighestRedistList = new Dictionary<string, Tuple<RedistList, string>>(StringComparer.OrdinalIgnoreCase); 46private readonly Dictionary<string, AssemblyNameExtension> _externallyResolvedImmutableFiles = new Dictionary<string, AssemblyNameExtension>(StringComparer.OrdinalIgnoreCase); 336_resolvedSDKReferences = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase); 381internal Dictionary<AssemblyNameExtension, Reference> References { get; private set; } = new Dictionary<AssemblyNameExtension, Reference>(AssemblyNameComparer.GenericComparer); 1379var goodReferences = new Dictionary<AssemblyNameExtension, Reference>(AssemblyNameComparer.GenericComparer); 1385var dependencyGraph = new Dictionary<Reference, List<ReferenceAssemblyExtensionPair>>(); 1871var fullNameToReference = new Dictionary<string, AssemblyNameReference>(References.Count, StringComparer.OrdinalIgnoreCase); 2188var baseNameToReferences = new Dictionary<string, List<AssemblyNameReference>>(References.Count, StringComparer.OrdinalIgnoreCase); 3024Dictionary<string, string> removedMetadata = new Dictionary<string, string>();
AssemblyDependency\ResolveAssemblyReference.cs (3)
222private Dictionary<string, MessageImportance> _showAssemblyFoldersExLocations = new Dictionary<string, MessageImportance>(StringComparer.OrdinalIgnoreCase); 1188_unresolvedConflicts.Add(new TaskItem(assemblyName.Name, new Dictionary<string, string>() 3077Dictionary<string, AssemblyTableInfo> tableMap = new Dictionary<string, AssemblyTableInfo>(StringComparer.OrdinalIgnoreCase);
AssignProjectConfiguration.cs (2)
370_vcxToDefaultMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 371_defaultToVcxMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BootstrapperUtil\BootstrapperBuilder.cs (8)
43private readonly Dictionary<string, XmlNode> _cultures = new Dictionary<string, XmlNode>(StringComparer.OrdinalIgnoreCase); 44private readonly Dictionary<string, ProductValidationResults> _validationResults = new Dictionary<string, ProductValidationResults>(StringComparer.Ordinal); 207var eulas = new Dictionary<string, KeyValuePair<string, string>>(StringComparer.Ordinal); 272var builtProducts = new Dictionary<string, ProductBuilder>(); 273var productsAndIncludes = new Dictionary<string, Product>(); 618var availableProducts = new Dictionary<string, Product>(StringComparer.Ordinal); 620var buildQueue = new Dictionary<string, Product>(StringComparer.Ordinal); 2212var includedProducts = new Dictionary<string, Product>(StringComparer.OrdinalIgnoreCase)
BootstrapperUtil\PackageCollection.cs (1)
16private readonly Dictionary<string, Package> _cultures = new Dictionary<string, Package>(StringComparer.OrdinalIgnoreCase);
BootstrapperUtil\Product.cs (1)
30private readonly Dictionary<string, Package> _cultures = new Dictionary<string, Package>(StringComparer.OrdinalIgnoreCase);
BootstrapperUtil\ProductCollection.cs (1)
22private readonly Dictionary<string, Product> _table = new Dictionary<string, Product>(StringComparer.OrdinalIgnoreCase);
BootstrapperUtil\productvalidationresults.cs (1)
17new Dictionary<string, XmlValidationResults>(StringComparer.Ordinal);
CommunicationsUtilities.cs (2)
482Dictionary<string, string> table = new(200, StringComparer.OrdinalIgnoreCase); // Razzle has 150 environment variables 625Dictionary<string, string> table = new(vars.Count, StringComparer.OrdinalIgnoreCase);
Copy.cs (2)
492var filesActuallyCopied = new Dictionary<string, string>( 586var partitionsByDestination = new Dictionary<string, List<int>>(
CreateItem.cs (1)
219var uniqueItems = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
CreateManifestResourceName.cs (1)
36protected Dictionary<string, ITaskItem> itemSpecToTaskitem = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase);
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
FileIO\GetFileHash.cs (1)
27= new Dictionary<string, Func<HashAlgorithm>>(StringComparer.OrdinalIgnoreCase)
FileMatcher.cs (1)
2494searchesToExcludeInSubdirs = new Dictionary<string, List<RecursionState>>(StringComparer.OrdinalIgnoreCase);
GenerateResource.cs (1)
3884resourcesHashTable = new Dictionary<string, IResource>(StringComparer.OrdinalIgnoreCase);
GetSDKReferenceFiles.cs (4)
1225_pathToReferenceMetadata = new Dictionary<string, SdkReferenceInfo>(StringComparer.OrdinalIgnoreCase); 1226_directoryToFileList = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase); 1271}, count => new Dictionary<string, SdkReferenceInfo>(count, StringComparer.OrdinalIgnoreCase)); 1276}, count => new Dictionary<string, List<string>>(count, StringComparer.OrdinalIgnoreCase));
ManifestUtil\ApplicationManifest.cs (4)
433var clsidList = new Dictionary<string, ComInfo>(); 434var tlbidList = new Dictionary<string, ComInfo>(); 565var usedExtensions = new Dictionary<string, FileAssociation>(StringComparer.OrdinalIgnoreCase); 642var targetPathList = new Dictionary<string, bool>();
ManifestUtil\AssemblyIdentity.cs (1)
402var redistDictionary = new Dictionary<string, RedistList>();
ManifestUtil\Manifest.cs (1)
624var identityList = new Dictionary<string, bool>();
ManifestUtil\Util.cs (1)
413var list = new Dictionary<string, ITaskItem>();
MSBuild.cs (1)
567var combinedTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
NodePacketFactory.cs (1)
26_packetFactories = new Dictionary<NodePacketType, PacketFactoryRecord>();
PlatformNegotiation.cs (1)
106Dictionary<string, string> table = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
PropertyParser.cs (2)
33propertiesTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 89finalPropertiesTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ReadOnlyEmptyDictionary.cs (2)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>(); 171return new Dictionary<K, V>()[key];
RedistList.cs (7)
38private static readonly Dictionary<string, RedistList> s_cachedRedistList = new Dictionary<string, RedistList>(StringComparer.OrdinalIgnoreCase); 116var simpleNameMap = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); 300s_redistListPathCache = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase); 665var denyListOfAssemblyNames = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 698var assemblyEntries = new Dictionary<string, AssemblyEntry>(StringComparer.OrdinalIgnoreCase); 870var attributes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1070s_subsetListPathCache = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase);
ResGenDependencies.cs (4)
32internal IDictionary<string, ResXFile> resXFiles = new Dictionary<string, ResXFile>(); 37internal IDictionary<string, PortableLibraryFile> portableLibraries = new Dictionary<string, PortableLibraryFile>(); 111count => new Dictionary<string, ResXFile>(count)); 120count => new Dictionary<string, PortableLibraryFile>(count));
ResolveManifestFiles.cs (4)
835private readonly Dictionary<string, MapEntry> _dictionary = new Dictionary<string, MapEntry>(); 836private readonly Dictionary<string, MapEntry> _simpleNameDictionary = new Dictionary<string, MapEntry>(); 900private readonly Dictionary<string, MapEntry> _dictionary = new Dictionary<string, MapEntry>(StringComparer.InvariantCultureIgnoreCase); 948private readonly Dictionary<string, MapEntry> _dictionary = new Dictionary<string, MapEntry>();
ResolveSDKReference.cs (7)
30private static readonly Dictionary<string, string> PlatformAliases = new(StringComparer.OrdinalIgnoreCase) 286_runtimeReferenceOnlyDependenciesByName = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase); 300var sdkItems = new Dictionary<string, ITaskItem>(InstalledSDKs.Length, StringComparer.OrdinalIgnoreCase); 332var productFamilyNameToSDK = new Dictionary<string, HashSet<SDKReference>>(StringComparer.OrdinalIgnoreCase); 335var sdkNameToSDK = new Dictionary<string, HashSet<SDKReference>>(StringComparer.OrdinalIgnoreCase); 741FrameworkIdentitiesFromManifest = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 742AppxLocationsFromManifest = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ResourceHandling\MSBuildResXReader.cs (1)
24var aliases = new Dictionary<string, string>();
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (2)
46internal static readonly IDictionary<string, IEnumerable<string>> DefaultReferences = new Dictionary<string, IEnumerable<string>>(StringComparer.OrdinalIgnoreCase) 71internal static readonly IDictionary<string, ISet<string>> ValidCodeLanguages = new Dictionary<string, ISet<string>>(StringComparer.OrdinalIgnoreCase)
SolutionConfiguration.cs (5)
51_cachedProjectElements = new Dictionary<string, XmlElement>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase); 52_cachedProjectElementsByAbsolutePath = new Dictionary<string, XmlElement>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase); 53_cachedProjectAbsolutePathsByGuid = new Dictionary<string, string>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase); 54_cachedProjectGuidsByAbsolutePath = new Dictionary<string, string>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase); 55_cachedDependencyProjectGuidsByDependingProjectGuid = new Dictionary<string, List<string>>(projectConfigurationCount, StringComparer.OrdinalIgnoreCase);
system.design\stronglytypedresourcebuilder.cs (2)
121var resourceTypes = new Dictionary<String, ResourceData>(StringComparer.InvariantCultureIgnoreCase); 720reverseFixupTable = new Dictionary<string, string>(0, StringComparer.InvariantCultureIgnoreCase);
SystemState.cs (6)
31private Dictionary<string, FileState> upToDateLocalFileStateCache = new Dictionary<string, FileState>(StringComparer.OrdinalIgnoreCase); 42internal Dictionary<string, FileState> instanceLocalFileStateCache = new Dictionary<string, FileState>(StringComparer.OrdinalIgnoreCase); 47internal Dictionary<string, FileState> instanceLocalOutgoingFileStateCache = new Dictionary<string, FileState>(StringComparer.OrdinalIgnoreCase); 54private Dictionary<string, DateTime> instanceLocalLastModifiedCache = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase); 61private Dictionary<string, bool> instanceLocalDirectoryExists = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase); 68private Dictionary<string, string[]> instanceLocalDirectories = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase);
TaskParameter.cs (5)
584_customEscapedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 601_customEscapedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 713_customEscapedMetadata ??= new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 802IDictionary<string, string> clonedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 864IDictionary clonedDictionary = new Dictionary<string, string>(_customEscapedMetadata);
Telemetry.cs (1)
34IDictionary<string, string> properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Tracing.cs (1)
58s_counts = new Dictionary<string, int>();
TranslatorHelpers.cs (5)
106capacity => new Dictionary<string, string>(capacity, comparer)); 123capacity => new Dictionary<string, T>(capacity, stringComparer)); 139capacity => new Dictionary<string, string>(capacity, comparer)); 156capacity => new Dictionary<string, T>(capacity, stringComparer)); 188translator.TranslateDictionary(ref localDict, capacity => new Dictionary<string, string>(capacity, comparer));
WriteCodeFragment.cs (3)
38private static readonly IReadOnlyDictionary<string, ParameterType> EmptyParameterTypes = new Dictionary<string, ParameterType>(); 328parameterTypes = new(); 358parameterTypes = new();
Microsoft.Build.Tasks.UnitTests (51)
AssemblyDependency\Node\RarNodeExecuteResponse_Tests.cs (7)
25new Dictionary<string, string>() 33new Dictionary<string, string>() 64new Dictionary<string, string>() 73new Dictionary<string, string>() 80new Dictionary<string, string>() 87new Dictionary<string, string>() 99new Dictionary<string, string>()
AssemblyDependency\ResolveAssemblyReferenceCacheSerialization.cs (3)
102Dictionary<string, SystemState.FileState> cache = new() { 145Dictionary<string, SystemState.FileState> cache = new() { 174Dictionary<string, SystemState.FileState> cache = new() {
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (2)
309uniqueFileExists = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); 310uniqueGetAssemblyName = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
AssemblyDependency\SuggestedRedirects.cs (2)
360new TaskItem("A", new Dictionary<string, string> { ["ExternallyResolved"] = "true" }), 361new TaskItem("B", new Dictionary<string, string> { ["ExternallyResolved"] = "true" }),
AssignLinkMetadata_Tests.cs (1)
183IDictionary<string, string> metadata = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
AssignTargetPath_Tests.cs (1)
94Dictionary<string, string> metaData = new Dictionary<string, string>();
CreateItem_Tests.cs (1)
205BuildRequestData data = new BuildRequestData(projectFileFullPath, new Dictionary<string, string>(), null, new string[] { "Repro" }, null);
Exec_Tests.cs (2)
962new Dictionary<string, string>(), 1019new Dictionary<string, string>(),
FindInvalidProjectReferences_Tests.cs (4)
28Dictionary<string, string> proj1 = new Dictionary<string, string>(); 31Dictionary<string, string> proj2 = new Dictionary<string, string>(); 34Dictionary<string, string> proj3 = new Dictionary<string, string>(); 37Dictionary<string, string> proj4 = new Dictionary<string, string>();
GetInstalledSDKLocations_Tests.cs (3)
288Dictionary<string, string> sdksAndVersions = new Dictionary<string, string>(); 335Dictionary<string, string> extensionSDKs = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 409Dictionary<string, string> extensionSDKs = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
GetSDKReference_Tests.cs (2)
265Dictionary<string, GetSDKReferenceFiles.SdkReferenceInfo> pathToReferenceMetadata = new(); 268Dictionary<string, List<string>> directoryToFileList = new();
MockUnmanagedMemoryHelper.cs (1)
25private Dictionary<IntPtr, List<IntPtr>> _dependentAllocations = new Dictionary<IntPtr, List<IntPtr>>();
RARPrecomputedCache_Tests.cs (3)
30t._cache.instanceLocalFileStateCache = new Dictionary<string, SystemState.FileState>() { 65rarWriterTask._cache.instanceLocalFileStateCache = new() { 117rarWriterTask._cache.instanceLocalFileStateCache = new Dictionary<string, SystemState.FileState>() {
ResolveSDKReference_Tests.cs (13)
332Dictionary<string, string> dict = new Dictionary<string, string>(); 3815IDictionary<string, TargetResult> targetResults = new Dictionary<string, TargetResult>(); 3824targetResults = new Dictionary<string, TargetResult>(); 3958IDictionary<string, TargetResult> targetResults = new Dictionary<string, TargetResult>(); 3967targetResults = new Dictionary<string, TargetResult>(); 4067IDictionary<string, TargetResult> targetResults = new Dictionary<string, TargetResult>(); 4076targetResults = new Dictionary<string, TargetResult>(); 4164IDictionary<string, TargetResult> targetResults = new Dictionary<string, TargetResult>(); 4175targetResults = new Dictionary<string, TargetResult>(); 4198SDKReference reference = new(new TaskItem("sdkReference", new Dictionary<string, string>() { { SDKManifest.Attributes.TargetPlatform, "UAP" } }), "sdkName", "1.0.2"); 4200new Dictionary<string, ITaskItem>() { { "sdkName, Version=1.0.2", new TaskItem(Path.GetTempFileName(), new Dictionary<string, string>() { { "PlatformVersion", "1.0.2" } }) } }, 4333IDictionary<string, TargetResult> targetResults = new Dictionary<string, TargetResult>();
ResourceHandling\GenerateResource_Tests.cs (1)
3634Dictionary<string, object> valuesFromResource = new Dictionary<string, object>();
RoslynCodeTaskFactory_Tests.cs (5)
254new Dictionary<string, TaskPropertyInfo>(StringComparer.OrdinalIgnoreCase), 272new Dictionary<string, TaskPropertyInfo>(StringComparer.OrdinalIgnoreCase), 1024bool success = factory.Initialize(taskName, new Dictionary<string, TaskPropertyInfo>(), taskBody, buildEngine); 1063bool success = factory.Initialize("TestTaskForced", new Dictionary<string, TaskPropertyInfo>(), taskCode, mockEngine); 1093bool success = factory.Initialize("TestTaskBoth", new Dictionary<string, TaskPropertyInfo>(), taskBody, buildEngine);
Microsoft.Build.UnitTests.Shared (14)
MockEngine.cs (4)
61public Dictionary<string, string> GlobalProperties { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 260var finalGlobalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 329Dictionary<string, string> finalGlobalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 344targetOutputsPerProject.Add(new Dictionary<string, ITaskItem[]>(StringComparer.OrdinalIgnoreCase));
ObjectModelHelpers.cs (9)
124return new Project(p, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, c) 259expectedDirectMetadata = new Dictionary<string, string>(); 469expected ??= new Dictionary<string, string>(); 1018BuildRequestData data = new BuildRequestData(projectFileFullPath, globalProperties ?? new Dictionary<string, string>(), null, targets, null); 1230Dictionary<string, V> dictionary = new Dictionary<string, V>(StringComparer.OrdinalIgnoreCase); 1440new Dictionary<string, string>(), 1767var nodes = new Dictionary<int, (bool IsRoot, string ProjectPath)>(); 1816globalProperties ?? new Dictionary<string, string>(), 2121globalProperties ?? new Dictionary<string, string>(),
TestEnvironment.cs (1)
631var tempPaths = new TempPaths
Microsoft.Build.Utilities.Core (48)
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
FileMatcher.cs (1)
2494searchesToExcludeInSubdirs = new Dictionary<string, List<RecursionState>>(StringComparer.OrdinalIgnoreCase);
MuxLogger.cs (2)
58private readonly Dictionary<int, SubmissionRecord> _submissionRecords = new Dictionary<int, SubmissionRecord>(); 93private readonly Dictionary<int, int> _submissionProjectsInProgress = new Dictionary<int, int>();
ReadOnlyEmptyDictionary.cs (2)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>(); 171return new Dictionary<K, V>()[key];
SDKManifest.cs (2)
379_frameworkIdentities = new Dictionary<string, string>(); 390_appxLocations = new Dictionary<string, string>();
TargetPlatformSDK.cs (2)
49ExtensionSDKs = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 50Platforms = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ToolLocationHelper.cs (13)
403var extensionSDKs = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 449var extensionSDKsAndVersions = new Dictionary<string, Tuple<string, string>>(StringComparer.OrdinalIgnoreCase); 623var filteredExtensionSdks = new Dictionary<string, string>(); 888s_cachedTargetPlatformReferences = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase); 957s_cachedExtensionSdkReferences = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase); 1418s_vsInstallFolders = new Dictionary<string, string[]>(); 2100s_cachedReferenceAssemblyPaths = new Dictionary<string, IList<string>>(StringComparer.OrdinalIgnoreCase); 2455s_cachedTargetPlatforms = new Dictionary<string, IEnumerable<TargetPlatformSDK>>(StringComparer.OrdinalIgnoreCase); 2460s_cachedExtensionSdks = new Dictionary<string, TargetPlatformSDK>(StringComparer.OrdinalIgnoreCase); 2465var monikers = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3098s_chainedReferenceAssemblyPath ??= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3099s_cachedTargetFrameworkDisplayNames ??= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3680s_cachedHighestFrameworkNameForTargetFrameworkIdentifier = new Dictionary<string, FrameworkNameVersioning>(StringComparer.OrdinalIgnoreCase);
ToolsetElement.cs (3)
171private Dictionary<string, string> _previouslySeenOS = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 346private Dictionary<string, string> _previouslySeenPropertyNames = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 525private Dictionary<string, string> _previouslySeenToolsVersions = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Tracing.cs (1)
58s_counts = new Dictionary<string, int>();
TrackedDependencies\CanonicalTrackedInputFiles.cs (8)
172DependencyTable = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); 343var sourcesNeedingCompilation = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase); 687primaryFiles = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 713dependencies = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 776dependencies = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 834DependencyTable = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); 1028Dictionary<string, bool> fileCache = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase); 1061var dependenciesWithoutMissingFiles = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
TrackedDependencies\CanonicalTrackedOutputFiles.cs (8)
85DependencyTable = new Dictionary<string, Dictionary<string, DateTime>>(StringComparer.OrdinalIgnoreCase); 187dependencies = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase); 250DependencyTable = new Dictionary<string, Dictionary<string, DateTime>>(StringComparer.OrdinalIgnoreCase); 344var outputs = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase); 416var outputs = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase); 539dependencies = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase); 722Dictionary<string, bool> fileCache = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase); 755var dependenciesWithoutMissingFiles = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase);
TrackedDependencies\DependencyTableCache.cs (1)
31internal static Dictionary<string, DependencyTableCacheEntry> DependencyTable { get; } = new Dictionary<string, DependencyTableCacheEntry>(StringComparer.OrdinalIgnoreCase);
TrackedDependencies\FlatTrackingData.cs (4)
58private readonly IDictionary<string, DateTime> _lastWriteTimeUtcCache = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase); 67internal Dictionary<string, DateTime> DependencyTable { get; private set; } = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase); 484DependencyTable = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase); 866IDictionary<string, ITaskItem> trackedFilesToRemove = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Utilities.UnitTests (7)
TaskItem_Tests.cs (2)
307IDictionary<string, string> metadata = new Dictionary<string, string>(); 329Dictionary<string, string> metadata = new()
ToolLocationHelper_Tests.cs (5)
3080var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3092var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3107var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3788var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 4057var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
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 (131)
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)
103map = 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)
422_lazyGeneratedCodeSymbolsForTreeMap = new Dictionary<SyntaxTree, ImmutableHashSet<ISymbol>>();
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
194var map = new Dictionary<DiagnosticAnalyzer, AnalyzerOptions>( 201var optionsProviderToOptions = new Dictionary<AnalyzerConfigOptionsProvider, AnalyzerOptions>(ReferenceEqualityComparer.Instance);
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>(); 248var declaratorToIndex = new Dictionary<SyntaxNode, int>(); 557var hoistedLocals = new Dictionary<EncHoistedLocalInfo, int>(); 558var awaiters = new Dictionary<Cci.ITypeReference, int>(Cci.SymbolEquivalentEqualityComparer.Instance);
Emit\EditAndContinue\DeltaMetadataWriter.cs (12)
99_deletedTypeMembers = new Dictionary<ITypeDefinition, ImmutableArray<ITypeDefinitionMember>>(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>(); 253var result = new Dictionary<K, V>(comparer); 508var result = new Dictionary<ITypeDefinition, ArrayBuilder<ITypeDefinitionMember>>(ReferenceEqualityComparer.Instance); 509var typesUsedByDeletedMembers = new Dictionary<ITypeDefinition, DeletedSourceTypeDefinition>(ReferenceEqualityComparer.Instance); 1501this.added = new Dictionary<T, int>(comparer); 1594_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)
357var changesBuilder = new Dictionary<ISymbolInternal, SymbolChange>(); 358var updatedMethodsBuilder = new Dictionary<INamedTypeSymbolInternal, ArrayBuilder<(IMethodSymbolInternal oldMethod, IMethodSymbolInternal newMethod)>>(); 387lazyDeletedMembersBuilder ??= new();
Emit\EditAndContinue\SymbolMatcher.cs (2)
78var result = new Dictionary<K, V>(Cci.SymbolEquivalentEqualityComparer.Instance); 97var 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); 249_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); 3813var caseInsensitiveMap = new Dictionary<string, (string OriginalName, int FirstIndex, int SecondIndex)>(StringComparer.OrdinalIgnoreCase); 3881typesToAssemblyIndexMap ??= 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); 4271: this(writer, new Dictionary<T, int>(), lastRowId) 4298: this(writer, new Dictionary<ITypeReference, int>(ReferenceEqualityComparer.Instance), lastRowId) 4328_instanceIndex = new Dictionary<T, int>(ReferenceEqualityComparer.Instance); 4329_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)
93s_nameToTypeIdMap = new Dictionary<string, ExtendedSpecialType>((int)InternalSpecialType.NextAvailable - 1);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
WellKnownTypes.cs (1)
707private 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)
146var 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
32var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var dictionary = new Dictionary<K, ImmutableArray<V>>(builders.Count);
Microsoft.CodeAnalysis.CodeStyle.Fixes (16)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
81var typeToNameSegments = new Dictionary<ITypeSymbol, ImmutableArray<string>>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
174var result = new Dictionary<ITypeSymbol, ITypeParameterSymbol>(SymbolEqualityComparer.Default);
src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
288var canEditMap = new Dictionary<DocumentId, bool>();
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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.CSharp (82)
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)
288constraints = new Dictionary<BoundDagTemp, ArrayBuilder<(BoundDagTest, bool)>>(); 289evaluations = new Dictionary<BoundDagTemp, ArrayBuilder<BoundDagEvaluation>>(); 573var properties = new Dictionary<Symbol, string>();
Binder\RefSafetyAnalysis.cs (2)
240_placeholderScopes ??= new Dictionary<BoundValuePlaceholderBase, SafeContextAndLocation>(); 505_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 (2)
97var map = new Dictionary<object, SourceLabelSymbol>(labels.Length, new SwitchConstantValueHelper.SwitchLabelsComparer()); 456var result = new Dictionary<SyntaxNode, LabelSymbol>();
BoundTree\BoundNode_Source.cs (1)
22appendSourceCore(this, indent: 0, tempIdentifiers: new Dictionary<SynthesizedLocal, int>());
CodeGen\EmitStatement.cs (1)
2041_labelClones = labelClones = new Dictionary<LabelSymbol, GeneratedLabelSymbol>();
CommandLine\CSharpCommandLineParser.cs (3)
121var diagnosticOptions = new Dictionary<string, ReportDiagnostic>(); 122var noWarns = new Dictionary<string, ReportDiagnostic>(); 123var 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>(); 1454_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 (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)
718var exportedNamesMap = new Dictionary<string, NamedTypeSymbol>(StringOrdinalComparer.Instance); 1617Interlocked.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)
896_labelsInInterestingTry = labelsInInterestingTry = new Dictionary<BoundTryStatement, HashSet<LabelSymbol>>(); 1042this.proxyLabels = proxyLabels = new Dictionary<LabelSymbol, LabelSymbol>(); 1123_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, BoundValuePlaceholderBase> _placeholderMap = new Dictionary<BoundValuePlaceholderBase, BoundValuePlaceholderBase>();
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)
44private 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>>(); 238_dispatches ??= new Dictionary<LabelSymbol, List<StateMachineState>>(); 503_lazyAvailableReusableHoistedFields = new Dictionary<TypeSymbol, ArrayBuilder<StateMachineFieldSymbol>>(Symbols.SymbolEqualityComparer.IgnoringDynamicTupleNamesAndNullability); 746oldDispatches ??= 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)
163ordinals = 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\ExtensionGroupingInfo.cs (2)
31var groupingMap = new Dictionary<string, MultiDictionary<string, SourceNamedTypeSymbol>>(EqualityComparer<string>.Default); 330var counts = new Dictionary<CSharpAttributeData, int>(comparer);
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 (11)
209new Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>>(EmptyReadOnlyMemoryOfCharComparer.Instance); 1342var conflictDict = new Dictionary<(string name, int arity, SyntaxTree? syntaxTree), SourceNamedTypeSymbol>(); 1658return new Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>(1, ReadOnlyMemoryOfCharComparer.Instance) 1666return new Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>(ReadOnlyMemoryOfCharComparer.Instance); 1679var dictionary = new Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>(accumulator.Count, ReadOnlyMemoryOfCharComparer.Instance); 2018var methodsBySignature = new Dictionary<MethodSymbol, MethodSymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2019var conversionsAsMethods = new Dictionary<MethodSymbol, MethodSymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2272var indexersBySignature = new Dictionary<PropertySymbol, PropertySymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2465membersByName = new Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>(membersByName, ReadOnlyMemoryOfCharComparer.Instance); 2974var instanceMap = new Dictionary<NamedTypeSymbol, NamedTypeSymbol>(ReferenceEqualityComparer.Instance); 3973var membersBySignature = new Dictionary<Symbol, Symbol>(MemberSignatureComparer.PartialMethodsComparer);
Symbols\Source\SourceNamespaceSymbol.cs (1)
282var result = new Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamespaceOrTypeSymbol>>(builder.Count, ReadOnlyMemoryOfCharComparer.Instance);
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[]>() 2437var expectedEmbeddedMap = new Dictionary<string, string>(); 9871Assert.True(args.ParseOptions.Features.SetEquals(new Dictionary<string, string> { { "Test", "false" }, { "Key", "value" } })); 9875Assert.True(args.ParseOptions.Features.SetEquals(new Dictionary<string, string> { { "Test", "true" } })); 13932ValidateEmbeddedSources_Portable(new Dictionary<string, string> { { Path.Combine(dir.Path, generatorPrefix, $"generatedSource.cs"), generatedSource } }, dir, true); 13973ValidateEmbeddedSources_Portable(new Dictionary<string, string> { { Path.Combine(dir.Path, generatorPrefix, "generatedSource.cs"), generatedSource } }, dir, true); 14014ValidateEmbeddedSources_Portable(new Dictionary<string, string> 14098ValidateWrittenSources(new() 14100{ Path.Combine(generatedDir.Path, generatorPrefix, expectedDir), new() { { expectedFileName, generatedSource } } } 14124ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource1 } } } }); 14131ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource2 } } } }); 14161ValidateWrittenSources(new() 14163{ generator1Prefix, new() { { source1Name, source1 } } }, 14164{ generator2Prefix, new() { { source2Name, source2 } } } 14200ValidateWrittenSources(new() 14202{ Path.Combine(generatedDir.Path, generatorPrefix, expectedDir), new() { { generatedFileName, generatedSource } } } 14252ValidateWrittenSources(new() 14255{ Path.Combine(generatedDir.Path, "generator", "TestGenerator"), new() { { "generatedSource.cs", "//from version 2.0.0.0" } } } 14273ValidateWrittenSources(new() { { generatedDir.Path, new() } }); 14317ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource } } } }); 14629ValidateWrittenSources(new() 14631{ generatorPrefix, new() { { "Generated.cs", generatedSource } } },
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (29)
CodeActions\AddUsing\AddUsingTests.cs (1)
2153var resolver = new TestMetadataReferenceResolver(assemblyNames: new Dictionary<string, PortableExecutableReference>()
Formatting\CodeCleanupTests.cs (1)
825var 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>() 1480expectedSymbolChanges: new Dictionary<string, string>() 1524expectedSymbolChanges: new Dictionary<string, string>() 1554expectedSymbolChanges: new Dictionary<string, string>()
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (3)
Recommendations\FromKeywordRecommenderTests.cs (1)
196var experimentalFeatures = new System.Collections.Generic.Dictionary<string, string>(); // no experimental features to enable
Recommendations\IsKeywordRecommenderTests.cs (1)
113var 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)
317var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 332specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 344specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 459var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 531var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 540specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 1141var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 1283specificOptions = specificOptions ?? new Dictionary<string, ReportDiagnostic>(); 1303var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", ReportDiagnostic.Default } }; 1324var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", specificOption } }; 1347var 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)
65private static readonly Dictionary<string, object[]> s_codeBlockSuggestions = new()
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (1)
181var implementationMap = new Dictionary<string, string>
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
450var experimentalFeatures = new Dictionary<string, string>(); // no experimental features to enable 499var featuresToEnable = new Dictionary<string, string>() { { feature, "enabled" } };
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
1086var builtInTypeMap = new Dictionary<string, string>()
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.FixAllProvider.cs (1)
36Dictionary<IBlockOperation, IdentifierGenerator> scopeMap = new();
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>() 11082var 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 (44)
Diagnostics\DiagnosticTest.cs (26)
574IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 618IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 678IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 729IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 785IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 841IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 899IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 957IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1016IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1086IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1157IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1222IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1275IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1329IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1379IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1430var warnings = new Dictionary<string, ReportDiagnostic>(); 1486IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1503warnings = new Dictionary<string, ReportDiagnostic>(); 1553IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1603IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1659IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1706IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1743IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1776IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>(); 1825var warnings = new Dictionary<string, ReportDiagnostic>(); 2249var 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" } });
Parsing\CSharpParseOptionsTests.cs (2)
61var options1 = CSharpParseOptions.Default.WithFeatures(new Dictionary<string, string>() { { "F1", "V1" }, { "F2", "V2" } }); 62var options2 = CSharpParseOptions.Default.WithFeatures(new Dictionary<string, string>() { { "f2", "V2" }, { "F1", "V1" } });
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)
64public 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)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
442var tempMappedMarkupSpans = new Dictionary<string, PooledObjects.ArrayBuilder<TextSpan>>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
731var map = new Dictionary<string, ImmutableArray<DiagnosticAnalyzer>>() 781var map = new Dictionary<string, ImmutableArray<DiagnosticAnalyzer>>()
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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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.ExternalAccess.FSharp (1)
Editor\Shared\Utilities\FSharpClassificationTypeMap.cs (1)
31_identityMap = new Dictionary<string, IClassificationType>(fields.Length, ReferenceEqualityComparer.Instance);
Microsoft.CodeAnalysis.Features (64)
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)
505var uniqueDiagnosticToEquivalenceKeysMap = new Dictionary<Diagnostic, PooledHashSet<string?>>(); 510var 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)
305var result = new Dictionary<CompletionProvider, int>(completionProviders.Length);
Completion\Providers\AbstractDocCommentCompletionProvider.cs (1)
31new()
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)
181var idToCount = new Dictionary<string, int>(); 182var categoryToCount = new Dictionary<string, int>(); 183var severityToCount = new Dictionary<DiagnosticSeverity, int>(); 243var diagnosticIdToCount = new Dictionary<string, int>(); 244var diagnosticIdToApplicationTime = new Dictionary<string, TimeSpan>(); 245var diagnosticIdToProviderName = new Dictionary<string, HashSet<string>>(); 246var providerNameToApplicationTime = new Dictionary<string, TimeSpan>(); 247var providerNameToHasConflict = new Dictionary<string, bool>(); 248var providerNameToTotalCount = new Dictionary<string, int>(); 249var providerNameToSuccessCount = new Dictionary<string, int>();
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
797var map = new Dictionary<SyntaxNode, EditKind>(editScript.Edits.Length); 1629var map = new Dictionary<SyntaxNode, SyntaxNode>();
EditAndContinue\EditSession.cs (2)
873var mergedUpdateEditSyntaxMaps = new Dictionary<SymbolKey, (Func<SyntaxNode, SyntaxNode?>? matchingNodes, Func<SyntaxNode, RuntimeRudeEdit?>? runtimeRudeEdits)>(symbolKeyComparer); 1065var 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)
359var renameTable = new Dictionary<ISymbol, string>();
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (1)
277var 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)
509var result = new Dictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>(_documentationMap);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
413var nodesToUpdate = new Dictionary<SyntaxNode, SyntaxNode>();
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)
174var result = new Dictionary<ITypeSymbol, ITypeParameterSymbol>(SymbolEqualityComparer.Default);
src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
288var canEditMap = new Dictionary<DocumentId, bool>();
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
60var builtReferences = new Dictionary<string, ReferenceInfo?>();
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)
543var result = new Dictionary<SyntaxNode, SyntaxNode>();
EditAndContinue\SourceMarkers.cs (1)
52var tagMap = new Dictionary<(int major, int minor), (int start, int end)>();
Microsoft.CodeAnalysis.Features.UnitTests (5)
EditAndContinue\ActiveStatementsMapTests.cs (3)
126var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>(); 183var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>(); 236var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>();
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
510var initialNonRemappableRegions = new Dictionary<ManagedMethodId, ImmutableArray<NonRemappableRegion>>
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
175var runningProjects1 = new Dictionary<ProjectId, RunningProjectOptions>
Microsoft.CodeAnalysis.InteractiveHost (6)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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(s_stringComparer);
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
114var 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)
55public static readonly ImmutableDictionary<string, ImmutableArray<LSP.CompletionItemKind>> RoslynTagToCompletionItemKinds = new Dictionary<string, ImmutableArray<LSP.CompletionItemKind>>() 102public 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); 280var 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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)
75private 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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)
103var map = new Dictionary<string, ICSharpCode.Decompiler.TypeSystem.IMethod>(); 429var 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)
398var result = new Dictionary<int, string>(); 429var 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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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 (19)
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 (3)
50Friend blockParent As Dictionary(Of BoundNode, BoundNode) = New Dictionary(Of BoundNode, BoundNode)() 58Friend variableScope As Dictionary(Of Symbol, BoundNode) = New Dictionary(Of Symbol, BoundNode)(ReferenceEqualityComparer.Instance) 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.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)
36private 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(identifierComparer);
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
264var documentIdErrorStateLookup = new Dictionary<DocumentId, bool>(); 344var reverseMappedLocations = new Dictionary<Location, Location>();
Rename\ConflictEngine\DeclarationConflictHelpers.cs (1)
44var signatureToConflictingMember = new Dictionary<ImmutableArray<ParameterSignature>, 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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)
68var 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)
134private 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)
128var 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 (4)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
95_pathToDiscoveredProjectInfosMap = new Dictionary<string, ImmutableArray<ProjectInfo>>(PathUtilities.Comparer);
MSBuild\ProjectFileExtensionRegistry.cs (1)
26_extensionToLanguageMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
MSBuild\ProjectMap.cs (2)
44_projectPathToProjectIdsMap = new Dictionary<string, HashSet<ProjectId>>(PathUtilities.Comparer); 45_projectPathToProjectInfosMap = new Dictionary<string, ImmutableArray<ProjectInfo>>(PathUtilities.Comparer);
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)
303_documents = new Dictionary<string, MSB.Evaluation.ProjectItem>(); 368metadata = new Dictionary<string, string> 404var metadata = new Dictionary<string, string>(); 478var 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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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 (3)
MSBuildWorkspaceTestBase.cs (1)
185var properties = new Dictionary<string, string>();
NetCoreTests.cs (1)
38var environmentVariables = new Dictionary<string, string>()
NewlyCreatedProjectsFromDotNetNew.cs (1)
255Dictionary<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)
615var projectNameToTestHostProject = new Dictionary<string, TProject>(); 616var 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.ApiCompat.IntegrationTests (5)
Task\ValidatePackageTargetIntegrationTests.cs (5)
177Dictionary<NuGetFramework, IEnumerable<string>> references = new() 209Dictionary<NuGetFramework, IEnumerable<string>> references = new() 250Dictionary<NuGetFramework, IEnumerable<string>> references = new() 279Dictionary<NuGetFramework, IEnumerable<string>> references = new() 303Dictionary<NuGetFramework, IEnumerable<string>> references = new()
Microsoft.DotNet.ApiCompat.Task (2)
TaskBase.cs (1)
53(BuildEngine as IBuildEngine5)?.LogTelemetry(eventName, new Dictionary<string, string> {
ValidatePackageTask.cs (1)
172Dictionary<NuGetFramework, IEnumerable<string>> packageAssemblyReferencesDict = new(packageAssemblyReferences.Length);
Microsoft.DotNet.ApiCompat.Tool (1)
Program.cs (1)
399Dictionary<NuGetFramework, IEnumerable<string>> packageAssemblyReferencesDict = new(argumentResult.Tokens.Count);
Microsoft.DotNet.ApiCompatibility (6)
Mapping\AssemblyMapper.cs (2)
33_namespaces = new Dictionary<INamespaceSymbol, INamespaceMapper>(Settings.SymbolEqualityComparer); 107Dictionary<INamespaceSymbol, List<INamedTypeSymbol>> typeForwards = new(comparer);
Mapping\AssemblySetMapper.cs (1)
29_assemblies = new Dictionary<IAssemblySymbol, IAssemblyMapper>(Settings.SymbolEqualityComparer);
Mapping\NamespaceMapper.cs (1)
39_types = new Dictionary<ITypeSymbol, ITypeMapper>(Settings.SymbolEqualityComparer);
Mapping\TypeMapper.cs (2)
79_nestedTypes = new Dictionary<ITypeSymbol, ITypeMapper>(Settings.SymbolEqualityComparer); 118_members = new Dictionary<ISymbol, IMemberMapper>(Settings.SymbolEqualityComparer);
Microsoft.DotNet.ApiDiff (1)
SyntaxRewriter\PrimitiveSimplificationRewriter.cs (1)
14private static readonly Dictionary<string, SyntaxKind> s_primitives = new() {
Microsoft.DotNet.ApiDiff.Tests (15)
Diff.Assembly.Tests.cs (3)
19expected: new Dictionary<string, string>() { 48expected: new Dictionary<string, string>() { 78expected: new Dictionary<string, string>() {
Diff.Base.Tests.cs (1)
30expected: new() { { AssemblyName, expectedCode } },
Diff.Disk.Tests.cs (9)
73private readonly Dictionary<string, string[]> DefaultBeforeAssemblyAndCodeFiles = new() { { DefaultAssemblyName, [BeforeCode] } }; 74private readonly Dictionary<string, string[]> DefaultAfterAssemblyAndCodeFiles = new() { { DefaultAssemblyName, [AfterCode] } }; 75private readonly Dictionary<string, string> DefaultExpectedAssemblyMarkdowns = new() { { DefaultAssemblyName, DefaultExpectedMarkdown } }; 184Dictionary<string, string[]> beforeAssemblyAndCodeFiles = new() 190Dictionary<string, string[]> afterAssemblyAndCodeFiles = new() 196Dictionary<string, string> expectedAssemblyMarkdowns = new() 362Dictionary<string, string[]> beforeAssemblyAndCodeFiles = new() { { DefaultAssemblyName, [beforeCode1, beforeCode2] } }; 363Dictionary<string, string[]> afterAssemblyAndCodeFiles = new() { { DefaultAssemblyName, [afterCode1, afterCode2] } }; 364Dictionary<string, string> expectedAssemblyMarkdowns = new() { { DefaultAssemblyName, expectedMarkdown } };
TestAssemblyLoaderFactory.cs (2)
24new Dictionary<string, IAssemblySymbol>()); 31Dictionary<string, IAssemblySymbol> assemblySymbols = new();
Microsoft.DotNet.ApiSymbolExtensions (2)
AssemblySymbolLoader.cs (2)
38private readonly Dictionary<string, string> _referencePathFiles = new(StringComparer.OrdinalIgnoreCase); 75new Dictionary<string, IAssemblySymbol>());
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 (11)
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()
src\PublishArtifactsInManifestBase.cs (4)
191new Dictionary<TargetFeedContentType, HashSet<TargetFeedConfig>>(); 194new Dictionary<TargetFeedContentType, HashSet<PackageArtifactModel>>(); 197new Dictionary<TargetFeedContentType, HashSet<BlobArtifactModel>>(); 341Dictionary<string, Asset> buildAssets = new Dictionary<string, Asset>();
src\PublishBuildToMaestro.cs (3)
262var builds = new Dictionary<int, bool>(); 263var assetCache = new Dictionary<(string name, string version, string commit), int>(); 264var buildCache = new Dictionary<int, ProductConstructionService.Client.Models.Build>();
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.Installers (3)
src\CreateWixBuildWixpack.cs (3)
188_defineVariablesDictionary = new Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase); 454var dict = new Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase); 485var dict = new Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase);
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.Cli.Utils (5)
Command.cs (1)
16customEnvironmentVariables == null ? null : new(customEnvironmentVariables);
MSBuildArgs.cs (3)
216var newRestoreProperties = new Dictionary<string, string>(RestoreGlobalProperties, StringComparer.OrdinalIgnoreCase); 263var newProperties = new Dictionary<string, string>(GlobalProperties, StringComparer.OrdinalIgnoreCase); 328var newdict = new Dictionary<string, string>(GlobalProperties, StringComparer.OrdinalIgnoreCase);
MSBuildForwardingAppWithoutLogging.cs (1)
224return new()
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\PinvokeAnalyzer.cs (1)
72Dictionary<string, string> parsedPinvokes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.GenAPI.Task (1)
TaskBase.cs (1)
53(BuildEngine as IBuildEngine5)?.LogTelemetry(eventName, new Dictionary<string, string> {
Microsoft.DotNet.GenAPI.Tests (2)
TestAssemblyLoaderFactory.cs (2)
24new Dictionary<string, IAssemblySymbol>()); 31Dictionary<string, IAssemblySymbol> assemblySymbols = new();
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.HotReload.Client.Tests (2)
EnvironmentUtilitiesTests.cs (2)
13var builder = new Dictionary<string, string>(); 24var builder = new Dictionary<string, string>();
Microsoft.DotNet.MSBuildSdkResolver (25)
CachingWorkloadResolver.cs (3)
162var itemsToAdd = new Dictionary<string, SdkResultItem>(); 165metadata: new Dictionary<string, string>() 170Dictionary<string, string> propertiesToAdd = new();
MSBuildSdkResolver.cs (4)
243propertiesToAdd ??= new Dictionary<string, string?>(); 246environmentVariablesToAdd ??= new Dictionary<string, string?>(1) 261propertiesToAdd ??= new Dictionary<string, string?>(); 287propertiesToAdd ??= new Dictionary<string, string?>();
SdkDirectoryWorkloadManifestProvider.cs (4)
99_knownManifestIdsAndOrder = new Dictionary<string, int>(); 296var manifestIdsToManifests = new Dictionary<string, ReadableWorkloadManifest>(StringComparer.OrdinalIgnoreCase); 338Dictionary<string, string> directoriesWithManifests = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 529Dictionary<string, WorkloadSet> availableWorkloadSets = new Dictionary<string, WorkloadSet>();
TempDirectoryWorkloadManifestProvider.cs (1)
57public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadManifestReader.cs (7)
176workloads ?? new Dictionary<WorkloadId, BaseWorkloadDefinition>(), 177packs ?? new Dictionary<WorkloadPackId, WorkloadPack>(), 220var dependsOn = new Dictionary<string, FXVersion>(StringComparer.OrdinalIgnoreCase); 252var workloads = new Dictionary<WorkloadId, BaseWorkloadDefinition>(); 278var packs = new Dictionary<WorkloadPackId, WorkloadPack>(); 350var dictionary = new Dictionary<string, string>(); 376var dictionary = new Dictionary<string, TValue>();
WorkloadResolver.cs (5)
17private readonly Dictionary<string, (WorkloadManifest manifest, WorkloadManifestInfo info)> _manifests = new(StringComparer.OrdinalIgnoreCase); 18private readonly Dictionary<WorkloadId, (WorkloadDefinition workload, WorkloadManifest manifest)> _workloads = new(); 19private readonly Dictionary<WorkloadPackId, (WorkloadPack pack, WorkloadManifest manifest)> _packs = new(); 167(redirects ??= new()).Add(redirect.Id, (redirect, manifest)); 780public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadSet.cs (1)
12public Dictionary<ManifestId, (ManifestVersion Version, SdkFeatureBand FeatureBand)> ManifestVersions = new();
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.PackageInstall.Tests (4)
NuGetPackageInstallerTests.cs (2)
180var dictionary = new Dictionary<string, IReadOnlyList<string>> 201var dictionary = new Dictionary<string, IReadOnlyList<string>>
ToolPackageDownloaderTests.cs (1)
894var frameworksMap = new Dictionary<PackageId, IEnumerable<NuGetFramework>>()
ToolPackageUninstallerTests.cs (1)
85var packagedShimsMap = new Dictionary<PackageId, IReadOnlyList<FilePath>>
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 (8)
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\SignatureVerificationManager.cs (1)
306_fileVerifiers = new Dictionary<string, FileVerifier>();
Verification\SignatureVerificationResult.cs (1)
29_detail = new Dictionary<string, string>();
Microsoft.DotNet.SignTool (18)
src\BatchSignUtil.cs (1)
167Dictionary<SignedFileContentKey, FileSignInfo> engines = new Dictionary<SignedFileContentKey, FileSignInfo>();
src\Configuration.cs (7)
140_zipDataMap = new Dictionary<SignedFileContentKey, ZipData>(); 141_filesByContentKey = new Dictionary<SignedFileContentKey, FileSignInfo>(); 143_additionalCertificateInformation = additionalCertificateInformation == null ? new() : additionalCertificateInformation; 144_whichPackagesTheFileIsIn = new Dictionary<SignedFileContentKey, HashSet<string>>(); 145_errors = new Dictionary<SigningToolErrorCode, HashSet<SignedFileContentKey>>(); 147_hashToCollisionIdMap = new Dictionary<SignedFileContentKey, string>(); 808var nestedParts = new Dictionary<string, ZipPart>();
src\SignTool.cs (2)
74var zipPaths = new Dictionary<string, string>(); 159var originalFileBackups = new Dictionary<string, string>();
src\SignToolTask.cs (4)
361var map = new Dictionary<string, List<AdditionalCertificateInformation>>(StringComparer.OrdinalIgnoreCase); 472var map = new Dictionary<string, List<SignInfo>>(StringComparer.OrdinalIgnoreCase); 519var map = new Dictionary<string, List<SignInfo>>(StringComparer.OrdinalIgnoreCase); 575var 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>();
src\ZipData.cs (2)
735scripts.Add(new TaskItem(file, new Dictionary<string, string> { { "Kind", kind } })); 752Requires = requireNames != null ? requireNames.Zip(requireVersions, (name, version) => new TaskItem($"{name}", new Dictionary<string, string> { { "Version", version } })).Where(t => !t.ItemSpec.StartsWith("rpmlib")).ToArray() : [],
Microsoft.DotNet.SignTool.Tests (172)
SignToolTests.cs (172)
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> { 550var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 552var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 628var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 634var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 663var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 669var fileSignInfo = new Dictionary<ExplicitCertificateKey, string> 696var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 702var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 717var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 723var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 741var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 747var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 765var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 771var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 793var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 799var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 801ValidateFileSignInfos(itemsToSign, strongNameSignInfo, fileSignInfo, new Dictionary<string, List<SignInfo>>(), new[] 806ValidateGeneratedProject(itemsToSign, strongNameSignInfo, fileSignInfo, new Dictionary<string, List<SignInfo>>(), new[] 826var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 832var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 868var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 874var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 908var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 914var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 936var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 943var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 948ValidateFileSignInfos(itemsToSign, strongNameSignInfo, fileSignInfo, new Dictionary<string, List<SignInfo>>(), new[] 954ValidateGeneratedProject(itemsToSign, strongNameSignInfo, fileSignInfo, new Dictionary<string, List<SignInfo>>(), new[] 974var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 979var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 996var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1001var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1021var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() { }; 1022var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 1043var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() { }; 1044var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 1065var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1071var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1116var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1122var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1194var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1201var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1277var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1283var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1331var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1334var explicitCertKeys = new Dictionary<ExplicitCertificateKey, string>() 1341var additionalCertificateInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 1420var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1426var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1454var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1460var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1511var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1517var additionalCertificateInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 1527var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1587var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1593var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1639var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1645var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1685var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1691var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1737var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1743var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1789var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1795var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1843var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1846var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1887var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1890var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1915var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1918var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1958var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1961var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1989var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1992var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2021var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2024var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2089var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2095var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2138var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2144var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2190var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2196var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2258var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2264var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2293var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2299var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2354var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2360var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2415var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2421var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2473var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2479var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2533var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2539var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2571var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2573var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 2595var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2598var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2617fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string> 2622fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string>{ 2636fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string> 2641fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string>{ 2644fileExtensionSignInfo.Add(new TaskItem(".ps1", new Dictionary<string, string> 2658fileExtensionSignInfo.Add(new TaskItem(".tar.gz", new Dictionary<string, string> 2684ValidateFileSignInfos(itemsToSign, new Dictionary<string, List<SignInfo>>(), new Dictionary<ExplicitCertificateKey, string>(), s_fileExtensionSignInfoWithCollisionId, new[] 2710new TaskItem(GetResourcePath("ContainerOne.1.0.0.nupkg"), new Dictionary<string, string> 2715new TaskItem(GetResourcePath("SignedLibrary.dll"), new Dictionary<string, string> 2720new TaskItem(GetResourcePath("test.zip"), new Dictionary<string, string> 2728new TaskItem("ArcadeStrongTest", new Dictionary<string, string> 2739new TaskItem("ProjectOne.dll", new Dictionary<string, string> 2746new TaskItem("SignedLibrary.dll", new Dictionary<string, string> 2753new TaskItem("test.zip", new Dictionary<string, string> 2763new TaskItem("DualSignCertificate", new Dictionary<string, string> 2768new TaskItem("MacDeveloperHardenWithNotarization", new Dictionary<string, string> 2774new TaskItem("DetachedArchiveCert", new Dictionary<string, string> 2850var additionalCertInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2855var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2860var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2879var additionalCertInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2888var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2893var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2908var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2914var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2940var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2946var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2991var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2997var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 3020var certificatesSignInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 3077var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 3080var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 3141var needContent = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 3163new Dictionary<string, List<SignInfo>>(), 3164new Dictionary<ExplicitCertificateKey, string>(), 3165new Dictionary<string, List<SignInfo>>(), 3166new(), 3182var needContent = new Dictionary<string, (string, string[])>(StringComparer.OrdinalIgnoreCase) 3203var extensionSignInfo = new Dictionary<string, List<SignInfo>>() 3215new Dictionary<string, List<SignInfo>>(), 3216new Dictionary<ExplicitCertificateKey, string>(), 3218new(), 3240new Dictionary<string, List<SignInfo>>(), 3241new Dictionary<ExplicitCertificateKey, 3248new Dictionary<string, List<SignInfo>>(), 3249new Dictionary<ExplicitCertificateKey, string>(), 3516new TaskItem("dotnet.exe", new Dictionary<string, string>() 3521new TaskItem("dotnet", new Dictionary<string, string>() 3526new TaskItem("dotnet", new Dictionary<string, string>() 3552new TaskItem("test.exe", new Dictionary<string, 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.TemplateLocator (18)
SdkDirectoryWorkloadManifestProvider.cs (4)
99_knownManifestIdsAndOrder = new Dictionary<string, int>(); 296var manifestIdsToManifests = new Dictionary<string, ReadableWorkloadManifest>(StringComparer.OrdinalIgnoreCase); 338Dictionary<string, string> directoriesWithManifests = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 529Dictionary<string, WorkloadSet> availableWorkloadSets = new Dictionary<string, WorkloadSet>();
TempDirectoryWorkloadManifestProvider.cs (1)
57public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadManifestReader.cs (7)
176workloads ?? new Dictionary<WorkloadId, BaseWorkloadDefinition>(), 177packs ?? new Dictionary<WorkloadPackId, WorkloadPack>(), 220var dependsOn = new Dictionary<string, FXVersion>(StringComparer.OrdinalIgnoreCase); 252var workloads = new Dictionary<WorkloadId, BaseWorkloadDefinition>(); 278var packs = new Dictionary<WorkloadPackId, WorkloadPack>(); 350var dictionary = new Dictionary<string, string>(); 376var dictionary = new Dictionary<string, TValue>();
WorkloadResolver.cs (5)
17private readonly Dictionary<string, (WorkloadManifest manifest, WorkloadManifestInfo info)> _manifests = new(StringComparer.OrdinalIgnoreCase); 18private readonly Dictionary<WorkloadId, (WorkloadDefinition workload, WorkloadManifest manifest)> _workloads = new(); 19private readonly Dictionary<WorkloadPackId, (WorkloadPack pack, WorkloadManifest manifest)> _packs = new(); 167(redirects ??= new()).Add(redirect.Id, (redirect, manifest)); 780public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadSet.cs (1)
12public Dictionary<ManifestId, (ManifestVersion Version, SdkFeatureBand FeatureBand)> ManifestVersions = new();
Microsoft.DotNet.Tools.Tests.ComponentMocks (5)
MockFeedPackage.cs (1)
18public Dictionary<string, string> AdditionalFiles { get; } = new();
ToolPackageDownloaderMock.cs (3)
69_warningsMap = warningsMap ?? new Dictionary<PackageId, IEnumerable<string>>(); 70_packagedShimsMap = packagedShimsMap ?? new Dictionary<PackageId, IReadOnlyList<FilePath>>(); 71_frameworksMap = frameworksMap ?? new Dictionary<PackageId, IEnumerable<NuGetFramework>>();
ToolPackageStoreMock.cs (1)
26_frameworksMap = frameworksMap ?? new Dictionary<PackageId, IEnumerable<NuGetFramework>>();
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)
24private readonly Dictionary<IMethodInfo, string> _conditionCache = new();
Microsoft.DotNet.XUnitV3Extensions (1)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTheoryDiscoverer.cs (1)
22private readonly Dictionary<MethodInfo, string> _conditionCache = new();
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
734map ??= new(StringComparer.Ordinal);
Microsoft.Extensions.AI.Abstractions (12)
AdditionalPropertiesDictionary{TValue}.cs (3)
30_dictionary = new(StringComparer.OrdinalIgnoreCase); 36_dictionary = new(dictionary, StringComparer.OrdinalIgnoreCase); 45_dictionary = new Dictionary<string, TValue>(StringComparer.OrdinalIgnoreCase);
Functions\AIFunctionArguments.cs (2)
81arguments is null ? new(comparer) : 83new(arguments, comparer);
Functions\AIFunctionFactory.cs (1)
680boundParameters = new(parameters.Length);
Image\ImageGeneratorExtensions.cs (1)
18private static readonly Dictionary<string, string> _extensionToMimeType = new(StringComparer.OrdinalIgnoreCase)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (2)
490private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new(); 583private static readonly Dictionary<Type, Func<JsonNumberHandling, JsonSchema>> _simpleTypeSchemaFactories = new()
src\Shared\JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
155Dictionary<ParameterLookupKey, ParameterInfo> dict = new(parameters.Length);
src\Shared\JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (2)
28private readonly Dictionary<Module, NotAnnotatedStatus> _publicOnlyModules = new(); 29private readonly Dictionary<MemberInfo, NullabilityState> _context = new();
Microsoft.Extensions.AI.Abstractions.Tests (24)
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)
271new FunctionCallContent("function-id", "plugin-name-function-name", new Dictionary<string, object?> { ["parameter"] = "argument" }),
Contents\AIContentTests.cs (3)
68new FunctionCallContent("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } }), 73new FunctionApprovalRequestContent("request123", new FunctionCallContent("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })), 74new FunctionApprovalResponseContent("request123", approved: true, new FunctionCallContent("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
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>
Contents\McpServerToolCallContentTests.cs (1)
42IReadOnlyDictionary<string, object?> args = new Dictionary<string, object?>();
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)
515Value: new() { Name = "name", ExtensionData = new() { ["x"] = 42 } }, 827Value: new() { ["one"] = 1, ["two"] = 2, ["three"] = 3 }, 839Value: new() 862Value: new() { ["one"] = 1, ["two"] = "two", ["three"] = 3.14 },
Utilities\AIJsonUtilitiesTests.cs (3)
1117string key5 = AIJsonUtilities.HashDataToString([new Dictionary<string, object> { ["key1"] = 1, ["key2"] = 2 }], options); 1118string key6 = AIJsonUtilities.HashDataToString([new Dictionary<string, object> { ["key2"] = 2, ["key1"] = 1 }], options); 1134Dictionary<string, object> dict = new() { ["key1"] = 1, ["key2"] = 2 };
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
379new 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)
53var 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)
147["stream_options"] = new Dictionary<string, object> { ["include_usage"] = true, }, 435aiFuncOptions.AdditionalProperties = new Dictionary<string, object?> { ["strictJsonSchema"] = true }; 443Dictionary<string, object?> additionalProperties = new();
Microsoft.Extensions.AI.OpenAI (1)
OpenAIImageGenerator.cs (1)
26private static readonly Dictionary<string, string> _mimeTypeToExtension = new(StringComparer.OrdinalIgnoreCase)
Microsoft.Extensions.AI.OpenAI.Tests (24)
OpenAIChatClientTests.cs (11)
174Assert.Equal(new Dictionary<string, long> 848Assert.Equal(new Dictionary<string, long> 945Assert.Equal(new Dictionary<string, long> 1043Assert.Equal(new Dictionary<string, long> 1155Assert.Equal(new Dictionary<string, long> 1168AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 1239Assert.Equal(new Dictionary<string, long> 1348AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 1355Assert.Equal(new Dictionary<string, long> 1496Assert.Equal(new Dictionary<string, long> 1611Assert.Equal(new Dictionary<string, long>
OpenAIConversionTests.cs (13)
166new FunctionCallContent("callid123", "SomeFunction", new Dictionary<string, object?> 207Assert.True(JsonElement.DeepEquals(JsonSerializer.SerializeToElement(new Dictionary<string, object?> 235new FunctionCallContent("callid123", "SomeFunction", new Dictionary<string, object?> 263Assert.True(JsonElement.DeepEquals(JsonSerializer.SerializeToElement(new Dictionary<string, object?> 475new FunctionCallContent("call123", "TestFunction", new Dictionary<string, object?> { ["param"] = "value" }) 564var complexArgs = new Dictionary<string, object?> 570["nestedObject"] = new Dictionary<string, object?> 763var functionCallContent = new FunctionCallContent("call-123", "GetWeather", new Dictionary<string, object?> 801var functionCall1 = new FunctionCallContent("call-1", "Function1", new Dictionary<string, object?> { ["param1"] = "value1" }); 802var functionCall2 = new FunctionCallContent("call-2", "Function2", new Dictionary<string, object?> { ["param2"] = "value2" }); 835new FunctionCallContent("call-123", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" }), 1077new FunctionCallContent("call-123", "TestFunction", new Dictionary<string, object?> { ["param"] = "value" }) 1112new FunctionCallContent("call-456", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" })
Microsoft.Extensions.AI.Tests (87)
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\FunctionInvokingChatClientApprovalsTests.cs (43)
41new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 49new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 77new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 85new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 121new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 129new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 156new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 161new FunctionApprovalResponseContent("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 168new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 179new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 210new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 218new FunctionApprovalResponseContent("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 226new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]) { MessageId = "resp2" }, 238new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]) { MessageId = "resp2" }, 266new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 271new FunctionApprovalResponseContent("callId2", false, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 278new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 293new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 325new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 330new FunctionApprovalResponseContent("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 337new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 349new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 357new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 389new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 394new FunctionApprovalResponseContent("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 401new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 407new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 3 } })]), 412new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 416new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 3 } })) 443new FunctionApprovalRequestContent("callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 448new FunctionApprovalResponseContent("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 450new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 465new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 522new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 531new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 541new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 599new FunctionApprovalResponseContent("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 606new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 617new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 645new FunctionApprovalResponseContent("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })) 661new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1"), new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 712new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }) 788new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })
ChatCompletion\FunctionInvokingChatClientTests.cs (34)
95new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 97new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]), 129new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 131new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]), 162new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 164new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]), 194new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 34 } }), 195new FunctionCallContent("callId3", "Func2", arguments: new Dictionary<string, object?> { { "i", 56 } }), 205new FunctionCallContent("callId4", "Func2", arguments: new Dictionary<string, object?> { { "i", 78 } }), 253new FunctionCallContent("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }), 254new FunctionCallContent("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }), 297new FunctionCallContent("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }), 298new FunctionCallContent("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }), 331new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 333new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]), 529arguments: new Dictionary<string, object?> { { "shouldThrow", callShouldThrow }, { "callIndex", thisCallIndex } })); 554new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]), 556new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]), 611new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]), 668new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]), 710JsonSerializer.Serialize(new Dictionary<string, object?> { ["arg1"] = "value1" }, AIJsonUtilities.DefaultOptions), 760new() { Contents = [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["text"] = "Input 1" })] }, 761new() { Contents = [new FunctionCallContent("callId2", "Func1", new Dictionary<string, object?> { ["text"] = "Input 2" })] } 862new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["i"] = 41 })]), 864new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId2", "Func1", new Dictionary<string, object?> { ["i"] = 42 })]), 872new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId3", "Func1", new Dictionary<string, object?> { ["i"] = 43 })]), 933new FunctionCallContent("callId2", "Search", new Dictionary<string, object?> { { "result", "birds" } }), 1018new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]), 1048new FunctionCallContent("callId1", "Func1", new Dictionary<string, object?> { ["arg"] = "value1" }), 1049new FunctionCallContent("callId2", "Func1", new Dictionary<string, object?> { ["arg"] = "value2" }), 1101new FunctionCallContent("callId1", "UnknownFunc", new Dictionary<string, object?> { ["i"] = 1 }), 1102new FunctionCallContent("callId2", "KnownFunc", new Dictionary<string, object?> { ["i"] = 2 }) 1120new FunctionCallContent("callId1", "UnknownFunc", new Dictionary<string, object?> { ["i"] = 1 }), 1121new FunctionCallContent("callId2", "KnownFunc", new Dictionary<string, object?> { ["i"] = 2 })
ChatReduction\MessageCountingChatReducerTests.cs (1)
128new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather", new Dictionary<string, object?> { ["location"] = "Seattle" })]),
ChatReduction\SummarizingChatReducerTests.cs (2)
188new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("call1", "get_weather", new Dictionary<string, object?> { ["location"] = "Seattle" }), new TestUserInputRequestContent("uir2")]), 193new ChatMessage(ChatRole.Assistant, [new FunctionCallContent("call2", "get_weather", new Dictionary<string, object?> { ["location"] = "New York" })]),
Functions\AIFunctionFactoryTest.cs (3)
276IReadOnlyDictionary<string, object?> metadata = new Dictionary<string, object?> { ["a"] = "b" }; 648Context = new Dictionary<object, object?>(), 655Context = new Dictionary<object, object?>
Microsoft.Extensions.AmbientMetadata.Application.Tests (2)
ApplicationMetadataExtensionsTests.cs (2)
94.AddInMemoryCollection(new Dictionary<string, string?> 120.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>(); 648var 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 (1)
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)
98var 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 (14)
Latency\Internal\HttpRequestLatencyListener.cs (10)
114private static readonly Dictionary<string, string> _socketMap = new() 120private static readonly Dictionary<string, string> _nameResolutionMap = new() 126private static readonly Dictionary<string, string> _httpMap = new() 140private static readonly Dictionary<string, string> _httpMeasureMap = new() 150Dictionary<string, CheckpointToken> socket = new(); 156Dictionary<string, CheckpointToken> nameResolution = new(); 162Dictionary<string, CheckpointToken> http = new(); 168Dictionary<string, MeasureToken> httpMeasures = new(); 174_eventToCheckpointTokenMap = new Dictionary<string, FrozenDictionary<string, CheckpointToken>> 181_eventToMeasureTokenMap = new Dictionary<string, FrozenDictionary<string, MeasureToken>>
Logging\LoggingOptions.cs (4)
51public IDictionary<string, DataClassification> RequestQueryParametersDataClasses { get; set; } = new Dictionary<string, DataClassification>(); 111public IDictionary<string, DataClassification> RequestHeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>(); 124public IDictionary<string, DataClassification> ResponseHeadersDataClasses { get; set; } = new Dictionary<string, DataClassification>(); 151public IDictionary<string, DataClassification> RouteParameterDataClasses { get; set; } = new Dictionary<string, DataClassification>();
Microsoft.Extensions.Http.Diagnostics.Tests (51)
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 } }, 297ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 298RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 406ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 407RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 503ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 504RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 618ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 619RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } }, 889ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } }, 890RequestHeadersDataClasses = 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 (20)
64RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } }, 65ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } }, 194RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 195ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 269RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 270ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 344RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 403RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 404ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 476RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 477ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 545RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } }, 546ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } }, 600RequestQueryParametersDataClasses = new Dictionary<string, DataClassification> 645RequestQueryParametersDataClasses = new Dictionary<string, DataClassification>() // No data classification 672RequestQueryParametersDataClasses = new Dictionary<string, DataClassification> 703RequestQueryParametersDataClasses = new Dictionary<string, DataClassification> 740RequestQueryParametersDataClasses = new Dictionary<string, DataClassification> 793RequestQueryParametersDataClasses = new Dictionary<string, DataClassification> 834RequestQueryParametersDataClasses = new Dictionary<string, DataClassification>
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 (16)
Hedging\StandardHedgingTests.cs (4)
95var 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)
45new 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 (3)
FallbackDnsResolver.cs (1)
54var lookupMapping = new Dictionary<string, List<AddressResult>>();
Resolver\DnsResolver.cs (2)
239Dictionary<EncodedDomainName, EncodedDomainName> aliasMap = new(); 240Dictionary<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)
22private 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 (27)
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 (16)
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 (13)
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> 612ValidationOptions = 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)
104var 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 (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();
ComInterfaceGenerator.cs (1)
93Dictionary<ComMethodInfo, IMethodSymbol> methodSymbols = new();
ComMethodContext.cs (1)
178var 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)
473_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 (66)
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 (3)
319Dictionary<TValue, uint> keyTypeValueMapping = new Dictionary<TValue, uint>(); 843return new Dictionary<ReadOnlyMemory<char>, TValue>(new ReadOnlyMemoryUtils.ReadonlyMemoryCharComparer()) as Dictionary<TKey, TValue>; 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\Phi2ForCausalLM.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 (34)
Model\BPETokenizer.cs (4)
152Dictionary<StringSpanOrdinalKey, int> vocab = new Dictionary<StringSpanOrdinalKey, int>(1000); 319_vocab = vocab ?? new Dictionary<StringSpanOrdinalKey, int>(); 363Merges = new(); 1175private 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 (12)
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); 1066new Dictionary<string, ModelEncoding>(StringComparer.OrdinalIgnoreCase) 1164new Dictionary<string, int> 1198new Dictionary<string, int> { { EndOfText, 100257 }, { FimPrefix, 100258 }, { FimMiddle, 100259 }, { FimSuffix, 100260 }, { EndOfPrompt, 100276 }, { IMStart, 100264 }, 1201new Dictionary<string, int> { { EndOfText, 100257 }, { FimPrefix, 100258 }, { FimMiddle, 100259 }, { FimSuffix, 100260 }, { EndOfPrompt, 100276 } }, 1205return (new Dictionary<string, int> { { EndOfText, 50256 }, }, P50kBaseRegex(), GPT2File, Type.GetType(Gpt2TypeName), Gpt2PackageName); 1208return (new Dictionary<string, int> { { EndOfText, 199999 }, { EndOfPrompt, 200018 } }, O200kBaseRegex(), O200kBaseFile, Type.GetType(O200kBaseTypeName), O200kBasePackageName); 1211return (new Dictionary<string, int> { { EndOfText, 50256 } }, P50kBaseRegex(), P50RanksFile, Type.GetType(P50kBaseTypeName), P50kBasePackageName); 1214return (new Dictionary<string, int> 1218return (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>();
ModelSourceGenerationContext.DictionaryStringSpanOrdinalKeyInt32.g.cs (1)
29ObjectCreator = () => new global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>(),
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 (20)
BertTokenizerTests.cs (1)
26Dictionary<string, int> specialTokens = new() {
BpeTests.cs (14)
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 }, 525IReadOnlyDictionary<string, int> specialTokens = new Dictionary<string, int>() 898SpecialTokens = new Dictionary<string, int> // SpecialTokens not part of the original vocab.json 1077Dictionary<string, int> specialTokens = new Dictionary<string, int>();
LlamaTests.cs (1)
48specialTokens: new Dictionary<string, int>
TiktokenTests.cs (2)
26private static readonly Dictionary<string, int> _specialTokens = new Dictionary<string, int> 791new 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 (19)
Dracula\CMCountTable.cs (4)
100Tables[i][j] = new Dictionary<int, float>(count); 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)
538_idvToTfMapping = new Dictionary<string, string>(); 851Outputs = 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.Build.Containers (10)
AuthHandshakeMessageHandler.cs (2)
120Dictionary<string, string> keyValues = new(); 264Dictionary<string, string?> parameters = new()
ImageConfig.cs (2)
252Dictionary<string, string> labels = new(); 269Dictionary<string, string> envVars = new();
ImageIndexGenerator.cs (1)
106annotations = new Dictionary<string, string>
Layer.cs (1)
83var entryAttributes = new Dictionary<string, string>();
Registry\Registry.cs (2)
265var ridDict = new Dictionary<string, PlatformSpecificManifest>(); 279var ridDict = new Dictionary<string, PlatformSpecificOciManifest>();
Tasks\ComputeDotnetBaseImageAndTag.cs (1)
352var telemetryProperties = new Dictionary<string, string?>
Telemetry.cs (1)
58private IDictionary<string, string?> ContextProperties() => new Dictionary<string, string?>
Microsoft.NET.Build.Containers.IntegrationTests (14)
FullFramework\CreateNewImageToolTaskTests.cs (14)
218new TaskItem("Valid1", new Dictionary<string, string>() {{ "Value", "Val1" }}), 219new TaskItem("Valid12", new Dictionary<string, string>() {{ "Value", "Val2" }}), 220new TaskItem("Valid12", new Dictionary<string, string>() {{ "Value", "" }}), 221new TaskItem("Valid3", new Dictionary<string, string>() {{ "Value", "has space" }}), 222new TaskItem("Valid4", new Dictionary<string, string>() {{ "Value", "has\"quotes\"" }}) 264new TaskItem("Valid1", new Dictionary<string, string>() {{ "Value", "Val1" }}), 265new TaskItem("Valid12", new Dictionary<string, string>() {{ "Value", "Val2" }}), 266new TaskItem("Valid12", new Dictionary<string, string>() {{ "Value", "" }}), 267new TaskItem("Valid3", new Dictionary<string, string>() {{ "Value", "has space" }}), 268new TaskItem("Valid4", new Dictionary<string, string>() {{ "Value", "has\"quotes\"" }}) 496new TaskItem("1501", new Dictionary<string, string>() {{ "Type", "udp" }}), 497new TaskItem("1501", new Dictionary<string, string>() {{ "Type", "tcp" }}), 498new TaskItem("1502", new Dictionary<string, string>() {{ "Type", "tcp" }}), 499new TaskItem("1503", new Dictionary<string, string>() {{ "Type", "" }})
Microsoft.NET.Build.Containers.UnitTests (8)
AuthHandshakeMessageHandlerTests.cs (7)
94queryParameters: new()) 101formParameters: new() 116formParameters: new() 131formParameters: new() 144queryParameters: new() 203=> ServerWithBearerAuth(authenticateParameters, requestUri, HttpMethod.Get, queryParameters, new(), new AuthenticationHeaderValue("Basic", GetUserPasswordBase64(username, password))); 206=> ServerWithBearerAuth(authenticateParameters, requestUri, HttpMethod.Post, new(), formParameters, null);
RegistryTests.cs (1)
537var environment = new Dictionary<string, string>();
Microsoft.NET.Build.Extensions.Tasks (8)
AddFacadesToReferences.cs (1)
22Dictionary<string, ITaskItem> facadeDict = new(StringComparer.OrdinalIgnoreCase);
ConflictResolver.cs (2)
14private Dictionary<string, TConflictItem> _winningItemsByKey = new(); 18private Dictionary<string, List<TConflictItem>> _unresolvedConflictItems = new(StringComparer.Ordinal);
FileUtilities.MetadataReader.cs (1)
22private static Dictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_versionCache = new(StringComparer.OrdinalIgnoreCase /* Not strictly correct on *nix. Fix? */);
PackageOverride.cs (1)
32OverriddenPackages = new Dictionary<string, OverrideVersion>(StringComparer.OrdinalIgnoreCase);
PackageOverrideResolver.cs (1)
38result = new Dictionary<string, PackageOverride>(_packageOverrideItems.Length, StringComparer.OrdinalIgnoreCase);
PackageRank.cs (1)
15packageRanks = new Dictionary<string, int>(numPackages, StringComparer.OrdinalIgnoreCase);
TaskBase.cs (1)
53(BuildEngine as IBuildEngine5)?.LogTelemetry(eventName, new Dictionary<string, string> {
Microsoft.NET.Build.Extensions.Tasks.UnitTests (3)
GivenAGetDependsOnNETStandardTask.cs (1)
40new Dictionary<string, string>
MockBuildEngine.cs (1)
78public Dictionary<object, object> RegisteredTaskObjects { get; } = new Dictionary<object, object>();
MockTaskItem.cs (1)
17private Dictionary<string, string> _metadata = new(StringComparer.OrdinalIgnoreCase);
Microsoft.NET.Build.Tasks (63)
AllowEmptyTelemetry.cs (1)
38IDictionary<string, string> properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ApplyImplicitVersions.cs (1)
66var result = new Dictionary<string, ImplicitPackageReferenceVersion>();
ConflictResolver.cs (2)
14private Dictionary<string, TConflictItem> _winningItemsByKey = new(); 18private Dictionary<string, List<TConflictItem>> _unresolvedConflictItems = new(StringComparer.Ordinal);
CreateWindowsSdkKnownFrameworkReferences.cs (1)
71var knownFrameworkReferencesByWindowsSdkVersion = new Dictionary<Version, List<(Version minimumNetVersion, TaskItem[] knownFrameworkReferences)>>();
DependencyContextBuilder.cs (8)
74_libraryDependencies = new Dictionary<string, List<LibraryDependency>>(StringComparer.OrdinalIgnoreCase); 139_dependencyLibraries = new Dictionary<string, DependencyLibrary>(); 140_libraryDependencies = new Dictionary<string, List<LibraryDependency>>(); 155_referenceLibraryNames = new Dictionary<ReferenceInfo, string>(); 184_compileReferences = new Dictionary<string, List<ReferenceInfo>>(StringComparer.OrdinalIgnoreCase); 195_resolvedNuGetFiles = new Dictionary<string, List<ResolvedFile>>(StringComparer.OrdinalIgnoreCase); 224_runtimePackAssets = new Dictionary<string, List<RuntimePackAssetInfo>>(); 328var referenceNameToRealName = new Dictionary<string, string>();
FileGroup.cs (1)
28private static readonly IDictionary<string, string> _emptyProperties = new Dictionary<string, string>();
FileUtilities.MetadataReader.cs (1)
22private static Dictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_versionCache = new(StringComparer.OrdinalIgnoreCase /* Not strictly correct on *nix. Fix? */);
FrameworkPackages\FrameworkPackages.cs (2)
49: this(framework, frameworkName) => this.Packages = new(frameworkPackages.Packages); 55public Dictionary<string, NuGetVersion> Packages { get; } = new Dictionary<string, NuGetVersion>(StringComparer.OrdinalIgnoreCase);
GenerateDepsFile.cs (1)
124filteredPackages = new Dictionary<PackageIdentity, string>();
GenerateSupportedTargetFrameworkAlias.cs (1)
52convertedTfms.Add(new TaskItem(targetFrameworkAlias, new Dictionary<string, string>() { { "DisplayName", displayName } }));
GetAssemblyAttributes.cs (2)
25AssemblyAttributes = FormatToAttributes(AssemblyAttributesNameByFieldInFileVersionInfo: new Dictionary<string, string> 42AssemblyAttributesNameByFieldInFileVersionInfo = new Dictionary<string, string>();
GetPackagesToPrune.cs (1)
123Dictionary<string, NuGetVersion> packagesToPrune = new();
LockFileLookup.cs (2)
19_packages = new Dictionary<KeyValuePair<string, NuGetVersion>, LockFileLibrary>(PackageCacheKeyComparer.Instance); 20_projects = new Dictionary<string, LockFileLibrary>(StringComparer.OrdinalIgnoreCase);
NugetContentAssetPreprocessor.cs (2)
13private Dictionary<string, string> _preprocessorValues = new(); 18_preprocessorValues = preprocessorValues ?? new Dictionary<string, string>();
PackageOverride.cs (1)
32OverriddenPackages = new Dictionary<string, OverrideVersion>(StringComparer.OrdinalIgnoreCase);
PackageOverrideResolver.cs (1)
38result = new Dictionary<string, PackageOverride>(_packageOverrideItems.Length, StringComparer.OrdinalIgnoreCase);
PackageRank.cs (1)
15packageRanks = new Dictionary<string, int>(numPackages, StringComparer.OrdinalIgnoreCase);
ParseTargetManifests.cs (1)
28var runtimeStorePackages = new Dictionary<PackageIdentity, StringBuilder>();
ProduceContentAssets.cs (1)
122var preprocessorValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ProjectContext.cs (1)
126var filterLookup = new Dictionary<string, HashSet<PackageIdentity>>(StringComparer.OrdinalIgnoreCase);
ReferenceInfo.cs (1)
128Dictionary<string, ReferenceInfo> directReferences = new();
ResolveAppHosts.cs (1)
104var packagesToDownload = new Dictionary<string, string>();
ResolvePackageAssets.cs (4)
761_stringTable = new Dictionary<string, int>(InitialStringTableCapacity, StringComparer.Ordinal); 1532var result = new Dictionary<string, LogLevel>(); 1548var packageReverseDependencies = new Dictionary<string, HashSet<string>>(_compileTimeTarget.Libraries.Count, StringComparer.OrdinalIgnoreCase); 1994Dictionary<string, string> paths = new();
ResolvePackageDependencies.cs (1)
23private readonly Dictionary<string, string> _fileTypes = new(StringComparer.OrdinalIgnoreCase);
RuntimeOptions.cs (1)
27public IDictionary<string, JToken> RawOptions { get; } = new Dictionary<string, JToken>();
SdkDirectoryWorkloadManifestProvider.cs (4)
99_knownManifestIdsAndOrder = new Dictionary<string, int>(); 296var manifestIdsToManifests = new Dictionary<string, ReadableWorkloadManifest>(StringComparer.OrdinalIgnoreCase); 338Dictionary<string, string> directoriesWithManifests = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 529Dictionary<string, WorkloadSet> availableWorkloadSets = new Dictionary<string, WorkloadSet>();
SingleProjectInfo.cs (1)
76Dictionary<string, SingleProjectInfo> projectReferences = new(StringComparer.OrdinalIgnoreCase);
TaskBase.cs (1)
53(BuildEngine as IBuildEngine5)?.LogTelemetry(eventName, new Dictionary<string, string> {
TempDirectoryWorkloadManifestProvider.cs (1)
57public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
TypeLibraryDictionaryBuilder.cs (2)
34typeLibraryIdMap = new Dictionary<int, string> { { id, typeLibraries[0].ItemSpec } }; 37typeLibraryIdMap = new Dictionary<int, string>();
ValidateExecutableReferences.cs (1)
45Dictionary<string, string> projectAdditionalProperties = new(StringComparer.OrdinalIgnoreCase);
WorkloadManifestReader.cs (7)
176workloads ?? new Dictionary<WorkloadId, BaseWorkloadDefinition>(), 177packs ?? new Dictionary<WorkloadPackId, WorkloadPack>(), 220var dependsOn = new Dictionary<string, FXVersion>(StringComparer.OrdinalIgnoreCase); 252var workloads = new Dictionary<WorkloadId, BaseWorkloadDefinition>(); 278var packs = new Dictionary<WorkloadPackId, WorkloadPack>(); 350var dictionary = new Dictionary<string, string>(); 376var dictionary = new Dictionary<string, TValue>();
WorkloadResolver.cs (5)
17private readonly Dictionary<string, (WorkloadManifest manifest, WorkloadManifestInfo info)> _manifests = new(StringComparer.OrdinalIgnoreCase); 18private readonly Dictionary<WorkloadId, (WorkloadDefinition workload, WorkloadManifest manifest)> _workloads = new(); 19private readonly Dictionary<WorkloadPackId, (WorkloadPack pack, WorkloadManifest manifest)> _packs = new(); 167(redirects ??= new()).Add(redirect.Id, (redirect, manifest)); 780public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadSet.cs (1)
12public Dictionary<ManifestId, (ManifestVersion Version, SdkFeatureBand FeatureBand)> ManifestVersions = new();
Microsoft.NET.Build.Tasks.UnitTests (91)
GetPublishItemsOutputGroupOutputsTests.cs (2)
13new Dictionary<string, string> 24new Dictionary<string, string>
GivenACompilationOptionsConverter.cs (2)
38metadata: new Dictionary<string, string> 72metadata: new Dictionary<string, string>
GivenAConflictResolver.cs (2)
369new MockTaskItem("Platform", new Dictionary<string, string> 400new MockTaskItem("Platform", new Dictionary<string, string>
GivenADependencyContextBuilder.cs (14)
109new Dictionary<string, string> 116new Dictionary<string, string> 234new MockTaskItem($"/usr/Path/{reference}.dll", new Dictionary<string, string> { 252Dictionary<string, SingleProjectInfo> referenceProjectInfos = new(); 277[new MockTaskItem($"{kvp.Key}.resource", new Dictionary<string, string>() { 308DependencyContext dependencyContext = BuildDependencyContextFromDependenciesWithResources(new Dictionary<string, List<string>>() { 321DependencyContext dependencyContext = BuildDependencyContextFromDependenciesWithResources(new Dictionary<string, List<string>>() { 334DependencyContext dependencyContext = BuildDependencyContextFromDependenciesWithResources(new Dictionary<string, List<string>>() { 349DependencyContext dependencyContext = BuildDependencyContextFromDependenciesWithResources(new Dictionary<string, List<string>>() 364DependencyContext dependencyContext = BuildDependencyContextFromDependenciesWithResources(new Dictionary<string, List<string>>() 381DependencyContext dependencyContext = BuildDependencyContextFromDependenciesWithResources(new Dictionary<string, List<string>>() 416new Dictionary<string, string> 424new Dictionary<string, string> 432new Dictionary<string, string>
GivenAGenerateRuntimeConfigurationFiles.cs (7)
47new Dictionary<string, string> 88new Dictionary<string, string> 95new Dictionary<string, string> 102new Dictionary<string, string> 148new Dictionary<string, string> 155new Dictionary<string, string> 195new Dictionary<string, string>
GivenAPackageOverrideResolver.cs (3)
21new MockTaskItem("Platform", new Dictionary<string, string> 25new MockTaskItem("Platform", new Dictionary<string, string> 58new MockTaskItem("FakePlatform", new Dictionary<string, string>
GivenAProduceContentsAssetsTask.cs (7)
22var preprocessorValues = new Dictionary<string, string>() 73var preprocessorValues = new Dictionary<string, string>() 129var preprocessorValues = new Dictionary<string, string>() 208var preprocessorValues = new Dictionary<string, string>() 286var preprocessorValues = new Dictionary<string, string>() 491metadata: new Dictionary<string, string> { { "Value", kvp.Value } })).ToArray(); 498metadata: new Dictionary<string, string>
GivenARemoveDuplicatePackageReferences.cs (1)
17metadata: new Dictionary<string, string> { { "Version", kvp.Version.ToString() } })).ToArray();
GivenAResolvePackageDependenciesTask.cs (2)
359var expectedTypes = new Dictionary<string, string>() 406var expectedFileGroups = new Dictionary<string, string>()
GivenAResolveRuntimePackAssetsTask.cs (1)
32new Dictionary<string, string> {
GivenAResolveTargetingPackAssetsTask.cs (5)
59new MockTaskItem("RuntimeFramework1", new Dictionary<string, string>{ ["FrameworkName"] = "Microsoft.Windows.SDK.NET.Ref"}), 60new MockTaskItem("RuntimeFramework2", new Dictionary<string, string>{ ["FrameworkName"] = "Microsoft.Windows.SDK.NET.Ref"}), 159new Dictionary<string, string>() 171new MockTaskItem("Microsoft.Windows.SDK.NET.Ref", new Dictionary<string, string>()) 307runtimeFrameworks: new[] { new MockTaskItem("RuntimeFramework1", new Dictionary<string, string>()) },
GivenThatWeWantToGenerateSupportedTargetFrameworkAlias.cs (1)
97Func<List<(string, string)>, ITaskItem[]> convertToItems = (List<(string, string)> list) => list.Select(item => new TaskItem(item.Item1, new Dictionary<string, string>() { { "DisplayName", item.Item2 } })).ToArray();
GivenUnresolvedSDKProjectItemsAndImplicitPackages.cs (6)
18metadata: new Dictionary<string, string> 25metadata: new Dictionary<string, string> 32metadata: new Dictionary<string, string> 41metadata: new Dictionary<string, string> 49metadata: new Dictionary<string, string> 56metadata: new Dictionary<string, string>
LockFileSnippets.cs (3)
292metadata: new Dictionary<string, string>() { {"locale", "de"} }) 297metadata: new Dictionary<string, string>() { 304metadata: new Dictionary<string, string>() {
Mocks\MockBuildEngine.cs (1)
78public Dictionary<object, object> RegisteredTaskObjects { get; } = new Dictionary<object, object>();
Mocks\MockContentAssetPreprocessor.cs (2)
12private Dictionary<string, string> _preprocessorValues = new(); 27_preprocessorValues = preprocessorValues ?? new Dictionary<string, string>();
Mocks\MockTaskItem.cs (1)
17private Dictionary<string, string> _metadata = new(StringComparer.OrdinalIgnoreCase);
ProcessFrameworkReferencesTests.cs (31)
82additionalMetadata: new Dictionary<string, string> { 98var metadata = new Dictionary<string, string> 121return new MockTaskItem("Microsoft.DotNet.ILCompiler", new Dictionary<string, string> 219ToolsetInfo.CurrentTargetFramework, "1.9.5", additionalMetadata: new Dictionary<string, string> 231FrameworkReferences = new[] { new MockTaskItem("Microsoft.AspNetCore.App", new Dictionary<string, string>()) }, 254FrameworkReferences = new[] { new MockTaskItem("Microsoft.AspNetCore.App", new Dictionary<string, string>()) }, 270additionalMetadata: new Dictionary<string, string> { 283FrameworkReferences = new[] { new MockTaskItem("Microsoft.Windows.SDK.NET.Ref", new Dictionary<string, string>()) }, 327new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()), 328new MockTaskItem("Microsoft.Windows.SDK.NET.Ref", new Dictionary<string, string>()) 361new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()), 362new MockTaskItem("Microsoft.Windows.SDK.NET.Ref", new Dictionary<string, string>()) 401FrameworkReferences = new[] { new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()) }, 437FrameworkReferences = new[] { new MockTaskItem("Microsoft.Windows.SDK.NET.Ref", new Dictionary<string, string>()) }, 468new Dictionary<string, string> { 473var nativeAOTRuntimePack = new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string> 483var ilLinkPack = new MockTaskItem("Microsoft.NET.ILLink.Tasks", new Dictionary<string, string> 489var ilCompilerPack = new MockTaskItem("Microsoft.DotNet.ILCompiler", new Dictionary<string, string> 517new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string> { ["IsImplicitlyDefined"] = "true" }), 518new MockTaskItem("Microsoft.macOS", new Dictionary<string, string> { ["IsImplicitlyDefined"] = "true" }) 553FrameworkReferences = new[] { new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()) }, 583FrameworkReferences = new[] { new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()) }, 609FrameworkReferences = new[] { new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()) }, 635new Dictionary<string, string> { ["Profile"] = "iOS" }); 646new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()), 647new MockTaskItem("Microsoft.iOS", new Dictionary<string, string>()) 676FrameworkReferences = new[] { new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()) }, 700new Dictionary<string, string> { 714new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()), 715new MockTaskItem($"Microsoft.{platformId}", new Dictionary<string, string>()) 751FrameworkReferences = new[] { new MockTaskItem("Microsoft.NETCore.App", new Dictionary<string, string>()) },
Microsoft.NET.Build.Tests (21)
GivenFrameworkReferences.cs (6)
1176var trimInfo = new Dictionary<string, List<(string asset, string isTrimmable)>>(); 1192public Dictionary<string, string> RuntimeFramework { get; } = new Dictionary<string, string>(); 1193public Dictionary<string, string> PackageDownload { get; } = new Dictionary<string, string>(); 1194public Dictionary<string, string> TargetingPack { get; } = new Dictionary<string, string>(); 1195public Dictionary<string, string> RuntimePack { get; } = new Dictionary<string, string>(); 1196public Dictionary<string, string> AppHostPack { get; } = new Dictionary<string, string>();
GivenThatWeWantACustomTFM.cs (1)
36var expectedValues = new Dictionary<string, string>
GivenThatWeWantToBuildACppCliProject.cs (1)
252var propertyValues = new Dictionary<string, string>();
GivenThatWeWantToBuildADesktopExe.cs (1)
117var project = collection.LoadProject(fileLocation, new Dictionary<string, string>(), null);
GivenThatWeWantToBuildAnAppWithLibrary.cs (1)
103Dictionary<string, string> cultureValueMap = new()
GivenThatWeWantToBuildANetCoreApp.cs (4)
962new Dictionary<string, string>() 973new Dictionary<string, string>() 1028new Dictionary<string, string>() 1037new Dictionary<string, string>()
GivenThatWeWantToBuildASelfContainedApp.cs (1)
189new Dictionary<string, string>()
GivenThatWeWantToGenerateGlobalUsings_DotNet.cs (1)
68testProject.AddItem("Using", new Dictionary<string, string> { ["Remove"] = "System.IO" });
GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs (1)
58var expectedItems = new Dictionary<string, List<string>>()
GivenThatWeWantToTargetEolFrameworks.cs (2)
128testProject.AddItem("EolWorkload", new() 159testProject.AddItem("EolWorkload", new()
GivenThatWeWantToVerifyNuGetReferenceCompat.cs (2)
182new Dictionary<string, string> { { "DisableImplicitAssetTargetFallback", "true" } }); 198new Dictionary<string, string> { ["CopyLocalLockFileAssemblies"] = "true" });
Microsoft.NET.Publish.Tests (3)
GivenThatWeWantToPreserveCompilationContext.cs (1)
223Dictionary<string, string> CompileLibraryNames = new()
GivenThatWeWantToPublishAnAotApp.cs (1)
394testProject.AddItem("PackageDownload", new Dictionary<string, string>
GivenThatWeWantToRunILLink.cs (1)
1969testProject.AddItem("EmbeddedResource", new Dictionary<string, string>
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (4)
BootJsonData.cs (4)
174public ResourceHashesByNameDictionary coreAssembly { get; set; } = new ResourceHashesByNameDictionary(); 179public ResourceHashesByNameDictionary assembly { get; set; } = new ResourceHashesByNameDictionary(); 427var result = new Dictionary<string, ResourceHashesByNameDictionary>(); 436return vfsAssets?.ToDictionary(a => a.virtualPath, a => new ResourceHashesByNameDictionary
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (11)
BootJsonData.cs (2)
65public ResourceHashesByNameDictionary runtime { get; set; } = new ResourceHashesByNameDictionary(); 70public ResourceHashesByNameDictionary assembly { get; set; } = new ResourceHashesByNameDictionary();
GenerateBlazorWebAssemblyBootJson50.cs (4)
105resourceData.lazyAssembly ??= new ResourceHashesByNameDictionary(); 110resourceData.satelliteResources ??= new Dictionary<string, ResourceHashesByNameDictionary>(StringComparer.OrdinalIgnoreCase); 115resourceList = new ResourceHashesByNameDictionary(); 121resourceData.pdb ??= new ResourceHashesByNameDictionary();
StaticWebAsset.cs (4)
1233var dictionary = new Dictionary<string, StaticWebAsset>(candidateAssets.Length); 1257var result = new Dictionary<string, (StaticWebAsset selected, List<StaticWebAsset> all)>(); 1481_additionalCustomMetadata ??= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1490var result = new Dictionary<string, string>(((ITaskItem)this).MetadataCount)
StaticWebAssetPathPattern.cs (1)
224var dictionary = new Dictionary<string, string>();
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (6)
BlazorReadSatelliteAssemblyFileTest.cs (2)
24new TaskItem("Resources.fr.wasm", new Dictionary<string, string> 29new TaskItem("Resources.ja-jp.wasm", new Dictionary<string, string>
BootJsonData.cs (4)
174public ResourceHashesByNameDictionary coreAssembly { get; set; } = new ResourceHashesByNameDictionary(); 179public ResourceHashesByNameDictionary assembly { get; set; } = new ResourceHashesByNameDictionary(); 427var result = new Dictionary<string, ResourceHashesByNameDictionary>(); 436return vfsAssets?.ToDictionary(a => a.virtualPath, a => new ResourceHashesByNameDictionary
Microsoft.NET.Sdk.Publish.Tasks (15)
AppSettingsTransform.cs (1)
44appSettingsModel.ConnectionStrings = new Dictionary<string, string>();
MsDeploy\CommonUtility.cs (7)
274s_wellKnownNamesDict = new Dictionary<string, string?>(wellKnownNames.GetLength(0), StringComparer.OrdinalIgnoreCase); 299s_wellKnownNamesMsdeployDict = new Dictionary<string, string?>(wellKnownNames.GetLength(0), StringComparer.OrdinalIgnoreCase); 1126Dictionary<string, string> nameValueDictionary = new(parameters.Count, StringComparer.OrdinalIgnoreCase); 1177Dictionary<string, string> nameValueDictionary = new(parameters.Count, StringComparer.OrdinalIgnoreCase); 1178Dictionary<string, string?> entryIdentityDictionary = new(parameters.Count); 1420Dictionary<string, bool> FoundDictionary = new(optimizedValueList.Count, StringComparer.OrdinalIgnoreCase); 1800Dictionary<string, string> versionsList = new();
MsDeploy\VsMSDeployObject.cs (1)
344private Dictionary<string, string?> m_NameValueDictionary = new(10, StringComparer.OrdinalIgnoreCase);
Tasks\MsDeploy\CreateParameterFile.cs (2)
106= new(parameters.GetLength(0), StringComparer.OrdinalIgnoreCase); 245= new(parameters.GetLength(0));
Tasks\MsDeploy\MSDeploy.cs (3)
678Dictionary<string, string> lookupDictionary = new(items.Count); 754Dictionary<string, string> lookupDictionary = new(items.Count); 755Dictionary<string, string> nameValueDictionary = new(items.Count, StringComparer.OrdinalIgnoreCase);
Tasks\MsDeploy\VsMsdeploy.cs (1)
518ExtendedMetadata = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase)
Microsoft.NET.Sdk.Publish.Tasks.Tests (9)
AppSettingsTransformTests.cs (3)
81private static readonly ITaskItem DefaultConnectionTaskItem = new TaskItem("DefaultConnection", new Dictionary<string, string>() { { "Value", @"Server=(localdb)\mssqllocaldb; Database=defaultDB;Trusted_Connection=True;MultipleActiveResultSets=true" } }); 82private static readonly ITaskItem CarConnectionTaskItem = new TaskItem("CarConnection", new Dictionary<string, string>() { { "Value", @"Server=(localdb)\mssqllocaldb; Database=CarDB;Trusted_Connection=True;MultipleActiveResultSets=true" } }); 83private static readonly ITaskItem PersonConnectionTaskItem = new TaskItem("PersonConnection", new Dictionary<string, string>() { { "Value", @"Server=(localdb)\mssqllocaldb; Database=PersonDb;Trusted_Connection=True;MultipleActiveResultSets=true" } });
Tasks\GenerateEFSQLScriptsTests.cs (3)
11private static readonly ITaskItem DefaultContext = new TaskItem("DefaultContext", new Dictionary<string, string>() { { "Value", @"Server=(localdb)\mssqllocaldb; Database=defaultDB;Trusted_Connection=True;MultipleActiveResultSets=true" } }); 12private static readonly ITaskItem CarContext = new TaskItem("CarContext", new Dictionary<string, string>() { { "Value", @"Server=(localdb)\mssqllocaldb; Database=CarDB;Trusted_Connection=True;MultipleActiveResultSets=true" } }); 13private static readonly ITaskItem PersonContext = new TaskItem("PersonContext", new Dictionary<string, string>() { { "Value", @"Server=(localdb)\mssqllocaldb; Database=PersonDb;Trusted_Connection=True;MultipleActiveResultSets=true" } });
Tasks\TransformAppSettingsTests.cs (3)
15private static readonly ITaskItem DefaultConnectionTaskItem = new TaskItem("DefaultConnection", new Dictionary<string, string>() { { "Value", @"Server=(localdb)\mssqllocaldb; Database=defaultDB;Trusted_Connection=True;MultipleActiveResultSets=true" } }); 16private static readonly ITaskItem CarConnectionTaskItem = new TaskItem("CarConnection", new Dictionary<string, string>() { { "Value", @"Server=(localdb)\mssqllocaldb; Database=CarDB;Trusted_Connection=True;MultipleActiveResultSets=true" } }); 17private static readonly ITaskItem PersonConnectionTaskItem = new TaskItem("PersonConnection", new Dictionary<string, string>() { { "Value", @"Server=(localdb)\mssqllocaldb; Database=PersonDb;Trusted_Connection=True;MultipleActiveResultSets=true" } });
Microsoft.NET.Sdk.Razor.Tasks (2)
ReferenceResolver.cs (2)
23_classifications = new Dictionary<AssemblyItem, Classification>(); 25Lookup = new Dictionary<string, AssemblyItem>(StringComparer.Ordinal);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (37)
ApplyCompressionNegotiation.cs (2)
32var compressionHeadersByEncoding = new Dictionary<string, StaticWebAssetEndpointResponseHeader[]>(2); 193var result = new Dictionary<string, List<StaticWebAssetEndpoint>>(endpointsByAsset.Count);
CollectStaticWebAssetsToCopy.cs (1)
70copyToOutputFolder.Add(new TaskItem(source, new Dictionary<string, string>
Compression\ResolveCompressedAssets.cs (1)
198var existingCompressionFormatsByAssetItemSpec = new Dictionary<string, HashSet<string>>();
Data\ContentTypeProvider.cs (1)
14new()
Data\StaticWebAsset.cs (4)
1233var dictionary = new Dictionary<string, StaticWebAsset>(candidateAssets.Length); 1257var result = new Dictionary<string, (StaticWebAsset selected, List<StaticWebAsset> all)>(); 1481_additionalCustomMetadata ??= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1490var result = new Dictionary<string, string>(((ITaskItem)this).MetadataCount)
Data\StaticWebAssetEndpoint.cs (3)
152var result = new Dictionary<string, List<StaticWebAssetEndpoint>>(candidateEndpoints.Length / 2); 488_additionalCustomMetadata ??= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 497var result = new Dictionary<string, string>(((ITaskItem)this).MetadataCount)
Data\StaticWebAssetPathPattern.cs (1)
224var dictionary = new Dictionary<string, string>();
DefineStaticWebAssetEndpoints.cs (1)
69Dictionary<string, HashSet<string>> existingEndpointsByAssetFile = new(ExistingEndpoints.Length, OSPath.PathComparer);
DefineStaticWebAssets.Cache.cs (2)
202var remainingCandidates = new Dictionary<string, ITaskItem>(); 272internal ITaskItem ToTaskItem() => new TaskItem(Identity, new Dictionary<string, string> { ["TargetPath"] = TargetPath });
DefineStaticWebAssets.cs (1)
102var assetsByRelativePath = new Dictionary<string, (ITaskItem First, ITaskItem Second)>(CandidateAssets.Length);
FilterStaticWebAssetEndpoints.cs (1)
37var endpointFoundMatchingAsset = new Dictionary<string, StaticWebAsset>();
GenerateStaticWebAssetsDevelopmentManifest.cs (7)
173var contentRootIndex = new Dictionary<string, int>(); 193currentNode.Children ??= new Dictionary<string, StaticWebAssetNode>(StringComparer.Ordinal); 202currentNode.Children ??= new Dictionary<string, StaticWebAssetNode>(StringComparer.Ordinal); 211Children = new Dictionary<string, StaticWebAssetNode>(StringComparer.Ordinal) 266currentNode.Children ??= new Dictionary<string, StaticWebAssetNode>(StringComparer.Ordinal); 284currentNode.Children ??= new Dictionary<string, StaticWebAssetNode>(StringComparer.Ordinal); 293Children = new Dictionary<string, StaticWebAssetNode>(StringComparer.Ordinal)
GenerateStaticWebAssetsManifest.cs (1)
157var result = new Dictionary<string, (StaticWebAsset First, StaticWebAsset Second, List<StaticWebAsset> Other)>(StringComparer.OrdinalIgnoreCase);
JSModules\ApplyJsModules.cs (1)
31var jsModulesByRazorItem = new Dictionary<string, IList<ITaskItem>>();
Legacy\ValidateStaticWebAssetsUniquePaths.cs (1)
24var assetsByWebRootPaths = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase);
MergeConfigurationProperties.cs (1)
43var entry = new TaskItem(configuration.ItemSpec, new Dictionary<string, string>
OverrideHtmlAssetPlaceholders.cs (4)
235Dictionary<string, string>? imports = new(); 236Dictionary<string, Dictionary<string, string>>? scopes = new(); 237Dictionary<string, string>? integrity = new(); 265var mappings = new Dictionary<string, ResourceAsset>(StringComparer.OrdinalIgnoreCase);
ScopedCss\ApplyCssScopes.cs (1)
34var scopedCssByRazorItem = new Dictionary<string, IList<ITaskItem>>();
Utils\Globbing\StaticWebAssetGlobMatcherBuilder.cs (2)
105current.LiteralsDictionary ??= new(StringComparer.OrdinalIgnoreCase); 182current.ExtensionsDictionary ??= new(StringComparer.OrdinalIgnoreCase);
Utils\HashingUtils.cs (1)
59var hashSet = new Dictionary<string, ITaskItem>(candidateAssets.Length);
Microsoft.NET.Sdk.StaticWebAssets.Tests (113)
JsModulesIntegrationTest.cs (1)
152var thumbprintLookup = new Dictionary<string, FileThumbPrint>();
ScopedCssIntegrationTests.cs (1)
364var thumbprintLookup = new Dictionary<string, FileThumbPrint>();
StaticWebAssets\ApplyCssScopesTest.cs (30)
27new TaskItem("TestFiles/Pages/Index.razor.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 28new TaskItem("TestFiles/Pages/Counter.razor.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }), 56new TaskItem("TestFiles/Pages/Index.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 57new TaskItem("TestFiles/Pages/Counter.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }), 86new TaskItem("TestFiles/Pages/Index.razor.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 87new TaskItem("TestFiles/Pages/Counter.razor.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }) 115new TaskItem("TestFiles/Pages/Index.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 116new TaskItem("TestFiles/Pages/Counter.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }) 143new TaskItem("TestFiles/Pages/Index.razor.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 144new TaskItem("TestFiles/Pages/Counter.razor.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }), 145new TaskItem("TestFiles/Pages/Profile.razor.css", new Dictionary<string, string> { ["CssScope"] = "profile-scope" }), 171new TaskItem("TestFiles/Pages/Index.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 172new TaskItem("TestFiles/Pages/Counter.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }), 173new TaskItem("TestFiles/Pages/Profile.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "profile-scope" }), 198new TaskItem("TestFiles/Pages/Profile.razor.css", new Dictionary<string, string> 227new TaskItem("TestFiles/Pages/Profile.cshtml.css", new Dictionary<string, string> 257new TaskItem("TestFiles/Pages/Index.razor.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 258new TaskItem("TestFiles/Pages/Counter.razor.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }), 259new TaskItem("TestFiles/Pages/Profile.razor.css", new Dictionary<string, string> 289new TaskItem("TestFiles/Pages/Index.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 290new TaskItem("TestFiles/Pages/Counter.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }), 291new TaskItem("TestFiles/Pages/Profile.cshtml.css", new Dictionary<string, string> 325new TaskItem("TestFiles/Pages/Home.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "home-scope" }), 326new TaskItem("TestFiles/Pages/_Host.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "_host-scope" }), 327new TaskItem("TestFiles/Pages/Index.razor.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 328new TaskItem("TestFiles/Pages/Counter.razor.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }), 364new TaskItem("TestFiles/Pages/Home.razor.css", new Dictionary<string, string> { ["CssScope"] = "home-scope" }), 365new TaskItem("TestFiles/Pages/_Host.razor.css", new Dictionary<string, string> { ["CssScope"] = "_host-scope" }), 366new TaskItem("TestFiles/Pages/Index.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "index-scope" }), 367new TaskItem("TestFiles/Pages/Counter.cshtml.css", new Dictionary<string, string> { ["CssScope"] = "counter-scope" }),
StaticWebAssets\ComputeCssScopesTests.cs (1)
121new TaskItem("TestFiles/Pages/Index.razor.css", new Dictionary<string,string>{ ["CssScope"] = "b-predefined" }), },
StaticWebAssets\ConcatenateFilesTest.cs (1)
112new Dictionary<string, string>
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (4)
396new Dictionary<string, string> 449new Dictionary<string, string> 501new Dictionary<string, string> 630return new TaskItem(contentType, new Dictionary<string, string>
StaticWebAssets\DiscoverDefaultScopedCssItemsTests.cs (1)
89new TaskItem("TestFiles/Pages/Profile.cshtml.css", new Dictionary<string,string>{ ["Scoped"] = "false" }),
StaticWebAssets\DiscoverStaticWebAssetsTest.cs (10)
92task.FingerprintPatterns = [new TaskItem("CssFile", new Dictionary<string, string> { ["Pattern"] = "*.css", ["Expression"] = expression })]; 187FingerprintPatterns = [new TaskItem("JsModule", new Dictionary<string, string> { ["Pattern"] = "*.lib.module.js", ["Expression"] = expression })], 248new TaskItem(assetFullPath, new Dictionary<string, string> 254FingerprintPatterns = [ new TaskItem("Js", new Dictionary<string,string>{{"Pattern","*.js"},{"Expression","#[.{fingerprint}]!"}})], 771new Dictionary<string,string>{ ["Integrity"] = "integrity", ["Fingerprint"] = "fingerprint"}), 773new Dictionary<string,string>{ ["Integrity"] = "integrity", ["Fingerprint"] = "fingerprint"}) 811new Dictionary<string,string>{ ["Integrity"] = "integrity", ["Fingerprint"] = "fingerprint"}), 813new Dictionary<string,string>{ ["Integrity"] = "integrity", ["Fingerprint"] = "fingerprint"}) 850new Dictionary<string,string>{ ["Integrity"] = "integrity", ["Fingerprint"] = "fingerprint"}), 910return new TaskItem(itemSpec, new Dictionary<string, string>
StaticWebAssets\FilterStaticWebAssetEndpointsTest.cs (7)
76new TaskItem("Property", new Dictionary<string,string>{ 112new TaskItem("Header", new Dictionary<string,string>{ 146new TaskItem("Standalone", new Dictionary<string,string>{ }) 182new TaskItem("Selector", new Dictionary<string,string>{ 219new TaskItem("Header", new Dictionary<string,string>{ 223new TaskItem("Property", new Dictionary<string,string>{ 263return new TaskItem(contentType, new Dictionary<string, string>
StaticWebAssets\FingerprintPatternMatcherTest.cs (1)
76[new TaskItem("ScopedCSS", new Dictionary<string, string> { ["Pattern"] = "*.bundle.scp.css", ["Expression"] = "#[.{fingerprint}]!" })])
StaticWebAssets\GenerateStaticWebAssetsPropsFileTest.cs (12)
30CreateItem(Path.Combine("wwwroot","js","sample.js"), new Dictionary<string,string> 63CreateItem(Path.Combine("wwwroot","js","sample.js"), new Dictionary<string,string> 96CreateItem(Path.Combine("wwwroot","js","sample.js"), new Dictionary<string,string> 129CreateItem(Path.Combine("wwwroot","js","sample.js"), new Dictionary<string,string> 162CreateItem(Path.Combine("wwwroot","js","sample.js"), new Dictionary<string,string> 206CreateItem(Path.Combine("wwwroot","js","sample.js"), new Dictionary<string,string> 222CreateItem(Path.Combine("wwwroot","css","site.css"), new Dictionary<string,string> 267CreateItem(Path.Combine("wwwroot","js","sample.js"), new Dictionary<string,string> 283CreateItem(Path.Combine("wwwroot","css","site.css"), new Dictionary<string,string> 350CreateItem(Path.Combine("wwwroot","js","sample.js"), new Dictionary<string,string> 451CreateItem(Path.Combine("wwwroot","js","sample.js"), new Dictionary<string,string> 472CreateItem(Path.Combine("wwwroot","App.styles.css"), new Dictionary<string,string>
StaticWebAssets\GenerateV1StaticWebAssetsManifestTest.cs (7)
29CreateItem(Path.Combine("wwwroot", "sample.js"), new Dictionary<string,string> 59CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string> 92CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string> 98CreateItem(Path.Combine("wwwroot", "otherLib.js"), new Dictionary<string,string> 180CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string> 225CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string> 233CreateItem(Path.Combine("wwwroot, site.css"), new Dictionary<string,string>
StaticWebAssets\MergeConfigurationPropertiesTest.cs (2)
265return new TaskItem(Path.GetFullPath(project), new Dictionary<string, string> 287return new TaskItem(project, new Dictionary<string, string>
StaticWebAssets\ResolveAllScopedCssAssetsTest.cs (8)
19new TaskItem("TestFiles/Pages/Counter.razor.rz.scp.css", new Dictionary<string,string> 23new TaskItem("site.css", new Dictionary<string,string> 47new TaskItem("TestFiles/Pages/Counter.razor.rz.scp.css", new Dictionary<string,string> 51new TaskItem("site.css", new Dictionary<string,string> 75new TaskItem("Folder/Project.bundle.scp.css", new Dictionary<string,string> 79new TaskItem("site.css", new Dictionary<string,string> 103new TaskItem("Folder/Project.styles.css", new Dictionary<string,string> 107new TaskItem("site.css", new Dictionary<string,string>
StaticWebAssets\ResolveFingerprintedStaticWebAssetEndpointsForAssetsTest.cs (1)
289return new TaskItem(contentType, new Dictionary<string, string>
StaticWebAssets\StaticWebAssetPathPatternTest.cs (4)
454CreateTestResolver(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { ["version"] = "v1" })); 469CreateTestResolver(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { ["version"] = "v1" })); 549CreateTestResolver(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { ["version"] = "v1" })); 564CreateTestResolver(new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { ["version"] = "v1" }));
StaticWebAssets\UpdateExternallyDefinedStaticWebAssetsTest.cs (8)
29new Dictionary<string, string> 48new Dictionary<string, string> 103new Dictionary<string, string> 122new Dictionary<string, string> 147new Dictionary<string, string> 189new Dictionary<string, string> 208new Dictionary<string, string> 231new Dictionary<string, string>
StaticWebAssets\UpdateStaticWebAssetEndpointsTest.cs (2)
297return new TaskItem(type, new Dictionary<string, string> 327return new TaskItem(contentType, new Dictionary<string, string>
StaticWebAssets\ValidateStaticWebAssetsUniquePathsTest.cs (11)
29CreateItem(Path.Combine("wwroot", "js", "project-transitive-dep.js"), new Dictionary<string,string> 39CreateItem(Path.Combine("wwwroot", "_content", "ClassLibrary", "js", "project-transitive-dep.js"), new Dictionary<string,string> 70CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string> 77CreateItem(Path.Combine("wwwroot", "otherLib.js"), new Dictionary<string,string> 103CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string> 110CreateItem(Path.Combine("wwwroot", "otherLib.js"), new Dictionary<string,string> 142CreateItem(Path.Combine(".", "Library", "wwwroot", "sample.js"), new Dictionary<string,string> 147CreateItem(Path.Combine(".", "Library", "bin", "dist", "sample.js"), new Dictionary<string,string> 176CreateItem(Path.Combine(".", "Library", "wwwroot", "sample.js"), new Dictionary<string,string> 181CreateItem(Path.Combine(".", "Library", "wwwroot", "sample.js"), new Dictionary<string,string> 189CreateItem(Path.Combine(".", "App", "wwwroot", "sample.js"), new Dictionary<string,string>
StaticWebAssetsPackIntegrationTest.cs (1)
1644var thumbPrints = new Dictionary<string, FileThumbPrint>();
Microsoft.NET.Sdk.WorkloadManifestReader (18)
SdkDirectoryWorkloadManifestProvider.cs (4)
99_knownManifestIdsAndOrder = new Dictionary<string, int>(); 296var manifestIdsToManifests = new Dictionary<string, ReadableWorkloadManifest>(StringComparer.OrdinalIgnoreCase); 338Dictionary<string, string> directoriesWithManifests = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 529Dictionary<string, WorkloadSet> availableWorkloadSets = new Dictionary<string, WorkloadSet>();
TempDirectoryWorkloadManifestProvider.cs (1)
57public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadManifestReader.cs (7)
176workloads ?? new Dictionary<WorkloadId, BaseWorkloadDefinition>(), 177packs ?? new Dictionary<WorkloadPackId, WorkloadPack>(), 220var dependsOn = new Dictionary<string, FXVersion>(StringComparer.OrdinalIgnoreCase); 252var workloads = new Dictionary<WorkloadId, BaseWorkloadDefinition>(); 278var packs = new Dictionary<WorkloadPackId, WorkloadPack>(); 350var dictionary = new Dictionary<string, string>(); 376var dictionary = new Dictionary<string, TValue>();
WorkloadResolver.cs (5)
17private readonly Dictionary<string, (WorkloadManifest manifest, WorkloadManifestInfo info)> _manifests = new(StringComparer.OrdinalIgnoreCase); 18private readonly Dictionary<WorkloadId, (WorkloadDefinition workload, WorkloadManifest manifest)> _workloads = new(); 19private readonly Dictionary<WorkloadPackId, (WorkloadPack pack, WorkloadManifest manifest)> _packs = new(); 167(redirects ??= new()).Add(redirect.Id, (redirect, manifest)); 780public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadSet.cs (1)
12public Dictionary<ManifestId, (ManifestVersion Version, SdkFeatureBand FeatureBand)> ManifestVersions = new();
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (3)
SdkDirectoryWorkloadManifestProviderTests.cs (2)
53installState.Manifests = new Dictionary<string, string>() 1460Dictionary<string, string> _mockedEnvironmentVariables = new(StringComparer.OrdinalIgnoreCase);
WorkloadPackGroupTests.cs (1)
124var ret = new Dictionary<WorkloadPackId, List<WorkloadId>>();
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (3)
CachingWorkloadResolver.cs (3)
162var itemsToAdd = new Dictionary<string, SdkResultItem>(); 165metadata: new Dictionary<string, string>() 170Dictionary<string, string> propertiesToAdd = new();
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.NET.TestFramework (10)
Commands\GetValuesCommand.cs (3)
28public Dictionary<string, string> Properties { get; } = new Dictionary<string, string>(); 164return (value: line, metadata: new Dictionary<string, string>()); 170var dict = new Dictionary<string, string>();
Commands\SdkCommandSpec.cs (1)
14public Dictionary<string, string> Environment { get; set; } = new Dictionary<string, string>();
Commands\TestCommand.cs (1)
12private Dictionary<string, string> _environment = new();
ProjectConstruction\TestProject.cs (5)
71public Dictionary<string, string> SourceFiles { get; } = new Dictionary<string, string>(); 73public Dictionary<string, string> EmbeddedResources { get; } = new Dictionary<string, string>(); 78public Dictionary<string, string> AdditionalProperties { get; } = new Dictionary<string, string>(); 481AddItem(itemName, new Dictionary<string, string>() { { attributeName, attributeValue } }); 500var propertyValues = new Dictionary<string, string>();
Microsoft.NET.ToolPack.Tests (3)
GivenThatWeWantToPackAToolProjectWithPackagedShim.cs (2)
348additionalProperty: new Dictionary<string, string>() 372additionalProperty: new Dictionary<string, string>()
PackWithShimsAndResultNugetPackageNuGetPackagexFixture.cs (1)
28= new();
Microsoft.TemplateEngine.Cli (37)
Alias\AliasModel.cs (2)
11: this(new Dictionary<string, IReadOnlyList<string>>()) 17CommandAliases = new Dictionary<string, IReadOnlyList<string>>(commandAliases.ToDictionary(x => x.Key, x => x.Value), StringComparer.OrdinalIgnoreCase);
Alias\AliasRegistry.cs (3)
28return new Dictionary<string, IReadOnlyList<string>>(_aliases!.CommandAliases, StringComparer.OrdinalIgnoreCase); 58Dictionary<string, IReadOnlyList<string>> aliasesWithCandidate = new(_aliases!.CommandAliases); 159Dictionary<string, IReadOnlyList<string>> result = new(comparer ?? StringComparer.Ordinal);
ChoiceTemplateParameter.cs (1)
19private Dictionary<string, ParameterChoice> _choices = new(StringComparer.OrdinalIgnoreCase);
CliEnvironment.cs (1)
15Dictionary<string, string> variables = new(StringComparer.OrdinalIgnoreCase)
CliTemplateInfo.cs (1)
95Dictionary<string, CliTemplateParameter> parameters = new();
Commands\BaseCommand.cs (1)
132Dictionary<FilterOptionDefinition, Option> options = new();
Commands\BaseFilterableArgs.cs (1)
55Dictionary<FilterOptionDefinition, OptionResult> filterValues = new();
Commands\create\CombinedChoiceTemplateParameter.cs (1)
15private Dictionary<string, ParameterChoice> _combinedParameters = new(StringComparer.OrdinalIgnoreCase);
Commands\create\InvalidTemplateOptionResult.cs (1)
131Dictionary<string, ParameterChoice> validChoices = new();
Commands\create\TemplateCommand.cs (1)
26private Dictionary<string, TemplateOption> _templateSpecificOptions = new();
Commands\create\TemplateCommandArgs.cs (1)
12private Dictionary<string, OptionResult> _templateOptions = new();
Commands\NewCommand.Legacy.cs (2)
45internal IReadOnlyDictionary<FilterOptionDefinition, Option> LegacyFilters { get; private set; } = new Dictionary<FilterOptionDefinition, Option>(); 142Dictionary<FilterOptionDefinition, Option> options = new();
Help\HelpBuilder.cs (1)
73_customizationsBySymbol ??= new();
HostSpecificTemplateData.cs (4)
19var symbolsInfo = new Dictionary<string, IReadOnlyDictionary<string, string>>(); 41var symbolProperties = new Dictionary<string, string>(); 115Dictionary<string, string> map = new(); 133Dictionary<string, string> map = new();
NuGet\NugetApiManager.cs (1)
28_sourceRepositories = new Dictionary<PackageSource, SourceRepository>();
TabularOutput\TabularOutput.cs (2)
78Dictionary<int, int> columnWidthLookup = new(); 364private readonly IDictionary<TextAlign, Func<string, int, StringBuilder, StringBuilder>> _alignRules = new Dictionary<TextAlign, Func<string, int, StringBuilder, StringBuilder>>()
TemplateInvoker.cs (1)
84new Dictionary<string, string?>
TemplatePackageCoordinator.cs (3)
193TelemetryEventEntry.TrackEvent(TelemetryConstants.InstallEvent, new Dictionary<string, string?> { { TelemetryConstants.ToInstallCount, args.TemplatePackages.Count.ToString() } }); 195var details = new Dictionary<string, string>(); 663var packagesToUninstall = new Dictionary<IManagedTemplatePackageProvider, List<IManagedTemplatePackage>>();
TemplatePackageDisplay.cs (1)
23private readonly IReadOnlyDictionary<int, string> _vulnerabilitySeverityToColorMap = new Dictionary<int, string>
TemplateResolution\TemplateGroupMatchInfo.cs (1)
266Dictionary<string, ParameterChoice> validChoices = new();
TemplateResolution\TemplateResolutionResult.cs (1)
263Dictionary<string, string?> parameterList = new();
TemplateSearch\CliHostSearchCacheData.cs (1)
29Dictionary<string, HostSpecificTemplateData> cliData = new();
TemplateSearch\CliSearchFiltersFactory.cs (2)
19Dictionary<string, string?> filterData = new(); 100Dictionary<string, HostSpecificTemplateData> hostSpecificData = new();
TemplateSearch\CliTemplateSearchCoordinatorFactory.cs (1)
14Dictionary<string, Func<object, object>> dataReaders = new()
WideTable.cs (1)
18_lookup = new Dictionary<Unicode, uint[,]>();
ZeroTable.cs (1)
18_lookup = new Dictionary<Unicode, uint[,]>();
Microsoft.TemplateEngine.Cli.UnitTests (75)
CliTestHostFactory.cs (2)
69HostParamDefaults = new Dictionary<string, string>(); 78internal Dictionary<string, string> HostParamDefaults { get; set; } = new Dictionary<string, string>();
HostDataLoaderTests.cs (8)
119var symbolInfo = new Dictionary<string, IReadOnlyDictionary<string, string>>() 123new Dictionary<string, string>() 132new Dictionary<string, string>() 141new Dictionary<string, string>() 162var symbolInfo = new Dictionary<string, IReadOnlyDictionary<string, string>>() 166new Dictionary<string, string>() 175new Dictionary<string, string>() 184new Dictionary<string, string>()
ParserTests\HelpTests.cs (2)
418new Dictionary<string, IReadOnlyDictionary<string, string>>() 421"Choice", new Dictionary<string, string>()
ParserTests\HelpTests.Resolution.cs (2)
75var defaultParams = new Dictionary<string, string> 105var defaultParams = new Dictionary<string, string>
ParserTests\InstantiateTests.cs (6)
31private readonly IReadOnlyDictionary<string, IReadOnlyList<MockTemplateInfo>> _testSets = new Dictionary<string, IReadOnlyList<MockTemplateInfo>>() 217var defaultParams = new Dictionary<string, string>(); 604var defaultParams = new Dictionary<string, string>() 632var defaultParams = new Dictionary<string, string>() 662var defaultParams = new Dictionary<string, string>() 692var defaultParams = new Dictionary<string, string>()
ParserTests\InstantiateTests.Subcommand.cs (1)
41var defaultParams = new Dictionary<string, string>();
ParserTests\ListTests.cs (1)
12private static readonly Dictionary<string, FilterOptionDefinition> _stringToFilterDefMap = new()
ParserTests\MiscTests.cs (3)
68Dictionary<string, Func<GlobalArgs, bool>> optionsMap = new() 98Dictionary<string, Func<GlobalArgs, bool>> optionsMap = new() 128Dictionary<string, Func<GlobalArgs, bool>> optionsMap = new()
ParserTests\SearchTests.cs (1)
12private static Dictionary<string, FilterOptionDefinition> _stringToFilterDefMap = new()
ParserTests\TemplateCommandTests.cs (2)
24var paramSymbolInfo = new Dictionary<string, string>() 29var symbolInfo = new Dictionary<string, IReadOnlyDictionary<string, string>>
PostActionDispatcherTests.cs (7)
294Args = new Dictionary<string, string>() 326Args = new Dictionary<string, string>() 357Args = new Dictionary<string, string>() 390Args = new Dictionary<string, string>() 421Args = new Dictionary<string, string>() 460Args = new Dictionary<string, string>() 503Args = new Dictionary<string, string>()
PostActionTests\AddJsonPropertyPostActionTests.cs (12)
37Args = new Dictionary<string, string> 78Args = new Dictionary<string, string> 255Args = new Dictionary<string, string> 287Args = new Dictionary<string, string> 321Args = new Dictionary<string, string> 450new Dictionary<string, string> 465new Dictionary<string, string> 480new Dictionary<string, string> 502new Dictionary<string, string> 527new Dictionary<string, string> 541new Dictionary<string, string> 555new Dictionary<string, string>()
TelemetryHelperTests.cs (18)
22Dictionary<string, string?> parameterValues = new() 40Dictionary<string, string?> parameterValues = new() 56choices: new Dictionary<string, ParameterChoice>() 65Dictionary<string, string?> parameterValues = new() 81choices: new Dictionary<string, ParameterChoice>() 90Dictionary<string, string?> parameterValues = new() 106choices: new Dictionary<string, ParameterChoice>() 114Dictionary<string, string?> parameterValues = new() 130choices: new Dictionary<string, ParameterChoice>() 140Dictionary<string, string?> parameterValues = new() 156choices: new Dictionary<string, ParameterChoice>(StringComparer.OrdinalIgnoreCase) 164Dictionary<string, string?> parameterValues = new() 180choices: new Dictionary<string, ParameterChoice>() 190Dictionary<string, string?> parameterValues = new() 206choices: new Dictionary<string, ParameterChoice>() 216Dictionary<string, string?> parameterValues = new() 232choices: new Dictionary<string, ParameterChoice>() 242Dictionary<string, string?> parameterValues = new()
TemplatePackageCoordinatorTests.cs (2)
33.Returns(new Dictionary<string, string> 60.Returns(new Dictionary<string, string> { });
TemplateSearchCoordinatorTests.cs (8)
511Dictionary<string, PackToTemplateEntry> packToTemplateMap = new(); 532Dictionary<string, object> additionalData = new(); 536Dictionary<string, string> frameworkParamSymbolInfo = new() 543new Dictionary<string, IReadOnlyDictionary<string, string>>() 549Dictionary<string, HostSpecificTemplateData> cliHostData = new() 567Dictionary<string, string> frameworkParamSymbolInfo = new() 574new Dictionary<string, IReadOnlyDictionary<string, string>>() 580Dictionary<string, object> additionalData = new()
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() 114= new()
Microsoft.VisualStudio.LanguageServices.CSharp (3)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (3)
67ruleSetSpecificDiagnosticOptions = new Dictionary<string, ReportDiagnostic>(ruleSetFile.GetSpecificDiagnosticOptions()); 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.Implementation (3)
CodeModel\AbstractCodeModelService.cs (1)
105var nameOrdinalMap = new Dictionary<string, int>();
CodeModel\CodeModelProjectCache.cs (1)
26private readonly Dictionary<string, CacheEntry> _cache = new(StringComparer.OrdinalIgnoreCase);
SolutionExplorer\SymbolTree\RootSymbolTreeItemSourceProvider.cs (1)
47private readonly Dictionary<string, List<RootSymbolTreeItemCollectionSource>> _filePathToCollectionSources = new(
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?>();
Microsoft.WebTools.AspireService.Package (1)
Helpers\SocketConnectionManager.cs (1)
22private readonly Dictionary<string, WebSocketConnection> _webSocketConnections = new(StringComparer.Ordinal);
Microsoft.WebTools.AspireService.Tests (2)
Mocks\Mocks.cs (1)
11private readonly Dictionary<Type, IMockFactory> _mockFactories = new();
SocketConnectionManager.cs (1)
22private readonly Dictionary<string, WebSocketConnection> _webSocketConnections = new(StringComparer.Ordinal);
MSBuild (34)
CommunicationsUtilities.cs (2)
482Dictionary<string, string> table = new(200, StringComparer.OrdinalIgnoreCase); // Razzle has 150 environment variables 625Dictionary<string, string> table = new(vars.Count, StringComparer.OrdinalIgnoreCase);
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
LogMessagePacketBase.cs (1)
279private static readonly Dictionary<LoggingEventType, MethodInfo> s_writeMethodCache = new Dictionary<LoggingEventType, MethodInfo>();
NodePacketFactory.cs (1)
26_packetFactories = new Dictionary<NodePacketType, PacketFactoryRecord>();
OutOfProcTaskAppDomainWrapperBase.cs (1)
360IDictionary<string, Object> finalParameterValues = new Dictionary<string, Object>(StringComparer.OrdinalIgnoreCase);
OutOfProcTaskHostNode.cs (6)
486Properties = properties == null ? new Dictionary<string, string>() : new Dictionary<string, string>(properties), 500return new Dictionary<string, string>(_currentConfiguration.GlobalProperties); 1067updatedEnvironment = new Dictionary<string, string>(environment, StringComparer.OrdinalIgnoreCase); 1127updatedEnvironment ??= new Dictionary<string, string>(environment, StringComparer.OrdinalIgnoreCase); 1166s_mismatchedEnvironmentValues = new Dictionary<string, KeyValuePair<string, string>>(StringComparer.OrdinalIgnoreCase);
ReadOnlyEmptyDictionary.cs (2)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>(); 171return new Dictionary<K, V>()[key];
TaskHostConfiguration.cs (3)
177_buildProcessEnvironment = new Dictionary<string, string>(buildProcessEnvironment); 199_taskParameters = new Dictionary<string, TaskParameter>(StringComparer.OrdinalIgnoreCase); 207_globalParameters = globalParameters ?? new Dictionary<string, string>();
TaskHostTaskComplete.cs (3)
120_taskOutputParameters = new Dictionary<string, TaskParameter>(StringComparer.OrdinalIgnoreCase); 133_buildProcessEnvironment = new Dictionary<string, string>(buildProcessEnvironment); 198_taskOutputParameters = new Dictionary<string, TaskParameter>(StringComparer.OrdinalIgnoreCase);
TaskParameter.cs (5)
584_customEscapedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 601_customEscapedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 713_customEscapedMetadata ??= new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 802IDictionary<string, string> clonedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 864IDictionary clonedDictionary = new Dictionary<string, string>(_customEscapedMetadata);
TranslatorHelpers.cs (5)
106capacity => new Dictionary<string, string>(capacity, comparer)); 123capacity => new Dictionary<string, T>(capacity, stringComparer)); 139capacity => new Dictionary<string, string>(capacity, comparer)); 156capacity => new Dictionary<string, T>(capacity, stringComparer)); 188translator.TranslateDictionary(ref localDict, capacity => new Dictionary<string, string>(capacity, comparer));
TypeLoader.cs (2)
197Dictionary<string, string> assembliesDictionary = new(localAssemblies.Length + runtimeAssemblies.Length); 323_publicTypeNameToType = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase);
XMake.cs (2)
1870Dictionary<string, string> restoreGlobalProperties = new Dictionary<string, string>(globalProperties); 3838Dictionary<string, string> properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
MSBuildTaskHost (44)
BinaryReaderExtensions.cs (2)
112data.ExtendedMetadata = new Dictionary<string, string?>(); 132var durations = new Dictionary<string, TimeSpan>(count);
BinaryTranslator.cs (5)
615count => new Dictionary<string, string>(count, comparer)); 639dictionary = new Dictionary<string, string>(count, comparer); 640additionalEntries = new(); 747dictionary = new Dictionary<string, T>(count, comparer); 813dictionary = new(count, comparer);
BuildExceptionBase.cs (1)
136customKeyedSerializedData = new Dictionary<string, string?>(count, StringComparer.CurrentCulture);
BuildExceptionSerializationHelper.cs (1)
49var exceptionFactories = new Dictionary<string, Func<string, Exception?, BuildExceptionBase>>();
CommunicationsUtilities.cs (1)
482Dictionary<string, string> table = new(200, StringComparer.OrdinalIgnoreCase); // Razzle has 150 environment variables
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
Immutable\ImmutableDictionary.cs (5)
174_backing = new Dictionary<K, V>(); 179_backing = new Dictionary<K, V>(comparer); 186_backing = new Dictionary<K, V>(imm._backing, keyComparer ?? imm._backing.Comparer); 190_backing = new Dictionary<K, V>(source, keyComparer); 211var n = new Dictionary<K, V>(_backing, _backing.Comparer);
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);
LogMessagePacketBase.cs (2)
273private static readonly Dictionary<LoggingEventType, MethodInfo> s_readMethodCache = new Dictionary<LoggingEventType, MethodInfo>(); 279private static readonly Dictionary<LoggingEventType, MethodInfo> s_writeMethodCache = new Dictionary<LoggingEventType, MethodInfo>();
NodePacketFactory.cs (1)
26_packetFactories = new Dictionary<NodePacketType, PacketFactoryRecord>();
OutOfProcTaskAppDomainWrapperBase.cs (1)
360IDictionary<string, Object> finalParameterValues = new Dictionary<string, Object>(StringComparer.OrdinalIgnoreCase);
OutOfProcTaskHostNode.cs (3)
1067updatedEnvironment = new Dictionary<string, string>(environment, StringComparer.OrdinalIgnoreCase); 1127updatedEnvironment ??= new Dictionary<string, string>(environment, StringComparer.OrdinalIgnoreCase); 1166s_mismatchedEnvironmentValues = new Dictionary<string, KeyValuePair<string, string>>(StringComparer.OrdinalIgnoreCase);
ReadOnlyEmptyDictionary.cs (2)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>(); 171return new Dictionary<K, V>()[key];
TaskHostConfiguration.cs (3)
177_buildProcessEnvironment = new Dictionary<string, string>(buildProcessEnvironment); 199_taskParameters = new Dictionary<string, TaskParameter>(StringComparer.OrdinalIgnoreCase); 207_globalParameters = globalParameters ?? new Dictionary<string, string>();
TaskHostTaskComplete.cs (3)
120_taskOutputParameters = new Dictionary<string, TaskParameter>(StringComparer.OrdinalIgnoreCase); 133_buildProcessEnvironment = new Dictionary<string, string>(buildProcessEnvironment); 198_taskOutputParameters = new Dictionary<string, TaskParameter>(StringComparer.OrdinalIgnoreCase);
TaskParameter.cs (5)
584_customEscapedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 601_customEscapedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 713_customEscapedMetadata ??= new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 802IDictionary<string, string> clonedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 864IDictionary clonedDictionary = new Dictionary<string, string>(_customEscapedMetadata);
TranslatorHelpers.cs (4)
106capacity => new Dictionary<string, string>(capacity, comparer)); 123capacity => new Dictionary<string, T>(capacity, stringComparer)); 139capacity => new Dictionary<string, string>(capacity, comparer)); 156capacity => new Dictionary<string, T>(capacity, stringComparer));
TypeLoader.cs (1)
229_publicTypeNameToType = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase);
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)
699private Dictionary<int, Manipulator2D> _currentManipulators = new Dictionary<int, Manipulator2D>(2); 702private 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)
419_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);
Replay (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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)
51var 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)
546var map = new Dictionary<Checksum, object>(); 587var map = new Dictionary<Checksum, object>(); 629var map = new Dictionary<Checksum, object>(); 662var map = new Dictionary<Checksum, object>(); 704var map = new Dictionary<Checksum, object>(); 744var map = new Dictionary<Checksum, object>(); 782var map = new Dictionary<Checksum, object>(); 815var map = new Dictionary<Checksum, object>(); 870var map = new Dictionary<Checksum, object>(); 939var map = new Dictionary<Checksum, object>(); 1274var 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)
83Dictionary<string, TimeSpan> testInfos = new();
rzc (6)
ConcurrentLruCache.cs (1)
36_cache = new Dictionary<TKey, CacheValue>(capacity, comparer);
DefaultExtensionAssemblyLoader.cs (4)
30_loadedByPath = new Dictionary<string, (Assembly assembly, AssemblyIdentity identity)>(StringComparer.OrdinalIgnoreCase); 31_loadedByIdentity = new Dictionary<AssemblyIdentity, Assembly>(); 32_identityCache = new Dictionary<string, AssemblyIdentity>(StringComparer.OrdinalIgnoreCase); 33_wellKnownAssemblies = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
GenerateCommand.cs (1)
320var cssScopeAssociations = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
Sample (4)
artifacts\obj\Sample\Release\net10.0\generated\Microsoft.AspNetCore.OpenApi.SourceGenerators\Microsoft.AspNetCore.OpenApi.SourceGenerators.XmlCommentGenerator\OpenApiXmlCommentSupport.generated.cs (1)
71var cache = new Dictionary<string, XmlComment>();
Endpoints\MapSchemasEndpoints.cs (2)
29schemas.MapGet("/dictionary-of-ints", () => new Dictionary<string, int> { { "one", 1 }, { "two", 2 } }); 30schemas.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 (4)
JsonSchemaExporter\JsonSchemaExporter.cs (2)
490private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new(); 583private static readonly Dictionary<Type, Func<JsonNumberHandling, JsonSchema>> _simpleTypeSchemaFactories = new()
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
155Dictionary<ParameterLookupKey, ParameterInfo> dict = new(parameters.Length);
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)
515Value: new() { Name = "name", ExtensionData = new() { ["x"] = 42 } }, 827Value: new() { ["one"] = 1, ["two"] = 2, ["three"] = 3 }, 839Value: new() 862Value: 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)
29private static Dictionary<Type, string> TypeIdentityCache => field ??= new();
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)
25private static Dictionary<Type, Func<Export, object>?> CastSingleValueCache => field ??= new();
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)
148return 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)
413indirectLocationInputs ??= 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)
687_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)
1137Interlocked.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.DirectoryServices.Protocols (2)
System\DirectoryServices\Protocols\common\ResultCode.cs (1)
57private static readonly Dictionary<ResultCode, string> s_resultCodeMapping = new Dictionary<ResultCode, string>(capacity: 43)
System\DirectoryServices\Protocols\ldap\LdapException.cs (1)
40private static readonly Dictionary<LdapError, string> s_resultCodeMapping = new Dictionary<LdapError, string>(capacity: 20)
System.Drawing.Common (1)
System\Drawing\Gdiplus.cs (1)
18internal static IDictionary<object, object> ThreadData => t_threadData ??= new Dictionary<object, object>();
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)
205Interlocked.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 (10)
src\libraries\Common\src\System\Collections\Generic\BidirectionalDictionary.cs (2)
18_forward = new Dictionary<T1, T2>(capacity); 19_backward = new Dictionary<T2, T1>(capacity);
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)
144_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)
433_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)
94Dictionary<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.Primitives (2)
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)
162_sslSessions = new Dictionary<string, IntPtr>();
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); 159Interlocked.CompareExchange(ref s_switches, new Dictionary<string, bool>(), null); 182s_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)
2689commandArgs.Arguments ??= new Dictionary<string, string?>(); 2909Dictionary<int, bool> eventEnabled = new Dictionary<int, bool>(m_eventData.Count); 3174eventData = new Dictionary<int, EventMetadata>(); 3587enabledDict = new Dictionary<int, bool>(m_eventData.Count); 3666eventsByName ??= new Dictionary<string, string>(); 3918private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>(); 3920private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>(); 4528Dictionary<EventListener, bool> allListeners = new Dictionary<EventListener, bool>(); 5342opcodeTab = new Dictionary<int, string>(); 5343stringTab = new Dictionary<string, string>(); 5345perEventByteArrayArgIndices = new Dictionary<string, List<int>>(); 5381taskTab ??= new Dictionary<int, string>(); 5404keywordTab ??= new Dictionary<ulong, string>(); 5429channelTab ??= new Dictionary<int, ChannelInfo>(4); 5548mapsTab ??= new Dictionary<string, Type>(); 5596channelTab ??= new Dictionary<int, ChannelInfo>(4); 5922channelTab ??= new Dictionary<int, ChannelInfo>(4); 5946taskTab ??= 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)
960private static readonly Dictionary<string, IntPtr> s_sortNameToSortHandleCache = new Dictionary<string, IntPtr>();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (3)
153new Dictionary<string, string>(255, StringComparer.OrdinalIgnoreCase) 447var newTable = new Dictionary<string, CultureData>(); 683var newTable = 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)
683nameToSlotMap = new Dictionary<string, LocalDataStoreSlot>();
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (1)
615private readonly Dictionary<int, bool> _usedIdToTracksAllValuesMap = new Dictionary<int, bool>();
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (2)
1182cachedData._timeZonesUsingAlternativeIds ??= new Dictionary<string, TimeZoneInfo>(StringComparer.OrdinalIgnoreCase); 1272cachedData._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)
919Configurations = new Dictionary<string, object>()
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (1)
71_typeBuilderDict = new Dictionary<string, Type>();
src\System\RuntimeType.CoreCLR.cs (2)
1148new Dictionary<string, RuntimeEventInfo>(); 1258new 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)
802Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>(); 1220_knownDataContracts ??= new DataContractDictionary(); 1361boundContracts ??= new Dictionary<DataContract, DataContract>(); 1419Dictionary<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)
613s_nameToBuiltInContract ??= new Dictionary<XmlQualifiedName, DataContract?>(); 636s_typeNameToBuiltInContract ??= new Dictionary<string, DataContract?>(); 928s_clrTypeStrings = new Dictionary<string, XmlDictionaryString>(); 1960Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 2053knownDataContracts ??= new DataContractDictionary(); 2079nameToDataContractTable = new DataContractDictionary();
System\Runtime\Serialization\DataContractSet.cs (4)
58_contracts ??= new DataContractDictionary(); 61_processedContracts ??= new Dictionary<DataContract, object>(); 317_referencedTypesDictionary = new Dictionary<XmlQualifiedName, object>(); 341_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)
186Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>(); 224DataContractDictionary knownDataContracts = new DataContractDictionary(); 242SchemaObjectDictionary 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)
26_lookup = new Dictionary<string, XmlDictionaryString>(); 33_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)
1765_nsHashtable = new Dictionary<string, int>(); 2119_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>(); 1563_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)
1217replaceList ??= 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>(); 28internal Dictionary<string, EnumMapping> Enums => field ??= 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 1400_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)
55public Dictionary<QilName, VarPar> AllGlobalVarPars = new Dictionary<QilName, VarPar>(); 56public Dictionary<QilName, Template> NamedTemplates = new Dictionary<QilName, Template>(); 57public Dictionary<QilName, AttributeSet> AttributeSets = new Dictionary<QilName, AttributeSet>(); 58public Dictionary<string, NsAlias> NsAliases = new Dictionary<string, NsAlias>(); 60private 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)
579paramToTemplate = new Dictionary<VarPar, Template>(); 580paramToFunction = new Dictionary<VarPar, QilFunction>();
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (1)
305Dictionary<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)
311_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)
56public IDictionary<string, string> Namespaces => field ??= 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>();
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaManaged.cs (1)
558Dictionary<CompositeMLDsaAlgorithm, AlgorithmMetadata> algorithmMetadata = new(count)
System\Security\Cryptography\CryptoConfig.cs (2)
55Dictionary<string, string> ht = new Dictionary<string, string>(capacity, StringComparer.OrdinalIgnoreCase); 119Dictionary<string, object> ht = new Dictionary<string, object>(capacity: capacity, comparer: StringComparer.OrdinalIgnoreCase);
System\Security\Cryptography\OidLookup.cs (2)
99new Dictionary<string, string>(FriendlyNameToOidCount, StringComparer.OrdinalIgnoreCase); 102new Dictionary<string, string>(OidToFriendlyNameCount, StringComparer.Ordinal);
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.Http (1)
System\ServiceModel\Channels\HttpTransportSecurityHelpers.cs (1)
18private static Dictionary<string, int> s_targetNameCounter = new Dictionary<string, int>();
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 (37)
Internals\System\Runtime\GeneratedXmlSerializers.cs (1)
12private static Dictionary<string, Type> s_generatedSerializers = new Dictionary<string, Type>();
Internals\System\Runtime\MruCache.cs (2)
61_items = new Dictionary<TKey, CacheEntry>(); 65_items = new Dictionary<TKey, CacheEntry>(comparer);
Internals\System\Xml\XmlMtomReader.cs (4)
452_mimeParts = new Dictionary<string, MimePart>(); 2227private Dictionary<string, MimeHeader> headers = new Dictionary<string, MimeHeader>(); 2406parameters = new Dictionary<string, string>(); 2417parameters = new Dictionary<string, string>();
System\IdentityModel\CryptoHelper.cs (1)
21private static Dictionary<string, Func<object>> s_algorithmDelegateDictionary = new Dictionary<string, Func<object>>();
System\IdentityModel\IdentityModelDictionary.cs (1)
49Dictionary<string, int> dictionary = new Dictionary<string, int>(_count);
System\IdentityModel\Policy\DefaultEvaluationContext.cs (1)
23_properties = new Dictionary<string, object>();
System\IdentityModel\SecurityUtils.cs (1)
332Dictionary<string, object> properties = new Dictionary<string, object>();
System\IdentityModel\Selectors\SecurityTokenRequirement.cs (1)
33_properties = new Dictionary<string, object>();
System\ServiceModel\Channels\AddressHeaderCollection.cs (2)
139Dictionary<string, int> myHeaders = new Dictionary<string, int>(); 142Dictionary<string, int> otherHeaders = new Dictionary<string, int>();
System\ServiceModel\Channels\DeliveryStrategy.cs (1)
61items = new Dictionary<Int64, ItemType>();
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (1)
480private Dictionary<IReliableChannelBinder, TState> _faultList = new Dictionary<IReliableChannelBinder, TState>();
System\ServiceModel\Channels\SecurityBindingElement.cs (4)
44_operationSupportingTokenParameters = new Dictionary<string, SupportingTokenParameters>(); 45_optionalOperationSupportingTokenParameters = new Dictionary<string, SupportingTokenParameters>(); 64_operationSupportingTokenParameters = new Dictionary<string, SupportingTokenParameters>(); 70_optionalOperationSupportingTokenParameters = new Dictionary<string, SupportingTokenParameters>();
System\ServiceModel\Channels\ServiceChannelFactory.cs (1)
190Dictionary<Type, byte> supportedChannels = new Dictionary<Type, byte>();
System\ServiceModel\Description\TypeLoader.cs (2)
52_contracts = new Dictionary<Type, ContractDescription>(); 53_messages = new Dictionary<Type, MessageDescriptionItems>();
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
752_xmlMappings = new Dictionary<string, XmlMembersMapping>();
System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (1)
36_operations = new Dictionary<string, ProxyOperationRuntime>();
System\ServiceModel\Dispatcher\OperationSelectorBehavior.cs (1)
42_operationMap = new Dictionary<IntPtr, string>();
System\ServiceModel\MessageHeaderT.cs (1)
67private static Dictionary<Type, TypedHeaderManager> s_cache = new Dictionary<Type, TypedHeaderManager>();
System\ServiceModel\Security\ReceiveSecurityHeader.cs (1)
264_tokenPoliciesMapping = new Dictionary<SecurityToken, ReadOnlyCollection<IAuthorizationPolicy>>();
System\ServiceModel\Security\ScopedMessagePartSpecification.cs (2)
20_actionParts = new Dictionary<string, MessagePartSpecification>(); 203_readOnlyNormalizedActionParts = new Dictionary<string, MessagePartSpecification>();
System\ServiceModel\Security\SecurityProtocol.cs (2)
260_mergedSupportingTokenProvidersMap = new Dictionary<string, Collection<SupportingTokenProviderSpecification>>(); 301ScopedSupportingTokenProviderSpecification = new Dictionary<string, ICollection<SupportingTokenProviderSpecification>>();
System\ServiceModel\Security\SendSecurityHeaderElementContainer.cs (1)
132_securityTokenMappedToIdentifierClause = new Dictionary<SecurityToken, SecurityKeyIdentifierClause>();
System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (2)
25ScopedCertificates = new Dictionary<Uri, X509Certificate2>(); 37ScopedCertificates = new Dictionary<Uri, X509Certificate2>();
System\ServiceModel\ServiceModelDictionary.cs (1)
49Dictionary<string, int> dictionary = new Dictionary<string, int>(_count);
System\ServiceModel\SynchronizedKeyedCollection.cs (1)
203_dictionary = new Dictionary<K, T>(_comparer);
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 (23)
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)
246return new Dictionary<TKey, TValue>(collection: collection, comparer);
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
414private 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\JsonSerializer.Read.HandlePropertyName.cs (4)
154var newDict = new Dictionary<string, object>(); 163extensionData = new Dictionary<string, object>(); 174var newDict = new Dictionary<string, JsonElement>(); 183extensionData = new Dictionary<string, JsonElement>();
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
44var converters = new Dictionary<Type, JsonConverter>(NumberOfSimpleConverters);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (5)
1052public Dictionary<string, (JsonPropertyInfo, int index)> AddedProperties = new(options.PropertyNameCaseInsensitive ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal); 1075Dictionary<string, JsonPropertyInfo> propertyIndex = new(properties.Count, comparer); 1153Dictionary<ParameterLookupKey, JsonParameterInfoValues> parameterIndex = new(parameterInfoValues.Length); 1191Dictionary<ParameterLookupKey, JsonParameterInfo> parameterIndex = new(ParameterCount); 1442(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)
119private 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)
30private readonly Dictionary<(int ordinal, BDD? one, BDD? zero), BDD> _bddCache = new(); 36private readonly Dictionary<(int op, BDD a, BDD? b), BDD> _operationCache = new(); // op is BooleanOperation; using int to reuse generic instantiation with _bddCache 358return 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)
40private readonly Dictionary<TSet, SymbolicRegexNode<TSet>> _singletonCache = new(); 47internal readonly Dictionary<NodeCacheKey, SymbolicRegexNode<TSet>> _nodeCache = new(); 95internal readonly Dictionary<(SymbolicRegexNode<TSet>, TSet elem, uint context), SymbolicRegexNode<TSet>> _derivativeCache = new(); 103internal readonly Dictionary<(SymbolicRegexNode<TSet>, uint), SymbolicRegexNode<TSet>> _pruneLowerPriorityThanNullabilityCache = new(); 111internal 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)
108Dictionary<string, string[]> requiredHelpers = new(); 169var emittedExpressions = new Dictionary<(string Pattern, RegexOptions Options, int? Timeout), RegexMethod>(); 175Dictionary<string, string[]> requiredHelpers = new();
RegexGenerator.Emitter.cs (2)
1603Dictionary<string, int> usedNames = new(); 1616Dictionary<string, string[]> additionalLocalFunctions = new();
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (1)
119private 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)
465private 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)
1962_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 (56)
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\BindingNavigatorDesignerTests.cs (2)
56Dictionary<string, object> defaultValues = new(); 70Dictionary<string, object> defaultValues = new();
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?[]?>
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 (6)
ArrayBuilder.cs (4)
391var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 399return new Dictionary<K, ImmutableArray<T>>(comparer); 404var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 418var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
RulesetToEditorconfigConverter.cs (1)
65var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
TemporaryDictionary`2.cs (1)
21private static readonly Dictionary<TKey, TValue> EmptyDictionary = new();
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); 249_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)
767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (1)
872var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
src\Dependencies\PooledObjects\ArrayBuilder.cs (4)
565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 573return new Dictionary<K, ImmutableArray<T>>(comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
18var dictionary = new Dictionary<K, V>(builders.Count); 32var 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>();
vbc (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
VBCSCompiler (1)
src\Compilers\Shared\BuildServerConnection.cs (1)
492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
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)
47routeValues = new Dictionary<string, object>(_actionContext.RouteData.Values),
Wasm.Performance.TestApp (2)
PersonJsonContext.DictionaryStringBoolean.g.cs (1)
28ObjectCreator = () => new global::System.Collections.Generic.Dictionary<string, bool>(),
Shared_ComplexTable_Cell_razor.g.cs (1)
216var attributes = new Dictionary<string, object>();
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>();
13408 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 (42)
Backchannel\ExtensionBackchannel.cs (2)
419var choicesByFormattedValue = choicesList.ToDictionary(choice => choiceFormatter(choice).RemoveSpectreFormatting(), choice => choice); 449var choicesByFormattedValue = choicesList.ToDictionary(choice => choiceFormatter(choice).RemoveSpectreFormatting(), choice => choice);
Commands\ConfigCommand.cs (1)
221var allConfig = await ConfigurationService.GetAllConfigurationAsync(cancellationToken);
Commands\ExecCommand.cs (1)
146var env = new Dictionary<string, string>();
Commands\InitCommand.cs (1)
217var serviceDefaultsActions = new Dictionary<string, string>
Commands\PublishCommandBase.cs (5)
126var env = new Dictionary<string, string>(); 284var steps = new Dictionary<string, string>(); 391var steps = new Dictionary<string, StepInfo>(); 507var tasks = stepInfo.Tasks; 813public Dictionary<string, TaskInfo> Tasks { get; } = [];
Commands\RunCommand.cs (2)
131var env = new Dictionary<string, string>(); 463private 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);
DotNet\DotNetCliRunner.cs (1)
736var env = new Dictionary<string, string>
Packaging\NuGetConfigMerger.cs (12)
21public required Dictionary<string, string> UrlToExistingKey { get; init; } 176var urlToExistingKey = BuildExistingSourceMappings(existingAdds); 191private static Dictionary<string, string> BuildExistingSourceMappings(XElement[] existingAdds) 193var urlToExistingKey = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 233var patternToNewSource = context.Mappings.ToDictionary(m => m.PackageFilter, m => m.Source, StringComparer.OrdinalIgnoreCase); 248Dictionary<string, string> patternToNewSource, 249Dictionary<string, string> urlToExistingKey, 328Dictionary<string, string> urlToExistingKey, 438Dictionary<string, string> urlToExistingKey, 689Dictionary<string, string> urlToExistingKey, 852var urlToExistingKey = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 878var patternToRequiredSource = mappings.ToDictionary(m => m.PackageFilter, m => m.Source, StringComparer.OrdinalIgnoreCase);
Projects\ProjectUpdater.cs (9)
663var originalMappings = ExtractPackageSourceMappings(originalDocument); 664var proposedMappings = ExtractPackageSourceMappings(proposedDocument); 705private static Dictionary<string, List<string>> ExtractPackageSourceMappings(XmlDocument? document) 707var mappings = new Dictionary<string, List<string>>(); 746private static List<MappingChange> AnalyzeMappingChanges(Dictionary<string, List<string>> originalMappings, Dictionary<string, List<string>> proposedMappings) 773var mappingChangesBySource = changes.MappingChanges.ToDictionary(mc => mc.SourceKey, mc => mc); 848public Dictionary<string, List<string>> OriginalMappings { get; set; } = new(); 849public Dictionary<string, List<string>> ProposedMappings { get; set; } = new();
Utils\ConsoleActivityLogger.cs (3)
23private readonly Dictionary<string, string> _stepColors = new(); 24private readonly Dictionary<string, ActivityState> _stepStates = new(); // Track final state per step for summary 25private readonly Dictionary<string, string> _displayNames = new(); // Optional friendly display names for step keys
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 (13)
Caching\DiskCacheTests.cs (2)
14private static DiskCache CreateCache(TemporaryWorkspace workspace, Action<Dictionary<string,string?>>? configure = null) 16var values = new Dictionary<string,string?>();
Commands\ConfigCommandTests.cs (1)
435public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default)
Commands\PublishCommandPromptingIntegrationTests.cs (1)
772private readonly Dictionary<string, TaskCompletionSource> _promptCompletionSources = new();
DotNet\DotNetCliRunnerTests.cs (2)
298var existingEnv = new Dictionary<string, string> 492var userEnv = new Dictionary<string, string>
DotNetSdkInstallerTests.cs (1)
387private readonly Dictionary<string, bool> _features = new();
Packaging\PackagingServiceTests.cs (1)
26private readonly Dictionary<string, bool> _features = new();
Projects\ProjectLocatorTests.cs (2)
690public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 709private readonly Dictionary<string, bool> _features = new();
Utils\CliTestHelper.cs (3)
41var configurationValues = new Dictionary<string, string?>(); 141public 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 (110)
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)
129var 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\Controls\GridValue.razor.cs (2)
113private Dictionary<string, object>? _componentParameters; 166private Dictionary<string, object> BuildComponentParameters()
Components\Controls\PropertyGrid.razor.cs (1)
147public Dictionary<string, ComponentMetadata>? ValueComponents { get; set; }
Components\Controls\ResourceDetails.razor.cs (1)
112private Dictionary<string, ComponentMetadata>? _valueComponents;
Components\Controls\SpanDetails.razor.cs (1)
83private Dictionary<string, ComponentMetadata>? _valueComponents;
Components\Controls\StructuredLogDetails.razor.cs (1)
51private Dictionary<string, ComponentMetadata>? _valueComponents;
Components\Dialogs\FilterDialog.razor.cs (1)
92var fieldValues = Content.GetFieldValues(parameterName);
Components\Dialogs\InteractionsInputDialog.razor.cs (1)
34private Dictionary<InputViewModel, FluentComponentBase?> _elementRefs = default!;
Components\Layout\AspirePageContentLayout.razor.cs (1)
52public 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)
44private Dictionary<ResourceKey, int>? _resourceUnviewedErrorCounts; 252var newResourceUnviewedErrorCounts = TelemetryRepository.GetResourceUnviewedErrorLogsCount(); 584private bool ResourceErrorCountsChanged(Dictionary<ResourceKey, int> newResourceUnviewedErrorCounts)
Components\Resize\GridColumnManager.razor.cs (1)
14private Dictionary<string, GridColumn> _columnById = null!;
Components\ResourcesGridColumns\StateColumnDisplay.razor.cs (1)
18public required Dictionary<ResourceKey, int>? UnviewedErrorCounts { get; set; }
Components\ResourcesGridColumns\UnreadLogErrorsBadge.razor.cs (1)
20public required Dictionary<ResourceKey, int>? UnviewedErrorCounts { get; set; }
Components_Controls_AspireMenu_razor.g.cs (1)
386var additionalMenuItemAttributes = new Dictionary<string, object>(item.AdditionalAttributes ?? ImmutableDictionary<string, object>.Empty)
Components_Controls_AspireMenuButton_razor.g.cs (1)
185var additionalButtonAttributes = new Dictionary<string, object>(AdditionalAttributes ?? ImmutableDictionary<string, object>.Empty)
Components_Controls_AssistantChat_razor.g.cs (1)
591var attributes = FluentUIExtensions.GetClipboardCopyAdditionalAttributes(chatMessage.PromptText, ControlsStringsLoc[nameof(ControlsStrings.GridValueCopyToClipboard)], ControlsStringsLoc[nameof(ControlsStrings.GridValueCopied)]);
Components_Controls_ResourceDetails_razor.g.cs (1)
792), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Collections.Generic.Dictionary<global::System.String, global::Aspire.Dashboard.Model.ComponentMetadata>>(
Components_Controls_SpanDetails_razor.g.cs (3)
707), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Collections.Generic.Dictionary<global::System.String, global::Aspire.Dashboard.Model.ComponentMetadata>>( 869), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Collections.Generic.Dictionary<global::System.String, global::Aspire.Dashboard.Model.ComponentMetadata>>( 1031), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Collections.Generic.Dictionary<global::System.String, global::Aspire.Dashboard.Model.ComponentMetadata>>(
Components_Controls_StructuredLogDetails_razor.g.cs (3)
501), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Collections.Generic.Dictionary<global::System.String, global::Aspire.Dashboard.Model.ComponentMetadata>>( 663), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Collections.Generic.Dictionary<global::System.String, global::Aspire.Dashboard.Model.ComponentMetadata>>( 993), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Collections.Generic.Dictionary<global::System.String, global::Aspire.Dashboard.Model.ComponentMetadata>>(
Components_Pages_Resources_razor.g.cs (1)
1926), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Collections.Generic.Dictionary<global::Aspire.Dashboard.Otlp.Storage.ResourceKey, global::System.Int32>>(
Components_ResourcesGridColumns_StateColumnDisplay_razor.g.cs (1)
242), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<global::System.Collections.Generic.Dictionary<global::Aspire.Dashboard.Otlp.Storage.ResourceKey, global::System.Int32>>(
DashboardWebApplication.cs (2)
545var initialValues = new Dictionary<string, string?>(); 583static 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)
GenAIMessagesContext.DictionaryStringJsonElement.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>>? _DictionaryStringJsonElement; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>> DictionaryStringJsonElement 20get => _DictionaryStringJsonElement ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>)); 23private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>> Create_DictionaryStringJsonElement(global::System.Text.Json.JsonSerializerOptions options) 25if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>> jsonTypeInfo)) 27var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>> 33jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>, string, global::System.Text.Json.JsonElement>(options, info); 43private void DictionaryStringJsonElementSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>? value)
GenAIMessagesContext.GenericPart.g.cs (2)
48var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>> 65properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>>(options, info0);
GenAIMessagesContext.GetJsonTypeInfo.g.cs (1)
46if (type == typeof(global::System.Collections.Generic.Dictionary<string, global::System.Text.Json.JsonElement>))
Model\Assistant\PromptContext.cs (1)
11private readonly Dictionary<string, string> _promptValueMap = new Dictionary<string, string>();
Model\ComponentMetadata.cs (1)
9public Dictionary<string, object> Parameters { get; } = [];
Model\ConnectionStringParser.cs (6)
16private static readonly Dictionary<string, int> s_schemeDefaultPorts = new(StringComparer.OrdinalIgnoreCase) 166var keyValuePairs = SplitIntoDictionary(connectionString); 274private static bool TryParseHostPortToken(string token, Dictionary<string, string> keyValuePairs, [NotNullWhen(true)] out string? host, out int? port) 393private static int? PortFromKV(Dictionary<string, string> keyValuePairs) 424private static Dictionary<string, string> SplitIntoDictionary(string connectionString) 426var result = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Model\ConsoleLogsFilters.cs (1)
10public Dictionary<string, DateTime> FilterResourceLogsDates { get; set; } = [];
Model\FilterDialogViewModel.cs (1)
13public required Func<string, Dictionary<string, int>> GetFieldValues { get; init; }
Model\GenAI\GenAIItemPartViewModel.cs (2)
66var additionalProperties = p is GenericPart genericPart ? genericPart.AdditionalProperties ?? [] : []; 72private static JsonObject ToJsonObject(Dictionary<string, JsonElement> dict)
Model\GenAI\GenAIMessages.cs (1)
72public Dictionary<string, JsonElement>? AdditionalProperties { get; set; }
Model\Markdown\HighlightedCodeBlockRenderer.cs (1)
81var attributes = FluentUIExtensions.GetClipboardCopyAdditionalAttributes(rawCode, _loc[nameof(ControlsStrings.GridValueCopyToClipboard)], _loc[nameof(ControlsStrings.GridValueCopied)]);
Model\Otlp\ResourcesSelectHelpers.cs (1)
83var replicasByResourceName = OtlpResource.GetReplicasByResourceName(resources);
Model\Otlp\SpanWaterfallViewModel.cs (1)
131var groupedLogs = logs.GroupBy(l => l.SpanId).ToDictionary(l => l.Key, g => g.ToList());
Model\SpanDetailsViewModel.cs (2)
40var traceCache = new Dictionary<string, OtlpTrace>(StringComparer.Ordinal); 62private static SpanLinkViewModel CreateLinkViewModel(string traceId, string spanId, KeyValuePair<string, string>[] attributes, TelemetryRepository telemetryRepository, Dictionary<string, OtlpTrace> traceCache)
Model\TraceHelpers.cs (4)
19var spanLookup = new Dictionary<OtlpSpan, List<OtlpSpan>>(); 44static void Visit(Dictionary<OtlpSpan, List<OtlpSpan>> spanLookup, OtlpSpan span, Func<OtlpSpan, TState, TState> spanAction, TState state, Func<OtlpSpan, DateTime> orderByFunc) 67var resourceFirstTimes = new Dictionary<OtlpResource, OrderedResource>(); 89private static void ProcessSpanResource(OtlpSpan span, OtlpResource resource, Dictionary<OtlpResource, OrderedResource> resourceFirstTimes, DateTime currentMinDate)
Otlp\Model\OtlpHelpers.cs (1)
474public 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\Model\OtlpResource.cs (3)
33private readonly Dictionary<string, OtlpScope> _meters = new(); 34private readonly Dictionary<OtlpInstrumentKey, OtlpInstrument> _instruments = new(); 250public static Dictionary<string, List<OtlpResource>> GetReplicasByResourceName(IEnumerable<OtlpResource> allResources)
Otlp\Storage\TelemetryRepository.cs (10)
43private readonly Dictionary<string, OtlpScope> _logScopes = new(); 47private readonly Dictionary<ResourceKey, int> _resourceUnviewedErrorLogs = new(); 50private readonly Dictionary<string, OtlpScope> _traceScopes = new(); 164public Dictionary<ResourceKey, int> GetResourceUnviewedErrorLogsCount() 727public Dictionary<string, int> GetTraceFieldValues(string attributeName) 731var attributesValues = new Dictionary<string, int>(StringComparers.OtlpAttribute); 763public Dictionary<string, int> GetLogsFieldValues(string attributeName) 767var attributesValues = new Dictionary<string, int>(StringComparers.OtlpAttribute); 980var updatedTraces = new Dictionary<ReadOnlyMemory<byte>, OtlpTrace>(); 1342var 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)
21public static Dictionary<string, List<CultureInfo>> ExpandedLocalizedCultures { get; } 35private static Dictionary<string, List<CultureInfo>> GetExpandedLocalizedCultures(List<CultureInfo> localizedCultures, List<CultureInfo> allCultures) 37var dict = new Dictionary<string, List<CultureInfo>>(StringComparers.CultureName);
Aspire.Dashboard.Components.Tests (1)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
18Dictionary<string, ResourcePropertyViewModel>? properties = null,
Aspire.Dashboard.Tests (42)
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)
173var apps = new Dictionary<string, OtlpResource>();
Model\ResourceGraphMapperTests.cs (4)
24var resources = new Dictionary<string, ResourceViewModel> 45var resources = new Dictionary<string, ResourceViewModel> 66var resources = new Dictionary<string, ResourceViewModel> 84var resources = new Dictionary<string, ResourceViewModel>
Model\ResourceIconHelpersTests.cs (1)
118var properties = new Dictionary<string, ResourcePropertyViewModel>
Model\ResourceSourceViewModelTests.cs (1)
18var properties = new Dictionary<string, ResourcePropertyViewModel>();
Model\ResourceStateViewModelTests.cs (1)
72var propertiesDictionary = new Dictionary<string, ResourcePropertyViewModel>();
ResourceOutgoingPeerResolverTests.cs (21)
30var resources = new Dictionary<string, ResourceViewModel> 43var resources = new Dictionary<string, ResourceViewModel> 56var resources = new Dictionary<string, ResourceViewModel> 69var resources = new Dictionary<string, ResourceViewModel> 88var resources = new Dictionary<string, ResourceViewModel> 102var resources = new Dictionary<string, ResourceViewModel> 116var resources = new Dictionary<string, ResourceViewModel> 195var resources = new Dictionary<string, ResourceViewModel> 209var resources = new Dictionary<string, ResourceViewModel> 233var resources = new Dictionary<string, ResourceViewModel> 248var resources = new Dictionary<string, ResourceViewModel> 262var resources = new Dictionary<string, ResourceViewModel> 277var resources = new Dictionary<string, ResourceViewModel> 290var resources = new Dictionary<string, ResourceViewModel> 304var resources = new Dictionary<string, ResourceViewModel> 319var resources = new Dictionary<string, ResourceViewModel> 331var properties = new Dictionary<string, ResourcePropertyViewModel> 349var properties = new Dictionary<string, ResourcePropertyViewModel> 369var resources = new Dictionary<string, ResourceViewModel> 384var resources = new Dictionary<string, ResourceViewModel> 401var resources = new Dictionary<string, ResourceViewModel>
TelemetryRepositoryTests\LogTests.cs (6)
246var unviewedCounts1 = repository.GetResourceUnviewedErrorLogsCount(); 256var unviewedCounts2 = repository.GetResourceUnviewedErrorLogsCount(); 265var unviewedCounts3 = repository.GetResourceUnviewedErrorLogsCount(); 317var unviewedCounts = repository.GetResourceUnviewedErrorLogsCount(); 369var unviewedCounts = repository.GetResourceUnviewedErrorLogsCount(); 407var unviewedCounts = repository.GetResourceUnviewedErrorLogsCount();
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)
18Dictionary<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 (96)
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\ProjectResource.cs (1)
18internal 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)
540var versionsSeen = new Dictionary<string, long>();
ConnectionPropertiesExtensions.cs (1)
24var dict = new Dictionary<string, ReferenceExpression>(StringComparer.OrdinalIgnoreCase);
Dashboard\DashboardEventHandlers.cs (1)
669var dashboardResourceTasks = new Dictionary<string, Task>();
Dashboard\ResourcePublisher.cs (1)
22private readonly Dictionary<string, SourceAndResourceSnapshot> _snapshot = [];
Dcp\DcpExecutor.cs (1)
280var resourceLogState = new Dictionary<string, (bool logsAvailable, bool hasSubscribers)>();
Dcp\DcpHost.cs (1)
272var loggerCache = new Dictionary<int, ILogger>();
Dcp\DcpResourceState.cs (2)
10internal sealed class DcpResourceState(Dictionary<string, IResource> applicationModel, List<AppResource> appResources) 19public 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)
537var switchMappings = new Dictionary<string, string>() 555var switchMappings = new Dictionary<string, string>()
Health\ResourceHealthCheckService.cs (2)
16private readonly Dictionary<string, ResourceMonitorState> _resourceMonitoringStates = new(); 224var healthCheckNameToStatus = latestHealthReportSnapshots.ToDictionary(p => p.Name);
IInteractionService.cs (2)
355private readonly Dictionary<string, InteractionInput> _inputsByName; 363var inputsByName = new Dictionary<string, InteractionInput>(StringComparers.InteractionInputName);
LaunchProfile.cs (1)
59public Dictionary<string, string> EnvironmentVariables { get; set; } = [];
LaunchSettings.cs (1)
17public Dictionary<string, LaunchProfile> Profiles { get; set; } = [];
LaunchSettingsSerializerContext.DictionaryStringLaunchProfile.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>? _DictionaryStringLaunchProfile; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> DictionaryStringLaunchProfile 20get => _DictionaryStringLaunchProfile ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>)); 23private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> Create_DictionaryStringLaunchProfile(global::System.Text.Json.JsonSerializerOptions options) 25if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> jsonTypeInfo)) 27var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> 33jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>, string, global::Aspire.Hosting.LaunchProfile>(options, info); 43private void DictionaryStringLaunchProfileSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>? value)
LaunchSettingsSerializerContext.DictionaryStringString.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>>? _DictionaryStringString; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>> DictionaryStringString 20get => _DictionaryStringString ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, string>)); 23private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>> Create_DictionaryStringString(global::System.Text.Json.JsonSerializerOptions options) 25if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, string>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>> jsonTypeInfo)) 27var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, string>> 33jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, string>, string, string>(options, info); 43private void DictionaryStringStringSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, string>? value)
LaunchSettingsSerializerContext.GetJsonTypeInfo.g.cs (2)
38if (type == typeof(global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>)) 42if (type == typeof(global::System.Collections.Generic.Dictionary<string, string>))
LaunchSettingsSerializerContext.LaunchProfile.g.cs (2)
181var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, string>> 198properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, string>>(options, info7);
LaunchSettingsSerializerContext.LaunchSettings.g.cs (2)
48var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> 65properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>(options, info0);
Orchestrator\ParameterProcessor.cs (4)
83var referencedParameters = new Dictionary<string, ParameterResource>(); 105private async Task CollectDependentParameterResourcesAsync(DistributedApplicationModel model, Dictionary<string, ParameterResource> referencedParameters, HashSet<object?> currentDependencySet, CancellationToken cancellationToken) 119private async Task ProcessResourceDependenciesAsync(IResource resource, DistributedApplicationExecutionContext executionContext, Dictionary<string, ParameterResource> referencedParameters, HashSet<object?> currentDependencySet, CancellationToken cancellationToken) 148private static void TryAddDependentParameters(object? value, Dictionary<string, ParameterResource> referencedParameters, HashSet<object?> currentDependencySet)
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)
148static void SetOtelEndpointAndProtocol(Dictionary<string, object> environmentVariables, string url, string protocol)
Pipelines\DistributedApplicationPipeline.cs (5)
117var stepsByName = allSteps.ToDictionary(s => s.Name, StringComparer.Ordinal); 189Dictionary<string, PipelineStep> stepsByName, 206var stepCompletions = new Dictionary<string, TaskCompletionSource>(steps.Count, StringComparer.Ordinal); 374Dictionary<string, PipelineStep> stepsByName) 391var visitStates = new Dictionary<string, VisitState>(steps.Count, StringComparer.Ordinal);
ProjectResourceBuilderExtensions.cs (1)
575Dictionary<string, int> endpointCountByScheme = [];
Publishing\ContainerRuntimeBase.cs (5)
38public abstract Task BuildImageAsync(string contextPath, string dockerfilePath, string imageName, ContainerBuildOptions? options, Dictionary<string, string?> buildArguments, Dictionary<string, string?> buildSecrets, string? stage, CancellationToken cancellationToken); 121Dictionary<string, string>? environmentVariables = null) 160protected static string BuildArgumentsString(Dictionary<string, string?> buildArguments) 178protected static string BuildSecretsString(Dictionary<string, string?> buildSecrets, bool requireValue = false)
Publishing\DockerContainerRuntime.cs (4)
19private async Task<int> RunDockerBuildAsync(string contextPath, string dockerfilePath, string imageName, ContainerBuildOptions? options, Dictionary<string, string?> buildArguments, Dictionary<string, string?> buildSecrets, string? stage, CancellationToken cancellationToken) 142public override async Task BuildImageAsync(string contextPath, string dockerfilePath, string imageName, ContainerBuildOptions? options, Dictionary<string, string?> buildArguments, Dictionary<string, string?> buildSecrets, string? stage, CancellationToken cancellationToken)
Publishing\IContainerRuntime.cs (2)
12Task BuildImageAsync(string contextPath, string dockerfilePath, string imageName, ContainerBuildOptions? options, Dictionary<string, string?> buildArguments, Dictionary<string, string?> buildSecrets, string? stage, CancellationToken cancellationToken);
Publishing\ManifestPublishingContext.cs (6)
46private readonly Dictionary<string, IResource> _referencedResources = []; 50private readonly Dictionary<ParameterResource, Dictionary<string, string>> _formattedParameters = []; 534var env = new Dictionary<string, (object, string)>(); 763if (!_formattedParameters.TryGetValue(parameter, out var formats)) 824if (!_formattedParameters.TryGetValue(parameter, out var formats))
Publishing\PodmanContainerRuntime.cs (5)
18private async Task<int> RunPodmanBuildAsync(string contextPath, string dockerfilePath, string imageName, ContainerBuildOptions? options, Dictionary<string, string?> buildArguments, Dictionary<string, string?> buildSecrets, string? stage, CancellationToken cancellationToken) 60var environmentVariables = new Dictionary<string, string>(); 78public override async Task BuildImageAsync(string contextPath, string dockerfilePath, string imageName, ContainerBuildOptions? options, Dictionary<string, string?> buildArguments, Dictionary<string, string?> buildSecrets, string? stage, CancellationToken cancellationToken)
Publishing\ResourceContainerImageBuilder.cs (2)
371var resolvedBuildArguments = new Dictionary<string, string?>(); 378var resolvedBuildSecrets = new Dictionary<string, string?>();
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
53var profiles = projectResource.GetLaunchSettings()?.Profiles;
src\Shared\SecretsStore.cs (2)
20private readonly Dictionary<string, string?> _secrets; 87private static Dictionary<string, string?> Load(string secretsFilePath)
Utils\DotnetSdkUtils.cs (1)
10private static readonly Dictionary<string, string> s_dotnetCliEnvVars = new()
Aspire.Hosting.Azure (19)
AzureBicepResource.cs (3)
43public Dictionary<string, object?> Parameters { get; } = []; 50public Dictionary<string, object?> Outputs { get; } = new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase); 55public Dictionary<string, string?> SecretOutputs { get; } = new Dictionary<string, string?>(StringComparer.OrdinalIgnoreCase);
AzureEnvironmentResource.cs (2)
319var resourcesByRegistry = new Dictionary<IContainerRegistry, List<IResource>>(); 505private static async Task PushImagesToAllRegistriesAsync(Dictionary<IContainerRegistry, List<IResource>> resourcesByRegistry, PipelineStepContext context, IResourceContainerImageBuilder containerImageBuilder)
AzureProvisioningResource.cs (1)
230var distinctInfrastructureParametersLookup = distinctInfrastructureParameters.ToDictionary(p => p.BicepIdentifier);
AzurePublishingContext.cs (5)
53public Dictionary<ParameterResource, ProvisioningParameter> ParameterLookup { get; } = []; 62public Dictionary<BicepOutputReference, ProvisioningOutput> OutputLookup { get; } = []; 71internal Dictionary<string, BicepOutputReference> ReverseOutputLookup { get; } = []; 152var moduleMap = new Dictionary<AzureBicepResource, ModuleImport>(); 292var outputs = new Dictionary<string, BicepOutputReference>();
AzureResourcePreparer.cs (8)
105var globalRoleAssignments = new Dictionary<AzureProvisioningResource, HashSet<RoleDefinition>>(); 186var roleAssignments = GetAllRoleAssignments(resource); 243private static Dictionary<AzureProvisioningResource, IEnumerable<RoleDefinition>> GetAllRoleAssignments(IResource resource) 245var result = new Dictionary<AzureProvisioningResource, IEnumerable<RoleDefinition>>(); 258Dictionary<AzureProvisioningResource, IEnumerable<RoleDefinition>> roleAssignments) 288Dictionary<AzureProvisioningResource, IEnumerable<RoleDefinition>> roleAssignments, 474private static void AppendGlobalRoleAssignments(Dictionary<AzureProvisioningResource, HashSet<RoleDefinition>> globalRoleAssignments, AzureProvisioningResource azureResource, IEnumerable<RoleDefinition> newRoles) 485private void CreateGlobalRoleAssignments(DistributedApplicationModel appModel, Dictionary<AzureProvisioningResource, HashSet<RoleDefinition>> globalRoleAssignments)
Aspire.Hosting.Azure.AppContainers (7)
AzureContainerAppEnvironmentResource.cs (1)
59internal Dictionary<string, (IResource resource, ContainerMountAnnotation volume, int index, BicepOutputReference outputReference)> VolumeNames { get; } = [];
AzureContainerAppExtensions.cs (1)
168var managedStorages = new Dictionary<string, ContainerAppManagedEnvironmentStorage>();
BaseContainerAppContext.cs (3)
29protected readonly Dictionary<string, EndpointMapping> _endpointMapping = []; 34public Dictionary<string, object> EnvironmentVariables { get; } = []; 36public Dictionary<string, (ContainerMountAnnotation, BicepOutputReference)> Volumes { get; } = [];
ContainerAppContext.cs (1)
156var endpointIndexMap = new Dictionary<string, int>();
ContainerAppEnvironmentContext.cs (1)
26private readonly Dictionary<IResource, BaseContainerAppContext> _containerApps = new(new ResourceNameComparer());
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceEnvironmentContext.cs (1)
24private readonly Dictionary<IResource, AzureAppServiceWebsiteContext> _appServices = new(new ResourceNameComparer());
AzureAppServiceWebsiteContext.cs (2)
25private readonly Dictionary<string, EndpointMapping> _endpointMapping = []; 30public Dictionary<string, object> EnvironmentVariables { get; } = [];
Aspire.Hosting.Azure.Functions (27)
LaunchSettingsSerializerContext.DictionaryStringLaunchProfile.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>? _DictionaryStringLaunchProfile; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> DictionaryStringLaunchProfile 20get => _DictionaryStringLaunchProfile ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>)); 23private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> Create_DictionaryStringLaunchProfile(global::System.Text.Json.JsonSerializerOptions options) 25if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> jsonTypeInfo)) 27var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> 33jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>, string, global::Aspire.Hosting.LaunchProfile>(options, info); 43private void DictionaryStringLaunchProfileSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>? value)
LaunchSettingsSerializerContext.DictionaryStringString.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>>? _DictionaryStringString; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>> DictionaryStringString 20get => _DictionaryStringString ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, string>)); 23private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>> Create_DictionaryStringString(global::System.Text.Json.JsonSerializerOptions options) 25if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, string>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>> jsonTypeInfo)) 27var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, string>> 33jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, string>, string, string>(options, info); 43private void DictionaryStringStringSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, string>? value)
LaunchSettingsSerializerContext.GetJsonTypeInfo.g.cs (2)
38if (type == typeof(global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>)) 42if (type == typeof(global::System.Collections.Generic.Dictionary<string, string>))
LaunchSettingsSerializerContext.LaunchProfile.g.cs (2)
181var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, string>> 198properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, string>>(options, info7);
LaunchSettingsSerializerContext.LaunchSettings.g.cs (2)
48var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> 65properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>(options, info0);
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
53var profiles = projectResource.GetLaunchSettings()?.Profiles;
Aspire.Hosting.Azure.Kusto.Tests (2)
AddAzureKustoTests.cs (2)
126var env = await builder.GetEnvironmentVariables(annotation); 432public static async Task<Dictionary<string, object>> GetEnvironmentVariables(this IDistributedApplicationTestingBuilder builder, EnvironmentCallbackAnnotation annotation)
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)
19private readonly Dictionary<string, AzureSqlDatabaseResource> _databases = new Dictionary<string, AzureSqlDatabaseResource>(StringComparers.ResourceName);
Aspire.Hosting.Azure.Tests (64)
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>();
ProvisioningTestHelpers.cs (32)
61public static IArmClientProvider CreateArmClientProvider(Dictionary<string, object> deploymentOutputs) => new TestArmClientProvider(deploymentOutputs); 62public static IArmClientProvider CreateArmClientProvider(Func<string, Dictionary<string, object>> deploymentOutputsProvider) => new TestArmClientProvider(deploymentOutputsProvider); 181private readonly Dictionary<string, object>? _deploymentOutputs; 182private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 184public TestArmClient(Dictionary<string, object> deploymentOutputs) 189public TestArmClient(Func<string, Dictionary<string, object>> deploymentOutputsProvider) 260private readonly Dictionary<string, object>? _deploymentOutputs; 261private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 263public TestSubscriptionResource(Dictionary<string, object> deploymentOutputs) 268public TestSubscriptionResource(Func<string, Dictionary<string, object>> deploymentOutputsProvider) 305private readonly Dictionary<string, object>? _deploymentOutputs; 306private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 308public TestResourceGroupCollection(Dictionary<string, object> deploymentOutputs) 313public TestResourceGroupCollection(Func<string, Dictionary<string, object>> deploymentOutputsProvider) 357private readonly Dictionary<string, object>? _deploymentOutputs; 358private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 361public TestResourceGroupResource(string name, Dictionary<string, object> deploymentOutputs) 367public TestResourceGroupResource(string name, Func<string, Dictionary<string, object>> deploymentOutputsProvider) 395private readonly Dictionary<string, object>? _deploymentOutputs; 396private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 398public TestArmDeploymentCollection(Dictionary<string, object> deploymentOutputs) 403public TestArmDeploymentCollection(Func<string, Dictionary<string, object>> deploymentOutputsProvider) 467private readonly Dictionary<string, object>? _deploymentData; 468private readonly Func<string, Dictionary<string, object>>? _deploymentDataProvider; 470public TestArmDeploymentResource(string name, Dictionary<string, object> deploymentData) 476public TestArmDeploymentResource(string name, Func<string, Dictionary<string, object>> deploymentDataProvider) 488Dictionary<string, object> data; 531private readonly Dictionary<string, object>? _deploymentOutputs; 532private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 534public TestArmClientProvider(Dictionary<string, object> deploymentOutputs) 539public TestArmClientProvider(Func<string, Dictionary<string, object>> deploymentOutputsProvider) 642public Dictionary<string, ProcessResult> CommandResults { get; set; } = [];
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.DevTunnels.Tests (1)
DevTunnelResourceBuilderExtensionsTests.cs (1)
28var values = await consumer.Resource.GetEnvironmentVariableValuesAsync();
Aspire.Hosting.Docker (30)
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\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)
542public Dictionary<string, LaunchProfile>? Profiles { get; set; } = [];
Aspire.Hosting.Kafka.Tests (2)
AddKafkaTests.cs (2)
120var config = await kafka.Resource.GetEnvironmentVariableValuesAsync(); 138var 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() 121Dictionary<string, KubernetesResource.HelmExpressionWithValue> contextItems, 124if (contextItems.Count <= 0 || _helmValues[helmKey] is not Dictionary<string, object> helmSection) 129var 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)
71private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.Milvus.Tests (2)
AddMilvusTests.cs (2)
105var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 116var containerConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(container1.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.MongoDB (1)
MongoDBServerResource.cs (1)
114private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.MongoDB.Tests (1)
AddMongoDBTests.cs (1)
152var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(mongoExpress, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.MySql (1)
MySqlServerResource.cs (1)
14private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.MySql.Tests (3)
AddMySqlTests.cs (3)
62var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 101var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 245var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(myAdmin, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.OpenAI (1)
OpenAIHealthCheck.cs (1)
111var data = new Dictionary<string, object>
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
90private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.Oracle.Tests (3)
AddOracleTests.cs (3)
61var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 100var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 182var 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)
90private readonly Dictionary<string, string> _databases = new Dictionary<string, string>(StringComparers.ResourceName);
Aspire.Hosting.PostgreSQL.Tests (3)
AddPostgresTests.cs (3)
71var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 125var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 218var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.Python.Tests (5)
AddPythonAppTests.cs (5)
132var environmentVariables = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(pyproj.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 503var environmentVariables = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 1106var environmentVariables = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 1128var environmentVariables = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 1146var environmentVariables = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(
Aspire.Hosting.Qdrant.Tests (4)
AddQdrantTests.cs (4)
66var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 138var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 179var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 191var containerConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(container1.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.Redis.Tests (4)
AddRedisTests.cs (4)
303var envs = await redisInsight.GetEnvironmentVariableValuesAsync(); 498var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 524var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(commander); 545var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
122private readonly Dictionary<string, string> _databases = new(StringComparers.ResourceName);
Aspire.Hosting.SqlServer.Tests (1)
AddSqlServerTests.cs (1)
62var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerResource, DistributedApplicationOperation.Run, TestServiceProvider.Instance);
Aspire.Hosting.Testing (29)
DistributedApplicationFactory.cs (3)
201var additionalConfig = new Dictionary<string, string?>(); 266var additionalConfig = new Dictionary<string, string?>(); 276var launchProfiles = appHostLaunchSettings.Profiles;
LaunchSettingsSerializerContext.DictionaryStringLaunchProfile.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>? _DictionaryStringLaunchProfile; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> DictionaryStringLaunchProfile 20get => _DictionaryStringLaunchProfile ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>)); 23private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> Create_DictionaryStringLaunchProfile(global::System.Text.Json.JsonSerializerOptions options) 25if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> jsonTypeInfo)) 27var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> 33jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>, string, global::Aspire.Hosting.LaunchProfile>(options, info); 43private void DictionaryStringLaunchProfileSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>? value)
LaunchSettingsSerializerContext.DictionaryStringString.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>>? _DictionaryStringString; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>> DictionaryStringString 20get => _DictionaryStringString ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, string>)); 23private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>> Create_DictionaryStringString(global::System.Text.Json.JsonSerializerOptions options) 25if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, string>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, string>> jsonTypeInfo)) 27var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, string>> 33jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, string>, string, string>(options, info); 43private void DictionaryStringStringSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, string>? value)
LaunchSettingsSerializerContext.GetJsonTypeInfo.g.cs (2)
38if (type == typeof(global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>)) 42if (type == typeof(global::System.Collections.Generic.Dictionary<string, string>))
LaunchSettingsSerializerContext.LaunchProfile.g.cs (2)
181var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, string>> 198properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, string>>(options, info7);
LaunchSettingsSerializerContext.LaunchSettings.g.cs (2)
48var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>> 65properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>(options, info0);
Aspire.Hosting.Tests (103)
ConnectionPropertiesExtensionsTests.cs (1)
25var dict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Dashboard\DashboardLifecycleHookTests.cs (1)
176var envVars = new Dictionary<string, object>();
Dashboard\DashboardResourceTests.cs (5)
227var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 266var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 302var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 345var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 386var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout();
Dcp\DcpExecutorTests.cs (11)
1556var configDict = new Dictionary<string, string?> 1602var configDict = new Dictionary<string, string?> 1641var configDict = new Dictionary<string, string?> 1680var configDict = new Dictionary<string, string?> 1716var configDict = new Dictionary<string, string?> 1758var configDict = new Dictionary<string, string?> 1800var configDict = new Dictionary<string, string?> 1842var configDict = new Dictionary<string, string?> 1879var configDict = new Dictionary<string, string?> 1916var configDict = new Dictionary<string, string?> 1959var configDict = new Dictionary<string, string?>
DistributedApplicationTests.cs (1)
500Dictionary<int, bool> pids = [];
ExpressionResolverTests.cs (5)
115var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(source.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance, "ContainerHostName").DefaultTimeout(); 149var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(test.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance, "ContainerHostName").DefaultTimeout(); 168var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(test.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance, "ContainerHostName").DefaultTimeout(); 189var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dep.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance, "ContainerHostName").DefaultTimeout(); 222Dictionary<string, ReferenceExpression> Expressions { get; }
ExternalServiceTests.cs (4)
111var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 128var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 147var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 167var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.Services).DefaultTimeout();
KestrelConfigTests.cs (3)
40var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 78var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 143var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout();
Orchestrator\ApplicationOrchestratorTests.cs (1)
548Dictionary<string, string> kvConnectionString,
Pipelines\DistributedApplicationPipelineTests.cs (2)
231var stepTimes = executionOrder.ToDictionary(x => x.step, x => x.time); 1075var executionTimes = new Dictionary<string, DateTime>();
ProjectResourceTests.cs (9)
80var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 196var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 327var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 370var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 392var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 417var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 444var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 641var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 759protected Dictionary<string, LaunchProfile>? Profiles { get; set; } = new();
Publishing\ResourceContainerImageBuilderTests.cs (4)
874public Dictionary<string, string?>? CapturedBuildArguments { get; private set; } 875public Dictionary<string, string?>? CapturedBuildSecrets { get; private set; } 906public Task BuildImageAsync(string contextPath, string dockerfilePath, string imageName, ContainerBuildOptions? options, Dictionary<string, string?> buildArguments, Dictionary<string, string?> buildSecrets, string? stage, CancellationToken cancellationToken)
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)
30var userSecrets = GetUserSecrets(userSecretsId); 54var userSecrets = GetUserSecrets(userSecretsId); 61private static Dictionary<string, string?> GetUserSecrets(string userSecretsId)
UserSecretsParameterDefaultTests.cs (2)
29var userSecrets = GetUserSecrets(userSecretsId); 83private 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)
214var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout();
WithEnvironmentTests.cs (19)
31var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 54var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 75var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 91var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 107var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 124var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 147var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, 189var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 213var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 240var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerB.Resource).DefaultTimeout(); 241var manifestConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerB.Resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 312var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(containerB.Resource).DefaultTimeout(); 336var runConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(targetBuilder.Resource, DistributedApplicationOperation.Run).DefaultTimeout(); 342var publishConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(targetBuilder.Resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 366var runtimeConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 374var manifestConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 400var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 447var runtimeConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync( 455var manifestConfig = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(
WithOtlpExporterTests.cs (1)
42var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(
WithReferenceTests.cs (24)
28var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 61var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 110var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 138var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 164var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 193var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 233var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 252var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance); 271var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 287var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 303var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Publish).DefaultTimeout(); 322var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 352var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 404var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 426var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 458var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectA.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 481var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 506var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(executable.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 531var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(executable.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 558var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(executable.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 583var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(container.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 610var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(container.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 639var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.Resource, DistributedApplicationOperation.Run, TestServiceProvider.Instance).DefaultTimeout(); 662var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(projectB.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) 38private static void FlattenToEnvVars(Dictionary<string, object> environmentVariables, object obj, string prefix)
Aspire.Hosting.Yarp.Tests (8)
AddYarpTests.cs (6)
42var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(yarp.Resource, DistributedApplicationOperation.Run, testProvider); 66var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(yarp.Resource, DistributedApplicationOperation.Publish, TestServiceProvider.Instance); 89var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(yarp.Resource, DistributedApplicationOperation.Run, testProvider); 109var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(yarp.Resource, DistributedApplicationOperation.Publish, testProvider); 131var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(yarp.Resource, DistributedApplicationOperation.Run, testProvider); 146var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(yarp.Resource, DistributedApplicationOperation.Publish, TestServiceProvider.Instance);
YarpConfigGeneratorTests.cs (2)
229var variables = new Dictionary<string, object>(); 248var 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>();
AzureFunctionsEndToEnd.Functions (1)
GeneratedFunctionExecutor.g.cs (1)
17private readonly Dictionary<string, Type> types = new Dictionary<string, Type>()
BasicWebSite (2)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
32var 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)
240var 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)
183var map = new Dictionary<Guid, AssemblyInfo>(); 374var 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();
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);
containerize (6)
ContainerizeCommand.cs (6)
114internal Option<Dictionary<string, string>> LabelsOption { get; } = new("--labels") 181internal Option<Dictionary<string, string>> EnvVarsOption { get; } = new("--environmentvariables") 260Dictionary<string, string> _labels = parseResult.GetValue(LabelsOption) ?? new Dictionary<string, string>(); 262Dictionary<string, string> _envVars = parseResult.GetValue(EnvVarsOption) ?? new Dictionary<string, string>(); 308private static Dictionary<string, string> ParseDictionary(ArgumentResult argumentResult, string errorMessage) 310Dictionary<string, string> parsed = new();
containerize.UnitTests (3)
ParserTests.cs (3)
42Dictionary<string, string>? labels = parseResult.GetValue(command.LabelsOption); 80Dictionary<string, string>? labels = parseResult.GetValue(command.LabelsOption); 154Dictionary<string, string>? envVars = parseResult.GetValue(command.EnvVarsOption);
csc (4)
src\Compilers\Shared\BuildServerConnection.cs (4)
454private static IntPtr CreateEnvironmentBlock(Dictionary<string, string> environmentVariables) 484internal static Dictionary<string, string>? GetServerEnvironmentVariables(System.Collections.IDictionary currentEnvironment, ICompilerServerLogger? logger = null) 492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger);
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 (140)
BuildServerConnection.cs (4)
454private static IntPtr CreateEnvironmentBlock(Dictionary<string, string> environmentVariables) 484internal static Dictionary<string, string>? GetServerEnvironmentVariables(System.Collections.IDictionary currentEnvironment, ICompilerServerLogger? logger = null) 492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger);
CliSchema.cs (16)
54Dictionary<string, ArgumentDetails>? arguments, 55Dictionary<string, OptionDetails>? options, 56Dictionary<string, CommandDetails>? subcommands); 63Dictionary<string, ArgumentDetails>? arguments, 64Dictionary<string, OptionDetails>? options, 65Dictionary<string, CommandDetails>? subcommands 77var telemetryProperties = new Dictionary<string, string> { { "command", commandString } }; 97var arguments = CreateArgumentsDictionary(command.Arguments); 98var options = CreateOptionsDictionary(command.Options); 99var subcommands = CreateSubcommandsDictionary(command.Subcommands); 113private static Dictionary<string, ArgumentDetails>? CreateArgumentsDictionary(IList<Argument> arguments) 119var dict = new Dictionary<string, ArgumentDetails>(); 127private static Dictionary<string, OptionDetails>? CreateOptionsDictionary(IList<Option> options) 133var dict = new Dictionary<string, OptionDetails>(); 141private static Dictionary<string, CommandDetails>? CreateSubcommandsDictionary(IList<Command> subcommands) 147var dict = new Dictionary<string, CommandDetails>();
CommandFactory\CommandResolution\IProject.cs (1)
29Dictionary<string, string> EnvironmentVariables { get; }
CommandFactory\CommandResolution\LockFileTargetExtensions.cs (1)
47Dictionary<string, LockFileTargetLibrary> libraryLookup =
CommandFactory\CommandResolution\MSBuildProject.cs (2)
75public Dictionary<string, string> EnvironmentVariables 108var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
CommandFactory\CommandSpec.cs (2)
11Dictionary<string, string>? environmentVariables = null) 17public Dictionary<string, string> EnvironmentVariables { get; } = environmentVariables ?? [];
Commands\MSBuild\MSBuildLogger.cs (3)
115Dictionary<string, string> maskedProperties = []; 179Dictionary<string, string> properties = null; 180Dictionary<string, double> measurements = null;
Commands\New\BuiltInTemplatePackageProvider.cs (1)
75var versionFileInfo = new Dictionary<string, SemanticVersion>();
Commands\New\MSBuildEvaluation\MSBuildEvaluator.cs (4)
165Dictionary<string, MSBuildProject?> evaluatedTfmBasedProjects = []; 198Dictionary<string, string?> properties = new() 206Dictionary<string, double> measurements = new() 228var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Commands\New\NewCommandParser.cs (1)
166var preferences = new Dictionary<string, string>
Commands\Run\CommonRunHelpers.cs (2)
17public static Dictionary<string, string> GetGlobalPropertiesFromArgs(MSBuildArgs msbuildArgs) 19var globalProperties = msbuildArgs.GlobalProperties?.ToDictionary() ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Commands\Run\LaunchSettings\ProjectLaunchSettingsModel.cs (1)
20public Dictionary<string, string> EnvironmentVariables { get; } = new Dictionary<string, string>(StringComparer.Ordinal);
Commands\Run\RunCommand.cs (2)
417var globalProperties = CommonRunHelpers.GetGlobalPropertiesFromArgs(msbuildArgs); 837var globalProperties = MSBuildArgs.GlobalProperties?.ToDictionary() ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Commands\Run\RunTelemetry.cs (1)
46var properties = new Dictionary<string, string?>
Commands\Run\VirtualProjectBuildingCommand.cs (3)
287Dictionary<string, string?> savedEnvironmentVariables = []; 1994public Dictionary<string, string> GlobalProperties { get; } 2032public RunFileBuildCacheEntry(Dictionary<string, string> globalProperties)
Commands\Test\MTP\IPC\Models\HandshakeMessage.cs (1)
6internal sealed record HandshakeMessage(Dictionary<byte, string> Properties) : IRequest, IResponse;
Commands\Test\MTP\IPC\NamedPipeBase.cs (2)
11private readonly Dictionary<Type, INamedPipeSerializer> _typeSerializer = []; 12private readonly Dictionary<int, INamedPipeSerializer> _idSerializer = [];
Commands\Test\MTP\IPC\Serializers\HandshakeMessageSerializer.cs (1)
15Dictionary<byte, string> properties = [];
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.Help.cs (4)
33Dictionary<bool, List<(string[], string[])>> moduleToMissingOptions = GetModulesToMissingOptions(_moduleNamesToCommandLineOptions, builtInOptions.Select(option => option.Name!), nonBuiltInOptions.Select(option => option.Name!)); 158private static Dictionary<bool, List<(string[], string[])>> GetModulesToMissingOptions( 163var modulesWithMissingOptions = new Dictionary<bool, List<(string[], string[])>>(); 169var missingOptionsToModules = new Dictionary<string, List<string>>();
Commands\Test\MTP\SolutionAndProjectUtility.cs (1)
184Dictionary<string, string>? globalProperties = null;
Commands\Test\MTP\Terminal\TerminalTestReporter.cs (2)
1004Dictionary<bool, List<(string[], string[])>> moduleToMissingOptions) 1085public void WriteModulesToMissingOptionsToConsole(Dictionary<bool, List<(string[], string[])>> modulesWithMissingOptions)
Commands\Test\MTP\Terminal\TestProgressState.cs (1)
11private readonly Dictionary<string, TestNodeInfoEntry> _testUidToResults = new();
Commands\Test\MTP\TestApplication.cs (1)
30private readonly Dictionary<NamedPipeServer, HandshakeMessage> _handshakes = new();
Commands\Test\MTP\TestApplicationHandler.cs (1)
15private readonly Dictionary<string, (int TestSessionStartCount, int TestSessionEndCount)> _testSessionEventCountPerSessionUid = new();
Commands\Test\VSTest\TestCommand.cs (4)
66var properties = GetUserSpecifiedExplicitMSBuildProperties(parseResult); 244Dictionary<string, string> variables = VSTestForwardingApp.GetVSTestRootVariables(); 314private static Dictionary<string, string> GetUserSpecifiedExplicitMSBuildProperties(ParseResult parseResult) 316Dictionary<string, string> globalProperties = new(StringComparer.OrdinalIgnoreCase);
Commands\Test\VSTest\VSTestForwardingApp.cs (2)
17Dictionary<string, string> variables = GetVSTestRootVariables(); 41internal static Dictionary<string, string> GetVSTestRootVariables()
Commands\Tool\Restore\ToolRestoreCommand.cs (2)
119Dictionary<RestoredCommandIdentifier, ToolCommand> downloaded = 182private static void EnsureNoCommandNameCollision(Dictionary<RestoredCommandIdentifier, ToolCommand> dictionary)
Commands\Workload\GlobalJsonWorkloadSetFile.cs (5)
28Dictionary<string, string> globalJsonWorkloadSetVersions; 31globalJsonWorkloadSetVersions = JsonSerializer.Deserialize<Dictionary<string, string>>(fileStream, _jsonSerializerOptions); 43public Dictionary<string, string> GetGlobalJsonWorkloadSetVersions() 69var globalJsonWorkloadSetVersions = JsonSerializer.Deserialize<Dictionary<string, string>>(fileStream, _jsonSerializerOptions);
Commands\Workload\Install\FileBasedInstaller.cs (13)
394var globalJsonWorkloadSetVersions = GetGlobalJsonWorkloadSetVersions(_sdkFeatureBand); 414var installedWorkloadSets = _workloadResolver.GetWorkloadManifestProvider().GetAvailableWorkloadSets(); 415Dictionary<(string workloadSetVersion, SdkFeatureBand workloadSetFeatureBand), List<SdkFeatureBand>> workloadSetInstallRecords = GetAllWorkloadSetInstallRecords(); 463Dictionary<(ManifestId manifestId, ManifestVersion manifestVersion, SdkFeatureBand manifestFeatureBand), List<SdkFeatureBand>> manifestInstallRecords = GetAllManifestInstallRecords(); 500Dictionary<(WorkloadPackId packId, string packVersion), List<SdkFeatureBand>> packInstallRecords = GetAllPackInstallRecords(); 574public void SaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary<string, string> manifestContents) 601public Dictionary<string, string> GetGlobalJsonWorkloadSetVersions(SdkFeatureBand sdkFeatureBand) 742private Dictionary<(string workloadSetVersion, SdkFeatureBand workloadSetFeatureBand), List<SdkFeatureBand>> GetAllWorkloadSetInstallRecords() 744Dictionary<(string workloadSetVersion, SdkFeatureBand workloadSetFeatureBand), List<SdkFeatureBand>> records = []; 793private Dictionary<(ManifestId manifestId, ManifestVersion manifestVersion, SdkFeatureBand manifestFeatureBand), List<SdkFeatureBand>> GetAllManifestInstallRecords() 795Dictionary<(ManifestId manifestId, ManifestVersion manifestVersion, SdkFeatureBand manifestFeatureBand), List<SdkFeatureBand>> records = []; 835private Dictionary<(WorkloadPackId packId, string packVersion), List<SdkFeatureBand>> GetAllPackInstallRecords() 837Dictionary<(WorkloadPackId packId, string packVersion), List<SdkFeatureBand>> records = [];
Commands\Workload\Install\IInstaller.cs (1)
59void SaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary<string, string> manifestContents);
Commands\Workload\Install\IWorkloadManifestUpdater.cs (1)
31internal record ManifestUpdateWithWorkloads(ManifestVersionUpdate ManifestUpdate, WorkloadCollection Workloads);
Commands\Workload\Install\MsiInstallerBase.cs (3)
277public Dictionary<string, string> GetGlobalJsonWorkloadSetVersions(SdkFeatureBand sdkFeatureBand) 285var versions = workloadSetsFile.GetGlobalJsonWorkloadSetVersions(); 581public void SaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary<string, string> manifestContents)
Commands\Workload\Install\NetSdkMsiInstallerClient.cs (1)
128var globalJsonWorkloadSetVersions = GetGlobalJsonWorkloadSetVersions(_sdkFeatureBand);
Commands\Workload\Install\NetSdkMsiInstallerClient.PackGroup.cs (3)
29private Dictionary<(string packId, string packVersion), List<WorkloadPackGroupJson>> GetWorkloadPackGroups() 31Dictionary<(string packId, string packVersion), List<WorkloadPackGroupJson>> ret = []; 81var groupsForPacks = GetWorkloadPackGroups();
Commands\Workload\Install\WorkloadGarbageCollector.cs (5)
28Dictionary<string, string> globalJsonWorkloadSetVersions, IReporter verboseReporter) 34private readonly Dictionary<string, string> _globalJsonWorkloadSetVersions = globalJsonWorkloadSetVersions; 48private Dictionary<string, GCAction> _workloadSets = []; 49private readonly Dictionary<(ManifestId id, ManifestVersion version, SdkFeatureBand featureBand), GCAction> _manifests = []; 80var installedWorkloadSets = resolver.GetWorkloadManifestProvider().GetAvailableWorkloadSets();
Commands\Workload\Install\WorkloadManifestUpdater.cs (3)
411private (ManifestVersionWithBand ManifestWithBand, WorkloadCollection Workloads)? GetAdvertisingManifestVersionAndWorkloads(ManifestId manifestId) 432var workloads = manifest.Workloads.Values.OfType<WorkloadDefinition>().ToDictionary(w => w.Id); 506var versions = WorkloadSet.FromJson(fileContent, featureBand).ManifestVersions;
Commands\Workload\InstallingWorkloadCommand.cs (1)
169protected static Dictionary<string, string> GetInstallStateContents(IEnumerable<ManifestVersionUpdate> manifestVersionUpdates) =>
Commands\Workload\InstallStateContents.cs (1)
21public Dictionary<string, string>? Manifests { get; set; }
Commands\Workload\List\InstalledWorkloadsCollection.cs (1)
12private readonly Dictionary<string, string> _workloads;
Commands\Workload\List\VisualStudioWorkloads.cs (3)
59internal static Dictionary<string, string> GetAvailableVisualStudioWorkloads(IWorkloadResolver workloadResolver) 61Dictionary<string, string> visualStudioComponentWorkloads = new(StringComparer.OrdinalIgnoreCase); 106Dictionary<string, string> visualStudioWorkloadIds = GetAvailableVisualStudioWorkloads(workloadResolver);
Commands\Workload\List\WorkloadListCommand.cs (2)
106var manifestInfoDict = _workloadListHelper.WorkloadResolver.GetInstalledManifests().ToDictionary(info => info.Id, StringComparer.OrdinalIgnoreCase); 143foreach ((ManifestVersionUpdate manifestUpdate, WorkloadCollection workloads) in manifestsToUpdate)
Commands\Workload\Restore\WorkloadRestoreCommand.cs (1)
71var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Commands\Workload\Search\WorkloadSearchVersionsCommand.cs (2)
136Reporter.WriteLine(JsonSerializer.Serialize(new Dictionary<string, Dictionary<string, string>>() 198var manifestVersions = installer.GetWorkloadSetContents(version).ManifestVersions;
Commands\Workload\WorkloadCommandParser.cs (1)
106var manifestInfoDict = workloadInfoHelper.WorkloadResolver.GetInstalledManifests().ToDictionary(info => info.Id, StringComparer.OrdinalIgnoreCase);
Commands\Workload\WorkloadHistoryRecord.cs (2)
15public Dictionary<string, string> RollbackFileContents { get; set; } 32public Dictionary<string, string> ManifestVersions { get; set; }
CommonOptions.cs (2)
56var dictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 356var result = new Dictionary<string, string>(
dotnet.GlobalUsings.g.cs (1)
12global using WorkloadCollection = System.Collections.Generic.Dictionary<Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadId, Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadDefinition>;
ForwardingApp.cs (1)
17Dictionary<string, string> environmentVariables = null)
Installer\Windows\InstallMessageDispatcher.cs (1)
169public InstallResponseMessage SendSaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary<string, string> manifestContents)
Installer\Windows\InstallRequestMessage.cs (1)
38public Dictionary<string, string> InstallStateManifestVersions
Installer\Windows\InstallResponseMessage.cs (1)
42public Dictionary<string, string> GlobalJsonWorkloadSetVersions
Program.cs (2)
126Dictionary<string, double> performanceData = []; 391Dictionary<string, double> performanceMeasurements,
ReleasePropertyProjectLocator.cs (2)
86var newConfigurationArgs = new Dictionary<string, string>(2, StringComparer.OrdinalIgnoreCase); 300var newDictionary = new Dictionary<string, string>(globalProperties, StringComparer.OrdinalIgnoreCase);
ShellShim\ShellShimRepository.cs (1)
118var files = new Dictionary<string, string>();
Telemetry\AllowListToSendFirstAppliedOptions.cs (1)
17public List<ApplicationInsightsEntryFormat> AllowList(ParseResult parseResult, Dictionary<string, double> measurements = null)
Telemetry\AllowListToSendFirstArgument.cs (1)
17public List<ApplicationInsightsEntryFormat> AllowList(ParseResult parseResult, Dictionary<string, double> measurements = null)
Telemetry\AllowListToSendVerbSecondVerbFirstArgument.cs (1)
18public List<ApplicationInsightsEntryFormat> AllowList(ParseResult parseResult, Dictionary<string, double> measurements = null)
Telemetry\IParseResultLogRule.cs (1)
13List<ApplicationInsightsEntryFormat> AllowList(ParseResult parseResult, Dictionary<string, double> measurements = null);
Telemetry\TelemetryFilter.cs (8)
28Dictionary<string, double> measurements = null; 30if (objectToFilter is Tuple<ParseResult, Dictionary<string, double>> parseResultWithMeasurements) 36else if (objectToFilter is Tuple<ParseResult, Dictionary<string, double>, string> parseResultWithMeasurementsAndGlobalJsonState) 49Dictionary<string, string> properties = new() 146Dictionary<string, double> measurements = null) 167Dictionary<string, double> measurements = null) 235private static Dictionary<string, double> RemoveZeroTimes(Dictionary<string, double> measurements)
Telemetry\TopLevelCommandNameAndOptionToLog.cs (1)
21public List<ApplicationInsightsEntryFormat> AllowList(ParseResult parseResult, Dictionary<string, double> measurements = null)
dotnet.Tests (38)
CommandTests\Build\GivenDotnetBuildBuildsCsproj.cs (1)
287var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: targetFramework);
CommandTests\New\DotnetAddPostActionTests.cs (5)
162var args = new Dictionary<string, string>() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "project" }, { "reference", "./OldName.csproj" } }; 190var args = new Dictionary<string, string>() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "project" }, { "reference", "./Reference.csproj" } }; 225var args = new Dictionary<string, string>() 259var args = new Dictionary<string, string>() { { "targetFiles", "[\"MyApp.csproj\"]" }, { "referenceType", "package" }, { "reference", "System.Net.Json" } }; 285var args = new Dictionary<string, string>() { { "targetFiles", "MyApp.csproj" }, { "referenceType", "package" }, { "reference", "System.Net.Json" } };
CommandTests\New\DotnetRestorePostActionTests.cs (2)
29var args = new Dictionary<string, string>() { { "files", "[\"MyApp.csproj\"]" } }; 54var args = new Dictionary<string, string>() { { "files", "MyApp.csproj" } };
CommandTests\New\DotnetSlnPostActionTests.cs (5)
205var args = new Dictionary<string, string>() { { "projectFiles", "[\"MyApp.csproj\"]" } }; 234var args = new Dictionary<string, string>() { { "projectFiles", "MyApp.csproj" } }; 263var args = new Dictionary<string, string>() { 295var args = new Dictionary<string, string>() { 327var args = new Dictionary<string, string>() {
CommandTests\Publish\GivenDotnetPublishPublishesProjects.cs (1)
188var properties = testProject.GetPropertyValues(testAsset.TestRoot, configuration: "Release", targetFramework: targetFramework);
CommandTests\Run\RunFileTests.cs (4)
3624var fileBasedFiles = ReadFiles(); 3632var projectBasedFiles = ReadFiles(); 3639Dictionary<string, string> ReadFiles() 3641var result = new DirectoryInfo(testInstance.Path)
CommandTests\Test\GivenDotnetTestBuildsAndRunsArtifactPostProcessing.cs (2)
203var dataCollectionAttributes = new Dictionary<string, string> 213private static void CreateDataCollectionRunSettingsFile(string destinationRunsettingsPath, Dictionary<string, string> dataCollectionAttributes)
CommandTests\Workload\Install\MockManifestProvider.cs (1)
32public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
CommandTests\Workload\Install\MockPackWorkloadInstaller.cs (4)
33private Dictionary<string, string> workloadSetContents; 41IList<PackInfo> installedPacks = null, bool failingGarbageCollection = false, List<WorkloadHistoryRecord> records = null, Dictionary<string, string> workloadSetContents = null) 229public void SaveInstallStateManifestVersions(SdkFeatureBand sdkFeatureBand, Dictionary<string, string> manifestContents) 243public Dictionary<string, string> GetGlobalJsonWorkloadSetVersions(SdkFeatureBand sdkFeatureBand)
CommandTests\Workload\List\GivenDotnetWorkloadList.cs (1)
49var availableWorkloads = VisualStudioWorkloads.GetAvailableVisualStudioWorkloads(workloadResolver);
CommandTests\Workload\List\GivenWorkloadInstallerAndWorkloadsInstalled.cs (1)
30private List<(TestManifestUpdate update, WorkloadCollection workloads)> _mockManifestUpdates;
CommandTests\Workload\Search\GivenDotnetWorkloadSearch.cs (1)
88Dictionary<string, string> workloadSets = new()
CommandTests\Workload\Update\GivenDotnetWorkloadUpdate.cs (1)
364Dictionary<string, string> workloadSets = new()
ConfigurerTests\GivenADotnetFirstTimeUseConfigurer.cs (2)
269Dictionary<string, double> measurements = new(); 309Dictionary<string, double> measurements = new();
dotnet.Tests.GlobalUsings.g.cs (1)
22global using WorkloadCollection = System.Collections.Generic.Dictionary<Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadId, Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadDefinition>;
GivenThatTheUserIsRunningDotNetForTheFirstTime.cs (1)
53public Dictionary<string, string> ExtraEnvironmentVariables = new();
ParserTests\CommonOptionsTests.cs (1)
34var expected = new Dictionary<string, string>();
TelemetryCommonPropertiesTests.cs (2)
175public void CanDetectCIStatusForEnvVars(Dictionary<string, string> envVars, bool expected) 196public void CanDetectLLMStatusForEnvVars(Dictionary<string, string> envVars, string expected)
TestAssetExtensions.cs (1)
14var assemblyMetadata = typeof(TestAssetExtensions).Assembly
VersionTest.cs (1)
20var assemblyMetadata = typeof(GivenDotnetSdk).Assembly
dotnet-format (7)
Analyzers\AnalyzerReferenceInformationProvider.cs (2)
13private static readonly Dictionary<string, Assembly> s_pathsToAssemblies = new(StringComparer.OrdinalIgnoreCase); 14private static readonly Dictionary<string, Assembly> s_namesToAssemblies = new(StringComparer.OrdinalIgnoreCase);
Analyzers\CodeAnalysisResult.cs (1)
9private readonly Dictionary<Project, List<Diagnostic>> _dictionary = new();
Analyzers\CodeStyleInformationProvider.cs (1)
35var analyzersByLanguage = new Dictionary<string, AnalyzersAndFixers>();
Utilities\ProcessRunner.cs (2)
57Dictionary<string, string>? environmentVariables = null, 172Dictionary<string, string>? environmentVariables = null)
Workspaces\MSBuildWorkspaceLoader.cs (1)
22var properties = new Dictionary<string, string>(StringComparer.Ordinal)
dotnet-format.UnitTests (36)
Analyzers\CodeStyleAnalyzerFormatterTests.cs (1)
47var editorConfig = new Dictionary<string, string>()
Analyzers\FilterDiagnosticsTests.cs (1)
192var analyzersByLanguage = new Dictionary<string, AnalyzersAndFixers>();
Analyzers\ThirdPartyAnalyzerFormatterTests.cs (3)
99var editorConfig = new Dictionary<string, string>() 152var editorConfig = new Dictionary<string, string>() 199var editorConfig = new Dictionary<string, string>()
Formatters\AbstractFormatterTests.cs (1)
267public Dictionary<string, string> XmlReferences { get; } = new Dictionary<string, string>();
Formatters\CharsetFormatterTests.cs (2)
45var editorConfig = new Dictionary<string, string>() 64var editorConfig = new Dictionary<string, string>()
Formatters\EndOfLineFormatterTests.cs (3)
32var editorConfig = new Dictionary<string, string>() 56var editorConfig = new Dictionary<string, string>() 72var editorConfig = new Dictionary<string, string>();
Formatters\FinalNewlineFormatterTests.cs (11)
24var editorConfig = new Dictionary<string, string>() 41var editorConfig = new Dictionary<string, string>() 56var editorConfig = new Dictionary<string, string>() 72var editorConfig = new Dictionary<string, string>() 88var editorConfig = new Dictionary<string, string>() 105var editorConfig = new Dictionary<string, string>() 121var editorConfig = new Dictionary<string, string>() 137var editorConfig = new Dictionary<string, string>() 153var editorConfig = new Dictionary<string, string>() 170var editorConfig = new Dictionary<string, string>() 184var editorConfig = new Dictionary<string, string>()
Formatters\FormattedFilesTests.cs (1)
18private Dictionary<string, string> EditorConfig => new Dictionary<string, string>()
Formatters\OrganizeImportsFormatterTests.cs (5)
37var editorConfig = new Dictionary<string, string>() 68var editorConfig = new Dictionary<string, string>() 100var editorConfig = new Dictionary<string, string>() 132var editorConfig = new Dictionary<string, string>() 154var editorConfig = new Dictionary<string, string>()
Formatters\UnnecessaryImportsFormatterTests.cs (6)
36var editorConfig = new Dictionary<string, string>(); 51var editorConfig = new Dictionary<string, string>(); 72var editorConfig = new Dictionary<string, string>() 101var editorConfig = new Dictionary<string, string>() 130var editorConfig = new Dictionary<string, string>() 154var editorConfig = new Dictionary<string, string>()
Utilities\XmlReferenceResolver.cs (1)
11public Dictionary<string, string> XmlReferences { get; } =
XUnit\MSBuildTestCase.cs (1)
21public Dictionary<string, List<string>> Traits => _testCase.Traits;
dotnet-MsiInstallation.Tests (11)
Framework\VMControl.cs (1)
137var existingSnapshots = GetSnapshots().ToDictionary(s => s.id, s => s.name);
Framework\VMStateTree.cs (3)
13public Dictionary<SerializedVMAction, (VMActionResult actionResult, VMStateTree resultingState)> Actions { get; set; } = new(); 15public Dictionary<SerializedVMAction, VMActionResult> ReadOnlyActions { get; set; } = new(); 87public Dictionary<string, VMStateTree> VMStates { get; set; } = new Dictionary<string, VMStateTree>();
MsiInstallerTests.cs (3)
311var installedManifestVersions = GetInstalledManifestVersions(); 322Dictionary<string, List<(string version, string sdkFeatureBand)>> GetInstalledManifestVersions() 324Dictionary<string, List<(string version, string sdkFeatureBand)>> installedManifestVersions = new();
WorkloadSetTests.cs (1)
362var searchResultWorkloadSet = WorkloadSet.FromDictionaryForJson(JsonSerializer.Deserialize<Dictionary<string, string>>(searchResultJson["manifestVersions"]), new SdkFeatureBand(SdkInstallerVersion));
WorkloadSetTestsBase.cs (3)
17protected Lazy<Dictionary<string, string>> _testWorkloadSetVersions; 26_testWorkloadSetVersions = new Lazy<Dictionary<string, string>>(() => 35return JsonSerializer.Deserialize<Dictionary<string, string>>(versionsFile.ReadAllText());
dotnet-new.IntegrationTests (6)
CommonTemplatesTests.cs (3)
59Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() }; 203Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() }; 397Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() };
DotnetClassTemplateTests.cs (2)
50Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() }; 130Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() };
TemplateEngineSamplesTest.cs (1)
48Dictionary<string, string> environmentUnderTest = new() { ["DOTNET_NOLOGO"] = false.ToString() };
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);
dotnet-watch (24)
Aspire\AspireServiceFactory.cs (1)
44private readonly Dictionary<string, Session> _sessions = [];
Browser\BrowserRefreshServerFactory.cs (1)
25private readonly Dictionary<ProjectInstanceId, BrowserRefreshServer?> _servers = [];
Build\BuildReporter.cs (1)
22public void ReportWatchedFiles(Dictionary<string, FileItem> fileItems)
Build\EvaluationResult.cs (1)
87var fileItems = new Dictionary<string, FileItem>();
Build\FilePathExclusions.cs (1)
19var globs = new Dictionary<(string fixedDirectoryPart, string wildcardDirectoryPart, string filenamePart), (MSBuildGlob glob, string value, string projectDir)>();
CommandLine\CommandLineOptions.cs (1)
324var knownCommandsByName = Parser.Subcommands.ToDictionary(keySelector: c => c.Name, elementSelector: c => c);
FileWatcher\FileWatcher.cs (3)
14protected readonly Dictionary<string, DirectoryWatcher> _directoryTreeWatchers = new(PathUtilities.OSSpecificPathComparer); 18protected readonly Dictionary<string, DirectoryWatcher> _directoryWatchers = new(PathUtilities.OSSpecificPathComparer); 126void RemoveRedundantWatchers(Dictionary<string, DirectoryWatcher> watchers)
FileWatcher\PollingDirectoryWatcher.cs (4)
16private Dictionary<string, DateTime> _currentSnapshot = new(PathUtilities.OSSpecificPathComparer); 19private Dictionary<string, DateTime> _snapshotBuilder = new(PathUtilities.OSSpecificPathComparer); 20private readonly Dictionary<string, ChangeKind> _changesBuilder = new(PathUtilities.OSSpecificPathComparer); 179private void NotifyChanges(Dictionary<string, ChangeKind> changes)
HotReload\CompilationHandler.cs (1)
481var updates = new Dictionary<RunningProject, List<(string filePath, string relativeUrl, string assemblyName, bool isApplicationProject)>>();
HotReload\IncrementalMSBuildWorkspace.cs (2)
54var oldProjectIdsByPath = oldSolution.Projects.ToDictionary(keySelector: static p => (p.FilePath!, p.Name), elementSelector: static p => p.Id); 58var projectIdMap = projectInfos.ToDictionary(
HotReload\StaticFileHandler.cs (1)
15var refreshRequests = new Dictionary<BrowserRefreshServer, List<string>>();
Process\ProcessSpec.cs (1)
11public Dictionary<string, string> EnvironmentVariables { get; } = new();
Process\ProjectLauncher.cs (1)
79var environmentBuilder = new Dictionary<string, string>();
SocketConnectionManager.cs (1)
22private readonly Dictionary<string, WebSocketConnection> _webSocketConnections = new(StringComparer.Ordinal);
Watch\DotNetWatcher.cs (1)
24var environmentBuilder = new Dictionary<string, string>();
Watch\MsBuildFileSetFactory.cs (1)
86var fileItems = new Dictionary<string, FileItem>();
Watch\MSBuildFileSetResult.cs (2)
12public required Dictionary<string, ProjectItems> Projects { get; init; } 19public Dictionary<string, string> StaticFileSetBuilder { get; init; } = [];
dotnet-watch.Tests (6)
MockBuildEngine.cs (1)
78public Dictionary<object, object> RegisteredTaskObjects { get; } = new Dictionary<object, object>();
MockTaskItem.cs (2)
17private Dictionary<string, string> _metadata = new(StringComparer.OrdinalIgnoreCase); 23public MockTaskItem(string itemSpec, Dictionary<string, string> metadata)
TestUtilities\TestBuildEvaluator.cs (1)
9public Dictionary<string, DateTime> Timestamps { get; } = [];
TestUtilities\TestReporter.cs (1)
10private readonly Dictionary<EventId, Action> _actions = [];
TestUtilities\WatchableApp.cs (1)
30public Dictionary<string, string> EnvironmentVariables { get; } = [];
DotNetWatchTasks (3)
FileSetSerializer.cs (1)
22var projectItems = new Dictionary<string, ProjectItems>();
MSBuildFileSetResult.cs (2)
12public required Dictionary<string, ProjectItems> Projects { get; init; } 19public Dictionary<string, string> StaticFileSetBuilder { get; init; } = [];
EndToEnd.Tests (2)
ProjectBuildTests.cs (1)
261var languageExtensionMap = new Dictionary<string, string>()
Utilities\TestProjectCreator.cs (1)
21public Dictionary<string, string> AdditionalProperties { get; } = new Dictionary<string, string>();
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 (5)
ArrayBuilder.cs (4)
386internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 391var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 404var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 418var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
ReleaseTrackingHelper.cs (1)
44var releaseTrackingDataByRulesBuilder = new Dictionary<string, ReleaseTrackingDataForRuleBuilder>();
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
32var 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; }
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)
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)
547private static Dictionary<string, (string, Action<XElement>)> InvalidConfigTransformations = InitInvalidConfigTransformations(); 571public static Dictionary<string, (string, Action<XElement>)> InitInvalidConfigTransformations() 573var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 592private static Dictionary<string, Func<IISDeploymentParameters, string>> PortableConfigTransformations = InitPortableWebConfigTransformations(); 606public static Dictionary<string, Func<IISDeploymentParameters, string>> InitPortableWebConfigTransformations() 608var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 661private static Dictionary<string, Func<IISDeploymentParameters, string>> StandaloneConfigTransformations = InitStandaloneConfigTransformations(); 677public static Dictionary<string, Func<IISDeploymentParameters, string>> InitStandaloneConfigTransformations() 679var 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)
547private static Dictionary<string, (string, Action<XElement>)> InvalidConfigTransformations = InitInvalidConfigTransformations(); 571public static Dictionary<string, (string, Action<XElement>)> InitInvalidConfigTransformations() 573var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 592private static Dictionary<string, Func<IISDeploymentParameters, string>> PortableConfigTransformations = InitPortableWebConfigTransformations(); 606public static Dictionary<string, Func<IISDeploymentParameters, string>> InitPortableWebConfigTransformations() 608var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 661private static Dictionary<string, Func<IISDeploymentParameters, string>> StandaloneConfigTransformations = InitStandaloneConfigTransformations(); 677public static Dictionary<string, Func<IISDeploymentParameters, string>> InitStandaloneConfigTransformations() 679var 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)
547private static Dictionary<string, (string, Action<XElement>)> InvalidConfigTransformations = InitInvalidConfigTransformations(); 571public static Dictionary<string, (string, Action<XElement>)> InitInvalidConfigTransformations() 573var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 592private static Dictionary<string, Func<IISDeploymentParameters, string>> PortableConfigTransformations = InitPortableWebConfigTransformations(); 606public static Dictionary<string, Func<IISDeploymentParameters, string>> InitPortableWebConfigTransformations() 608var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 661private static Dictionary<string, Func<IISDeploymentParameters, string>> StandaloneConfigTransformations = InitStandaloneConfigTransformations(); 677public static Dictionary<string, Func<IISDeploymentParameters, string>> InitStandaloneConfigTransformations() 679var 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)
547private static Dictionary<string, (string, Action<XElement>)> InvalidConfigTransformations = InitInvalidConfigTransformations(); 571public static Dictionary<string, (string, Action<XElement>)> InitInvalidConfigTransformations() 573var dictionary = new Dictionary<string, (string, Action<XElement>)>(); 592private static Dictionary<string, Func<IISDeploymentParameters, string>> PortableConfigTransformations = InitPortableWebConfigTransformations(); 606public static Dictionary<string, Func<IISDeploymentParameters, string>> InitPortableWebConfigTransformations() 608var dictionary = new Dictionary<string, Func<IISDeploymentParameters, string>>(); 661private static Dictionary<string, Func<IISDeploymentParameters, string>> StandaloneConfigTransformations = InitStandaloneConfigTransformations(); 677public static Dictionary<string, Func<IISDeploymentParameters, string>> InitStandaloneConfigTransformations() 679var 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 (112)
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)
225(Location[]? sourceLocation, Dictionary<string, string?>? DAMArgs) = (!attributableSymbolLocation.IsInSource 249(Location[]? sourceLocation, Dictionary<string, string?>? DAMArgs) = (!attributableSymbolLocation.IsInSource 275(Location[]? sourceLocation, Dictionary<string, string?>? DAMArgs) = (!attributableSymbolLocation.IsInSource 370private static (Location[]?, Dictionary<string, string?>?) CreateArguments(Location attributableSymbolLocation, DynamicallyAccessedMemberTypes mismatchedArgument) 372Dictionary<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)
1043var requestHeaders = new List<Dictionary<string, StringValues>>(); 1072var request1Headers = requestHeaders.Single(i => i["id"] == "1"); 1085var request2Headers = requestHeaders.Single(i => i["id"] == "2"); 1101var 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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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)
211public readonly Dictionary<string, AuthenticationTicket> Store = new Dictionary<string, AuthenticationTicket>();
FacebookTests.cs (2)
402var entries = form.ReadForm(); 445var queryParams = QueryHelpers.ParseQuery(locationUri.Query);
GoogleTests.cs (6)
67var queryParams = QueryHelpers.ParseQuery(location.Query); 197var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query); 249var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query); 305var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query); 1041var entries = form.ReadForm(); 1078var queryParams = QueryHelpers.ParseQuery(locationUri.Query);
MicrosoftAccountTests.cs (3)
277var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query); 308var entries = form.ReadForm(); 345var queryParams = QueryHelpers.ParseQuery(locationUri.Query);
OpenIdConnect\OpenIdConnectTests.cs (2)
249var query = transaction.Response.Headers.Location.Query.Substring(1).Split('&') 280var query = transaction.Response.Headers.Location.Query.Substring(1).Split('&')
OpenIdConnect\TestSettings.cs (1)
139var queryDict = string.IsNullOrEmpty(redirectUri.Query) ?
TwitterTests.cs (2)
407var content = new Dictionary<string, string>() 476var content = new Dictionary<string, string>()
WsFederation\WsFederationTest.cs (5)
84var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 100var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 116var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 131var queryItems = QueryHelpers.ParseQuery(response.Headers.Location.Query); 182var 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)
21private readonly Dictionary<string, byte[]> _currentState = new(StringComparer.Ordinal);
PersistentState\PersistentServicesRegistry.cs (1)
162private readonly Dictionary<string, (PropertySetter, PropertyGetter, RestoreOptions)> _underlyingAccessors;
PersistentState\PersistentStateValueProvider.cs (2)
12private readonly Dictionary<ComponentSubscriptionKey, PersistentValueProviderComponentSubscription> _subscriptions = []; 16internal Dictionary<ComponentSubscriptionKey, PersistentValueProviderComponentSubscription> Subscriptions => _subscriptions;
Reflection\ComponentProperties.cs (4)
101Dictionary<string, object>? unmatched = null; 238private static void ThrowForCaptureUnmatchedValuesConflict(Type targetType, string parameterName, Dictionary<string, object> unmatched) 279private readonly Dictionary<string, PropertySetter> _underlyingWriters; 351if (!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(); 1091public readonly Dictionary<string, int> AttributeDiffSet; 1092public 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 (48)
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>
PrerenderComponentApplicationStoreSerializerContext.DictionaryStringByteArray.g.cs (10)
10private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>>? _DictionaryStringByteArray; 16public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>> DictionaryStringByteArray 19get => _DictionaryStringByteArray ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, byte[]>)); 22private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>> Create_DictionaryStringByteArray(global::System.Text.Json.JsonSerializerOptions options) 24if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, byte[]>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>> jsonTypeInfo)) 26var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, byte[]>> 32jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, byte[]>, string, byte[]>(options, info); 42private void DictionaryStringByteArraySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, byte[]>? value)
PrerenderComponentApplicationStoreSerializerContext.GetJsonTypeInfo.g.cs (1)
23if (type == typeof(global::System.Collections.Generic.Dictionary<string, byte[]>))
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); 203private 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 (3)
33var state = JsonSerializer.Deserialize( 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.QuickGrid.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.Server (43)
CircuitPersistenceManagerSerializerContext.DictionaryInt32ComponentMarker.g.cs (9)
12private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>>? _DictionaryInt32ComponentMarker; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>> DictionaryInt32ComponentMarker 21get => _DictionaryInt32ComponentMarker ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>)); 24private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>> Create_DictionaryInt32ComponentMarker(global::System.Text.Json.JsonSerializerOptions options) 26if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>> jsonTypeInfo)) 28var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>> 34jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>, int, global::Microsoft.AspNetCore.Components.ComponentMarker>(options, info);
CircuitPersistenceManagerSerializerContext.GetJsonTypeInfo.g.cs (1)
33if (type == typeof(global::System.Collections.Generic.Dictionary<int, global::Microsoft.AspNetCore.Components.ComponentMarker>))
Circuits\CircuitPersistenceManager.cs (6)
94internal ProtectedPrerenderComponentApplicationStore ToComponentApplicationStore(Dictionary<string, byte[]> applicationState) 125var persistedMarkers = TryDeserializeMarkers(rootComponents); 163static Dictionary<int, ComponentMarker> TryDeserializeMarkers(byte[] rootComponents) 172return JsonSerializer.Deserialize<Dictionary<int, ComponentMarker>>( 193var persistedComponents = new Dictionary<int, ComponentMarker>(); 231[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();
PrerenderComponentApplicationStoreSerializerContext.DictionaryStringByteArray.g.cs (10)
10private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>>? _DictionaryStringByteArray; 16public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>> DictionaryStringByteArray 19get => _DictionaryStringByteArray ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, byte[]>)); 22private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>> Create_DictionaryStringByteArray(global::System.Text.Json.JsonSerializerOptions options) 24if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, byte[]>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>> jsonTypeInfo)) 26var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, byte[]>> 32jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, byte[]>, string, byte[]>(options, info); 42private void DictionaryStringByteArraySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, byte[]>? value)
PrerenderComponentApplicationStoreSerializerContext.GetJsonTypeInfo.g.cs (1)
23if (type == typeof(global::System.Collections.Generic.Dictionary<string, byte[]>))
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 (3)
33var state = JsonSerializer.Deserialize( 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 (21)
Circuits\CircuitHostTest.cs (10)
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() 785private async Task AddComponentAsync<TComponent>(CircuitHost circuitHost, int ssrComponentId, Dictionary<string, object> parameters = null, string componentKey = "") 802private async Task UpdateComponentAsync<TComponent>(CircuitHost circuitHost, int ssrComponentId, Dictionary<string, object> parameters = null, string componentKey = "") 869private ComponentMarker CreateMarker(Type type, string locationHash, Dictionary<string, object> parameters = null, string componentKey = "") 1147private class TestComponentApplicationStore(Dictionary<string, byte[]> dictionary) : IPersistentComponentStateStore, IClearableStore
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, 526(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)
557var parameters = new Dictionary<string, object> { ["Name"] = "value" }; 596var 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 (79)
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>
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\ComponentStatePersistenceManagerTest.cs (14)
44var state = new Dictionary<string, byte[]> 66var state = new Dictionary<string, byte[]> 88var state = new Dictionary<string, byte[]>(); 140var state = new Dictionary<string, byte[]>(); 167var state = new Dictionary<string, byte[]>(); 189var state = new Dictionary<string, byte[]>(); 219var state = new Dictionary<string, byte[]>(); 255var state = new Dictionary<string, byte[]>(); 283var state = new Dictionary<string, byte[]>(); 311var state = new Dictionary<string, byte[]>(); 360var state = new Dictionary<string, byte[]>(); 523private class TestStore(Dictionary<string, byte[]> initialState) : IPersistentComponentStateStore 540private class CompositeTestStore(Dictionary<string, byte[]> initialState) 543public Dictionary<string, byte[]> State { get; set; } = initialState;
PersistentState\PersistentComponentStateTest.cs (15)
19var existingState = new Dictionary<string, byte[]> 37var existingState = new Dictionary<string, byte[]> 52var currentState = new Dictionary<string, byte[]>(); 67var existingState = new Dictionary<string, byte[]> 85var currentState = new Dictionary<string, byte[]>(); 104var currentState = new Dictionary<string, byte[]>(); 121var currentState = new Dictionary<string, byte[]>(); 140var currentState = new Dictionary<string, byte[]>(); 160var existingState = new Dictionary<string, byte[]>() { ["MyState"] = serialized }; 178var existingState = new Dictionary<string, byte[]>() { ["MyState"] = serialized }; 195var currentState = new Dictionary<string, byte[]>(); 214var currentState = new Dictionary<string, byte[]>(); 233var currentState = new Dictionary<string, byte[]>(); 252var currentState = new Dictionary<string, byte[]>(); 271var currentState = new Dictionary<string, byte[]>();
PersistentStateValueProviderKeyResolverTests.cs (7)
52var state = new Dictionary<string, byte[]>(); 107var state = new Dictionary<string, byte[]>(); 160var state = new Dictionary<string, byte[]>(); 210var state = new Dictionary<string, byte[]>(); 248var state = new Dictionary<string, byte[]>(); 287var state = new Dictionary<string, byte[]>(); 406private class TestStore(Dictionary<string, byte[]> initialState) : IPersistentComponentStateStore
PersistentStateValueProviderTests.cs (1)
104var dictionary = new Dictionary<string, byte[]>();
PersistentValueProviderComponentSubscriptionTests.cs (9)
69var initialState = new Dictionary<string, byte[]>(); 129var initialState = new Dictionary<string, byte[]>(); 159var initialState = new Dictionary<string, byte[]>(); 209var initialState = new Dictionary<string, byte[]>(); 243var appState = new Dictionary<string, byte[]>(); 276var newState = new Dictionary<string, byte[]> 296var initialState = new Dictionary<string, byte[]>(); 336var initialState = new Dictionary<string, byte[]>(); 396var initialState = new Dictionary<string, byte[]>();
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 (10)
189var parameters = new Dictionary<string, object> 209var parameters = new Dictionary<string, object> 235var parameters = new Dictionary<string, object> 256var parameters = new Dictionary<string, object> 289var parameters = new Dictionary<string, object> 323var parameters = new Dictionary<string, object> 370var parameters = new Dictionary<string, object> 422var parameters = new Dictionary<string, object> 459var parameters = new Dictionary<string, object> 474var 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 (46)
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;
Media\FileDownload.cs (1)
79var copy = new Dictionary<string, object>(AdditionalAttributes.Count);
Media\MediaComponentBase.cs (1)
95[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }
WebRenderer.cs (2)
188[JsonSerializable(typeof(Dictionary<string, JSComponentConfigurationStore.JSComponentParameter[]>))] 189[JsonSerializable(typeof(Dictionary<string, List<string>>))]
WebRendererSerializerContext.DictionaryStringJSComponentParameterArray.g.cs (10)
10private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>>? _DictionaryStringJSComponentParameterArray; 16public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>> DictionaryStringJSComponentParameterArray 19get => _DictionaryStringJSComponentParameterArray ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>)); 22private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>> Create_DictionaryStringJSComponentParameterArray(global::System.Text.Json.JsonSerializerOptions options) 24if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>> jsonTypeInfo)) 26var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>> 32jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>, string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>(options, info); 42private void DictionaryStringJSComponentParameterArraySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>? value)
WebRendererSerializerContext.DictionaryStringListString.g.cs (10)
10private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>>? _DictionaryStringListString; 16public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>> DictionaryStringListString 19get => _DictionaryStringListString ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>)); 22private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>> Create_DictionaryStringListString(global::System.Text.Json.JsonSerializerOptions options) 24if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>> jsonTypeInfo)) 26var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>> 32jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>, string, global::System.Collections.Generic.List<string>>(options, info); 42private void DictionaryStringListStringSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>? value)
WebRendererSerializerContext.GetJsonTypeInfo.g.cs (2)
27if (type == typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.Components.Web.JSComponentConfigurationStore.JSComponentParameter[]>)) 31if (type == typeof(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.List<string>>))
Microsoft.AspNetCore.Components.Web.Tests (8)
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; }
Media\FileDownloadTest.cs (1)
127var attrs = new Dictionary<string, object?> { ["href"] = "https://example.org/real", ["class"] = "btn" };
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 (16)
PrerenderComponentApplicationStoreSerializerContext.DictionaryStringByteArray.g.cs (10)
10private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>>? _DictionaryStringByteArray; 16public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>> DictionaryStringByteArray 19get => _DictionaryStringByteArray ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, byte[]>)); 22private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>> Create_DictionaryStringByteArray(global::System.Text.Json.JsonSerializerOptions options) 24if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, byte[]>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, byte[]>> jsonTypeInfo)) 26var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, byte[]>> 32jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, byte[]>, string, byte[]>(options, info); 42private void DictionaryStringByteArraySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, byte[]>? value)
PrerenderComponentApplicationStoreSerializerContext.GetJsonTypeInfo.g.cs (1)
23if (type == typeof(global::System.Collections.Generic.Dictionary<string, byte[]>))
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 (3)
33var state = JsonSerializer.Deserialize( 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 (23)
SourceGenerationContext.DictionaryStringStaticWebAssetNode.g.cs (10)
12private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>? _DictionaryStringStaticWebAssetNode; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> DictionaryStringStaticWebAssetNode 21get => _DictionaryStringStaticWebAssetNode ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>)); 24private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> Create_DictionaryStringStaticWebAssetNode(global::System.Text.Json.JsonSerializerOptions options) 26if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> jsonTypeInfo)) 28var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> 34jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>, string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>(options, info); 44private void DictionaryStringStaticWebAssetNodeSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>? value)
SourceGenerationContext.GetJsonTypeInfo.g.cs (1)
41if (type == typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>))
SourceGenerationContext.StaticWebAssetNode.g.cs (5)
70var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> 76Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>)ExpandConverter(typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>), new global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.OSBasedCaseConverter(), options), 85AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode).GetProperty("Children", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>), global::System.Array.Empty<global::System.Type>(), null), 88properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>(options, info1);
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.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\EnumNameHelpers.cs (4)
76var writeMapping = nameMappings.ToDictionary(m => m.Value, m => m); 80var removeEnumPrefixMapping = nameMappings.ToDictionary(m => m.OriginalName, m => m.OriginalName); 154public required Dictionary<object, NameMapping> WriteMapping { get; init; } 155public required Dictionary<string, string> RemoveEnumPrefixMapping { get; init; }
Internal\Json\JsonConverterHelper.cs (2)
23internal static readonly Dictionary<string, Type> WellKnownTypeNames = new Dictionary<string, Type> 139var repeatedFieldType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType);
Internal\Json\MessageTypeInfoResolver.cs (3)
40var mappings = CreateJsonFieldMap(fields); 190private static Dictionary<string, FieldDescriptor> CreateJsonFieldMap(IList<FieldDescriptor> fields) 192var 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\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 (9)
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\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 (22)
SourceGenerationContext.DictionaryStringStaticWebAssetNode.g.cs (10)
12private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>? _DictionaryStringStaticWebAssetNode; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> DictionaryStringStaticWebAssetNode 21get => _DictionaryStringStaticWebAssetNode ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>)); 24private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> Create_DictionaryStringStaticWebAssetNode(global::System.Text.Json.JsonSerializerOptions options) 26if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> jsonTypeInfo)) 28var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> 34jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>, string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>(options, info); 44private void DictionaryStringStaticWebAssetNodeSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>? value)
SourceGenerationContext.GetJsonTypeInfo.g.cs (1)
41if (type == typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>))
SourceGenerationContext.StaticWebAssetNode.g.cs (5)
70var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>> 76Converter = (global::System.Text.Json.Serialization.JsonConverter<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>)ExpandConverter(typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>), new global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.OSBasedCaseConverter(), options), 85AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode).GetProperty("Children", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>), global::System.Array.Empty<global::System.Type>(), null), 88properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::Microsoft.AspNetCore.StaticWebAssets.ManifestStaticWebAssetFileProvider.StaticWebAssetNode>>(options, info1);
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 (24)
HostingApplicationDiagnosticsTests.cs (1)
1189var tags = new Dictionary<string, object>();
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
20private readonly Dictionary<string, Channel<double>> _counters = new Dictionary<string, Channel<double>>();
WebHostBuilderTests.cs (10)
296var data = new Dictionary<string, string> 511var settings = new Dictionary<string, string> 537var settings = new Dictionary<string, string> 563var settings = new Dictionary<string, string> 572var overrideSettings = new Dictionary<string, string> 598var vals = new Dictionary<string, string> 627var vals = new Dictionary<string, string> 648var vals = new Dictionary<string, string> 1481var vals = new Dictionary<string, string> 1507var 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)
54var data = new Dictionary<string, string> 73var data = new Dictionary<string, string> 92var data = new Dictionary<string, string> 124var data = new Dictionary<string, string> 198var data = new Dictionary<string, string> 237var data = new Dictionary<string, string> 273var data = new Dictionary<string, string> 815var vals = new Dictionary<string, string> 838var 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)
2269var 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.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; } 268private readonly Dictionary<Type, ValidatableTypeInfo> _typeInfoCache = []; 300CreatePropertyInfo(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)
91var _assemblyMap = 104var relatedParts = relatedAssemblies.ToDictionary(
MapIdentityApiTests.cs (1)
1347private static Dictionary<string, Action<IServiceCollection>> AddIdentityActions { get; } = new()
Microsoft.AspNetCore.Identity.InMemory.Test (3)
InMemoryStore.cs (1)
71private 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)
1739private 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)
342var responseProviderMetadataTypes = ApiResponseTypeProvider.ReadResponseMetadata( 344var 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; 414var 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 } }; 1455var actionParameters = new Dictionary<string, object> { { "input", inputParam }, }; 1480var actionParameters = new Dictionary<string, object> { { "input", inputParam }, }; 1504var actionParameters = new Dictionary<string, object>(); 1528var 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; 221Dictionary<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)
487var 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 (15)
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>(); 285var props = ReadDictionary<OpenApiJsonSchema>(ref reader); 320var mappings = ReadDictionary<string>(ref reader);
Services\OpenApiDocumentService.cs (3)
253var operations = await GetOperationsAsync(descriptions, document, scopedServiceProvider, operationTransformers, schemaTransformers, cancellationToken); 263private async Task<Dictionary<HttpMethod, OpenApiOperation>> GetOperationsAsync( 271var 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.Tests (11)
Extensions\JsonTypeInfoExtensionsTests.cs (3)
77[typeof(Dictionary<string, string[]>), null], 78[typeof(Dictionary<string, List<string[]>>), null], 79[typeof(Dictionary<string, IEnumerable<string[]>>), null],
Extensions\OpenApiRouteHandlerBuilderExtensionTests.cs (1)
226var summaries = builder.DataSources
Services\OpenApiSchemaService\OpenApiSchemaService.PropertySchemas.cs (1)
665public Dictionary<string, Todo>? NullableDictionary { get; set; }
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (1)
865builder.MapPost("/api/nullable-dictionary", (Dictionary<string, Todo>? todoDict) => { });
Transformers\CustomSchemaTransformerTests.cs (1)
532public Dictionary<string, object> Metadata { get; set; } = [];
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (4)
131builder.MapPost("/api-2", (Dictionary<string, Todo> todo) => { }); 631builder.MapPost("/dictionary", (Dictionary<string, LocationContainer> items) => { }); 763builder.MapPost("/dictionary", (Dictionary<string, ParentObject> item) => { }); 1136public Dictionary<string, object?>? Words { get; set; }
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 (24)
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,
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.Server.Kestrel.Tests (3)
KestrelConfigurationLoaderTests.cs (3)
687private static readonly Dictionary<string, MLDsaAlgorithm> _mlDsaAlgorithms = ((IEnumerable<MLDsaAlgorithm>)[ 693private static readonly Dictionary<string, SlhDsaAlgorithm> _slhDsaAlgorithms = ((IEnumerable<SlhDsaAlgorithm>)[ 708private static readonly Dictionary<string, CompositeMLDsaAlgorithm> _compositeMLDsaAlgorithms = ((IEnumerable<CompositeMLDsaAlgorithm>)[
Microsoft.AspNetCore.Session (1)
DefaultDistributedSessionStore.cs (1)
11private readonly Dictionary<EncodedKey, byte[]> _store = new Dictionary<EncodedKey, byte[]>();
Microsoft.AspNetCore.Shared.Tests (32)
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\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.StaticAssets (1)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
30private readonly Dictionary<(string Route, string ETag), StaticAssetDescriptor> _descriptorsMap = [];
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 (13)
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 (4)
121/// A collection of parsed keys and values. The returned <see cref="Dictionary{TKey, TValue}"/> always uses a 125public static Dictionary<string, StringValues> ParseQuery(string? queryString) 127var result = ParseNullableQuery(queryString); 142public 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 (46)
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 (14)
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>() 205var collection = QueryHelpers.ParseQuery(null);
Microsoft.Build (470)
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);
BackEnd\BuildManager\BuildManager.cs (8)
133private readonly Dictionary<int, HashSet<int>> _nodeIdToKnownConfigurations; 166private readonly Dictionary<int, BuildSubmissionBase> _buildSubmissions; 191private readonly Dictionary<ProjectInstance, string> _unnamedProjectInstanceToNames; 206private readonly Dictionary<int, BuildEventArgs> _projectStartedEvents; 2021Dictionary<ProjectGraphNode, BuildResult>? resultsPerNode = null; 2069private Dictionary<ProjectGraphNode, BuildResult> BuildGraph( 2084var buildingNodes = new Dictionary<BuildSubmissionBase, ProjectGraphNode>(); 2085var resultsPerNode = new Dictionary<ProjectGraphNode, BuildResult>(projectGraph.ProjectNodes.Count);
BackEnd\BuildManager\CacheAggregator.cs (1)
69var configIdMapping = new Dictionary<int, int>();
BackEnd\Client\MSBuildClient.cs (2)
34private readonly Dictionary<string, string> _serverEnvironmentVariables; 503Dictionary<string, string> envVars = new();
BackEnd\Components\BuildComponentFactoryCollection.cs (1)
26private readonly Dictionary<BuildComponentType, BuildComponentEntry> _componentEntriesByType;
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (3)
72private readonly Dictionary<int, BuildRequestEntry> _requestsByGlobalRequestId; 101private Dictionary<int, BuildRequestConfiguration> _unresolvedConfigurationsById; 106private Dictionary<ConfigurationMetadata, BuildRequestConfiguration> _unresolvedConfigurationsByMetadata;
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (3)
79private Dictionary<int, List<BuildRequest>> _unresolvedConfigurations; 95private Dictionary<int, BuildRequest> _outstandingRequests; 100private Dictionary<int, BuildResult> _outstandingResults;
BackEnd\Components\Communications\NodeManager.cs (1)
37private readonly Dictionary<int, INodeProvider> _nodeIdToProvider;
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (4)
453internal static (string RuntimeHostPath, string MSBuildAssemblyPath) GetMSBuildLocationForNETRuntime(HandshakeOptions hostContext, Dictionary<string, string> taskHostParameters) 463private static string GetMSBuildAssemblyPath(Dictionary<string, string> taskHostParameters) 575Dictionary<string, string> taskHostParameters) 616internal bool CreateNode(HandshakeOptions hostContext, int taskHostNodeId, INodePacketFactory factory, INodePacketHandler handler, TaskHostConfiguration configuration, Dictionary<string, string> taskHostParameters)
BackEnd\Components\Logging\LoggingService.cs (1)
129private Dictionary<int, IBuildEventSink> _eventSinkDictionary;
BackEnd\Components\Logging\ProjectTelemetry.cs (10)
42private readonly Dictionary<string, int> _msbuildTaskSubclassUsage = new(); 135Dictionary<string, string> taskFactoryProperties = GetTaskFactoryProperties(); 141Dictionary<string, string> taskTotalProperties = GetTaskProperties(); 147Dictionary<string, string> msbuildTaskSubclassProperties = GetMSBuildTaskSubclassProperties(); 180private Dictionary<string, string> GetTaskFactoryProperties() 182Dictionary<string, string> properties = new(); 217private Dictionary<string, string> GetTaskProperties() 219Dictionary<string, string> properties = new(); 241private Dictionary<string, string> GetMSBuildTaskSubclassProperties() 243Dictionary<string, string> properties = new();
BackEnd\Components\ProjectCache\Experimental\ProxyTargets.cs (1)
24private Dictionary<string, string> _proxyTargetToRealTargetMap = null!;
BackEnd\Components\ProjectCache\ProjectCacheService.cs (5)
185var pluginSettings = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 391Dictionary<string, string> globalProperties = new(configuration.GlobalProperties.Count, StringComparer.OrdinalIgnoreCase); 722var globalProperties = new Dictionary<string, string>(configuration.GlobalProperties.Count, StringComparer.OrdinalIgnoreCase); 756Dictionary<string, string> templateGlobalProperties) 789var globalProperties = new Dictionary<string, string>(templateGlobalProperties, StringComparer.OrdinalIgnoreCase)
BackEnd\Components\ProjectCache\ProxyTargets.cs (1)
23private Dictionary<string, string> _proxyTargetToRealTargetMap = null!;
BackEnd\Components\RequestBuilder\BatchingEngine.cs (11)
132Dictionary<string, MetadataReference> consumedMetadataReferences = pair.Metadata; 151Dictionary<string, ICollection<ProjectItemInstance>> itemListsToBeBatched = GetItemListsToBeBatched(consumedMetadataReferences, consumedItemReferences, lookup, elementLocation); 210private static Dictionary<string, ICollection<ProjectItemInstance>> GetItemListsToBeBatched( 211Dictionary<string, MetadataReference> consumedMetadataReferences, // Key is [string] potentially qualified metadata name 219var itemListsToBeBatched = new Dictionary<string, ICollection<ProjectItemInstance>>(MSBuildNameIgnoreCaseComparer.Default); 306Dictionary<string, ICollection<ProjectItemInstance>> itemListsToBeBatched, 307Dictionary<string, MetadataReference> consumedMetadataReferences, 332Dictionary<string, string> itemMetadataValues = GetItemMetadataValues(item, consumedMetadataReferences, elementLocation); 401private static Dictionary<string, string> GetItemMetadataValues( 403Dictionary<string, MetadataReference> consumedMetadataReferences, 406var itemMetadataValues = new Dictionary<string, string>(consumedMetadataReferences.Count, MSBuildNameIgnoreCaseComparer.Default);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (2)
674private Dictionary<string, string> _addTable; 710internal Dictionary<string, string> AddedMetadata
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (7)
248if (!PropertyParser.GetTableWithEscaping(Log, ResourceUtilities.GetResourceString("General.GlobalProperties"), "Properties", Properties, out Dictionary<string, string> propertiesTable)) 410private async Task<bool> BuildProjectsInParallel(Dictionary<string, string> propertiesTable, string[] undefinePropertiesArray, List<string[]> targetLists, bool success, bool[] skipProjects) 524Dictionary<string, string> propertiesTable, 544var projectProperties = new Dictionary<string, string>[projects.Length]; 569out Dictionary<string, string> preProjectPropertiesTable)) 613out Dictionary<string, string> additionalProjectPropertiesTable)) 618var combinedTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BackEnd\Components\RequestBuilder\ItemBucket.cs (4)
36private readonly Dictionary<string, string> _metadata; 64private ItemBucket(Dictionary<string, string> metadata) 79Dictionary<string, string> metadata, 138internal static ItemBucket GetDummyBucketForComparisons(Dictionary<string, string> metadata)
BackEnd\Components\RequestBuilder\Lookup.cs (22)
20using ItemsMetadataUpdateDictionary = System.Collections.Generic.Dictionary<Microsoft.Build.Execution.ProjectItemInstance, Microsoft.Build.BackEnd.Lookup.MetadataModifications>; 21using ItemTypeToItemsMetadataUpdateDictionary = System.Collections.Generic.Dictionary<string, System.Collections.Generic.Dictionary<Microsoft.Build.Execution.ProjectItemInstance, Microsoft.Build.BackEnd.Lookup.MetadataModifications>>; 93private Dictionary<ProjectItemInstance, ProjectItemInstance> _cloneTable; 150private ItemTypeToItemsMetadataUpdateDictionary PrimaryModifyTable 174private ItemTypeToItemsMetadataUpdateDictionary SecondaryModifyTable 202internal List<string> GetPropertyOverrideMessages(Dictionary<string, string> lookupHash) 337foreach (KeyValuePair<string, Dictionary<ProjectItemInstance, MetadataModifications>> entry in PrimaryModifyTable) 339Dictionary<ProjectItemInstance, MetadataModifications> modifiesOfType; 396foreach (KeyValuePair<string, Dictionary<ProjectItemInstance, MetadataModifications>> entry in PrimaryModifyTable) 471Dictionary<ProjectItemInstance, MetadataModifications> allModifies = null; 505Dictionary<ProjectItemInstance, MetadataModifications> modifies; 854Dictionary<ProjectItemInstance, MetadataModifications> modifiesOfType; 883private void ApplyModifies(List<ProjectItemInstance> result, Dictionary<ProjectItemInstance, MetadataModifications> allModifies) 972private void ApplyModificationsToTable(IItemDictionary<ProjectItemInstance> table, string itemType, ItemsMetadataUpdateDictionary modify) 995private void MergeModificationsIntoModificationTable(Dictionary<ProjectItemInstance, MetadataModifications> modifiesOfType, 1048private void MustNotBeInTable(ItemTypeToItemsMetadataUpdateDictionary table, ProjectItemInstance item) 1050ItemsMetadataUpdateDictionary tableOfItemsOfSameType = null; 1116private Dictionary<string, MetadataModification> _modifications; 1226public Dictionary<string, MetadataModification> ExplicitModifications 1412private ItemTypeToItemsMetadataUpdateDictionary _modifies; 1508internal ItemTypeToItemsMetadataUpdateDictionary Modifies
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (34)
24using ItemVectorPartition = System.Collections.Generic.Dictionary<string, System.Collections.Generic.IList<Microsoft.Build.Execution.ProjectItemInstance>>; 32using ItemVectorPartitionCollection = System.Collections.Generic.Dictionary<string, System.Collections.Generic.Dictionary<string, System.Collections.Generic.IList<Microsoft.Build.Execution.ProjectItemInstance>>>; 159out ItemVectorPartitionCollection itemVectorsInTargetInputs, 160out ItemVectorPartitionCollection itemVectorTransformsInTargetInputs, 161out Dictionary<string, string> discreteItemsInTargetInputs, 162out ItemVectorPartitionCollection itemVectorsInTargetOutputs, 163out Dictionary<string, string> discreteItemsInTargetOutputs, 404out ItemVectorPartitionCollection itemVectorsInTargetInputs, 405out ItemVectorPartitionCollection itemVectorTransformsInTargetInputs, 406out Dictionary<string, string> discreteItemsInTargetInputs, 407out ItemVectorPartitionCollection itemVectorsInTargetOutputs, 408out Dictionary<string, string> discreteItemsInTargetOutputs, 517ItemVectorPartitionCollection itemVectorsInTargetInputs, 518ItemVectorPartitionCollection itemVectorTransformsInTargetInputs, 519Dictionary<string, string> discreteItemsInTargetInputs, 590ItemVectorPartitionCollection itemVectorsInTargetInputs, 591ItemVectorPartitionCollection itemVectorsInTargetOutputs, 606ItemVectorPartition inputItemVectors = itemVectorsInTargetInputs[itemVectorType]; 607ItemVectorPartition outputItemVectors = itemVectorsInTargetOutputs[itemVectorType]; 739ItemVectorPartitionCollection itemVectorsInTargetInputs, 740ItemVectorPartitionCollection itemVectorTransformsInTargetInputs, 741Dictionary<string, string> discreteItemsInTargetInputs, 797out ItemVectorPartitionCollection itemVectors, 798ItemVectorPartitionCollection itemVectorTransforms, 799out Dictionary<string, string> discreteItems, 830ItemVectorPartitionCollection itemVectorCollection; 842if (!itemVectorCollection.TryGetValue(itemVectorType, out ItemVectorPartition itemVectorPartition)) 864private static bool IsItemVectorEmpty(ItemVectorPartitionCollection itemVectors) 866foreach (KeyValuePair<string, ItemVectorPartition> item in itemVectors) 882private static List<string> GetItemSpecsFromItemVectors(ItemVectorPartitionCollection itemVectors) 886foreach (KeyValuePair<string, ItemVectorPartition> item in itemVectors) 901private static IEnumerable<string> GetItemSpecsFromItemVectors(ItemVectorPartitionCollection itemVectors, string itemType, ItemVectorPartition itemVectorPartition)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
319Dictionary<string, string> lookupHash = null; 370private async ValueTask<WorkUnitResult> ExecuteBucket(TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Dictionary<string, string> lookupHash)
BackEnd\Components\Scheduler\SchedulableRequest.cs (2)
97private Dictionary<BlockingRequestKey, SchedulableRequest> _requestsWeAreBlockedBy; 122private Dictionary<SchedulableRequestState, ScheduleTimeRecord> _timeRecords;
BackEnd\Components\Scheduler\Scheduler.cs (3)
101private Dictionary<int, NodeInfo> _availableNodes; 1344Dictionary<int, int> configurationCountsByNode = new Dictionary<int, int>(_availableNodes.Count); 2414Dictionary<int, int> availableNodeIdsToIndex = new Dictionary<int, int>(_availableNodes.Count);
BackEnd\Components\Scheduler\SchedulingData.cs (12)
24private readonly Dictionary<int, SchedulableRequest> _executingRequests = new Dictionary<int, SchedulableRequest>(32); 29private readonly Dictionary<int, SchedulableRequest> _blockedRequests = new Dictionary<int, SchedulableRequest>(32); 34private readonly Dictionary<int, SchedulableRequest> _yieldingRequests = new Dictionary<int, SchedulableRequest>(32); 39private readonly Dictionary<int, SchedulableRequest> _readyRequests = new Dictionary<int, SchedulableRequest>(32); 50private readonly Dictionary<SchedulableRequest, LinkedListNode<SchedulableRequest>> _unscheduledRequestNodesByRequest = new Dictionary<SchedulableRequest, LinkedListNode<SchedulableRequest>>(32); 59private readonly Dictionary<int, HashSet<SchedulableRequest>> _scheduledRequestsByNode = new Dictionary<int, HashSet<SchedulableRequest>>(32); 64private readonly Dictionary<int, SchedulableRequest> _executingRequestByNode = new Dictionary<int, SchedulableRequest>(32); 69private readonly Dictionary<int, HashSet<SchedulableRequest>> _readyRequestsByNode = new Dictionary<int, HashSet<SchedulableRequest>>(32); 74private readonly Dictionary<int, HashSet<int>> _configurationsByNode = new Dictionary<int, HashSet<int>>(32); 82private readonly Dictionary<int, int> _configurationToNode = new Dictionary<int, int>(32); 87private readonly Dictionary<int, HashSet<SchedulableRequest>> _configurationToRequests = new Dictionary<int, HashSet<SchedulableRequest>>(32); 105private readonly Dictionary<SchedulableRequest, List<SchedulableRequest>> _buildHierarchy = new Dictionary<SchedulableRequest, List<SchedulableRequest>>(32);
BackEnd\Components\Scheduler\SchedulingPlan.cs (5)
37private Dictionary<string, PlanConfigData> _configPathToData = new Dictionary<string, PlanConfigData>(); 42private Dictionary<int, PlanConfigData> _configIdToData = new Dictionary<int, PlanConfigData>(); 47private Dictionary<int, List<Stack<PlanConfigData>>> _configIdToPaths = new Dictionary<int, List<Stack<PlanConfigData>>>(); 110Dictionary<int, double> accumulatedTimeByConfiguration = new Dictionary<int, double>(); 459private void RecursiveAccumulateConfigurationTimes(SchedulableRequest request, Dictionary<int, double> accumulatedTimeByConfiguration)
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
46private Dictionary<SdkResolverManifest, IReadOnlyList<SdkResolver>> _manifestToResolvers;
BackEnd\Components\SdkResolution\TranslationHelpers.cs (1)
40Dictionary<string, string> metadata = null;
BackEnd\Node\ServerNodeBuildCommand.cs (3)
23private Dictionary<string, string> _buildProcessEnvironment = default!; 51public Dictionary<string, string> BuildProcessEnvironment => _buildProcessEnvironment; 88Dictionary<string, string> buildProcessEnvironment,
BackEnd\Shared\BuildRequestConfiguration.cs (3)
125private Dictionary<string, int> _activelyBuildingTargets; 464Dictionary<string, string> globalProperties = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 614public Dictionary<string, int> ActivelyBuildingTargets => _activelyBuildingTargets ?? (_activelyBuildingTargets =
BackEnd\Shared\BuildResult.cs (1)
660Dictionary<string, string> additionalEntries = new();
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (4)
158private readonly Dictionary<string, TaskFactoryWrapper> _intrinsicTasks = new Dictionary<string, TaskFactoryWrapper>(StringComparer.OrdinalIgnoreCase); 391var setParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1503else if (customMetadata is Dictionary<string, string> dictionary) 1781Dictionary<string, string> taskHostParameters = new Dictionary<string, string>
BuildCheck\API\CheckConfiguration.cs (4)
70internal static CheckConfiguration Create(Dictionary<string, string>? configDictionary) => new() 76private static EvaluationCheckScope? TryExtractEvaluationCheckScope(Dictionary<string, string>? config) 101private static CheckResultSeverity? TryExtractSeverity(Dictionary<string, string>? config) 128private static bool TryExtractValue(string key, Dictionary<string, string>? config, out string? stringValue)
BuildCheck\Checks\DoubleWritesCheck.cs (1)
47private readonly Dictionary<string, (string projectFilePath, string taskName)> _filesWritten = new(StringComparer.CurrentCultureIgnoreCase);
BuildCheck\Checks\PreferProjectReferenceCheck.cs (2)
37private readonly Dictionary<string, (string, string)> _projectsPerReferencePath = new(MSBuildNameIgnoreCaseComparer.Default); 38private readonly Dictionary<string, string> _projectsPerOutputPath = new(MSBuildNameIgnoreCaseComparer.Default);
BuildCheck\Checks\PropertiesUsageCheck.cs (3)
121private Dictionary<string, IMSBuildElementLocation?> _writenProperties = new(MSBuildNameIgnoreCaseComparer.Default); 126private Dictionary<string, IMSBuildElementLocation> _uninitializedReadsInScope = new(MSBuildNameIgnoreCaseComparer.Default); 127private Dictionary<string, IMSBuildElementLocation> _uninitializedReadsOutOfScope = new(MSBuildNameIgnoreCaseComparer.Default);
BuildCheck\Checks\SharedOutputPathCheck.cs (1)
36private readonly Dictionary<string, string> _projectsPerOutputPath = new(MSBuildNameIgnoreCaseComparer.Default);
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (6)
18private Dictionary<Type, Action<BuildEventArgs>> _eventHandlers; 19private readonly Dictionary<Type, Action<BuildEventArgs>> _eventHandlersFull; 20private readonly Dictionary<Type, Action<BuildEventArgs>> _eventHandlersRestore; 163Dictionary<string, TimeSpan> infraStats = _tracingData.InfrastructureTracingData; 166Dictionary<string, TimeSpan> checkStats = _tracingData.ExtractCheckStats(); 181private string BuildCsvString(string title, Dictionary<string, TimeSpan> rowData)
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (3)
429Dictionary<string, string>? propertiesLookup = null; 546private readonly Dictionary<int, HashSet<string>> _deferredProjectEvalIdToImportedProjects = new(); 660private readonly Dictionary<int, List<BuildEventArgs>> _deferredEvalDiagnostics = new();
BuildCheck\Infrastructure\BuildEventsProcessor.cs (8)
26public Dictionary<string, TaskInvocationCheckData.TaskParameter> TaskParameters; 45private readonly Dictionary<TaskKey, ExecutingTaskData> _tasksBeingExecuted = []; 47internal static Dictionary<string, string> ExtractEvaluatedPropertiesLookup( 51private static Dictionary<string, string> ExtractPropertiesLookup(System.Collections.IEnumerable? propertiesFromEventArgs) 53Dictionary<string, string> propertiesLookup = new Dictionary<string, string>(); 67Dictionary<string, string>? propertiesLookup) 72var globalPropertiesLookup = ExtractPropertiesLookup(evaluationFinishedEventArgs.GlobalProperties); 152Dictionary<string, TaskInvocationCheckData.TaskParameter> taskParameters = new();
BuildCheck\Infrastructure\ConfigurationProvider.cs (13)
28private readonly ConcurrentDictionary<string, Dictionary<string, string>> _editorConfigData = new ConcurrentDictionary<string, Dictionary<string, string>>(StringComparer.InvariantCultureIgnoreCase); 52var configuration = GetConfiguration(projectFullPath, ruleId); 162private Dictionary<string, string> FilterDictionaryByKeys(string keyFilter, Dictionary<string, string> originalConfiguration, bool updateKey = false) 164var filteredConfig = new Dictionary<string, string>(); 190private Dictionary<string, string> FetchEditorConfigRules(string projectFullPath) 192var editorConfigRules = _editorConfigData.GetOrAdd(projectFullPath, (key) => 194Dictionary<string, string> config; 206Dictionary<string, string> filteredData = FilterDictionaryByKeys($"{BuildCheck_ConfigurationKey}.", config); 213internal Dictionary<string, string> GetConfiguration(string projectFullPath, string ruleId) 215var config = FetchEditorConfigRules(projectFullPath); 237var config = GetConfiguration(projectFullPath, ruleId);
BuildCheck\Infrastructure\CustomConfigurationData.cs (1)
25public CustomConfigurationData(string ruleId, Dictionary<string, string> properties)
BuildCheck\Infrastructure\EditorConfig\EditorConfigParser.cs (3)
27internal Dictionary<string, string> Parse(string filePath) 79internal Dictionary<string, string> MergeEditorConfigFiles(List<EditorConfigFile> editorConfigFiles, string filePath) 81var resultingDictionary = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
BuildCheck\Infrastructure\TracingReporter.cs (1)
31public Dictionary<string, TimeSpan> GetInfrastructureTracingStats()
CollectionHelpers.cs (1)
41internal static bool ContainsValueAndIsEqual(this Dictionary<string, string> dictionary, string key, string value, StringComparison comparer)
Collections\HashTableUtility.cs (2)
26internal static int Compare(Dictionary<string, string> h1, Dictionary<string, string> h2)
Collections\ItemDictionary.cs (2)
41private readonly Dictionary<string, LinkedList<T>> _itemLists; 48private readonly Dictionary<T, LinkedListNode<T>> _nodes;
Collections\ItemDictionarySlim.cs (2)
16private readonly Dictionary<string, List<ProjectItemInstance>> _itemLists; 107public Dictionary<string, List<ProjectItemInstance>>.Enumerator GetEnumerator() => _itemLists.GetEnumerator();
Collections\LookasideStringInterner.cs (1)
37private readonly Dictionary<string, int> _stringToIdsMap;
Collections\MultiDictionary.cs (1)
56private Dictionary<K, SmallList<V>> _backing;
Collections\PropertyDictionary.cs (2)
565internal Dictionary<string, string> ToDictionary() 569var dictionary = new Dictionary<string, string>(((ICollection<T>)_properties).Count, MSBuildNameIgnoreCaseComparer.Default);
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (1)
44/// This uses an array-based implementation similar to <see cref="Dictionary{TKey, TValue}" />, using a buckets array
Collections\WeakValueDictionary.cs (1)
26private readonly Dictionary<K, WeakReference<V>> _dictionary;
CommunicationsUtilities.cs (2)
482Dictionary<string, string> table = new(200, StringComparer.OrdinalIgnoreCase); // Razzle has 150 environment variables 625Dictionary<string, string> table = new(vars.Count, StringComparer.OrdinalIgnoreCase);
Construction\ProjectTaskElement.cs (1)
149var parametersClone = new Dictionary<string, string>(_parameters.Count, StringComparer.OrdinalIgnoreCase);
Construction\Solution\ProjectInSolution.cs (1)
122private readonly Dictionary<string, ProjectConfigurationInSolution> _projectConfigurations;
Construction\Solution\SolutionFile.cs (8)
109private Dictionary<string, ProjectInSolution> _projectsByGuid; 112private Dictionary<string, ProjectInSolution> _solutionFoldersByGuid; 118private Dictionary<string, SolutionConfigurationInSolution> _solutionConfigurationsByFullName; 777Dictionary<string, string> rawProjectConfigurationsEntries = null; 827var projectsByUniqueName = new Dictionary<string, ProjectInSolution>(StringComparer.OrdinalIgnoreCase); 1708internal Dictionary<string, string> ParseProjectConfigurations() 1710var rawProjectConfigurationsEntries = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1744internal void ProcessProjectConfigurationSection(Dictionary<string, string> rawProjectConfigurationsEntries)
Construction\Solution\SolutionProjectGenerator.cs (1)
2076var properties = new Dictionary<string, string>(_metaprojectGlobalProperties.Length, StringComparer.OrdinalIgnoreCase);
CoreCLRAssemblyLoader.cs (2)
22private readonly Dictionary<string, Assembly> _pathsToAssemblies = new Dictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase); 23private readonly Dictionary<string, Assembly> _namesToAssemblies = new Dictionary<string, Assembly>();
Definition\Project.cs (4)
2158var dictionary = new Dictionary<string, string>(_data.GlobalPropertiesDictionary.Count, MSBuildNameIgnoreCaseComparer.Default); 2596var removeElementCache = new Dictionary<string, CumulativeRemoveElementData>(projectItemElements.Count); 2686private void CacheInformationFromRemoveItem(ProjectItemElement itemElement, Dictionary<string, CumulativeRemoveElementData> removeElementCache) 4176public Dictionary<string, List<string>> ConditionedProperties { get; private set; }
Definition\ProjectCollection.cs (3)
144private Dictionary<string, Toolset> _toolsets; 592Dictionary<string, string> dictionary; 1911private Dictionary<string, List<Project>> _loadedProjects = new Dictionary<string, List<Project>>(StringComparer.OrdinalIgnoreCase);
Definition\Toolset.cs (7)
139private Dictionary<string, SubToolset> _subToolsets; 151private Dictionary<string, ProjectImportPathMatch> _propertySearchPathsTable; 255Dictionary<string, ProjectImportPathMatch> importSearchPathsTable = null) 267Dictionary<string, SubToolset> subToolsetsAsDictionary = subToolsets as Dictionary<string, SubToolset>; 488internal Dictionary<string, ProjectImportPathMatch> ImportPropertySearchPathsTable => _propertySearchPathsTable; 493internal Dictionary<MSBuildExtensionsPathReferenceKind, IList<string>> MSBuildExtensionsPathSearchPathsTable
Definition\ToolsetConfigurationReader.cs (7)
56private readonly Dictionary<string, Dictionary<string, ProjectImportPathMatch>> _projectImportSearchPathsCache; 74_projectImportSearchPathsCache = new Dictionary<string, Dictionary<string, ProjectImportPathMatch>>(StringComparer.OrdinalIgnoreCase); 207protected override Dictionary<string, ProjectImportPathMatch> GetProjectImportSearchPathsTable(string toolsVersion, string os) 209Dictionary<string, ProjectImportPathMatch> kindToPathsCache; 233private Dictionary<string, ProjectImportPathMatch> ComputeDistinctListOfSearchPaths(ToolsetElement.PropertyElementCollection propertyCollection) 235var pathsTable = new Dictionary<string, ProjectImportPathMatch>();
Definition\ToolsetLocalReader.cs (1)
51protected override Dictionary<string, ProjectImportPathMatch> GetProjectImportSearchPathsTable(string toolsVersion, string os)
Definition\ToolsetReader.cs (7)
82internal static string ReadAllToolsets(Dictionary<string, Toolset> toolsets, PropertyDictionary<ProjectPropertyInstance> environmentProperties, PropertyDictionary<ProjectPropertyInstance> globalProperties, ToolsetDefinitionLocations locations) 97Dictionary<string, Toolset> toolsets, 339Dictionary<string, Toolset> toolsets, 391protected abstract Dictionary<string, ProjectImportPathMatch> GetProjectImportSearchPathsTable(string toolsVersion, string os); 397Dictionary<string, Toolset> toolsets, 453Dictionary<string, SubToolset> subToolsets = new Dictionary<string, SubToolset>(StringComparer.OrdinalIgnoreCase); 493var importSearchPathsTable = GetProjectImportSearchPathsTable(toolsVersion.Name, NativeMethodsShared.GetOSNameForExtensionsPath());
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
Evaluation\ConditionEvaluator.cs (5)
36Dictionary<string, List<string>> conditionedPropertiesTable, 219Dictionary<string, List<string>>? conditionedPropertiesTable, 363Dictionary<string, List<string>>? ConditionedPropertiesInProject { get; } 420public Dictionary<string, List<string>>? ConditionedPropertiesInProject { get; } 431Dictionary<string, List<string>>? conditionedPropertiesInProject,
Evaluation\Evaluator.cs (11)
106private readonly Dictionary<string, ProjectImportElement> _importsSeen; 118private readonly Dictionary<ProjectRootElement, bool> _projectSupportsReturnsAttribute; 767Dictionary<string, List<TargetSpecification>> targetsWhichRunBeforeByTarget = new Dictionary<string, List<TargetSpecification>>(StringComparer.OrdinalIgnoreCase); 768Dictionary<string, List<TargetSpecification>> targetsWhichRunAfterByTarget = new Dictionary<string, List<TargetSpecification>>(StringComparer.OrdinalIgnoreCase); 770Dictionary<string, LinkedListNode<ProjectTargetElement>> activeTargets = new Dictionary<string, LinkedListNode<ProjectTargetElement>>(StringComparer.OrdinalIgnoreCase); 862var pluginSettings = item.Metadata.ToDictionary(m => m.Key, m => m.EscapedValue); 1043private void ReadTargetElement(ProjectTargetElement targetElement, LinkedList<ProjectTargetElement> activeTargetsByEvaluationOrder, Dictionary<string, LinkedListNode<ProjectTargetElement>> activeTargets) 1067private void AddBeforeAndAfterTargetMappings(ProjectTargetElement targetElement, Dictionary<string, LinkedListNode<ProjectTargetElement>> activeTargets, Dictionary<string, List<TargetSpecification>> targetsWhichRunBeforeByTarget, Dictionary<string, List<TargetSpecification>> targetsWhichRunAfterByTarget) 1988Dictionary<string, string> escapedMetadata = null;
Evaluation\EvaluatorMetadataTable.cs (1)
21private Dictionary<string, string>? _metadata;
Evaluation\Expander.cs (1)
2728Dictionary<string, string> directoryNameTable = new Dictionary<string, string>(itemsOfType.Count, StringComparer.OrdinalIgnoreCase);
Evaluation\IEvaluatorData.cs (1)
143Dictionary<string, List<string>> ConditionedProperties
Evaluation\IntrinsicFunctions.cs (1)
505Dictionary<string, string> parameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
Evaluation\ItemsAndMetadataPair.cs (3)
25private Dictionary<string, MetadataReference> _metadata; 32internal ItemsAndMetadataPair(HashSet<string> items, Dictionary<string, MetadataReference> metadata) 59internal Dictionary<string, MetadataReference> Metadata
Evaluation\ItemSpec.cs (1)
575private readonly Dictionary<string, MetadataTrie<P, I>> _children;
Evaluation\LazyItemEvaluator.cs (4)
42private Dictionary<string, LazyItemList> _itemLists = Traits.Instance.EscapeHatches.UseCaseSensitiveItemNames ? 168private Dictionary<ISet<string>, OrderedItemDataCollection> _cache; 364Dictionary<string, UpdateOperation> itemsWithNoWildcards = new Dictionary<string, UpdateOperation>(StringComparer.OrdinalIgnoreCase); 437private static void ProcessNonWildCardItemUpdates(Dictionary<string, UpdateOperation> itemsWithNoWildcards, OrderedItemDataCollection.Builder items)
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
70public Dictionary<string, List<string>> ConditionedProperties => _wrappedData.ConditionedProperties;
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (4)
90private Dictionary<string, I> CapturedItems { get; } 92public ItemBatchingContext(I operationItem, Dictionary<string, I> capturedItems = null) 121private readonly Dictionary<string, I> _capturedItems; 123public ItemOperationMetadataTable(I operationItem, Dictionary<string, I> capturedItems)
Evaluation\LazyItemEvaluator.OrderedItemDataCollection.cs (3)
35private Dictionary<string, ItemDataCollectionValue<I>> _dictionaryBuilder; 100public Dictionary<string, ItemDataCollectionValue<I>> Dictionary 148var dictionary = Dictionary;
Evaluation\LazyItemEvaluator.UpdateOperation.cs (4)
33public Dictionary<string, I> CapturedItemsFromReferencedItemTypes { get; } 35public MatchResult(bool isMatch, Dictionary<string, I> capturedItemsFromReferencedItemTypes) 93private ItemData UpdateItem(ItemData item, Dictionary<string, I> capturedItemsFromReferencedItemTypes) 124Dictionary<string, I> capturedItemsFromReferencedItemTypes = null;
Evaluation\Preprocessor.cs (2)
40private readonly Dictionary<XmlElement, IList<ProjectRootElement>> _importTable; 56private readonly Dictionary<XmlDocument, List<ResolvedImport>> _implicitImportsByProject = new Dictionary<XmlDocument, List<ResolvedImport>>();
Evaluation\Profiler\EvaluationProfiler.cs (1)
23private readonly Dictionary<EvaluationLocation, ProfiledLocation> _timeSpent = new Dictionary<EvaluationLocation, ProfiledLocation>();
Evaluation\PropertiesUseTracker.cs (1)
38private Dictionary<string, IElementLocation>? _properties;
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (1)
150public Dictionary<string, List<string>> ConditionedProperties => _wrapped.ConditionedProperties;
Evaluation\StringMetadataTable.cs (2)
23private Dictionary<string, string> _metadata; 31internal StringMetadataTable(Dictionary<string, string> metadata)
Evaluation\ToolsetProvider.cs (1)
24private Dictionary<string, Toolset> _toolsets;
FileMatcher.cs (2)
825Dictionary<string, List<RecursionState>> searchesToExcludeInSubdirs, 2416Dictionary<string, List<RecursionState>>? searchesToExcludeInSubdirs = null;
Graph\GraphBuilder.cs (12)
88var allParsedProjects = FindGraphNodes(); 120private void AddEdges(Dictionary<ConfigurationMetadata, ParsedProject> allParsedProjects) 134private void AddEdgesFromProjectReferenceItems(Dictionary<ConfigurationMetadata, ParsedProject> allParsedProjects, GraphEdges edges) 136Dictionary<ProjectGraphNode, HashSet<ProjectGraphNode>> transitiveReferenceCache = new(allParsedProjects.Count); 202var projectsByPath = new Dictionary<string, List<ProjectGraphNode>>(); 308Dictionary<string, ImmutableDictionary<string, string>> globalPropertiesForProjectConfiguration = new(StringComparer.OrdinalIgnoreCase); 312Dictionary<string, IReadOnlyCollection<string>> solutionDependencies = new(); 442Dictionary<ConfigurationMetadata, ParsedProject> allParsedProjects) 444var nodeStates = new Dictionary<ProjectGraphNode, NodeVisitationState>(); 528var globalProperties = configurationMetadata.GlobalProperties.ToDictionary(); 552private Dictionary<ConfigurationMetadata, ParsedProject> FindGraphNodes() 597Dictionary<string, string> globalProperties,
Graph\ParallelWorkSet.cs (2)
45internal Dictionary<TKey, TResult> CompletedWork 49var completedWork = new Dictionary<TKey, TResult>(_inProgressOrCompletedWork.Count);
Graph\ProjectGraph.cs (5)
57Dictionary<string, string> globalProperties, 565var inDegree = graphNodes.ToDictionary(n => n, n => n.ReferencingProjects.Count); 614var targetLists = ProjectNodes.ToDictionary(node => node, node => ImmutableList<string>.Empty); 837Dictionary<string, string> globalProperties, 851Dictionary<string, string> globalProperties,
Graph\ProjectInterpretation.cs (2)
246public void AddInnerBuildEdges(Dictionary<ConfigurationMetadata, ParsedProject> allNodes, GraphBuilder graphBuilder) 434out var propertiesTable))
ICollectionExtensions.cs (1)
68public static void AddRange<TKey, TValue>(this ICollection<TKey> collection, Dictionary<TKey, TValue>.KeyCollection? keyCollection) where TKey : notnull
IEnumerableExtensions.cs (2)
802internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 805var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
ImmutableArrayExtensions.cs (7)
859this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 1148internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 1176(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 1210internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 1211(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 1222var dictionary = new Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>>(capacity, comparer);
InsertionBehavior.cs (1)
18/// Used internally to control behavior of insertion into a <see cref="Dictionary{TKey, TValue}"/> or <see cref="HashSet{T}"/>.
Instance\HostServices.cs (4)
52private Dictionary<string, HostObjects> _hostObjectMap; 58private Dictionary<string, NodeAffinity> _projectAffinities; 313var hostObjectMap = new Dictionary<string, HostObjects>(); 412internal Dictionary<TargetTaskKey, MonikerNameOrITaskHost> _hostObjects;
Instance\ProjectInstance.cs (9)
391var projectItemToInstanceMap = this.CreateItemsSnapshot(project.Items, project.ItemTypes.Count, keepEvaluationCache); 690var projectItemToInstanceMap = this.CreateItemsSnapshot(new ReadOnlyCollection<ProjectItem>(data.Items), data.ItemTypes.Count, keepEvaluationCache); 1528Dictionary<string, List<string>> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.ConditionedProperties 2631Dictionary<string, string> globalProperties = new Dictionary<string, string>(globalPropertiesInstances.Count, StringComparer.OrdinalIgnoreCase); 2680Dictionary<string, string> globalProperties, 3107Dictionary<string, TValue> clone; 3383private void CreateEvaluatedIncludeSnapshotIfRequested(bool keepEvaluationCache, ICollection<ProjectItem> items, Dictionary<ProjectItem, ProjectItemInstance> projectItemToInstanceMap) 3402private Dictionary<ProjectItem, ProjectItemInstance> CreateItemsSnapshot(ICollection<ProjectItem> items, int itemTypeCount, bool keepEvaluationCache) 3406var projectItemToInstanceMap = keepEvaluationCache ? new Dictionary<ProjectItem, ProjectItemInstance>(items.Count) : null;
Instance\ProjectItemInstance.cs (3)
618internal static void SetMetadata(Dictionary<string, string> metadataList, List<ProjectItemInstance> items) 1609Dictionary<string, string> clonedMetadata = new Dictionary<string, string>(metadata.Count, MSBuildNameIgnoreCaseComparer.Default); 1626Dictionary<string, string> clonedMetadata = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default);
Instance\ProjectTaskInstance.cs (1)
238Dictionary<string, string> filteredParameters = new Dictionary<string, string>(_parameters.Count, StringComparer.OrdinalIgnoreCase);
Instance\TaskFactories\AssemblyTaskFactory.cs (4)
350Dictionary<string, string> mergedParameters = null; 604private static Dictionary<string, string> MergeTaskFactoryParameterSets( 608Dictionary<string, string> mergedParameters = null; 663private static void AddNetHostParams(ref Dictionary<string, string> taskParams, Func<string, ProjectPropertyInstance> getProperty)
Instance\TaskFactories\TaskHostTask.cs (2)
81private Dictionary<string, string> _taskHostParameters; 156Dictionary<string, string> taskHostParameters,
Instance\TaskFactoryWrapper.cs (4)
271Dictionary<string, TaskPropertyInfo>? propertyInfoCache = null; 272Dictionary<string, string>? namesOfPropertiesWithRequiredAttribute = null; 273Dictionary<string, string>? namesOfPropertiesWithOutputAttribute = null; 274Dictionary<string, string>? namesOfPropertiesWithAmbiguousMatches = null;
Instance\TaskRegistry.cs (11)
148private Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> _taskRegistrations; 155private readonly Dictionary<string, List<RegisteredTaskRecord>> _overriddenTasks = new Dictionary<string, List<RegisteredTaskRecord>>(); 423Dictionary<string, string> taskFactoryParameters = null; 447private static Dictionary<string, string> CreateTaskFactoryParametersDictionary(int? initialCount = null) 688Dictionary<string, string> taskFactoryParameters, 755private static Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>> CreateRegisteredTaskDictionary(int? capacity = null) 1157private Dictionary<RegisteredTaskIdentity, object> _taskNamesCreatableByFactory; 1162private Dictionary<string, string> _taskFactoryParameters; 1231Dictionary<string, string> taskFactoryParameters, 1955_taskFactoryParameters = (Dictionary<string, string>)localParameters; 1977_taskRegistrations = (Dictionary<RegisteredTaskIdentity, List<RegisteredTaskRecord>>)copy;
Logging\BaseConsoleLogger.cs (6)
674internal static PerformanceCounter GetPerformanceCounter(string scopeName, ref Dictionary<string, PerformanceCounter> table) 697internal void DisplayCounters(Dictionary<string, PerformanceCounter> counters) 1184internal Dictionary<string, PerformanceCounter> projectPerformanceCounters; 1189internal Dictionary<string, PerformanceCounter> targetPerformanceCounters; 1194internal Dictionary<string, PerformanceCounter> taskPerformanceCounters; 1199internal Dictionary<string, PerformanceCounter> projectEvaluationPerformanceCounters;
Logging\BinaryLogger\BuildEventArgsReader.cs (2)
718var d = new Dictionary<EvaluationLocation, ProfiledLocation>(count); 1514var result = new Dictionary<string, string>(count);
Logging\BinaryLogger\BuildEventArgsWriter.cs (3)
75private readonly Dictionary<HashKey, int> stringHashes = new Dictionary<HashKey, int>(); 80private readonly Dictionary<HashKey, int> nameValueListHashes = new Dictionary<HashKey, int>(); 330Dictionary<string, TimeSpan> stats = e.TracingData.ExtractCheckStats();
Logging\BinaryLogger\ExtendedDataFields.cs (2)
24public Dictionary<string, string?>? ExtendedMetadataAsDictionary => 27ExtendedMetadata is Dictionary<string, string?> asDictionary ?
Logging\ParallelLogger\ParallelConsoleLogger.cs (6)
30internal Dictionary<(int nodeId, int contextId), string> propertyOutputMap = new Dictionary<(int nodeId, int contextId), string>(); 424var groupByProjectEntryPoint = new Dictionary<ErrorWarningSummaryDictionaryKey, List<BuildEventArgs>>(); 1647internal static new MPPerformanceCounter GetPerformanceCounter(string scopeName, ref Dictionary<string, PerformanceCounter> table) 1674private Dictionary<string, PerformanceCounter> _internalPerformanceCounters; 1679private Dictionary<BuildEventContext, object> _startedEvent; 1784private Dictionary<BuildEventContext, List<BuildMessageEventArgs>> _deferredMessages;
Logging\ParallelLogger\ParallelLoggerHelpers.cs (4)
20private Dictionary<BuildEventContext, ProjectStartedEventMinimumFields> _projectStartedEvents; 21private Dictionary<BuildEventContext, TargetStartedEventMinimumFields> _targetStartedEvents; 22private Dictionary<string, int> _projectTargetKey = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); 23private Dictionary<string, int> _projectKey = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
Logging\ProfilerLogger.cs (6)
34private Dictionary<EvaluationLocation, ProfiledLocation> _aggregatedLocations = null; 132var mergeMap = new Dictionary<long, long>(); 135var originalLocations = new Dictionary<EvaluationLocation, EvaluationLocation>(EvaluationLocationIdAgnosticComparer.Singleton); 215private static Dictionary<EvaluationLocation, ProfiledLocation> PruneSmallItems( 218var result = new Dictionary<EvaluationLocation, ProfiledLocation>(); 221var idTable = aggregatedLocations.ToDictionary(pair => pair.Key.Id,
Logging\TerminalLogger\TerminalLogger.cs (2)
104private readonly Dictionary<ProjectContext, TerminalProjectInfo> _projects = new(); 106private readonly Dictionary<EvalContext, EvalProjectInfo> _evals = new();
LogMessagePacketBase.cs (1)
279private static readonly Dictionary<LoggingEventType, MethodInfo> s_writeMethodCache = new Dictionary<LoggingEventType, MethodInfo>();
NodePacketFactory.cs (1)
19private Dictionary<NodePacketType, PacketFactoryRecord> _packetFactories;
PlatformNegotiation.cs (4)
24Dictionary<string, string>? currentProjectLookupTable = ExtractLookupTable(platformLookupTable, log); 34Dictionary<string, string>? projectReferenceLookupTable = ExtractLookupTable(projectReferenceLookupTableMetadata, log); 99internal static Dictionary<string, string>? ExtractLookupTable(string stringTable, TaskLoggingHelper? log = null) 106Dictionary<string, string> table = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
PropertyParser.cs (2)
27internal static bool GetTable(TaskLoggingHelper log, string parameterName, string[] propertyList, out Dictionary<string, string> propertiesTable) 83internal static bool GetTableWithEscaping(TaskLoggingHelper log, string parameterName, string syntaxName, string[] propertyNameValueStrings, out Dictionary<string, string> finalPropertiesTable)
ReadOnlyEmptyDictionary.cs (1)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>();
SegmentedDictionary`2.cs (1)
29/// <para>This collection has the same performance characteristics as <see cref="Dictionary{TKey, TValue}"/>, but
SolutionConfiguration.cs (5)
23private readonly Dictionary<string, XmlElement> _cachedProjectElements; 26private readonly Dictionary<string, XmlElement> _cachedProjectElementsByAbsolutePath; 29private readonly Dictionary<string, string> _cachedProjectAbsolutePathsByGuid; 32private readonly Dictionary<string, string> _cachedProjectGuidsByAbsolutePath; 35private readonly Dictionary<string, List<string>> _cachedDependencyProjectGuidsByDependingProjectGuid;
TaskHostConfiguration.cs (8)
33private Dictionary<string, string> _buildProcessEnvironment; 90private Dictionary<string, TaskParameter> _taskParameters; 92private Dictionary<string, string> _globalParameters; 160Dictionary<string, string> globalParameters, 173_buildProcessEnvironment = buildProcessEnvironment as Dictionary<string, string>; 240public Dictionary<string, string> BuildProcessEnvironment 353public Dictionary<string, TaskParameter> TaskParameters 363public Dictionary<string, string> GlobalProperties
TaskHostTaskComplete.cs (5)
85private Dictionary<string, TaskParameter> _taskOutputParameters = null; 90private Dictionary<string, string> _buildProcessEnvironment = null; 129_buildProcessEnvironment = buildProcessEnvironment as Dictionary<string, string>; 191public Dictionary<string, TaskParameter> TaskOutputParameters 208public Dictionary<string, string> BuildProcessEnvironment
TaskParameter.cs (2)
562private Dictionary<string, string> _customEscapedMetadata = null; 580_customEscapedMetadata = nonGenericEscapedMetadata as Dictionary<string, string>;
TelemetryInfra\TelemetryDataUtils.cs (8)
72private class TargetsDetailsConverter : JsonConverter<Dictionary<TaskOrTargetTelemetryKey, bool>?> 74public override Dictionary<TaskOrTargetTelemetryKey, bool>? Read( 83Dictionary<TaskOrTargetTelemetryKey, bool>? value, 114private class TasksDetailsConverter : JsonConverter<Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats>?> 116public override Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats>? Read( 125Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats>? value, 160public void Process(Dictionary<TaskOrTargetTelemetryKey, bool> targetsExecutionData) 257public void Process(Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats> tasksExecutionData)
ToolsetElement.cs (3)
171private Dictionary<string, string> _previouslySeenOS = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 346private Dictionary<string, string> _previouslySeenPropertyNames = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 525private Dictionary<string, string> _previouslySeenToolsVersions = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Tracing.cs (1)
28private static readonly Dictionary<string, int> s_counts;
TranslatorHelpers.cs (9)
89ref Dictionary<string, T> dictionary, 98ref Dictionary<string, string> dictionary, 107dictionary = (Dictionary<string, string>)localDict; 112ref Dictionary<string, T> dictionary, 124dictionary = (Dictionary<string, T>)localDict; 129ref Dictionary<string, string> dictionary, 140dictionary = (Dictionary<string, string>)localDict; 145ref Dictionary<string, T> dictionary, 157dictionary = (Dictionary<string, T>)localDict;
TypeLoader.cs (2)
197Dictionary<string, string> assembliesDictionary = new(localAssemblies.Length + runtimeAssemblies.Length); 296private Dictionary<string, Type> _publicTypeNameToType;
Microsoft.Build.BuildCheck.UnitTests (21)
CheckConfiguration_Test.cs (4)
47var config = new Dictionary<string, string>() 67var config = new Dictionary<string, string>() 87var config = new Dictionary<string, string>() 106var config = new Dictionary<string, string>()
ConfigurationProvider_Tests.cs (2)
33var configs = configurationProvider.GetConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id"); 55var configs = configurationProvider.GetConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
CustomConfigurationData_Tests.cs (9)
53var config1 = new Dictionary<string, string>() 58var config2 = new Dictionary<string, string>() 72var config = new Dictionary<string, string>() 85var config1 = new Dictionary<string, string>() 90var config2 = new Dictionary<string, string>() 104var config1 = new Dictionary<string, string>() 109var config2 = new Dictionary<string, string>() 123var config1 = new Dictionary<string, string>() 129var config2 = new Dictionary<string, string>()
DoubleWritesAnalyzer_Tests.cs (1)
26private TaskInvocationCheckData MakeTaskInvocationData(string taskName, Dictionary<string, TaskInvocationCheckData.TaskParameter> parameters)
EditorConfigParser_Tests.cs (2)
32var mergedResult = parser.MergeEditorConfigFiles(configs, "/some/path/to/file"); 55var mergedResult = parser.MergeEditorConfigFiles(configs, "/some/path/to/file.proj");
ExecCliBuildCheck_Tests.cs (1)
92private TaskInvocationCheckData MakeTaskInvocationData(string taskName, Dictionary<string, TaskInvocationCheckData.TaskParameter> parameters)
SharedOutputPathCheck_Tests.cs (2)
27Dictionary<string, string>? evaluatedProperties, 112var evaluatedProperties = new Dictionary<string, string> {
Microsoft.Build.Engine.OM.UnitTests (79)
Construction\ProjectTaskElement_Tests.cs (7)
33var parameters = Helpers.MakeDictionary(task.Parameters); 117var parameters = Helpers.MakeDictionary(task.Parameters); 138var parameters = Helpers.MakeDictionary(task.Parameters); 159var parameters = Helpers.MakeDictionary(task.Parameters); 227var parameters = Helpers.MakeDictionary(task.Parameters); 243var parameters = Helpers.MakeDictionary(task.Parameters); 261var parameters = Helpers.MakeDictionary(task.Parameters);
Definition\DefinitionEditing_Tests.cs (2)
615Dictionary<string, string> metadata = new Dictionary<string, string>() { { "m", "m1" } }; 2532Dictionary<string, string> metadata = new Dictionary<string, string>() { { "m", "m1" } };
Definition\Project_Tests.cs (8)
812var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 829var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 960Dictionary<string, string> initial = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 988Dictionary<string, string> initial = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 2420Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 2434Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 2458Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 2528Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Definition\ProjectCollection_Tests.cs (5)
395var globals = new Dictionary<string, string> { { "Configuration", "Debug" } }; 411var globalProperties1 = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { { "p", "v1" } }; 418var globalProperties2 = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { { "p", "v2" } }; 455var project2Globals = 572var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { { "p", "v1" } };
Definition\ProjectItem_Tests.cs (38)
2760var expectedInitial = new Dictionary<string, string> 2765var expectedUpdateFromTrue = new Dictionary<string, string> 2802var expectedInitial = new Dictionary<string, string> 2807var expectedUpdateFromUnconditionedElement = new Dictionary<string, string> 2835var expectedUpdate = new Dictionary<string, string> 2871Dictionary<string, string> expectedUpdatei = new Dictionary<string, string> 2875Dictionary<string, string> expectedUpdatej = new Dictionary<string, string> 2942var expectedMetadata = new Dictionary<string, string> 2972var expectedMetadata = new Dictionary<string, string> 3026var expectedMetadataX = new Dictionary<string, string> 3031var expectedMetadataA = new Dictionary<string, string> 3038var expectedMetadataB = new Dictionary<string, string> 3072var expectedMetadataA = new Dictionary<string, string> 3079var expectedMetadataB = new Dictionary<string, string> 3086var expectedMetadataC = new Dictionary<string, string> 3137var expectedMetadataA = doNotExpandQualifiedMetadataInUpdateOperation 3166var expectedMetadataA = new Dictionary<string, string> 3185var expectedMetadataA = new Dictionary<string, string> 3212var expectedMetadataA = new Dictionary<string, string> 3252var expectedMetadataX = new Dictionary<string, string> 3260var expectedMetadata2 = new Dictionary<string, string> 3268var expectedMetadataCCC = new Dictionary<string, string> 3276var expectedMetadata1 = new Dictionary<string, string> 3285var expectedMetadataD = new Dictionary<string, string> 3293var expectedMetadataY = new Dictionary<string, string> 3343var expectedMetadataB = new Dictionary<string, string> 3348var expectedMetadataA = new Dictionary<string, string>() 3353var expectedMetadataC = new Dictionary<string, string>(); 3408var expectedInitialMetadata = new Dictionary<string, string> 3414var expectedUpdatedMetadata = new Dictionary<string, string> 3450var expected_i1 = new Dictionary<string, string> 3456var expected_i2_a = new Dictionary<string, string> 3462var expected_i2_y = new Dictionary<string, string> 3499var expectedInitial = new Dictionary<string, string> 3505var expectedUpdated = new Dictionary<string, string> 3534var expectedUpdated = new Dictionary<string, string> 3629public void UpdateAndRemoveShouldWorkWithEscapedCharacters(string projectContents, string include, string update, string remove, string[] expectedInclude, Dictionary<string, string>[] expectedMetadata) 3687var expectedUpdated = new Dictionary<string, string>
Definition\ProjectMetadata_Tests.cs (1)
505var metadata = new Dictionary<string, string>
Definition\ProjectProperty_Tests.cs (1)
190Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
Instance\ProjectInstance_Tests.cs (2)
202Dictionary<string, string> globals = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) { { "p", "p1" } }; 1026var globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Instance\ProjectItemInstance_Tests.cs (3)
1137var expectedInitial = new Dictionary<string, string> 1142var expectedUpdateFromTrue = new Dictionary<string, string> 1193private static void AssertItemHasMetadata(Dictionary<string, string> expected, ProjectItemInstance item)
ObjectModelRemoting\Helpers\TestCollectionGroup.cs (1)
205var result = new Dictionary<ProjectCollectionLinker, HashSet<Project>>();
ObjectModelRemoting\RemoteProjectsProviderMock\CollectionsHelpers.cs (2)
112Dictionary<TKey, TValue> result = new Dictionary<TKey, TValue>(); 131Dictionary<TKey, RMock> result = new Dictionary<TKey, RMock>();
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\ProjectElemetExportHelper.cs (2)
84private static Dictionary<Type, ExporterFactory> knownTypes = new Dictionary<Type, ExporterFactory>(); 126var newKnown = new Dictionary<Type, ExporterFactory>(knownTypes);
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (2)
151private Dictionary<UInt32, ExternalConnection> imported = new Dictionary<UInt32, ExternalConnection>(); 215Dictionary<UInt32, ExternalConnection> newMap = new Dictionary<uint, ExternalConnection>(imported);
ObjectModelRemoting\RemoteProjectsProviderMock\LinkedObjectsMap.cs (3)
34private static Dictionary<UInt32, LinkedObjectsMap<KeyType>> collections = new Dictionary<UInt32, LinkedObjectsMap<KeyType>>(); 36private Dictionary<UInt32, WeakHolder> activeLinks = new Dictionary<UInt32, WeakHolder>(); 37private Dictionary<KeyType, WeakHolder> indexByKey = new Dictionary<KeyType, WeakHolder>();
TransientIO.cs (1)
18private Dictionary<string, TransientIO> Children = new Dictionary<string, TransientIO>(StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Engine.UnitTests (258)
BackEnd\AssemblyTaskFactory_Tests.cs (1)
685var taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BackEnd\BinaryTranslator_Tests.cs (32)
844Dictionary<string, string> value = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 850Dictionary<string, string> deserializedValue = null; 865Dictionary<string, string> value = null; 869Dictionary<string, string> deserializedValue = null; 882Dictionary<string, BaseClass> value = new Dictionary<string, BaseClass>(StringComparer.OrdinalIgnoreCase); 888Dictionary<string, BaseClass> deserializedValue = null; 904Dictionary<string, BaseClass> value = null; 908Dictionary<string, BaseClass> deserializedValue = null; 921Dictionary<string, BaseClass> value = new Dictionary<string, BaseClass>(); 925TranslationHelpers.GetWriteTranslator().TranslateDictionary<Dictionary<string, BaseClass>, BaseClass>(ref value, BaseClass.FactoryForDeserialization); 927Dictionary<string, BaseClass> deserializedValue = null; 928TranslationHelpers.GetReadTranslator().TranslateDictionary<Dictionary<string, BaseClass>, BaseClass>(ref deserializedValue, BaseClass.FactoryForDeserialization); 943Dictionary<string, BaseClass> value = null; 945TranslationHelpers.GetWriteTranslator().TranslateDictionary<Dictionary<string, BaseClass>, BaseClass>(ref value, BaseClass.FactoryForDeserialization); 947Dictionary<string, BaseClass> deserializedValue = null; 948TranslationHelpers.GetReadTranslator().TranslateDictionary<Dictionary<string, BaseClass>, BaseClass>(ref deserializedValue, BaseClass.FactoryForDeserialization); 959Dictionary<string, string> value = new(StringComparer.OrdinalIgnoreCase) 964Dictionary<string, string> valueUpperCase = new(StringComparer.OrdinalIgnoreCase) 976Dictionary<string, string> deserializedValue = null; 977Dictionary<string, string> deserializedValueUpperCase = null; 1003Dictionary<string, BaseClass> value = new(StringComparer.Ordinal) 1008Dictionary<string, BaseClass> valueUpperCase = new(StringComparer.Ordinal) 1020Dictionary<string, BaseClass> deserializedValue = null; 1021Dictionary<string, BaseClass> deserializedValueUpperCase = null; 1043Dictionary<string, string> value = new(StringComparer.OrdinalIgnoreCase) 1048Dictionary<string, string> valueUpperCase = new(StringComparer.OrdinalIgnoreCase) 1060Dictionary<string, string> deserializedValue = null; 1061Dictionary<string, string> deserializedValueUpperCase = null; 1090Dictionary<string, BaseClass> value = new(StringComparer.Ordinal) 1095Dictionary<string, BaseClass> valueUpperCase = new(StringComparer.Ordinal) 1107Dictionary<string, BaseClass> deserializedValue = null; 1108Dictionary<string, BaseClass> deserializedValueUpperCase = null;
BackEnd\BuildManager_Tests.cs (12)
140Dictionary<string, string> properties = ExtractProjectStartedPropertyList(evalFinishedEvent.Properties); 257Dictionary<string, string> properties = ExtractProjectStartedPropertyList(evalFinishedEvent.Properties); 574Dictionary<string, string> properties = ExtractProjectStartedPropertyList(evalFinishedEvent.Properties); 614Dictionary<string, string> properties = ExtractProjectStartedPropertyList(evalFinishedEvent.Properties); 658Dictionary<string, string> properties = ExtractProjectStartedPropertyList(evalFinishedEvent.Properties); 720Dictionary<string, string> properties = ExtractProjectStartedPropertyList(projectStartedEvent.Properties); 796Dictionary<string, string> properties = ExtractProjectStartedPropertyList(projectStartedEvent.Properties); 842Dictionary<string, string> properties = ExtractProjectStartedPropertyList(projectStartedEvent.Properties); 939Dictionary<string, string> properties = ExtractProjectStartedPropertyList(projectStartedEvent.Properties); 1152var globalProperties = new Dictionary<string, string>(); 3541private static Dictionary<string, string> ExtractProjectStartedPropertyList(IEnumerable properties) 3543Dictionary<string, string> propertiesLookup = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BackEnd\BuildRequestConfiguration_Tests.cs (4)
173Dictionary<string, string> props = new Dictionary<string, string>(); 275Dictionary<string, string> globalProperties = new(StringComparer.OrdinalIgnoreCase); 351Dictionary<string, string> globalProperties = 457Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BackEnd\ConfigurationMetadata_Tests.cs (1)
150Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BackEnd\IntrinsicTask_Tests.cs (2)
1256Dictionary<string, string> globalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 3983internal static void AssertItemEvaluationFromTarget(string projectContents, string targetName, string itemType, string[] inputFiles, string[] expectedInclude, bool makeExpectedIncludeAbsolute = false, Dictionary<string, string>[] expectedMetadataPerItem = null, bool normalizeSlashes = false)
BackEnd\MockRunningObjectTable.cs (1)
15private readonly Dictionary<string, object> _dictionary = new Dictionary<string, object>();
BackEnd\NodeEndpointInProc_Tests.cs (1)
172private Dictionary<INodeEndpoint, LinkStatusContext> _linkStatusTable;
BackEnd\NodePackets_Tests.cs (1)
174private static Dictionary<string, string> CreateStringDictionary()
BackEnd\ProjectTelemetry_Tests.cs (7)
30var properties = GetMSBuildTaskSubclassProperties(telemetry); 49var properties = GetMSBuildTaskSubclassProperties(telemetry); 68var properties = GetMSBuildTaskSubclassProperties(telemetry); 86var properties = GetMSBuildTaskSubclassProperties(telemetry); 105var properties = GetMSBuildTaskSubclassProperties(telemetry); 113private System.Collections.Generic.Dictionary<string, string> GetMSBuildTaskSubclassProperties(ProjectTelemetry telemetry) 117return (System.Collections.Generic.Dictionary<string, string>)method!.Invoke(telemetry, null)!;
BackEnd\RequestedProjectState_Tests.cs (2)
44Dictionary<string, List<string>> items = new() 66Dictionary<string, List<string>> items = new()
BackEnd\SdkResolverService_Tests.cs (11)
409private void CreateMockSdkResultPropertiesAndItems(out Dictionary<string, string> propertiesToAdd, out Dictionary<string, SdkResultItem> itemsToAdd) 437var metadata = result.ItemsToAdd.Values.Single().Metadata; 454Dictionary<string, string> propertiesToAdd = null; 455Dictionary<string, SdkResultItem> itemsToAdd = null; 494Dictionary<string, string> propertiesToAdd; 495Dictionary<string, SdkResultItem> itemsToAdd; 534Dictionary<string, string> propertiesToAdd = null; 535Dictionary<string, SdkResultItem> itemsToAdd = null; 584Dictionary<string, string> propertiesToAdd; 585Dictionary<string, SdkResultItem> itemsToAdd;
BackEnd\TaskExecutionHost_Tests.cs (11)
39private Dictionary<string, object> _parametersSetOnTask; 44private Dictionary<string, object> _outputsReadFromTask; 143var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 159var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 169var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 608var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 624var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 642var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase); 1475var parameters = GetStandardParametersDictionary(true); 1484private Dictionary<string, (string, ElementLocation)> GetStandardParametersDictionary(bool returnParam) 1486var parameters = new Dictionary<string, (string, ElementLocation)>(StringComparer.OrdinalIgnoreCase);
BackEnd\TaskHost_Tests.cs (1)
716Dictionary<string, string> globalProperties = new Dictionary<string, string>
BackEnd\TaskHostConfiguration_Tests.cs (1)
332var expectedGlobalProperties = new Dictionary<string, string>
BackEnd\TaskRegistry_Tests.cs (5)
580Dictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1057Dictionary<string, string> taskParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 2004Dictionary<string, string> taskParameters, 2053Dictionary<string, string> parameters = null; 2072private void RetrieveAndValidateRegisteredTaskRecord(TaskRegistry registry, bool exactMatchRequired, Dictionary<string, string> taskParameters, bool shouldBeRetrieved, bool shouldBeRetrievedFromCache)
BackEnd\TranslationHelpers.cs (1)
204var dictionary = properties
BinaryLogger_Tests.cs (3)
259Dictionary<string, string> embedFiles1 = new(); 260Dictionary<string, string> embedFiles2 = new(); 290void AddArchiveFile(Dictionary<string, string> files, ArchiveFileEventArgs arg)
BuildEnvironmentHelper_Tests.cs (1)
508private readonly Dictionary<string, string> _mockEnvironment = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
BuildEventArgsSerialization_Tests.cs (2)
115var globalVariables = new Dictionary<string, string> 557Dictionary<string, TimeSpan> stats = new() { { key1, span1 }, { key2, span2 }, { key3, span3 } };
Collections\OMcollections_tests.cs (6)
207var dictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 224var dictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 252var backing = new Dictionary<string, string>(); 268Dictionary<string, string> values = new Dictionary<string, string>(); 273Dictionary<string, int> convertedValues = new Dictionary<string, int>(); 336Dictionary<string, TValue> clone;
ConsoleLogger_Tests.cs (1)
32private Dictionary<string, string> _environment;
Construction\SolutionProjectGenerator_Tests.cs (7)
1727Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 2104Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 2202Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 2290Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 2367Dictionary<string, string> globalProperties = new Dictionary<string, string>(); 2549var globalProperties = new Dictionary<string, string> { { "ImportByWildcardBeforeSolution", "false" } }; 2790Dictionary<string, string> globalProperties = new Dictionary<string, string>();
Definition\Toolset_Tests.cs (2)
103Dictionary<string, SubToolset> subToolsets = new Dictionary<string, SubToolset>(StringComparer.OrdinalIgnoreCase); 495Dictionary<string, SubToolset> subToolsets = new Dictionary<string, SubToolset>(StringComparer.OrdinalIgnoreCase);
Definition\ToolsetConfigurationReader_Tests.cs (3)
560Dictionary<string, Toolset> toolsets = new Dictionary<string, Toolset>(StringComparer.OrdinalIgnoreCase); 565Dictionary<string, ProjectImportPathMatch> pathsTable = toolsets["2.0"].ImportPropertySearchPathsTable; 582private void CheckPathsTable(Dictionary<string, ProjectImportPathMatch> pathsTable, string kind, string[] expectedPaths)
Definition\ToolsVersion_Tests.cs (1)
989private readonly Dictionary<string, string> _defaultTasksFileMap;
Evaluation\Evaluator_Tests.cs (1)
5155Dictionary<string, SubToolset> subToolsets = new Dictionary<string, SubToolset>(StringComparer.OrdinalIgnoreCase);
Evaluation\Expander_Tests.cs (4)
780Dictionary<string, string> itemMetadataTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1358Dictionary<string, string> itemMetadataTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1574var itemMetadataTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 3911Dictionary<string, string> itemMetadataTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Evaluation\ExpressionShredder_Tests.cs (5)
459Dictionary<string, MetadataReference> actualMetadata = pair.Metadata; 465Dictionary<string, MetadataReference> expectedMetadata = GetConsumedMetadataReferences_OriginalImplementation(test); 1185private static Dictionary<string, MetadataReference> GetConsumedMetadataReferences_OriginalImplementation(string expression) 1190Dictionary<string, MetadataReference> consumedMetadataReferences = new Dictionary<string, MetadataReference>(StringComparer.OrdinalIgnoreCase); 1207Dictionary<string, MetadataReference> consumedMetadataReferences)
Evaluation\ItemEvaluation_Tests.cs (11)
61var mI2_1 = new Dictionary<string, string> 70var mI2_2 = new Dictionary<string, string> 110var expectedMetadata = new Dictionary<string, string> 184var a = new Dictionary<string, string> 192var b = new Dictionary<string, string> 200var c = new Dictionary<string, string> 211var metadataForI2 = new Dictionary<string, string> 364public void ItemOperationsShouldExpandIndirectItemReferences(string projectContent, string[] expectedItemValues, Dictionary<string, string> expectedItemMetadata) 490var i1BaseMetadata = new Dictionary<string, string> 496var i1Metadata = new Dictionary<string, string>[] 508var i2Metadata = new Dictionary<string, string>[]
Evaluation\ItemSpec_Tests.cs (2)
88private ProjectInstanceExpander CreateExpander(Dictionary<string, string[]> items) 99private static ItemDictionary<ProjectItemInstance> ToItemDictionary(Dictionary<string, string[]> itemTypes)
Evaluation\Preprocessor_Tests.cs (2)
943var propertiesToAdd = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 948var itemsToAdd = new Dictionary<string, SdkResultItem>(StringComparer.OrdinalIgnoreCase)
Evaluation\ProjectSdkImplicitImport_Tests.cs (1)
350var mapping = new Dictionary<string, string> { { SdkName, _testSdkDirectory } };
Evaluation\SdkResultEvaluation_Tests.cs (14)
58private void CreateMockSdkResultPropertiesAndItems(out Dictionary<string, string> propertiesToAdd, out Dictionary<string, SdkResultItem> itemsToAdd) 108Dictionary<string, string> propertiesToAdd = null; 109Dictionary<string, SdkResultItem> itemsToAdd = null; 144Dictionary<string, string> propertiesToAdd = null; 145Dictionary<string, SdkResultItem> itemsToAdd = null; 182Dictionary<string, string> propertiesToAdd = null; 183Dictionary<string, SdkResultItem> itemsToAdd = null; 276Dictionary<string, string> propertiesToAdd = null; 277Dictionary<string, SdkResultItem> itemsToAdd = null; 382Dictionary<string, string> propertiesToAdd; 383Dictionary<string, SdkResultItem> itemsToAdd; 454Dictionary<string, string> propertiesToAdd = new Dictionary<string, string>() 459Dictionary<string, SdkResultItem> itemsToAdd = new Dictionary<string, SdkResultItem>()
ExpressionTree_Tests.cs (2)
333Dictionary<string, List<string>> conditionedProperties = new Dictionary<string, List<string>>(); 391private static void DumpDictionary(Dictionary<string, List<string>> propertyDictionary)
ExpressionTreeExpression_Tests.cs (1)
400Dictionary<string, string> metadataDictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Graph\GraphLoadedFromSolution_tests.cs (10)
195Dictionary<int, int[]> edges, 205Dictionary<int, int[]> edges, 211var projectSpecificConfigurations = graph.ProjectNodes.ToDictionary( 233ProjectConfigurations = new Dictionary<string, Dictionary<SolutionConfigurationInSolution, ProjectConfigurationInSolution>> 480public void SolutionsCanInjectEdgesIntoTheProjectGraph(Dictionary<int, int[]> edges, (int, int)[] solutionDependencies, bool hasCycle, bool solutionEdgesOverlapGraphEdges) 660Dictionary<int, int[]> edges, 663Dictionary<string, Dictionary<SolutionConfigurationInSolution, ProjectConfigurationInSolution>> projectConfigurations = null) 673var globalProperties = currentSolutionConfiguration != null 705var actualProjectConfigurations = projectConfigurations ?? solutionFileBuilder.ProjectConfigurations;
Graph\GraphTestingUtilities.cs (6)
43Dictionary<string, string> additionalGlobalProperties = null, 90public static void AssertNonMultitargetingNode(ProjectGraphNode node, Dictionary<string, string> additionalGlobalProperties = null) 99public static void AssertOuterBuildEvaluation(ProjectGraphNode outerBuild, Dictionary<string, string> additionalGlobalProperties) 112Dictionary<string, string> additionalGlobalProperties) 200Dictionary<string, string[]> projectReferenceTargets = null, 232internal static void AssertReferencesIgnoringOrder(this ProjectGraph graph, Dictionary<int, int[]> expectedReferencesForNode)
Graph\IsolateProjects_Tests.cs (5)
15using ExpectedNodeBuildOutput = System.Collections.Generic.Dictionary<Microsoft.Build.Graph.ProjectGraphNode, string[]>; 16using OutputCacheDictionary = System.Collections.Generic.Dictionary<Microsoft.Build.Graph.ProjectGraphNode, string>; 325var expectedOutput = new ExpectedNodeBuildOutput(); 326var outputCaches = new OutputCacheDictionary(); 328Dictionary<string, (BuildResult Result, MockLogger Logger)> results = ResultCacheBasedBuilds_Tests.BuildUsingCaches(
Graph\ParallelWorkSet_Tests.cs (1)
22internal Dictionary<string, string> ExpectedCompletedWork =
Graph\ProjectGraph_Tests.cs (22)
370var globalPropertiesFor1 = new Dictionary<string, string> { ["B"] = "EntryPointB", ["C"] = "EntryPointC", ["IsGraphBuild"] = "true" }; 377var globalPropertiesFor2 = new Dictionary<string, string> { ["IsGraphBuild"] = "true" }; 939var projectReferenceTargets = new Dictionary<string, string[]> 966var projectReferenceTargets = new Dictionary<string, string[]> 1430var projectReferenceTargets = new Dictionary<string, string[]> 1555Dictionary<string, (BuildResult Result, MockLogger Logger)> results = ResultCacheBasedBuilds_Tests.BuildUsingCaches( 1605Dictionary<string, (BuildResult Result, MockLogger Logger)> results = ResultCacheBasedBuilds_Tests.BuildUsingCaches( 1807public void TopologicalSortShouldTopologicallySort(Dictionary<int, int[]> edges) 1830public void DotNotationShouldRepresentGraph(Dictionary<int, int[]> edges) 2125var additionalGlobalProperties = new Dictionary<string, string> { { "x", "y" } }; 2164var additionalGlobalProperties = new Dictionary<string, string> { { "x", "y" } }; 2191var additionalGlobalProperties = new Dictionary<string, string> { { "x", "y" } }; 2253var graph1 = new Dictionary<int, int[]> 2261var graph2 = new Dictionary<int, int[]> 2271foreach (var globalVariables in globalVariablesArray) 2323public void AllNodesShouldHaveGraphBuildGlobalProperty(Dictionary<int, int[]> edges, int[] entryPoints, Dictionary<string, string> globalProperties) 2331var expectedGlobalProperties = new Dictionary<string, string>(globalProperties); 2357public void GraphShouldSupportTransitiveReferences(Dictionary<int, int[]> edges) 2483Dictionary<int, int[]> edges, 2484Dictionary<int, string> extraContentPerProjectNumber, 2485Dictionary<int, int[]> expectedReferences)
Graph\ResultCacheBasedBuilds_Tests.cs (16)
20using ExpectedNodeBuildOutput = System.Collections.Generic.Dictionary<Microsoft.Build.Graph.ProjectGraphNode, string[]>; 21using OutputCacheDictionary = System.Collections.Generic.Dictionary<Microsoft.Build.Graph.ProjectGraphNode, string>; 286public void BuildProjectGraphUsingCaches(Dictionary<int, int[]> edges) 296var expectedOutput = new ExpectedNodeBuildOutput(); 298var outputCaches = new OutputCacheDictionary(); 343var expectedOutput = new ExpectedNodeBuildOutput(); 345var outputCaches = new OutputCacheDictionary(); 381var expectedOutput = new ExpectedNodeBuildOutput(); 383var outputCaches = new OutputCacheDictionary(); 390var results = BuildUsingCaches(_env, topoSortedNodes, expectedOutput, outputCaches, generateCacheFiles: false, assertBuildResults: false); 422internal static Dictionary<string, (BuildResult Result, MockLogger Logger)> BuildUsingCaches( 425ExpectedNodeBuildOutput expectedNodeBuildOutput, 426OutputCacheDictionary outputCaches, 430Func<ProjectGraphNode, ExpectedNodeBuildOutput, string[]> expectedOutputProducer = null, 436var results = new Dictionary<string, (BuildResult Result, MockLogger Logger)>(topoSortedNodes.Count); 511private static TransientTestFile CreateProjectFileWrapper(TestEnvironment env, int projectNumber, int[] projectReferences, Dictionary<string, string[]> projectReferenceTargets, string defaultTargets, string extraContent)
HashTableUtility_Tests.cs (4)
28Dictionary<string, string> h1 = new Dictionary<string, string>(); 30Dictionary<string, string> h2 = new Dictionary<string, string>(); 41Dictionary<string, string> h1 = new Dictionary<string, string>(); 42Dictionary<string, string> h2 = new Dictionary<string, string>();
Instance\HostServices_Tests.cs (1)
502Dictionary<string, string> globals = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
Instance\ProjectTaskInstance_Internal_Tests.cs (1)
72var parametersCopy = new Dictionary<string, (string, ElementLocation)>(parameters.Count);
Instance\TaskItem_Tests.cs (1)
204((Dictionary<string, string>)item.CloneCustomMetadata()).ShouldBeSetEquivalentTo(new KeyValuePair<string, string>[] { new("a", "override"), new("b", "base") });
InstanceFromRemote\FakeProjectLinkWithPropertyValues.cs (2)
17private readonly Dictionary<string, string> _propertyValues; 19public FakeProjectLinkWithPropertyValues(string path, Dictionary<string, string> propertyValues)
InstanceFromRemote\ProjectInstance_FromImmutableProjectLink_Tests.cs (3)
36var propertyValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 59var items = new Dictionary<string, ProjectItemLink[]>(StringComparer.OrdinalIgnoreCase); 94var items = new Dictionary<string, ProjectItemLink[]>(StringComparer.OrdinalIgnoreCase);
InternalEngineHelpers.cs (6)
41private readonly Dictionary<string, SdkResult> _resultMap; 51public ConfigurableMockSdkResolver(Dictionary<string, SdkResult> resultMap) 102Dictionary<string, SdkResultItem> sdkResultItems; 113Dictionary<string, string> newMetadata = null; 133private readonly Dictionary<string, string> _mapping; 135public FileBasedMockSdkResolver(Dictionary<string, string> mapping)
ProjectCache\ProjectCacheTests.cs (9)
115private Dictionary<int, int[]?> GraphEdges { get; } 117public Dictionary<int, CacheResult> NonCacheMissResults { get; } 119public GraphCacheResponse(Dictionary<int, int[]?> graphEdges, Dictionary<int, CacheResult>? nonCacheMissResults = null, IDictionary<int, string>? extraContentPerProjectNumber = null) 514var nodesToBuildResults = new Dictionary<ProjectGraphNode, BuildResult>(); 537(MockLogger logger, ProjectGraph graph, Dictionary<ProjectGraphNode, BuildResult> nodesToBuildResults) = BuildGraphVsScenario(testData, buildParameters); 561private (MockLogger logger, ProjectGraph projectGraph, Dictionary<ProjectGraphNode, BuildResult> nodesToBuildResults) BuildGraphVsScenario( 566var nodesToBuildResults = new Dictionary<ProjectGraphNode, BuildResult>(); 705var globalProperties = new Dictionary<string, string>
SolutionFileBuilder.cs (6)
39public Dictionary<string, Dictionary<SolutionConfigurationInSolution, ProjectConfigurationInSolution>> ProjectConfigurations { get; set; } 80Dictionary<int, int[]> edges, 88Dictionary<string, Dictionary<SolutionConfigurationInSolution, ProjectConfigurationInSolution>> projectConfigurations = null, 105var projectInfos = Projects.ToDictionary(
Telemetry\Telemetry_Tests.cs (1)
255var tags = activity.Tags.ToDictionary(t => t.Key, t => t.Value);
TerminalLogger_Tests.cs (1)
292private BuildMessageEventArgs MakeExtendedMessageEventArgs(string message, MessageImportance importance, string extendedType, Dictionary<string, string?>? extendedMetadata, BuildEventContext? buildEventContext = null)
Microsoft.Build.Framework (61)
BinaryReaderExtensions.cs (2)
129public static Dictionary<string, TimeSpan> ReadDurationDictionary(this BinaryReader reader) 132var durations = new Dictionary<string, TimeSpan>(count);
BinaryTranslator.cs (9)
609public void TranslateDictionary(ref Dictionary<string, string> dictionary, IEqualityComparer<string> comparer) 617dictionary = (Dictionary<string, string>)copy; 631public void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys) 738public void TranslateDictionary<T>(ref Dictionary<string, T> dictionary, IEqualityComparer<string> comparer, ObjectTranslatorWithValueFactory<T> objectTranslator, NodePacketValueFactory<T> valueFactory) 805public void TranslateDictionary(ref Dictionary<string, DateTime> dictionary, StringComparer comparer) 1441public void TranslateDictionary(ref Dictionary<string, string> dictionary, IEqualityComparer<string> comparer) 1458public void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys) 1581public void TranslateDictionary<T>(ref Dictionary<string, T> dictionary, IEqualityComparer<string> comparer, ObjectTranslatorWithValueFactory<T> objectTranslator, NodePacketValueFactory<T> valueFactory) 1650public 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; }
InterningReadTranslator.cs (1)
23private Dictionary<InternPathIds, string> _pathIdsToString = [];
InterningWriteTranslator.cs (2)
40private Dictionary<string, int> _stringToIds = []; 42private Dictionary<string, InternPathIds> _stringToPathIds = [];
ITranslator.cs (4)
344void TranslateDictionary(ref Dictionary<string, string> dictionary, IEqualityComparer<string> comparer); 357void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys); 361void TranslateDictionary(ref Dictionary<string, DateTime> dictionary, StringComparer comparer); 375void TranslateDictionary<T>(ref Dictionary<string, T> dictionary, IEqualityComparer<string> comparer, ObjectTranslatorWithValueFactory<T> objectTranslator, NodePacketValueFactory<T> valueFactory)
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)
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)
105var properties = new Dictionary<string, string>();
Telemetry\IWorkerNodeTelemetryData.cs (2)
10Dictionary<TaskOrTargetTelemetryKey, TaskExecutionStats> TasksExecutionData { get; } 11Dictionary<TaskOrTargetTelemetryKey, bool> TargetsExecutionData { get; }
Telemetry\LoggingConfigurationTelemetry.cs (1)
86var 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.Framework.UnitTests (3)
BuildCheckTracingEventArgs_Tests.cs (1)
25Dictionary<string, TimeSpan> stats = new() { { key1, span1 }, { key2, span2 }, { key3, span3 } };
BuildSubmissionStartedEventArgs_Tests.cs (1)
17var globalVariables = new Dictionary<string, string?>
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
Microsoft.Build.Tasks.CodeAnalysis (6)
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (2)
92var rootByItemSpec = new Dictionary<string, ITaskItem>(); 123var topLevelMappedPaths = new Dictionary<string, string>();
src\Compilers\Shared\BuildServerConnection.cs (4)
454private static IntPtr CreateEnvironmentBlock(Dictionary<string, string> environmentVariables) 484internal static Dictionary<string, string>? GetServerEnvironmentVariables(System.Collections.IDictionary currentEnvironment, ICompilerServerLogger? logger = null) 492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (6)
src\Compilers\Core\MSBuildTask\MapSourceRoots.cs (2)
92var rootByItemSpec = new Dictionary<string, ITaskItem>(); 123var topLevelMappedPaths = new Dictionary<string, string>();
src\Compilers\Shared\BuildServerConnection.cs (4)
454private static IntPtr CreateEnvironmentBlock(Dictionary<string, string> environmentVariables) 484internal static Dictionary<string, string>? GetServerEnvironmentVariables(System.Collections.IDictionary currentEnvironment, ICompilerServerLogger? logger = null) 492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger);
Microsoft.Build.Tasks.CodeAnalysis.Sdk.UnitTests (1)
src\Compilers\Core\MSBuildTaskTests\TestUtilities\MSBuildUtil.cs (1)
29public static ITaskItem CreateTaskItem(string fileName, Dictionary<string, string> metadata)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (7)
IntegrationTests.cs (2)
27private Dictionary<string, string> SimpleMsBuildFiles => new Dictionary<string, string> { 335private Dictionary<string, string> ReportAnalyzerMsBuildFiles => new Dictionary<string, string> {
TargetTests.cs (1)
957static 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.Build.Tasks.Core (159)
AssemblyDependency\GenerateBindingRedirects.cs (1)
363var map = new Dictionary<AssemblyName, string>();
AssemblyDependency\Node\RarNodeExecuteRequest.cs (1)
18private Dictionary<string, TaskParameter> _taskInputs = new(StringComparer.Ordinal);
AssemblyDependency\Node\RarNodeExecuteResponse.cs (1)
18private Dictionary<string, TaskParameter> _taskOutputs = new(StringComparer.Ordinal);
AssemblyDependency\Node\RarTaskParameters.cs (3)
52internal static Dictionary<string, TaskParameter> Get(ParameterType parameterType, ResolveAssemblyReference rar) 59Dictionary<string, TaskParameter> taskParameters = new(properties.Length, StringComparer.Ordinal); 103internal static void Set(ParameterType parameterType, ResolveAssemblyReference rar, Dictionary<string, TaskParameter> parameters)
AssemblyDependency\Reference.cs (2)
27private Dictionary<string, ITaskItem> _sourceItems = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase); 76private Dictionary<string, UnificationVersion> _preUnificationVersions = new Dictionary<string, UnificationVersion>(StringComparer.OrdinalIgnoreCase);
AssemblyDependency\ReferenceTable.cs (21)
36private static readonly Dictionary<string, Tuple<RedistList, string>> s_monikerToHighestRedistList = new Dictionary<string, Tuple<RedistList, string>>(StringComparer.OrdinalIgnoreCase); 46private readonly Dictionary<string, AssemblyNameExtension> _externallyResolvedImmutableFiles = new Dictionary<string, AssemblyNameExtension>(StringComparer.OrdinalIgnoreCase); 78private readonly Dictionary<string, ITaskItem> _resolvedSDKReferences; 381internal Dictionary<AssemblyNameExtension, Reference> References { get; private set; } = new Dictionary<AssemblyNameExtension, Reference>(AssemblyNameComparer.GenericComparer); 1379var goodReferences = new Dictionary<AssemblyNameExtension, Reference>(AssemblyNameComparer.GenericComparer); 1385var dependencyGraph = new Dictionary<Reference, List<ReferenceAssemblyExtensionPair>>(); 1473private static void AddToDependencyGraph(Dictionary<Reference, List<ReferenceAssemblyExtensionPair>> dependencyGraph, AssemblyNameExtension assemblyName, Reference assemblyReference) 1493private void RemoveDependencyMarkedForExclusion(LogExclusionReason logExclusionReason, bool removeOnlyNoWarning, string subsetName, Dictionary<AssemblyNameExtension, Reference> goodReferences, List<Reference> removedReferences, AssemblyNameExtension assemblyName, Reference assemblyReference) 1577private static void RemoveDependencies(Reference removedReference, Dictionary<AssemblyNameExtension, Reference> referenceList, Dictionary<Reference, List<ReferenceAssemblyExtensionPair>> dependencyList) 1810private void ResolveConflictsBetweenReferences(Dictionary<string, List<AssemblyNameReference>> baseNameToReferences) 1855Dictionary<string, List<AssemblyNameReference>> baseNameToReferences = BuildSimpleNameTable(); 1871var fullNameToReference = new Dictionary<string, AssemblyNameReference>(References.Count, StringComparer.OrdinalIgnoreCase); 2184private Dictionary<string, List<AssemblyNameReference>> BuildSimpleNameTable() 2188var baseNameToReferences = new Dictionary<string, List<AssemblyNameReference>>(References.Count, StringComparer.OrdinalIgnoreCase); 2214Dictionary<string, List<AssemblyNameReference>> baseNameToReferences) 2739Dictionary<string, string> nonForwardableMetadata = null; 3022private static Dictionary<string, string> RemoveNonForwardableMetadata(ITaskItem item) 3024Dictionary<string, string> removedMetadata = new Dictionary<string, string>(); 3035private static void RemoveMetadatum(string key, ITaskItem item, Dictionary<string, string> removedMetadata) 3152internal bool MarkReferencesForExclusion(Dictionary<string, string> exclusionList)
AssemblyDependency\ResolveAssemblyReference.cs (4)
222private Dictionary<string, MessageImportance> _showAssemblyFoldersExLocations = new Dictionary<string, MessageImportance>(StringComparer.OrdinalIgnoreCase); 2265Dictionary<string, string> exclusionList = null; 2807private void HandleProfile(AssemblyTableInfo[] installedAssemblyTableInfo, out AssemblyTableInfo[] fullRedistAssemblyTableInfo, out Dictionary<string, string> exclusionList, out RedistList fullFrameworkRedistList) 3077Dictionary<string, AssemblyTableInfo> tableMap = new Dictionary<string, AssemblyTableInfo>(StringComparer.OrdinalIgnoreCase);
BootstrapperUtil\BootstrapperBuilder.cs (20)
43private readonly Dictionary<string, XmlNode> _cultures = new Dictionary<string, XmlNode>(StringComparer.OrdinalIgnoreCase); 44private readonly Dictionary<string, ProductValidationResults> _validationResults = new Dictionary<string, ProductValidationResults>(StringComparer.Ordinal); 207var eulas = new Dictionary<string, KeyValuePair<string, string>>(StringComparer.Ordinal); 254private static void Merge(Dictionary<string, Product> output, Dictionary<string, Product> input) 262private static void AddProduct(Dictionary<string, Product> output, Product product) 272var builtProducts = new Dictionary<string, ProductBuilder>(); 273var productsAndIncludes = new Dictionary<string, Product>(); 292Dictionary<string, Product> includes = GetIncludedProducts(builder.Product); 618var availableProducts = new Dictionary<string, Product>(StringComparer.Ordinal); 620var buildQueue = new Dictionary<string, Product>(StringComparer.Ordinal); 650private void AddDependencies(Product p, Dictionary<string, Product> availableProducts) 697private void AddIncludes(Product p, Dictionary<string, Product> availableProducts) 734private void OrderProducts(Dictionary<string, Product> availableProducts, Dictionary<string, Product> buildQueue) 785private static void RemoveDependency(Dictionary<string, Product> availableProducts, Product product) 1361private bool BuildPackages(BuildSettings settings, XmlElement configElement, ResourceUpdater resourceUpdater, List<string> filesCopied, Dictionary<string, KeyValuePair<string, string>> eulas) 2210private static Dictionary<string, Product> GetIncludedProducts(Product product) 2212var includedProducts = new Dictionary<string, Product>(StringComparer.OrdinalIgnoreCase) 2229private static void AddIncludedProducts(Product product, Dictionary<string, Product> includedProducts)
BootstrapperUtil\PackageCollection.cs (1)
16private readonly Dictionary<string, Package> _cultures = new Dictionary<string, Package>(StringComparer.OrdinalIgnoreCase);
BootstrapperUtil\Product.cs (1)
30private readonly Dictionary<string, Package> _cultures = new Dictionary<string, Package>(StringComparer.OrdinalIgnoreCase);
BootstrapperUtil\ProductCollection.cs (1)
22private readonly Dictionary<string, Product> _table = new Dictionary<string, Product>(StringComparer.OrdinalIgnoreCase);
BootstrapperUtil\productvalidationresults.cs (1)
16private readonly Dictionary<string, XmlValidationResults> _packageValidationResults =
CommunicationsUtilities.cs (2)
482Dictionary<string, string> table = new(200, StringComparer.OrdinalIgnoreCase); // Razzle has 150 environment variables 625Dictionary<string, string> table = new(vars.Count, StringComparer.OrdinalIgnoreCase);
Copy.cs (2)
492var filesActuallyCopied = new Dictionary<string, string>( 586var partitionsByDestination = new Dictionary<string, List<int>>(
CreateItem.cs (6)
81if (!PropertyParser.GetTable(Log, "AdditionalMetadata", AdditionalMetadata, out Dictionary<string, string> metadataTable)) 87Dictionary<string, string> excludeItems = GetUniqueItems(Exclude); 101private List<ITaskItem> CreateOutputItems(Dictionary<string, string> metadataTable, Dictionary<string, string> excludeItems) 217private static Dictionary<string, string> GetUniqueItems(ITaskItem[] items) 219var uniqueItems = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
CreateManifestResourceName.cs (1)
36protected Dictionary<string, ITaskItem> itemSpecToTaskitem = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase);
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
FileIO\GetFileHash.cs (1)
26internal static readonly Dictionary<string, Func<HashAlgorithm>> SupportedAlgorithms
FileMatcher.cs (2)
825Dictionary<string, List<RecursionState>> searchesToExcludeInSubdirs, 2416Dictionary<string, List<RecursionState>>? searchesToExcludeInSubdirs = null;
GenerateResource.cs (1)
3877public Dictionary<string, IResource> resourcesHashTable;
InstalledSDKResolver.cs (2)
22private readonly Dictionary<string, ITaskItem> _resolvedSDKs; 27public InstalledSDKResolver(Dictionary<string, ITaskItem> resolvedSDKs, string searchPathElement, GetAssemblyName getAssemblyName, FileExists fileExists, GetAssemblyRuntimeVersion getRuntimeVersion, Version targetedRuntimeVesion)
ManifestUtil\ApplicationManifest.cs (4)
433var clsidList = new Dictionary<string, ComInfo>(); 434var tlbidList = new Dictionary<string, ComInfo>(); 565var usedExtensions = new Dictionary<string, FileAssociation>(StringComparer.OrdinalIgnoreCase); 642var targetPathList = new Dictionary<string, bool>();
ManifestUtil\AssemblyIdentity.cs (1)
402var redistDictionary = new Dictionary<string, RedistList>();
ManifestUtil\Manifest.cs (1)
624var identityList = new Dictionary<string, bool>();
ManifestUtil\Util.cs (1)
413var list = new Dictionary<string, ITaskItem>();
MSBuild.cs (7)
214if (!PropertyParser.GetTableWithEscaping(Log, ResourceUtilities.GetResourceString("General.GlobalProperties"), "Properties", Properties, out Dictionary<string, string> propertiesTable)) 374private bool BuildProjectsInParallel(Dictionary<string, string> propertiesTable, string[] undefinePropertiesArray, List<string[]> targetLists, bool success, bool[] skipProjects) 482Dictionary<string, string> propertiesTable, 501var projectProperties = new Dictionary<string, string>[projects.Count]; 523out Dictionary<string, string> preProjectPropertiesTable)) 563out Dictionary<string, string> additionalProjectPropertiesTable)) 567var combinedTable = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
NodePacketFactory.cs (1)
19private Dictionary<NodePacketType, PacketFactoryRecord> _packetFactories;
PlatformNegotiation.cs (4)
24Dictionary<string, string>? currentProjectLookupTable = ExtractLookupTable(platformLookupTable, log); 34Dictionary<string, string>? projectReferenceLookupTable = ExtractLookupTable(projectReferenceLookupTableMetadata, log); 99internal static Dictionary<string, string>? ExtractLookupTable(string stringTable, TaskLoggingHelper? log = null) 106Dictionary<string, string> table = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
PropertyParser.cs (2)
27internal static bool GetTable(TaskLoggingHelper log, string parameterName, string[] propertyList, out Dictionary<string, string> propertiesTable) 83internal static bool GetTableWithEscaping(TaskLoggingHelper log, string parameterName, string syntaxName, string[] propertyNameValueStrings, out Dictionary<string, string> finalPropertiesTable)
ReadOnlyEmptyDictionary.cs (1)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>();
RedistList.cs (12)
38private static readonly Dictionary<string, RedistList> s_cachedRedistList = new Dictionary<string, RedistList>(StringComparer.OrdinalIgnoreCase); 42private static Dictionary<string, string[]> s_redistListPathCache; 70private readonly ConcurrentDictionary<string, Dictionary<string, string>> _cachedDenyList = new ConcurrentDictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); 116var simpleNameMap = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); 563internal Dictionary<string, string> GenerateDenyList(AssemblyTableInfo[] allowListAssemblyTableInfo, List<Exception> allowListErrors, List<string> allowListErrorFileNames) 585if (!_cachedDenyList.TryGetValue(key, out Dictionary<string, string> returnTable)) 665var denyListOfAssemblyNames = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 698var assemblyEntries = new Dictionary<string, AssemblyEntry>(StringComparer.OrdinalIgnoreCase); 824private static void ParseFileListSection(AssemblyTableInfo assemblyTableInfo, string path, string redistName, XmlReader reader, Dictionary<string, AssemblyEntry> assemblyEntries, List<AssemblyRemapping> remapEntries) 870var attributes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 1009private static Dictionary<string, string[]> s_subsetListPathCache;
ResolveManifestFiles.cs (6)
56private Dictionary<string, ITaskItem> _runtimePackAssets; 510var outputAssembliesMap = outputAssemblies.ToDictionary(p => Path.GetFullPath(p.ItemSpec), StringComparer.OrdinalIgnoreCase); 835private readonly Dictionary<string, MapEntry> _dictionary = new Dictionary<string, MapEntry>(); 836private readonly Dictionary<string, MapEntry> _simpleNameDictionary = new Dictionary<string, MapEntry>(); 900private readonly Dictionary<string, MapEntry> _dictionary = new Dictionary<string, MapEntry>(StringComparer.InvariantCultureIgnoreCase); 948private readonly Dictionary<string, MapEntry> _dictionary = new Dictionary<string, MapEntry>();
ResolveSDKReference.cs (9)
30private static readonly Dictionary<string, string> PlatformAliases = new(StringComparer.OrdinalIgnoreCase) 111private Dictionary<string, string> _runtimeReferenceOnlyDependenciesByName; 300var sdkItems = new Dictionary<string, ITaskItem>(InstalledSDKs.Length, StringComparer.OrdinalIgnoreCase); 332var productFamilyNameToSDK = new Dictionary<string, HashSet<SDKReference>>(StringComparer.OrdinalIgnoreCase); 335var sdkNameToSDK = new Dictionary<string, HashSet<SDKReference>>(StringComparer.OrdinalIgnoreCase); 479internal static void AddMetadataToReferences(TaskLoggingHelper log, HashSet<SDKReference> sdkReferenceItems, Dictionary<string, string> referencesToAddMetadata, string metadataName, string metadataValue) 883private Dictionary<string, string> FrameworkIdentitiesFromManifest { get; } 898private Dictionary<string, string> AppxLocationsFromManifest { get; } 912public void Resolve(Dictionary<string, ITaskItem> sdks, string targetConfiguration, string targetArchitecture, HashSet<string> sdkNamesOnReferenceItems, bool treatErrorsAsWarnings, bool prefer32Bit, string identifierTargetPlatform, Version versionTargetPlatform, string projectName, bool enableMaxPlatformVersionEmptyWarning)
ResourceHandling\MSBuildResXReader.cs (4)
24var aliases = new Dictionary<string, string>(); 57private static void ParseAssemblyAlias(Dictionary<string, string> aliases, XElement elem) 83private static string GetFullTypeNameFromAlias(string aliasedTypeName, Dictionary<string, string> aliases) 114Dictionary<string, string> aliases,
SolutionConfiguration.cs (5)
23private readonly Dictionary<string, XmlElement> _cachedProjectElements; 26private readonly Dictionary<string, XmlElement> _cachedProjectElementsByAbsolutePath; 29private readonly Dictionary<string, string> _cachedProjectAbsolutePathsByGuid; 32private readonly Dictionary<string, string> _cachedProjectGuidsByAbsolutePath; 35private readonly Dictionary<string, List<string>> _cachedDependencyProjectGuidsByDependingProjectGuid;
system.design\stronglytypedresourcebuilder.cs (6)
114internal static CodeCompileUnit Create(Dictionary<string, IResource> resourceList, String baseName, String generatedCodeNamespace, String resourcesNamespace, CodeDomProvider codeProvider, bool internalClass, out String[] unmatchable) 121var resourceTypes = new Dictionary<String, ResourceData>(StringComparer.InvariantCultureIgnoreCase); 136private static CodeCompileUnit InternalCreate(Dictionary<String, ResourceData> resourceList, String baseName, String generatedCodeNamespace, String resourcesNamespace, CodeDomProvider codeProvider, bool internalClass, out String[] unmatchable) 156SortedList<string, ResourceData> cleanedResourceList = VerifyResourceNames(resourceList, codeProvider, errors, out Dictionary<string, string> reverseFixupTable); 715Dictionary<String, ResourceData> resourceList, 718out Dictionary<string, string> reverseFixupTable)
SystemState.cs (7)
31private Dictionary<string, FileState> upToDateLocalFileStateCache = new Dictionary<string, FileState>(StringComparer.OrdinalIgnoreCase); 42internal Dictionary<string, FileState> instanceLocalFileStateCache = new Dictionary<string, FileState>(StringComparer.OrdinalIgnoreCase); 47internal Dictionary<string, FileState> instanceLocalOutgoingFileStateCache = new Dictionary<string, FileState>(StringComparer.OrdinalIgnoreCase); 54private Dictionary<string, DateTime> instanceLocalLastModifiedCache = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase); 61private Dictionary<string, bool> instanceLocalDirectoryExists = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase); 68private Dictionary<string, string[]> instanceLocalDirectories = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase); 606Dictionary<string, FileState> oldFileStateCache = instanceLocalOutgoingFileStateCache;
TaskParameter.cs (2)
562private Dictionary<string, string> _customEscapedMetadata = null; 580_customEscapedMetadata = nonGenericEscapedMetadata as Dictionary<string, string>;
Tracing.cs (1)
28private static readonly Dictionary<string, int> s_counts;
TranslatorHelpers.cs (9)
89ref Dictionary<string, T> dictionary, 98ref Dictionary<string, string> dictionary, 107dictionary = (Dictionary<string, string>)localDict; 112ref Dictionary<string, T> dictionary, 124dictionary = (Dictionary<string, T>)localDict; 129ref Dictionary<string, string> dictionary, 140dictionary = (Dictionary<string, string>)localDict; 145ref Dictionary<string, T> dictionary, 157dictionary = (Dictionary<string, T>)localDict;
WriteCodeFragment.cs (1)
305Dictionary<string, ParameterType> parameterTypes = null;
Microsoft.Build.Tasks.UnitTests (30)
AssemblyDependency\ResolveAssemblyReferenceCacheSerialization.cs (5)
102Dictionary<string, SystemState.FileState> cache = new() { 129Dictionary<string, SystemState.FileState> cache2 = sysState2.instanceLocalFileStateCache; 145Dictionary<string, SystemState.FileState> cache = new() { 166Dictionary<string, SystemState.FileState> cache2 = sysState2.instanceLocalFileStateCache; 174Dictionary<string, SystemState.FileState> cache = new() {
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (2)
49internal static Dictionary<string, int> uniqueFileExists = null; 50internal static Dictionary<string, int> uniqueGetAssemblyName = null;
AssignTargetPath_Tests.cs (1)
94Dictionary<string, string> metaData = new Dictionary<string, string>();
FindInvalidProjectReferences_Tests.cs (4)
28Dictionary<string, string> proj1 = new Dictionary<string, string>(); 31Dictionary<string, string> proj2 = new Dictionary<string, string>(); 34Dictionary<string, string> proj3 = new Dictionary<string, string>(); 37Dictionary<string, string> proj4 = new Dictionary<string, string>();
GetInstalledSDKLocations_Tests.cs (3)
288Dictionary<string, string> sdksAndVersions = new Dictionary<string, string>(); 335Dictionary<string, string> extensionSDKs = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 409Dictionary<string, string> extensionSDKs = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
GetSDKReference_Tests.cs (2)
265Dictionary<string, GetSDKReferenceFiles.SdkReferenceInfo> pathToReferenceMetadata = new(); 268Dictionary<string, List<string>> directoryToFileList = new();
MockUnmanagedMemoryHelper.cs (1)
25private Dictionary<IntPtr, List<IntPtr>> _dependentAllocations = new Dictionary<IntPtr, List<IntPtr>>();
PropertyParser_Tests.cs (10)
17Assert.True(PropertyParser.GetTable(null, "Properties", null, out Dictionary<string, string> propertiesTable)); 29new[] { "Configuration=Debug" }, out Dictionary<string, string> propertiesTable)); 46new[] { "Configuration=Debug", "Platform=AnyCPU", "VBL=Lab22Dev" }, out Dictionary<string, string> propertiesTable)); 67new[] { "Configuration = Debug", "Platform \t= AnyCPU" }, out Dictionary<string, string> propertiesTable)); 86new[] { "Configuration=", "Platform = " }, out Dictionary<string, string> propertiesTable)); 124new[] { "DependsOn = Clean; Build" }, out Dictionary<string, string> propertiesTable)); 141new[] { "Depends On = CleanBuild" }, out Dictionary<string, string> propertiesTable)); 156new[] { "Configuration = Debug", "Platform = Any CPU" }, out Dictionary<string, string> propertiesTable)); 173new[] { "WarningsAsErrors = 1234", "5678", "9999", "Configuration=Debug" }, out Dictionary<string, string> propertiesTable)); 190new[] { @"OutDir=c:\Rajeev;s Stuff\binaries", "Configuration=Debug" }, out Dictionary<string, string> propertiesTable));
ResolveSDKReference_Tests.cs (1)
332Dictionary<string, string> dict = new Dictionary<string, string>();
ResourceHandling\GenerateResource_Tests.cs (1)
3634Dictionary<string, object> valuesFromResource = new Dictionary<string, object>();
Microsoft.Build.UnitTests.Shared (30)
MockEngine.cs (3)
61public Dictionary<string, string> GlobalProperties { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 260var finalGlobalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 329Dictionary<string, string> finalGlobalProperties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ObjectModelHelpers.cs (18)
120public static void AssertItemEvaluationFromProject([StringSyntax(StringSyntaxAttribute.Xml)] string projectContents, string[] inputFiles, string[] expectedInclude, Dictionary<string, string>[] expectedMetadataPerItem = null, bool normalizeSlashes = false, bool makeExpectedIncludeAbsolute = false) 137public static void AssertItemEvaluationFromGenericItemEvaluator(Func<string, ProjectCollection, IList<ITestItem>> itemEvaluator, [StringSyntax(StringSyntaxAttribute.Xml)] string projectContents, string[] inputFiles, string[] expectedInclude, bool makeExpectedIncludeAbsolute = false, Dictionary<string, string>[] expectedMetadataPerItem = null, bool normalizeSlashes = false) 246public static void AssertItems(string[] expectedItems, ICollection<ProjectItem> items, Dictionary<string, string> expectedDirectMetadata = null, bool normalizeSlashes = false) 255public static void AssertItems(string[] expectedItems, IList<ITestItem> items, Dictionary<string, string> expectedDirectMetadata = null, bool normalizeSlashes = false) 263var metadata = new Dictionary<string, string>[expectedItems.Length]; 273public static void AssertItems(string[] expectedItems, IList<ProjectItem> items, Dictionary<string, string>[] expectedDirectMetadataPerItem, bool normalizeSlashes = false) 279public static void AssertItems(string[] expectedItems, IList<ITestItem> items, Dictionary<string, string>[] expectedDirectMetadataPerItem, bool normalizeSlashes = false) 456public static void AssertItemHasMetadata(Dictionary<string, string> expected, ProjectItem item) 467public static void AssertItemHasMetadata(Dictionary<string, string> expected, ITestItem item) 1228public static Dictionary<string, V> MakeDictionary<V>(IEnumerable<KeyValuePair<string, V>> enumerable) 1230Dictionary<string, V> dictionary = new Dictionary<string, V>(StringComparer.OrdinalIgnoreCase); 1343public static MockLogger BuildProjectWithNewOMExpectSuccess(string content, Dictionary<string, string> globalProperties = null, MockLogger logger = null, bool enableTargetOutputLogging = false) 1354private static void BuildProjectWithNewOM([StringSyntax(StringSyntaxAttribute.Xml)] string content, ref MockLogger logger, out bool result, bool allowTaskCrash, Dictionary<string, string> globalProperties = null, bool enableTargetOutputLogging = false) 1700Dictionary<string, string[]> projectReferenceTargets = null, 1708Dictionary<string, string[]> projectReferenceTargets = null, 1767var nodes = new Dictionary<int, (bool IsRoot, string ProjectPath)>(); 2108Dictionary<string, string> globalProperties = null) 2117Dictionary<string, string> globalProperties = null)
TestEnvironment.cs (9)
20using TempPaths = System.Collections.Generic.Dictionary<string, string>; 593private readonly TempPaths _oldtempPaths; 605private static TempPaths SetTempPath(string tempPath) 607var oldTempPaths = GetTempPaths(); 617private static TempPaths SetTempPaths(TempPaths tempPaths) 619var oldTempPaths = GetTempPaths(); 629private static TempPaths GetTempPaths() 631var tempPaths = new TempPaths
Microsoft.Build.Utilities.Core (83)
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
FileMatcher.cs (2)
825Dictionary<string, List<RecursionState>> searchesToExcludeInSubdirs, 2416Dictionary<string, List<RecursionState>>? searchesToExcludeInSubdirs = null;
MuxLogger.cs (2)
58private readonly Dictionary<int, SubmissionRecord> _submissionRecords = new Dictionary<int, SubmissionRecord>(); 93private readonly Dictionary<int, int> _submissionProjectsInProgress = new Dictionary<int, int>();
ReadOnlyEmptyDictionary.cs (1)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>();
TargetPlatformSDK.cs (2)
118internal Dictionary<string, string> ExtensionSDKs { get; } 123internal Dictionary<string, string> Platforms { get; }
ToolLocationHelper.cs (16)
216private static Dictionary<string, string> s_chainedReferenceAssemblyPath; 226private static Dictionary<string, IList<string>> s_cachedReferenceAssemblyPaths; 232private static Dictionary<string, FrameworkNameVersioning> s_cachedHighestFrameworkNameForTargetFrameworkIdentifier; 237private static Dictionary<string, IEnumerable<TargetPlatformSDK>> s_cachedTargetPlatforms; 242private static Dictionary<string, TargetPlatformSDK> s_cachedExtensionSdks; 249private static Dictionary<string, string> s_cachedTargetFrameworkDisplayNames; 257private static Dictionary<string, string[]> s_cachedTargetPlatformReferences; 262private static Dictionary<string, string[]> s_cachedExtensionSdkReferences; 272private static Dictionary<string, string[]> s_vsInstallFolders; 403var extensionSDKs = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 449var extensionSDKsAndVersions = new Dictionary<string, Tuple<string, string>>(StringComparer.OrdinalIgnoreCase); 623var filteredExtensionSdks = new Dictionary<string, string>(); 2465var monikers = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 2578internal static void GatherSDKListFromDirectory(List<string> diskroots, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformSDKs) 2672internal static void GatherSDKsFromRegistryImpl(Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers, string registryKeyRoot, RegistryView registryView, RegistryHive registryHive, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, OpenBaseKey openBaseKey, FileExists fileExists) 2863private static void GatherSDKListFromRegistry(string registryRoot, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers)
ToolsetElement.cs (3)
171private Dictionary<string, string> _previouslySeenOS = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 346private Dictionary<string, string> _previouslySeenPropertyNames = new Dictionary<string, string>(MSBuildNameIgnoreCaseComparer.Default); 525private Dictionary<string, string> _previouslySeenToolsVersions = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ToolTask.cs (3)
282protected virtual Dictionary<string, string> EnvironmentOverride => null; 672Dictionary<string, string> envOverrides = EnvironmentOverride; 1521Dictionary<string, string> envOverrides = EnvironmentOverride;
Tracing.cs (1)
28private static readonly Dictionary<string, int> s_counts;
TrackedDependencies\CanonicalTrackedInputFiles.cs (22)
65public Dictionary<string, Dictionary<string, string>> DependencyTable { get; private set; } 172DependencyTable = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); 343var sourcesNeedingCompilation = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase); 426private void SourceDependenciesForOutputRoot(Dictionary<string, ITaskItem> sourceDependencies, string sourceKey, ITaskItem[] filesToIgnore) 430if (DependencyTable.TryGetValue(sourceKey, out Dictionary<string, string> dependencies)) 468bool dependenciesAvailable = DependencyTable.TryGetValue(sourceFullPath, out Dictionary<string, string> dependencies); 476if (_outputs.DependencyTable.TryGetValue(sourceFullPath, out Dictionary<string, DateTime> outputFiles)) 624DependencyTable = (Dictionary<string, Dictionary<string, string>>)cachedEntry.DependencyTable; 682Dictionary<string, string> dependencies; 683Dictionary<string, string> primaryFiles; 834DependencyTable = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase); 887foreach (KeyValuePair<string, Dictionary<string, string>> dependency in DependencyTable) 892Dictionary<string, string> dependencies = dependency.Value; 910foreach (KeyValuePair<string, Dictionary<string, string>> dependency in DependencyTable) 912Dictionary<string, string> dependencies = dependency.Value; 991if (DependencyTable.TryGetValue(rootingMarker, out Dictionary<string, string> dependencies)) 1028Dictionary<string, bool> fileCache = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase); 1055private void RemoveDependenciesFromEntryIfMissing(string rootingMarker, Dictionary<string, bool> fileCache) 1059if (DependencyTable.TryGetValue(rootingMarker, out Dictionary<string, string> dependencies)) 1061var dependenciesWithoutMissingFiles = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
TrackedDependencies\CanonicalTrackedOutputFiles.cs (27)
39public Dictionary<string, Dictionary<string, DateTime>> DependencyTable { get; private set; } 85DependencyTable = new Dictionary<string, Dictionary<string, DateTime>>(StringComparer.OrdinalIgnoreCase); 138DependencyTable = (Dictionary<string, Dictionary<string, DateTime>>)cachedEntry.DependencyTable; 185if (!DependencyTable.TryGetValue(tlogEntry, out Dictionary<string, DateTime> dependencies)) 250DependencyTable = new Dictionary<string, Dictionary<string, DateTime>>(StringComparer.OrdinalIgnoreCase); 280if (DependencyTable.TryGetValue(currentRoot, out Dictionary<string, DateTime> currentOutputs)) 285foreach (KeyValuePair<string, Dictionary<string, DateTime>> root in DependencyTable) 319if (DependencyTable.TryGetValue(sourceRoot, out var outputPaths)) 344var outputs = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase); 416var outputs = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase); 476private void OutputsForSourceRoot(Dictionary<string, ITaskItem> outputs, string sourceKey) 478if (DependencyTable.TryGetValue(sourceKey, out Dictionary<string, DateTime> dependencies)) 498Dictionary<string, DateTime> dependencies = GetSourceKeyOutputs(sourceKey); 509Dictionary<string, DateTime> dependencies = GetSourceKeyOutputs(sourceKey); 523Dictionary<string, DateTime> dependencies = GetSourceKeyOutputs(sourceKey); 535private Dictionary<string, DateTime> GetSourceKeyOutputs(string sourceKey) 537if (!DependencyTable.TryGetValue(sourceKey, out Dictionary<string, DateTime> dependencies)) 550private static void AddOutput(Dictionary<string, DateTime> dependencies, string computedOutput) 597foreach (KeyValuePair<string, Dictionary<string, DateTime>> kvp in DependencyTable) 600Dictionary<string, DateTime> dependencies = kvp.Value; 685if (DependencyTable.TryGetValue(rootingMarker, out Dictionary<string, DateTime> dependencies)) 722Dictionary<string, bool> fileCache = new Dictionary<string, bool>(StringComparer.OrdinalIgnoreCase); 749private void RemoveDependenciesFromEntryIfMissing(string rootingMarker, Dictionary<string, bool> fileCache) 753if (DependencyTable.TryGetValue(rootingMarker, out Dictionary<string, DateTime> dependencies)) 755var dependenciesWithoutMissingFiles = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase);
TrackedDependencies\DependencyTableCache.cs (1)
31internal static Dictionary<string, DependencyTableCacheEntry> DependencyTable { get; } = new Dictionary<string, DependencyTableCacheEntry>(StringComparer.OrdinalIgnoreCase);
TrackedDependencies\FlatTrackingData.cs (2)
67internal Dictionary<string, DateTime> DependencyTable { get; private set; } = new Dictionary<string, DateTime>(StringComparer.OrdinalIgnoreCase); 381DependencyTable = (Dictionary<string, DateTime>)cachedEntry.DependencyTable;
Microsoft.Build.Utilities.UnitTests (6)
TaskItem_Tests.cs (1)
329Dictionary<string, string> metadata = new()
ToolLocationHelper_Tests.cs (5)
3080var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3092var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3107var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3788var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 4057var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
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 (240)
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; 96private Dictionary<ILocalSymbolInternal, LocalDefinition> LocalMap 100var 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)
250private Dictionary<SyntaxTree, ImmutableHashSet<ISymbol>>? _lazyGeneratedCodeSymbolsForTreeMap; 255private Dictionary<SyntaxTree, ImmutableHashSet<ISymbol>> GeneratedCodeSymbolsForTreeMap
DiagnosticAnalyzer\AnalyzerExecutor.cs (3)
63private readonly Dictionary<DiagnosticAnalyzer, AnalyzerOptions>? _analyzerToCachedOptions; 194var map = new Dictionary<DiagnosticAnalyzer, AnalyzerOptions>( 201var optionsProviderToOptions = new Dictionary<AnalyzerConfigOptionsProvider, AnalyzerOptions>(ReferenceEqualityComparer.Instance);
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>(); 248var declaratorToIndex = new Dictionary<SyntaxNode, int>(); 557var hoistedLocals = new Dictionary<EncHoistedLocalInfo, int>(); 558var awaiters = new Dictionary<Cci.ITypeReference, int>(Cci.SymbolEquivalentEqualityComparer.Instance);
Emit\EditAndContinue\DeletedSourceDefinition.cs (2)
18private readonly Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> _typesUsedByDeletedMembers; 29protected DeletedSourceDefinition(T oldDefinition, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers, ICustomAttribute? deletedAttribute)
Emit\EditAndContinue\DeletedSourceEventDefinition.cs (1)
17public DeletedSourceEventDefinition(IEventDefinition oldEvent, EventDefinitionHandle handle, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers, ICustomAttribute? deletedAttribute)
Emit\EditAndContinue\DeletedSourceGenericParameter.cs (1)
17public DeletedSourceGenericParameter(IGenericMethodParameter oldParameter, DeletedSourceMethodDefinition method, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers)
Emit\EditAndContinue\DeletedSourceMethodDefinition.cs (1)
20public DeletedSourceMethodDefinition(IMethodDefinition oldMethod, MethodDefinitionHandle handle, ImmutableArray<byte> bodyIL, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers, ICustomAttribute? deletedAttribute)
Emit\EditAndContinue\DeletedSourceParameterDefinition.cs (1)
16public DeletedSourceParameterDefinition(IParameterDefinition oldParameter, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers)
Emit\EditAndContinue\DeletedSourcePropertyDefinition.cs (1)
19public DeletedSourcePropertyDefinition(IPropertyDefinition oldProperty, PropertyDefinitionHandle handle, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers, ICustomAttribute? deletedAttribute)
Emit\EditAndContinue\DeletedSourceTypeDefinition.cs (1)
19public DeletedSourceTypeDefinition(ITypeDefinition oldDefinition, Dictionary<ITypeDefinition, DeletedSourceTypeDefinition> typesUsedByDeletedMembers)
Emit\EditAndContinue\DeltaMetadataWriter.cs (15)
35private readonly Dictionary<ITypeDefinition, ImmutableArray<ITypeDefinitionMember>> _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>(); 208var generationOrdinals = CreateDictionary(_previousGeneration.GenerationOrdinals, SymbolEquivalentEqualityComparer.Instance); 250private static Dictionary<K, V> CreateDictionary<K, V>(IReadOnlyDictionary<K, V> dictionary, IEqualityComparer<K>? comparer) 253var result = new Dictionary<K, V>(comparer); 275var result = CreateDictionary(previous, comparer); 508var result = new Dictionary<ITypeDefinition, ArrayBuilder<ITypeDefinitionMember>>(ReferenceEqualityComparer.Instance); 509var typesUsedByDeletedMembers = new Dictionary<ITypeDefinition, DeletedSourceTypeDefinition>(ReferenceEqualityComparer.Instance); 1494protected readonly Dictionary<T, int> added; // Definitions added in this generation. 1588private 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)
357var changesBuilder = new Dictionary<ISymbolInternal, SymbolChange>(); 358var updatedMethodsBuilder = new Dictionary<INamedTypeSymbolInternal, ArrayBuilder<(IMethodSymbolInternal oldMethod, IMethodSymbolInternal newMethod)>>(); 360var lazyDeletedMembersBuilder = (Dictionary<ISymbolInternal, ArrayBuilder<ISymbolInternal>>?)null; 478private static void AddContainingSymbolChanges(Dictionary<ISymbolInternal, SymbolChange> changes, ISymbolInternal symbol)
Emit\EditAndContinue\SymbolMatcher.cs (2)
78var result = new Dictionary<K, V>(Cci.SymbolEquivalentEqualityComparer.Instance); 97var 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; 279public 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) 3813var caseInsensitiveMap = new Dictionary<string, (string OriginalName, int FirstIndex, int SecondIndex)>(StringComparer.OrdinalIgnoreCase); 3836Dictionary<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); 4268private readonly Dictionary<T, int> _index; 4275private HeapOrReferenceIndex(MetadataWriter writer, Dictionary<T, int> index, int lastRowId) 4295private readonly Dictionary<ITypeReference, int> _index; 4302private TypeReferenceIndex(MetadataWriter writer, Dictionary<ITypeReference, int> index, int lastRowId) 4322private readonly Dictionary<T, int> _instanceIndex; 4323private 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)
86private 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
WellKnownTypes.cs (1)
707private 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)
146var 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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
32var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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 (10)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
81var typeToNameSegments = new Dictionary<ITypeSymbol, ImmutableArray<string>>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
174var 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\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
468var mapping = capturedMethodTypeParameters.ToDictionary(tp => tp,
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (1)
48if (!_helpers.TryGetOrComputePreferredOrder(option.Value, out var preferredOrder))
src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
288var canEditMap = new Dictionary<DocumentId, bool>();
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.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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.CSharp (216)
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)
817Dictionary<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)
237gatherConstraintsAndEvaluations(targetNode, shortestPathToNode, out var constraints, out var evaluations); 260gatherConstraintsAndEvaluations(targetNode, currentPathToNode, out var constraints, out var evaluations); 285out Dictionary<BoundDagTemp, ArrayBuilder<(BoundDagTest, bool)>> constraints, 286out Dictionary<BoundDagTemp, ArrayBuilder<BoundDagEvaluation>> evaluations) 333Dictionary<BoundDagTemp, ArrayBuilder<(BoundDagTest test, bool sense)>> constraintMap, 334Dictionary<BoundDagTemp, ArrayBuilder<BoundDagEvaluation>> evaluationMap, 351static ImmutableArray<T> getArray<T>(Dictionary<BoundDagTemp, ArrayBuilder<T>> map, BoundDagTemp temp) 573var properties = new Dictionary<Symbol, string>();
Binder\RefSafetyAnalysis.cs (2)
64private Dictionary<LocalSymbol, (SafeContext RefEscapeScope, SafeContext ValEscapeScope)>? _localEscapeScopes; 65private Dictionary<BoundValuePlaceholderBase, SafeContextAndLocation>? _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, 4423Dictionary<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)
200Dictionary<SyntaxNode, LabelSymbol> labelsByNode = LabelsByNode;
Binder\TypeofBinder.cs (1)
25private readonly Dictionary<GenericNameSyntax, bool> _allowedMap;
BoundTree\BoundNode_Source.cs (1)
25void appendSourceCore(BoundNode node, int indent, Dictionary<SynthesizedLocal, int> tempIdentifiers)
CodeGen\EmitStatement.cs (2)
1967private Dictionary<LabelSymbol, GeneratedLabelSymbol> _labelClones; 2038var 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, 2041private readonly Dictionary<LocalSymbol, LocalDefUseInfo> _info; 2043private StackOptimizerPass2(Dictionary<LocalSymbol, LocalDefUseInfo> info) 2048public static BoundStatement Rewrite(BoundStatement src, Dictionary<LocalSymbol, LocalDefUseInfo> info)
CommandLine\CSharpCommandLineParser.cs (5)
121var diagnosticOptions = new Dictionary<string, ReportDiagnostic>(); 122var noWarns = new Dictionary<string, ReportDiagnostic>(); 123var warnAsErrors = new Dictionary<string, ReportDiagnostic>(); 2140private static void AddWarnings(Dictionary<string, ReportDiagnostic> d, ReportDiagnostic kind, ReadOnlyMemory<char> warningArgument) 2185private 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\EditAndContinue\CSharpSymbolMatcher.cs (1)
819var result = members.ToDictionary(s => s.MetadataName, StringOrdinalComparer.Instance);
Emitter\Model\PEModuleBuilder.cs (2)
50private Dictionary<FieldSymbol, NamedTypeSymbol> _fixedImplementationTypes; 718var 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)
8406Dictionary<TypeParameterSymbol, int>? ordinals = definition.MakeAdjustedTypeParameterOrdinalsIfNeeded(typeParameters);
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (6)
292var proxyLabels = frame.proxyLabels; 833private Dictionary<BoundTryStatement, HashSet<LabelSymbol>> _labelsInInterestingTry; 893var labelsInInterestingTry = _labelsInInterestingTry; 999public Dictionary<LabelSymbol, LabelSymbol> proxyLabels; 1038var proxyLabels = this.proxyLabels; 1113private readonly Dictionary<LocalSymbol, LocalSymbol> _hoistedLocals;
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (2)
61private readonly Dictionary<TypeSymbol, FieldSymbol> _awaiterFields; 64private readonly Dictionary<BoundValuePlaceholderBase, BoundExpression> _placeholderMap;
Lowering\AsyncRewriter\RuntimeAsyncRewriter.cs (2)
74private readonly Dictionary<BoundAwaitableValuePlaceholder, BoundExpression> _placeholderMap; 78private readonly Dictionary<Symbol, CapturedSymbolReplacement> _proxies = [];
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (2)
24private readonly Dictionary<LocalSymbol, LocalSymbol> localMap = new Dictionary<LocalSymbol, LocalSymbol>(); 27private readonly Dictionary<BoundValuePlaceholderBase, BoundValuePlaceholderBase> _placeholderMap = new Dictionary<BoundValuePlaceholderBase, BoundValuePlaceholderBase>();
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 (2)
24private Dictionary<Symbol, DelegateCacheContainer>? _genericCacheContainers; 107var containers = _genericCacheContainers ??= new Dictionary<Symbol, DelegateCacheContainer>(ReferenceEqualityComparer.Instance);
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)
44private 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; 731var oldDispatches = _dispatches;
Lowering\StateMachineRewriter\RefInitializationHoister.cs (1)
61Dictionary<Symbol, CapturedSymbolReplacement> proxies,
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)
151internal static Dictionary<TypeParameterSymbol, int>? MakeAdjustedTypeParameterOrdinalsIfNeeded<TMember>(this TMember member, ImmutableArray<TypeParameterSymbol> originalTypeParameters) 156Dictionary<TypeParameterSymbol, int>? ordinals = null;
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
481Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>> typesDict)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (13)
33private static readonly Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>> s_emptyNestedTypes = 61private Dictionary<string, ImmutableArray<Symbol>> _lazyMembersByName; 67private Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>> _lazyNestedTypes; 1700Dictionary<string, ImmutableArray<Symbol>> membersDict = GroupByName(members); 1702var exchangeResult = Interlocked.CompareExchange(ref _lazyMembersByName, membersDict, null); 1813var typesDict = GroupByName(types); 1815var exchangeResult = Interlocked.CompareExchange(ref _lazyNestedTypes, typesDict, null); 1829var exchangeResult = Interlocked.CompareExchange(ref _lazyNestedTypes, GroupByName(groupingNestedTypes), null); 2390private void CreateProperties(Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, ArrayBuilder<Symbol> members) 2429Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, 2468private PEMethodSymbol GetAccessorMethod(PEModule module, Dictionary<MethodDefinitionHandle, PEMethodSymbol> methodHandleToSymbol, TypeDefinitionHandle typeDef, MethodDefinitionHandle methodDef) 2481private static Dictionary<string, ImmutableArray<Symbol>> GroupByName(ArrayBuilder<Symbol> symbols) 2486private static Dictionary<ReadOnlyMemory<char>, ImmutableArray<PENamedTypeSymbol>> GroupByName(ArrayBuilder<PENamedTypeSymbol> symbols)
Symbols\Metadata\PE\PENamespaceSymbol.cs (7)
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; 315var typesDict = children.ToDictionary(c => c.Name.AsMemory(), ReadOnlyMemoryOfCharComparer.Instance); 323var original = Interlocked.CompareExchange(ref this.lazyTypes, typesDict, 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\ExtensionGroupingInfo.cs (2)
31var groupingMap = new Dictionary<string, MultiDictionary<string, SourceNamedTypeSymbol>>(EqualityComparer<string>.Default); 330var counts = new Dictionary<CSharpAttributeData, int>(comparer);
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; 1321private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>> GetTypeMembersDictionary() 1339private Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>> MakeTypeMembers(BindingDiagnosticBag diagnostics) 1342var conflictDict = new Dictionary<(string name, int arity, SyntaxTree? syntaxTree), SourceNamedTypeSymbol>(); 1617private Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> GetEarlyAttributeDecodingMembersDictionary() 1621if (Volatile.Read(ref _lazyMembersDictionary) is Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> result) 1631Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName; 1654private static Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> ToNameKeyedDictionary(ImmutableArray<Symbol> symbols) 1679var dictionary = new Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>(accumulator.Count, ReadOnlyMemoryOfCharComparer.Instance); 1806protected Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> GetMembersByName() 1816private Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> GetMembersByNameSlow() 1820var membersDictionary = MakeAllMembers(); 2009Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>>? typesByName, 2010Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2018var methodsBySignature = new Dictionary<MethodSymbol, MethodSymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2019var conversionsAsMethods = new Dictionary<MethodSymbol, MethodSymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2267BindingDiagnosticBag diagnostics, Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName) 2272var indexersBySignature = new Dictionary<PropertySymbol, PropertySymbol>(MemberSignatureComparer.DuplicateSourceComparer); 2336Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2337Dictionary<PropertySymbol, PropertySymbol> indexersBySignature, 2406Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2407Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>>? typesByName, 2423Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>? membersByName; 2435static (Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>? membersByName, ImmutableArray<Symbol> membersUnordered) mergeMembersInGroup(IGrouping<string, NamedTypeSymbol> grouping) 2437Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>>? membersByName = null; 2445Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByNameToMerge = ((SourceMemberContainerTypeSymbol)extension).GetMembersByName(); 2564Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2716Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2758Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2797Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 2974var instanceMap = new Dictionary<NamedTypeSymbol, NamedTypeSymbol>(ReferenceEqualityComparer.Instance); 3006private static bool InfiniteFlatteningGraph(SourceMemberContainerTypeSymbol top, NamedTypeSymbol t, Dictionary<NamedTypeSymbol, NamedTypeSymbol> instanceMap) 3124private Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> MakeAllMembers() 3126Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName; 3148Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 3149Dictionary<ReadOnlyMemory<char>, ImmutableArray<NamedTypeSymbol>> typesByName) 3968Dictionary<ReadOnlyMemory<char>, object> membersByName, 3973var membersBySignature = new Dictionary<Symbol, Symbol>(MemberSignatureComparer.PartialMethodsComparer); 4350Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> membersByName, 4401Dictionary<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();
Utilities\FirstAmongEqualsSet.cs (1)
42private readonly Dictionary<T, T> _dictionary;
Microsoft.CodeAnalysis.CSharp.CodeStyle (21)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
133Dictionary<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 (16)
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 (3)
61var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false); 75private static async Task<Dictionary<int, int>?> GetModifierOrderAsync(Document document, CancellationToken cancellationToken) 79CSharpOrderModifiersHelper.Instance.TryGetOrComputePreferredOrder(modifierOrder, out var preferredOrder);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (3)
174var expandUsingDirectiveTasks = allUsingDirectives.ToDictionary( 222var namespaceDeclarationMap = namespaceDeclarations.ToDictionary( 258var 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, 2437var expectedEmbeddedMap = new Dictionary<string, string>(); 2476private static void ValidateEmbeddedSources_Portable(Dictionary<string, string> expectedEmbeddedMap, TempDirectory dir, bool isEmbeddedPdb) 2507private static void ValidateEmbeddedSources_Windows(Dictionary<string, string> expectedEmbeddedMap, TempDirectory dir) 2537private static void ValidateWrittenSources(Dictionary<string, Dictionary<string, string>> expectedFilesMap, Encoding encoding = null) 2539foreach ((var dirPath, var fileMap) in expectedFilesMap.ToArray())
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (2)
877private readonly Dictionary<string, SuppressionDescriptor> mapping = []; 884Dictionary<string, SuppressionDescriptor> mapping,
EditAndContinue\ActiveStatementTrackingServiceTests.cs (2)
81var spans1 = trackingSession.Test_GetTrackingSpans(); 108var spans5 = trackingSession.Test_GetTrackingSpans();
Formatting\CodeCleanupTests.cs (1)
825var map = new Dictionary<string, ImmutableArray<DiagnosticAnalyzer>>{
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (3)
Recommendations\FromKeywordRecommenderTests.cs (1)
196var experimentalFeatures = new System.Collections.Generic.Dictionary<string, string>(); // no experimental features to enable
Recommendations\IsKeywordRecommenderTests.cs (1)
113var 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 (32)
Attributes\AttributeTests.cs (2)
3137attrs[1].VerifyValue<object>(0, TypedConstantKind.Type, typeof(Dictionary<string, int>)); 5765var named = attr.NamedArguments.ToDictionary(e => e.Key, e => e.Value);
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)
317var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 459var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 531var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 1141var specificDiagOptions = new Dictionary<string, ReportDiagnostic>(); 1279Dictionary<string, ReportDiagnostic> specificOptions = null, 1303var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", ReportDiagnostic.Default } }; 1324var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", specificOption } }; 1347var specificOptions = new Dictionary<string, ReportDiagnostic>() { { "Test0001", specificOption } };
FlowAnalysis\FlowDiagnosticTests.cs (1)
383Dictionary<int, int> warnings = new Dictionary<int, int>();
Microsoft.CodeAnalysis.CSharp.Features (28)
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)
2489Dictionary<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,
Snippets\AbstractCSharpTypeSnippetProvider.cs (1)
61if (CSharpOrderModifiersHelper.Instance.TryGetOrComputePreferredOrder(preferredModifierOrderString, out var preferredOrder) &&
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
133Dictionary<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 (3)
61var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false); 75private static async Task<Dictionary<int, int>?> GetModifierOrderAsync(Document document, CancellationToken cancellationToken) 79CSharpOrderModifiersHelper.Instance.TryGetOrComputePreferredOrder(modifierOrder, out var preferredOrder);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (3)
174var expandUsingDirectiveTasks = allUsingDirectives.ToDictionary( 222var namespaceDeclarationMap = namespaceDeclarations.ToDictionary( 258var 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)
65private static readonly Dictionary<string, object[]> s_codeBlockSuggestions = new()
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (3)
181var implementationMap = new Dictionary<string, string> 532private static ImmutableDictionary<SyntaxNode, ImplementationDetails> BuildResult(ImmutableDictionary<SyntaxNode, ImmutableArray<ReferencedSymbol>> memberReferences, Dictionary<string, string> implementationMap) 661Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> ICopilotCodeAnalysisService.GetDocumentationCommentAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
450var experimentalFeatures = new Dictionary<string, string>(); // no experimental features to enable 499var featuresToEnable = new Dictionary<string, string>() { { feature, "enabled" } };
SimplifyTypeNames\SimplifyTypeNamesTests.cs (1)
1086var builtInTypeMap = new Dictionary<string, string>()
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.FixAllProvider.cs (1)
36Dictionary<IBlockOperation, IdentifierGenerator> scopeMap = new();
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)
11082var 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 (6)
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>();
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
315var named = attr.NamedArguments.ToDictionary(e => e.Key, e => e.Value);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Diagnostics\DiagnosticTest.cs (3)
1430var warnings = new Dictionary<string, ReportDiagnostic>(); 1825var warnings = new Dictionary<string, ReportDiagnostic>(); 2249var 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)
1596internal 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.EditorFeatures (34)
Classification\Syntactic\SyntacticClassificationTaggerProvider.ClassifiedLineCache.cs (1)
84private readonly Dictionary<Span, LinkedListNode<SpanAndClassifiedSpans>> _spanToLruNode = [];
CommentSelection\ToggleLineCommentCommandHandler.cs (1)
84var linesInSelections = selectedSpans.ToDictionary(
Copilot\RoslynProposalAdjusterProvider.cs (1)
58Dictionary<string, object?> map, string? proposalId, string providerName, bool before, TimeSpan elapsedTime)
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)
56private 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;
Logging\FunctionIdOptions.cs (1)
48var functionIdOptions = GetFunctionIds().ToDictionary(id => id, id => globalOptions.GetOption(GetOption(id)));
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)
49private static readonly ConditionalWeakTable<SolutionServices, Dictionary<string, string>> s_hostServicesToContentTypeMap = new(); 53if (!s_hostServicesToContentTypeMap.TryGetValue(workspaceServices, out var contentTypeMap)) 62private static Dictionary<string, string> CreateContentTypeMap(SolutionServices hostWorkspaceServices)
Shared\Extensions\ITextViewExtensions.AutoClosingViewProperty.cs (1)
17private readonly Dictionary<object, TProperty> _map = [];
Shared\Extensions\ITextViewExtensions.PerSubjectBufferProperty.cs (8)
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)) 139var bufferMap = _subjectBufferMap.GetOrAdd(subjectBuffer, _ => []); 145if (_subjectBufferMap.TryGetValue(subjectBuffer, out var bufferMap))
Shared\Utilities\ClassificationTypeMap.cs (1)
28private readonly Dictionary<string, IClassificationType> _identityMap;
Suggestions\SuggestedActions\EditorSuggestedAction.cs (1)
175private 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)
40private readonly Dictionary<string, ITextBuffer2> _createdTextBuffers = []; 284out var projectionBufferSpans, out var mappedSpans, out var mappedCaretLocation); 343out Dictionary<string, ImmutableArray<TextSpan>> mappedMarkupSpans, out int? mappedCaretLocation) 439out Dictionary<string, ImmutableArray<TextSpan>> mappedMarkupSpans, 442var tempMappedMarkupSpans = new Dictionary<string, PooledObjects.ArrayBuilder<TextSpan>>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (19)
CodeFixes\CodeFixServiceTests.cs (1)
594public Dictionary<string, string> Messages = [];
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
731var map = new Dictionary<string, ImmutableArray<DiagnosticAnalyzer>>() 781var map = new Dictionary<string, ImmutableArray<DiagnosticAnalyzer>>()
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); 719var expectedMap = expected.ToDictionary(entry => (entry.diagnosticId, entry.optionName), entry => entry.optionValue);
LanguageServer\VSTypeScriptHandlerTests.cs (2)
112public VSTypeScriptTestLspServer(LspTestWorkspace testWorkspace, Dictionary<string, IList<Roslyn.LanguageServer.Protocol.Location>> locations, InitializationOptions options, AbstractLspLogger logger) : base(testWorkspace, locations, options, logger) 141var locations = await GetAnnotatedLocationsAsync(testWorkspace, testWorkspace.CurrentSolution);
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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Symbols\INamedTypeSymbolExtensions.cs (3)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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 (266)
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)
505var uniqueDiagnosticToEquivalenceKeysMap = new Dictionary<Diagnostic, PooledHashSet<string?>>(); 510var diagnosticAndEquivalenceKeyToFixersMap = new Dictionary<(Diagnostic diagnostic, string? equivalenceKey), CodeFixProvider>(); 659Dictionary<Diagnostic, PooledHashSet<string?>> uniqueDiagosticToEquivalenceKeysMap, 660Dictionary<(Diagnostic diagnostic, string? equivalenceKey), CodeFixProvider> diagnosticAndEquivalenceKeyToFixersMap, 698Dictionary<Diagnostic, PooledHashSet<string?>> uniqueDiagosticToEquivalenceKeysMap, 699Dictionary<(Diagnostic diagnostic, string? equivalenceKey), CodeFixProvider> diagnosticAndEquivalenceKeyToFixersMap) 1031private 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)
121var completionProviderToIndex = GetCompletionProviderToIndex(providers); 303private static Dictionary<CompletionProvider, int> GetCompletionProviderToIndex(ConcatImmutableArray<CompletionProvider> completionProviders) 305var result = new Dictionary<CompletionProvider, int>(completionProviders.Length); 345private static readonly ObjectPool<Dictionary<string, object>> s_uniqueSourcesPool = new(factory: () => [], size: 5); 348private 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)
111private static string StringifyDictionary<TKey, TValue>(Dictionary<TKey, TValue> dictionary) where TKey : notnull where TValue : notnull
Copilot\ICopilotChangeAnalysisService.cs (12)
150private static void IncrementCount<TKey>(Dictionary<TKey, int> map, TKey key) where TKey : notnull 156private static void IncrementElapsedTime<TKey>(Dictionary<TKey, TimeSpan> map, TKey key, TimeSpan elapsed) where TKey : notnull 181var idToCount = new Dictionary<string, int>(); 182var categoryToCount = new Dictionary<string, int>(); 183var severityToCount = new Dictionary<DiagnosticSeverity, int>(); 243var diagnosticIdToCount = new Dictionary<string, int>(); 244var diagnosticIdToApplicationTime = new Dictionary<string, TimeSpan>(); 245var diagnosticIdToProviderName = new Dictionary<string, HashSet<string>>(); 246var providerNameToApplicationTime = new Dictionary<string, TimeSpan>(); 247var providerNameToHasConflict = new Dictionary<string, bool>(); 248var providerNameToTotalCount = new Dictionary<string, int>(); 249var 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)
33public static void AppendAnalyzerMap(this Dictionary<string, DiagnosticAnalyzer> analyzerMap, ImmutableArray<DiagnosticAnalyzer> analyzers)
Diagnostics\Service\DiagnosticAnalyzerService.IncrementalMemberEditAnalyzer.cs (4)
135Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 150Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 162Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder) 175Dictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>> builder)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (16)
397internal abstract void ReportTopLevelSyntacticRudeEdits(RudeEditDiagnosticsBuilder diagnostics, Match<SyntaxNode> match, Edit<SyntaxNode> edit, Dictionary<SyntaxNode, EditKind> editMap); 613var editMap = BuildEditMap(syntacticEdits); 787private void ReportTopLevelSyntacticRudeEdits(RudeEditDiagnosticsBuilder diagnostics, EditScript<SyntaxNode> syntacticEdits, Dictionary<SyntaxNode, EditKind> editMap) 795internal Dictionary<SyntaxNode, EditKind> BuildEditMap(EditScript<SyntaxNode> editScript) 797var map = new Dictionary<SyntaxNode, EditKind>(editScript.Edits.Length); 1141Dictionary<LambdaBody, LambdaInfo>? lazyActiveOrMatchedLambdas = null; 1576ref Dictionary<LambdaBody, LambdaInfo>? lazyActiveOrMatchedLambdas) 1629var map = new Dictionary<SyntaxNode, SyntaxNode>(); 1661[Out] Dictionary<LambdaBody, LambdaInfo> activeOrMatchedLambdas) 1796Dictionary<LambdaBody, LambdaInfo> lambdaInfos) 2677public readonly Dictionary<SyntaxNode, SyntaxMaps> ChangedDeclarations = []; 3663Dictionary<INamedTypeSymbol, MemberInitializationUpdates> constructorEdits; 6390private static void BuildIndex(Dictionary<VariableCaptureKey, int> index, ImmutableArray<VariableCapture> array) 6519[Out] Dictionary<SyntaxNode, RudeEditDiagnostic> closureRudeEdits, 7181internal void ReportTopLevelSyntacticRudeEdits(RudeEditDiagnosticsBuilder diagnostics, EditScript<SyntaxNode> syntacticEdits, Dictionary<SyntaxNode, EditKind> editMap) 7187ref Dictionary<LambdaBody, LambdaInfo>? lazyActiveOrMatchedLambdas)
EditAndContinue\CommittedSolution.cs (1)
107private readonly Dictionary<DocumentId, DocumentState> _documentState = [];
EditAndContinue\DebuggingSession.cs (2)
77private readonly Dictionary<ProjectId, ImmutableList<ProjectBaseline>> _projectBaselines = []; 78private 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)
873var mergedUpdateEditSyntaxMaps = new Dictionary<SymbolKey, (Func<SyntaxNode, SyntaxNode?>? matchingNodes, Func<SyntaxNode, RuntimeRudeEdit?>? runtimeRudeEdits)>(symbolKeyComparer); 1065var 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.cs (2)
300var oldProjectSourceGeneratedDocumentsById = oldProjectSourceGeneratedDocuments.ToDictionary(static document => document.Id); 302var newProjectSourceGeneratedDocumentsById = newProjectSourceGeneratedDocuments.ToDictionary(static document => document.Id);
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)
69private readonly Dictionary<SymbolGroup, DefinitionItem> _definitionToItem = [];
FindUsages\IRemoteFindUsagesService.cs (1)
91private readonly Dictionary<int, DefinitionItem> _idToDefinition = [];
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (1)
359var renameTable = new Dictionary<ISymbol, string>();
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (4)
156var methodCallSites = await FindCallSitesAsync(document, methodSymbol, cancellationToken).ConfigureAwait(false); 242IMethodSymbol methodSymbol, SyntaxNode containingMethod, Dictionary<Document, List<TExpressionSyntax>> methodCallSites, bool allOccurrences, IntroduceParameterCodeActionKind selectedCodeAction, 274protected static async Task<Dictionary<Document, List<TExpressionSyntax>>> FindCallSitesAsync( 277var 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 (4)
83private readonly Dictionary<SymbolDescriptionGroups, IList<SymbolDisplayPart>> _groupMap = []; 84private readonly Dictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>> _documentationMap = []; 504private Dictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>> BuildDescriptionSections() 509var result = new Dictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>(_documentationMap);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
42private readonly Dictionary<UniqueDocumentKey, MetadataAsSourceGeneratedFileInfo> _keyToInformation = [];
MetadataAsSource\TelemetryMessage.cs (1)
53private void SetLogProperties(Dictionary<string, object?> properties)
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
413var nodesToUpdate = new Dictionary<SyntaxNode, SyntaxNode>();
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)
52private 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)
174var 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\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
468var mapping = capturedMethodTypeParameters.ToDictionary(tp => tp,
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (1)
48if (!_helpers.TryGetOrComputePreferredOrder(option.Value, out var preferredOrder))
src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
288var canEditMap = new Dictionary<DocumentId, bool>();
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)
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)
540Dictionary<LambdaBody, LambdaInfo>? lazyActiveOrMatchedLambdas = null; 543var 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)
52var tagMap = new Dictionary<(int major, int minor), (int start, int end)>();
Microsoft.CodeAnalysis.Features.UnitTests (4)
EditAndContinue\ActiveStatementsMapTests.cs (3)
126var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>(); 183var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>(); 236var documentPathMap = new Dictionary<string, ImmutableArray<ActiveStatement>>();
FindUsages\DefinitionItemFactoryTests.cs (1)
95var expressionMap = (symbols ?? []).ToDictionary(s => SymbolKey.Create(s.symbol).ToString(), s => $"{nameof(SymbolKey)}.{nameof(SymbolKey.CreateString)}({s.localName})");
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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.LanguageServer (10)
FileBasedPrograms\VirtualProjectXmlProvider.cs (1)
28private readonly Dictionary<string, ImmutableArray<SimpleDiagnostic>> _diagnosticsByFilePath = [];
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (1)
67private readonly Dictionary<string, int> _watchedFiles = new(s_stringComparer);
HostWorkspace\LanguageServerProjectLoader.cs (2)
52private readonly Dictionary<string, ProjectLoadState> _loadedProjects = []; 269Dictionary<ProjectFileInfo, ProjectLoadTelemetryReporter.TelemetryInfo> telemetryInfos = [];
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (2)
39public async Task ReportProjectLoadTelemetryAsync(Dictionary<ProjectFileInfo, TelemetryInfo> projectFileInfos, ProjectToLoad projectToLoad, CancellationToken cancellationToken) 114var 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); 248Dictionary<ImmutableArray<CharacterSetModificationRule>, string[]> currentRuleCache) 280var 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)
65Dictionary<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)
55private readonly Dictionary<Workspace, (int? forkedFromVersion, Checksum? sourceGeneratorChecksum, Solution solution)> _cachedLspSolutions = [];
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
InlayHint\AbstractInlayHintTests.cs (1)
24var expectedInlayHints = await GetAnnotatedLocationsAsync(testLspServer.TestWorkspace, testLspServer.GetCurrentSolution());
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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
Microsoft.CodeAnalysis.PublicApiAnalyzers (137)
DeclarePublicApiAnalyzer.cs (1)
391private 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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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\PerformanceQueue.cs (6)
68using var pooledMap = SharedPools.Default<Dictionary<int, string>>().GetPooledObject(); 72var reverseMap = pooledMap.Object; 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)
75private 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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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)
103var map = new Dictionary<string, ICSharpCode.Decompiler.TypeSystem.IMethod>(); 118void listMethods(ICSharpCode.Decompiler.TypeSystem.INamespace @namespace, Dictionary<string, ICSharpCode.Decompiler.TypeSystem.IMethod> result) 135void listMethodsInType(ICSharpCode.Decompiler.TypeSystem.ITypeDefinition type, Dictionary<string, ICSharpCode.Decompiler.TypeSystem.IMethod> result) 393private readonly Dictionary<string, PEReader> _readersByName; 395internal Resolver(Dictionary<string, PEReader> readersByName) 429var readersByName = new Dictionary<string, PEReader>(StringComparer.OrdinalIgnoreCase); 746Dictionary<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)
396public static Dictionary<int, string> GetSequencePointMarkers(XElement methodXml) 398var result = new Dictionary<int, string>(); 427public static Dictionary<int, string> GetSequencePointMarkers(XElement methodXml, Func<string, SourceText> getSource) 429var 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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\Extensions\ImmutableArrayExtensionsTests.cs (1)
309var dict = System.Linq.ImmutableArrayExtensions.ToDictionary(roa, s => s.Split(':').First());
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 (295)
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; 48ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, DocumentId documentId, ImmutableArray<Diagnostic> diagnostics) 93private static void AddDocumentDiagnostic(ref Dictionary<DocumentId, List<DiagnosticData>>? map, TextDocument document, Diagnostic diagnostic) 119Dictionary<DocumentId, List<DiagnosticData>>? dummy = null; 127ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, SyntaxTree? tree, Diagnostic diagnostic) 180ref Dictionary<DocumentId, List<DiagnosticData>>? lazyLocals, SyntaxTree? tree, ImmutableArray<Diagnostic> diagnostics) 186private 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)
36private static readonly ObjectPool<Dictionary<ISymbol, SymbolGroup>> s_symbolToGroupPool = new(() => new(MetadataUnifyingEquivalenceComparer.Instance)); 91using var _1 = s_symbolToGroupPool.GetPooledObject(out var symbolToGroup); 129Dictionary<ISymbol, SymbolGroup> symbolToGroup, 165ImmutableArray<ISymbol> symbols, Dictionary<ISymbol, SymbolGroup> symbolToGroup, CancellationToken cancellationToken) 177ISymbol symbol, Dictionary<ISymbol, SymbolGroup> symbolToGroup, CancellationToken cancellationToken) 220using var _2 = PooledDictionary<Document, Dictionary<ISymbol, SymbolGroup>>.GetInstance(out var documentToSymbolsWithin); 242var symbolsWithin = documentToSymbolsWithin.GetOrAdd(document, static _ => s_symbolToGroupPool.AllocateAndClear()); 270private static PooledHashSet<U>? TryGet<T, U>(Dictionary<T, PooledHashSet<U>> dictionary, T key) where T : notnull 275Dictionary<ISymbol, SymbolGroup> symbolsToSearchFor, 276Dictionary<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; 263ref 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);
Rename\ConflictEngine\ConflictingIdentifierTracker.cs (1)
16private readonly Dictionary<string, List<SyntaxToken>> _currentIdentifiersInScope = new(identifierComparer);
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
264var documentIdErrorStateLookup = new Dictionary<DocumentId, bool>(); 344var reverseMappedLocations = new Dictionary<Location, Location>();
Rename\ConflictEngine\DeclarationConflictHelpers.cs (1)
44var signatureToConflictingMember = new Dictionary<ImmutableArray<ParameterSignature>, 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)
18public 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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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)
24private Dictionary<string, string> _docComments; 68var 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)
99private readonly Dictionary<string, ImmutableArray<MetadataReferenceProperties>> _allMetadataReferences = []; 105private readonly Dictionary<DocumentId, IWatchedFile> _documentWatchedFiles = []; 134private 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 (4)
126private async Task<Dictionary<ImmutableArray<byte>, DocumentId>> ComputeContentHashToDocumentIdAsync(CancellationToken cancellationToken) 128var result = new Dictionary<ImmutableArray<byte>, DocumentId>(ImmutableArrayComparer<byte>.Instance); 160private AsyncLazy<Dictionary<ImmutableArray<byte>, DocumentId>> LazyContentHashToDocumentId 186var map = await LazyContentHashToDocumentId.GetValueAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Solution.cs (2)
32private readonly Dictionary<ProjectId, Project> _projectIdToProjectMap = []; 43private 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)
64private readonly Dictionary<ProjectId, ProjectFileInfo> _projectIdToFileInfoMap; 65private readonly Dictionary<ProjectId, List<ProjectReference>> _projectIdToProjectReferencesMap; 66private 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)
365Dictionary<string, string>? metadata = null; 404var metadata = new Dictionary<string, string>(); 478var 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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
38var environmentVariables = new Dictionary<string, string>()
NewlyCreatedProjectsFromDotNetNew.cs (1)
255Dictionary<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)
27private 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)
615var projectNameToTestHostProject = new Dictionary<string, TProject>(); 616var 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.ApiCompat.IntegrationTests (5)
Task\ValidatePackageTargetIntegrationTests.cs (5)
177Dictionary<NuGetFramework, IEnumerable<string>> references = new() 209Dictionary<NuGetFramework, IEnumerable<string>> references = new() 250Dictionary<NuGetFramework, IEnumerable<string>> references = new() 279Dictionary<NuGetFramework, IEnumerable<string>> references = new() 303Dictionary<NuGetFramework, IEnumerable<string>> references = new()
Microsoft.DotNet.ApiCompat.Task (2)
ValidatePackageTask.cs (2)
167private static Dictionary<NuGetFramework, IEnumerable<string>>? ParsePackageAssemblyReferences(ITaskItem[]? packageAssemblyReferences) 172Dictionary<NuGetFramework, IEnumerable<string>> packageAssemblyReferencesDict = new(packageAssemblyReferences.Length);
Microsoft.DotNet.ApiCompat.Tool (6)
Program.cs (6)
259Option<Dictionary<NuGetFramework, IEnumerable<string>>?> packageAssemblyReferencesOption = new("--package-assembly-references") 267Option<Dictionary<NuGetFramework, IEnumerable<string>>?> baselinePackageAssemblyReferencesOption = new("--baseline-package-assembly-references") 319Dictionary<NuGetFramework, IEnumerable<string>>? packageAssemblyReferences = parseResult.GetValue(packageAssemblyReferencesOption); 320Dictionary<NuGetFramework, IEnumerable<string>>? baselinePackageAssemblyReferences = parseResult.GetValue(baselinePackageAssemblyReferencesOption); 395private static Dictionary<NuGetFramework, IEnumerable<string>>? ParsePackageAssemblyReferenceArgument(ArgumentResult argumentResult) 399Dictionary<NuGetFramework, IEnumerable<string>> packageAssemblyReferencesDict = new(argumentResult.Tokens.Count);
Microsoft.DotNet.ApiCompatibility (10)
Mapping\AssemblyMapper.cs (4)
23private Dictionary<INamespaceSymbol, INamespaceMapper>? _namespaces; 49Dictionary<INamespaceSymbol, List<INamedTypeSymbol>> typeForwards = ResolveTypeForwards(assemblyContainer, side, Settings.SymbolEqualityComparer, setIndex); 102Dictionary<INamespaceSymbol, List<INamedTypeSymbol>> ResolveTypeForwards(ElementContainer<IAssemblySymbol> assembly, 107Dictionary<INamespaceSymbol, List<INamedTypeSymbol>> typeForwards = new(comparer);
Mapping\AssemblySetMapper.cs (1)
19private Dictionary<IAssemblySymbol, IAssemblyMapper>? _assemblies;
Mapping\NamespaceMapper.cs (1)
16private readonly Dictionary<ITypeSymbol, ITypeMapper> _types;
Mapping\TypeMapper.cs (2)
27private Dictionary<ITypeSymbol, ITypeMapper>? _nestedTypes; 28private Dictionary<ISymbol, IMemberMapper>? _members;
Rules\EnumsMustMatch.cs (2)
56Dictionary<string, IFieldSymbol> leftMembers = left.GetMembers() 60Dictionary<string, IFieldSymbol> rightMembers = right.GetMembers()
Microsoft.DotNet.ApiDiff (12)
DiffGeneratorFactory.cs (2)
92Dictionary<string, IAssemblySymbol> beforeAssemblySymbols, 93Dictionary<string, IAssemblySymbol> afterAssemblySymbols,
FileOutputDiffGenerator.cs (3)
31private readonly Dictionary<string, string> _results; 97(IAssemblySymbolLoader beforeLoader, Dictionary<string, IAssemblySymbol> beforeAssemblySymbols) = 105(IAssemblySymbolLoader afterLoader, Dictionary<string, IAssemblySymbol> afterAssemblySymbols) =
MemoryOutputDiffGenerator.cs (6)
60Dictionary<string, IAssemblySymbol> beforeAssemblySymbols, 61Dictionary<string, IAssemblySymbol> afterAssemblySymbols, 454Dictionary<string, AttributeSyntax>? beforeAttributeNodes = CollectAttributeNodes(beforeNode, beforeModel); 455Dictionary<string, AttributeSyntax>? afterAttributeNodes = CollectAttributeNodes(afterNode, afterModel); 501private Dictionary<string, AttributeSyntax> CollectAttributeNodes(MemberDeclarationSyntax? memberNode, SemanticModel? model) 510Dictionary<string, AttributeSyntax> dictionary = [];
SyntaxRewriter\PrimitiveSimplificationRewriter.cs (1)
14private static readonly Dictionary<string, SyntaxKind> s_primitives = new() {
Microsoft.DotNet.ApiDiff.Tests (18)
Diff.Base.Tests.cs (3)
38Dictionary<string, string> expected, 45(IAssemblySymbolLoader beforeLoader, Dictionary<string, IAssemblySymbol> beforeAssemblySymbols) 48(IAssemblySymbolLoader afterLoader, Dictionary<string, IAssemblySymbol> afterAssemblySymbols)
Diff.Disk.Tests.cs (13)
73private readonly Dictionary<string, string[]> DefaultBeforeAssemblyAndCodeFiles = new() { { DefaultAssemblyName, [BeforeCode] } }; 74private readonly Dictionary<string, string[]> DefaultAfterAssemblyAndCodeFiles = new() { { DefaultAssemblyName, [AfterCode] } }; 75private readonly Dictionary<string, string> DefaultExpectedAssemblyMarkdowns = new() { { DefaultAssemblyName, DefaultExpectedMarkdown } }; 184Dictionary<string, string[]> beforeAssemblyAndCodeFiles = new() 190Dictionary<string, string[]> afterAssemblyAndCodeFiles = new() 196Dictionary<string, string> expectedAssemblyMarkdowns = new() 362Dictionary<string, string[]> beforeAssemblyAndCodeFiles = new() { { DefaultAssemblyName, [beforeCode1, beforeCode2] } }; 363Dictionary<string, string[]> afterAssemblyAndCodeFiles = new() { { DefaultAssemblyName, [afterCode1, afterCode2] } }; 364Dictionary<string, string> expectedAssemblyMarkdowns = new() { { DefaultAssemblyName, expectedMarkdown } }; 456Dictionary<string, string[]> beforeAssemblyAndCodeFiles, 457Dictionary<string, string[]> afterAssemblyAndCodeFiles, 492private void WriteCodeToAssemblyInDisk(string assemblyDirectoryPath, Dictionary<string, string[]> assemblyAndCodeFiles) 525private void VerifyDiskWrite(string outputFolderPath, string tableOfContentsTitle, string expectedTableOfContents, Dictionary<string, string> expectedAssemblyMarkdowns)
TestAssemblyLoaderFactory.cs (2)
14public static (IAssemblySymbolLoader, Dictionary<string, IAssemblySymbol>) CreateFromTexts( 31Dictionary<string, IAssemblySymbol> assemblySymbols = new();
Microsoft.DotNet.ApiSymbolExtensions (4)
AssemblySymbolLoader.cs (4)
38private readonly Dictionary<string, string> _referencePathFiles = new(StringComparer.OrdinalIgnoreCase); 40private readonly Dictionary<string, MetadataReference> _loadedAssemblies; 64public static (AssemblySymbolLoader, Dictionary<string, IAssemblySymbol>) CreateFromFiles( 94Dictionary<string, IAssemblySymbol> dictionary = [];
Microsoft.DotNet.ApiSymbolExtensions.Tests (4)
AssemblySymbolLoaderTests.cs (4)
309Dictionary<string, MetadataReference> loadedAssemblies = (Dictionary<string, MetadataReference>)typeof(AssemblySymbolLoader)?.GetField("_loadedAssemblies", BindingFlags.NonPublic | BindingFlags.Instance)?.GetValue(loader); 340(AssemblySymbolLoader loader, Dictionary<string, IAssemblySymbol> symbols) = AssemblySymbolLoader.CreateFromFiles( 363(AssemblySymbolLoader loader, Dictionary<string, IAssemblySymbol> symbols) = AssemblySymbolLoader.CreateFromFiles(
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.Baselines.Tasks (3)
PRCreator.cs (3)
60Dictionary<string, HashSet<string>> parsedUpdatedFiles = ParseAndGroupUpdatedFiles(updatedFiles); 136private Dictionary<string, HashSet<string>> ParseAndGroupUpdatedFiles(List<string> updatedFiles) => 152Dictionary<string, HashSet<string>> updatedFiles,
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 (13)
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()
src\PublishArtifactsInManifestBase.cs (4)
190public readonly Dictionary<TargetFeedContentType, HashSet<TargetFeedConfig>> FeedConfigs = 193public readonly Dictionary<TargetFeedContentType, HashSet<PackageArtifactModel>> PackagesByCategory = 196public readonly Dictionary<TargetFeedContentType, HashSet<BlobArtifactModel>> BlobsByCategory = 341Dictionary<string, Asset> buildAssets = new Dictionary<string, Asset>();
src\PublishBuildToMaestro.cs (5)
262var builds = new Dictionary<int, bool>(); 263var assetCache = new Dictionary<(string name, string version, string commit), int>(); 264var buildCache = new Dictionary<int, ProductConstructionService.Client.Models.Build>(); 296Dictionary<int, ProductConstructionService.Client.Models.Build> buildCache, 297Dictionary<(string name, string version, string commit), int> assetCache,
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 (9)
src\CreateRpmPackage.cs (1)
121Dictionary<string, string> filePathToKind = RawPayloadFileKinds.Select(k => k.ItemSpec.Split(':')).ToDictionary(k => k[0], k => k[1].Trim());
src\CreateWixBuildWixpack.cs (7)
81private Dictionary<string, string> _defineConstantsDictionary; 82private Dictionary<string, string> _defineVariablesDictionary; 83private Dictionary<string, string> _systemVariablesDictionary; 452private Dictionary<string, string> GetDefineConstantsDictionary() 454var dict = new Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase); 483private Dictionary<string, string> GetSystemVariablesDictionary() 485var dict = new Dictionary<string, string>(System.StringComparer.OrdinalIgnoreCase);
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)
278Dictionary<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.Cli.Utils (13)
Command.cs (1)
14private readonly Dictionary<string, string?>? _customEnvironmentVariables =
ForwardingAppImplementation.cs (2)
22private Dictionary<string, string?> _environmentVariables; 32Dictionary<string, string?>? environmentVariables = null)
FrameworkDependencyFile.cs (1)
87var candidateMap = candidateRuntimeIdentifiers
MSBuildArgs.cs (3)
216var newRestoreProperties = new Dictionary<string, string>(RestoreGlobalProperties, StringComparer.OrdinalIgnoreCase); 263var newProperties = new Dictionary<string, string>(GlobalProperties, StringComparer.OrdinalIgnoreCase); 328var newdict = new Dictionary<string, string>(GlobalProperties, StringComparer.OrdinalIgnoreCase);
MSBuildForwardingAppWithoutLogging.cs (3)
43private readonly Dictionary<string, string?> _msbuildRequiredEnvironmentVariables = GetMSBuildRequiredEnvironmentVariables(); 154Dictionary<string, string?> savedEnvironmentVariables = []; 222internal static Dictionary<string, string?> GetMSBuildRequiredEnvironmentVariables()
TelemetryEventEntry.cs (3)
49private readonly Dictionary<string, double>? _data; 52public PerformanceMeasurement(Dictionary<string, double>? data, string name) 110var appliedProperties = Properties?.ToDictionary(p => p.Key, p => (string?)func(p.Value));
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.Configurer (2)
DotnetFirstTimeUseConfigurer.cs (2)
18private readonly Dictionary<string, double>? _performanceMeasurements; 29Dictionary<string, double>? performanceMeasurements = null,
Microsoft.DotNet.GenAPI (2)
GenAPIApp.cs (2)
34(IAssemblySymbolLoader loader, Dictionary<string, IAssemblySymbol> assemblySymbols) = AssemblySymbolLoader.CreateFromFiles( 58Dictionary<string, IAssemblySymbol> assemblySymbols,
Microsoft.DotNet.GenAPI.Tests (3)
CSharpFileBuilderTests.cs (1)
43(IAssemblySymbolLoader loader, Dictionary<string, IAssemblySymbol> assemblySymbols) = TestAssemblyLoaderFactory
TestAssemblyLoaderFactory.cs (2)
14public static (IAssemblySymbolLoader, Dictionary<string, IAssemblySymbol>) CreateFromTexts( 31Dictionary<string, IAssemblySymbol> assemblySymbols = new();
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.HotReload.Client.Tests (2)
EnvironmentUtilitiesTests.cs (2)
13var builder = new Dictionary<string, string>(); 24var builder = new Dictionary<string, string>();
Microsoft.DotNet.MSBuildSdkResolver (51)
CachingWorkloadResolver.cs (2)
162var itemsToAdd = new Dictionary<string, SdkResultItem>(); 170Dictionary<string, string> propertiesToAdd = new();
InstallStateContents.cs (1)
21public Dictionary<string, string>? Manifests { get; set; }
IWorkloadManifestProvider.cs (1)
19Dictionary<string, WorkloadSet> GetAvailableWorkloadSets();
SdkDirectoryWorkloadManifestProvider.cs (11)
23private readonly Dictionary<string, int>? _knownManifestIdsAndOrder; 130var availableWorkloadSets = GetAvailableWorkloadSets(_sdkVersionBand); 131var workloadSets80100 = GetAvailableWorkloadSets(new SdkFeatureBand("8.0.100")); 145var featureBandWorkloadSets = GetAvailableWorkloadSets(workloadSetFeatureBand); 296var manifestIdsToManifests = new Dictionary<string, ReadableWorkloadManifest>(StringComparer.OrdinalIgnoreCase); 338Dictionary<string, string> directoriesWithManifests = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 516public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() 521public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets(SdkFeatureBand workloadSetFeatureBand) 526Dictionary<string, WorkloadSet> GetAvailableWorkloadSetsInternal(SdkFeatureBand? workloadSetFeatureBand) 529Dictionary<string, WorkloadSet> availableWorkloadSets = new Dictionary<string, WorkloadSet>(); 551static void AddWorkloadSetsForFeatureBand(Dictionary<string, WorkloadSet> availableWorkloadSets, string featureBandDirectory)
TempDirectoryWorkloadManifestProvider.cs (1)
57public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadManifest.cs (6)
13internal WorkloadManifest(string id, FXVersion version, string? description, string manifestPath, Dictionary<WorkloadId, BaseWorkloadDefinition> workloads, Dictionary<WorkloadPackId, WorkloadPack> packs, Dictionary<string, FXVersion>? dependsOnManifests) 42internal Dictionary<string, FXVersion>? DependsOnManifests { get; } 48public Dictionary<WorkloadId, BaseWorkloadDefinition> Workloads { get; } 49public Dictionary<WorkloadPackId, WorkloadPack> Packs { get; }
WorkloadManifestReader.cs (14)
88Dictionary<WorkloadId, BaseWorkloadDefinition>? workloads = null; 89Dictionary<WorkloadPackId, WorkloadPack>? packs = null; 90Dictionary<string, FXVersion>? dependsOn = null; 216private static Dictionary<string, FXVersion> ReadDependsOn(ref Utf8JsonStreamReader reader) 220var dependsOn = new Dictionary<string, FXVersion>(StringComparer.OrdinalIgnoreCase); 248private static Dictionary<WorkloadId, BaseWorkloadDefinition> ReadWorkloadDefinitions(ref Utf8JsonStreamReader reader, LocalizationCatalog? localizationCatalog) 252var workloads = new Dictionary<WorkloadId, BaseWorkloadDefinition>(); 274private static Dictionary<WorkloadPackId, WorkloadPack> ReadWorkloadPacks(ref Utf8JsonStreamReader reader) 278var packs = new Dictionary<WorkloadPackId, WorkloadPack>(); 346private static Dictionary<string, string> ReadStringDictionary(ref Utf8JsonStreamReader reader) 350var dictionary = new Dictionary<string, string>(); 372private static Dictionary<string, TValue> ReadStringDictionary<TValue>(ref Utf8JsonStreamReader reader, Func<string, TValue> mapValue) 376var dictionary = new Dictionary<string, TValue>(); 506Dictionary<string, WorkloadPackId>? aliasTo = null;
WorkloadManifestReader.Localization.cs (2)
78readonly Dictionary<string, string> _catalog; 80public LocalizationCatalog(Dictionary<string, string> catalog)
WorkloadPack.cs (2)
8public WorkloadPack(WorkloadPackId id, string version, WorkloadPackKind kind, Dictionary<string, WorkloadPackId>? aliasTo) 20public Dictionary<string, WorkloadPackId>? AliasTo { get; }
WorkloadResolver.cs (7)
17private readonly Dictionary<string, (WorkloadManifest manifest, WorkloadManifestInfo info)> _manifests = new(StringComparer.OrdinalIgnoreCase); 18private readonly Dictionary<WorkloadId, (WorkloadDefinition workload, WorkloadManifest manifest)> _workloads = new(); 19private readonly Dictionary<WorkloadPackId, (WorkloadPack pack, WorkloadManifest manifest)> _packs = new(); 140Dictionary<WorkloadId, (WorkloadRedirect redirect, WorkloadManifest manifest)>? redirects = null; 780public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new(); 790public static bool TryAdd<TKey,TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue value) where TKey : notnull 807public static TValue? TryGetValue<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key)
WorkloadSet.cs (4)
12public Dictionary<ManifestId, (ManifestVersion Version, SdkFeatureBand FeatureBand)> ManifestVersions = new(); 31var manifestVersions = dictionary 115public Dictionary<string, string> ToDictionaryForJson() 117var dictionary = ManifestVersions.ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.Version + "/" + kvp.Value.FeatureBand, StringComparer.OrdinalIgnoreCase);
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.PackageInstall.Tests (5)
NuGetPackageInstallerTests.cs (2)
180var dictionary = new Dictionary<string, IReadOnlyList<string>> 201var dictionary = new Dictionary<string, IReadOnlyList<string>>
TestToolBuilder.cs (1)
205var outputDict = result.StdOut!.Split(Environment.NewLine)
ToolPackageDownloaderTests.cs (1)
894var frameworksMap = new Dictionary<PackageId, IEnumerable<NuGetFramework>>()
ToolPackageUninstallerTests.cs (1)
85var packagedShimsMap = new Dictionary<PackageId, IReadOnlyList<FilePath>>
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.PackageValidation (3)
Validators\CompatibleTFMValidator.cs (3)
18private static readonly Dictionary<NuGetFramework, HashSet<NuGetFramework>> s_packageTfmMapping = InitializeTfmMappings(); 99private static Dictionary<NuGetFramework, HashSet<NuGetFramework>> InitializeTfmMappings() 101Dictionary<NuGetFramework, HashSet<NuGetFramework>> packageTfmMapping = [];
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 (15)
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\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 (39)
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, 808var nestedParts = new Dictionary<string, ZipPart>();
src\SignTool.cs (8)
72private Dictionary<string, string> ZipMacFiles(IEnumerable<FileSignInfo> filesToSign) 74var zipPaths = new Dictionary<string, string>(); 111private void UnzipMacFiles(Dictionary<string, string> zippedOSXFiles) 155var zippedPaths = ZipMacFiles(filesToSign); 159var originalFileBackups = new Dictionary<string, string>(); 211private void CompleteDetachedSignatures(List<FileSignInfo> detachedSignatureFiles, Dictionary<string, string> originalFileBackups) 236private void PrepareDetachedSignatureFiles(List<FileSignInfo> detachedSignatureFiles, Dictionary<string, string> originalFileBackups) 247private string GenerateBuildFileContent(IEnumerable<FileSignInfo> filesToSign, Dictionary<string, string> zippedPaths, bool notarize)
src\SignToolTask.cs (12)
264var strongNameInfo = ParseStrongNameSignInfo(); 265var fileSignInfo = ParseFileSignInfo(); 266var extensionSignInfo = ParseFileExtensionSignInfo(); 267var dualCertificates = ParseAdditionalCertificateInformation(); 350private Dictionary<string, List<AdditionalCertificateInformation>> ParseAdditionalCertificateInformation() 361var map = new Dictionary<string, List<AdditionalCertificateInformation>>(StringComparer.OrdinalIgnoreCase); 470private Dictionary<string, List<SignInfo>> ParseFileExtensionSignInfo() 472var map = new Dictionary<string, List<SignInfo>>(StringComparer.OrdinalIgnoreCase); 517private Dictionary<string, List<SignInfo>> ParseStrongNameSignInfo() 519var map = new Dictionary<string, List<SignInfo>>(StringComparer.OrdinalIgnoreCase); 573private Dictionary<ExplicitCertificateKey, string> ParseFileSignInfo() 575var 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 (123)
SignToolTests.cs (123)
29private static readonly Dictionary<string, List<SignInfo>> s_fileExtensionSignInfo = new Dictionary<string, List<SignInfo>>() 52private static readonly Dictionary<string, List<SignInfo>> s_fileExtensionSignInfoWithCollisionId = 315Dictionary<string, List<SignInfo>> strongNameSignInfo, 316Dictionary<ExplicitCertificateKey, string> fileSignInfo, 317Dictionary<string, List<SignInfo>> extensionsSignInfo, 319Dictionary<string, List<AdditionalCertificateInformation>> additionalCertificateInfo = null, 395Dictionary<string, List<SignInfo>> strongNameSignInfo, 396Dictionary<ExplicitCertificateKey, string> fileSignInfo, 397Dictionary<string, List<SignInfo>> extensionsSignInfo, 400Dictionary<string, List<AdditionalCertificateInformation>> additionalCertificateInfo = null, 550var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 552var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 628var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 634var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 663var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 669var fileSignInfo = new Dictionary<ExplicitCertificateKey, string> 696var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 702var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 717var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 723var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 741var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 747var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 765var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 771var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 793var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 799var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 826var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 832var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 868var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 874var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 908var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 914var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 936var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 943var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 974var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 979var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 996var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1001var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1021var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() { }; 1022var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 1043var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() { }; 1044var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() { }; 1065var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1071var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1116var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1122var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1194var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1201var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1277var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1283var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1331var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1334var explicitCertKeys = new Dictionary<ExplicitCertificateKey, string>() 1341var additionalCertificateInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 1420var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1426var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1454var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1460var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1511var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1517var additionalCertificateInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 1527var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 1587var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1593var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1639var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1645var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1685var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1691var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1737var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1743var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1789var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 1795var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1796var tempFileExtensionSignInfo = s_fileExtensionSignInfo.Where(s => s.Key != ".symbols.nupkg").ToDictionary(e => e.Key, e => e.Value); 1843var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1846var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1887var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1890var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1915var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1918var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1958var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1961var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 1989var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 1992var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2021var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2024var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2089var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2095var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2138var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2144var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2190var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2196var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2258var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2264var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2293var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2299var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2354var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2360var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2415var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2421var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2473var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2479var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2533var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2539var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2571var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2573var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 2595var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 2598var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2850var additionalCertInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2855var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2860var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2879var additionalCertInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 2888var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2893var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2908var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2914var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2940var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2946var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>(); 2991var strongNameSignInfo = new Dictionary<string, List<SignInfo>>() 2997var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 3020var certificatesSignInfo = new Dictionary<string, List<AdditionalCertificateInformation>>() 3077var strongNameSignInfo = new Dictionary<string, List<SignInfo>>(); 3080var fileSignInfo = new Dictionary<ExplicitCertificateKey, string>() 3141var needContent = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) 3182var needContent = new Dictionary<string, (string, string[])>(StringComparer.OrdinalIgnoreCase) 3203var 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.TemplateLocator (48)
InstallStateContents.cs (1)
21public Dictionary<string, string>? Manifests { get; set; }
IWorkloadManifestProvider.cs (1)
19Dictionary<string, WorkloadSet> GetAvailableWorkloadSets();
SdkDirectoryWorkloadManifestProvider.cs (11)
23private readonly Dictionary<string, int>? _knownManifestIdsAndOrder; 130var availableWorkloadSets = GetAvailableWorkloadSets(_sdkVersionBand); 131var workloadSets80100 = GetAvailableWorkloadSets(new SdkFeatureBand("8.0.100")); 145var featureBandWorkloadSets = GetAvailableWorkloadSets(workloadSetFeatureBand); 296var manifestIdsToManifests = new Dictionary<string, ReadableWorkloadManifest>(StringComparer.OrdinalIgnoreCase); 338Dictionary<string, string> directoriesWithManifests = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 516public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() 521public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets(SdkFeatureBand workloadSetFeatureBand) 526Dictionary<string, WorkloadSet> GetAvailableWorkloadSetsInternal(SdkFeatureBand? workloadSetFeatureBand) 529Dictionary<string, WorkloadSet> availableWorkloadSets = new Dictionary<string, WorkloadSet>(); 551static void AddWorkloadSetsForFeatureBand(Dictionary<string, WorkloadSet> availableWorkloadSets, string featureBandDirectory)
TempDirectoryWorkloadManifestProvider.cs (1)
57public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadManifest.cs (6)
13internal WorkloadManifest(string id, FXVersion version, string? description, string manifestPath, Dictionary<WorkloadId, BaseWorkloadDefinition> workloads, Dictionary<WorkloadPackId, WorkloadPack> packs, Dictionary<string, FXVersion>? dependsOnManifests) 42internal Dictionary<string, FXVersion>? DependsOnManifests { get; } 48public Dictionary<WorkloadId, BaseWorkloadDefinition> Workloads { get; } 49public Dictionary<WorkloadPackId, WorkloadPack> Packs { get; }
WorkloadManifestReader.cs (14)
88Dictionary<WorkloadId, BaseWorkloadDefinition>? workloads = null; 89Dictionary<WorkloadPackId, WorkloadPack>? packs = null; 90Dictionary<string, FXVersion>? dependsOn = null; 216private static Dictionary<string, FXVersion> ReadDependsOn(ref Utf8JsonStreamReader reader) 220var dependsOn = new Dictionary<string, FXVersion>(StringComparer.OrdinalIgnoreCase); 248private static Dictionary<WorkloadId, BaseWorkloadDefinition> ReadWorkloadDefinitions(ref Utf8JsonStreamReader reader, LocalizationCatalog? localizationCatalog) 252var workloads = new Dictionary<WorkloadId, BaseWorkloadDefinition>(); 274private static Dictionary<WorkloadPackId, WorkloadPack> ReadWorkloadPacks(ref Utf8JsonStreamReader reader) 278var packs = new Dictionary<WorkloadPackId, WorkloadPack>(); 346private static Dictionary<string, string> ReadStringDictionary(ref Utf8JsonStreamReader reader) 350var dictionary = new Dictionary<string, string>(); 372private static Dictionary<string, TValue> ReadStringDictionary<TValue>(ref Utf8JsonStreamReader reader, Func<string, TValue> mapValue) 376var dictionary = new Dictionary<string, TValue>(); 506Dictionary<string, WorkloadPackId>? aliasTo = null;
WorkloadManifestReader.Localization.cs (2)
78readonly Dictionary<string, string> _catalog; 80public LocalizationCatalog(Dictionary<string, string> catalog)
WorkloadPack.cs (2)
8public WorkloadPack(WorkloadPackId id, string version, WorkloadPackKind kind, Dictionary<string, WorkloadPackId>? aliasTo) 20public Dictionary<string, WorkloadPackId>? AliasTo { get; }
WorkloadResolver.cs (6)
17private readonly Dictionary<string, (WorkloadManifest manifest, WorkloadManifestInfo info)> _manifests = new(StringComparer.OrdinalIgnoreCase); 18private readonly Dictionary<WorkloadId, (WorkloadDefinition workload, WorkloadManifest manifest)> _workloads = new(); 19private readonly Dictionary<WorkloadPackId, (WorkloadPack pack, WorkloadManifest manifest)> _packs = new(); 140Dictionary<WorkloadId, (WorkloadRedirect redirect, WorkloadManifest manifest)>? redirects = null; 780public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new(); 807public static TValue? TryGetValue<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key)
WorkloadSet.cs (4)
12public Dictionary<ManifestId, (ManifestVersion Version, SdkFeatureBand FeatureBand)> ManifestVersions = new(); 31var manifestVersions = dictionary 115public Dictionary<string, string> ToDictionaryForJson() 117var dictionary = ManifestVersions.ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.Version + "/" + kvp.Value.FeatureBand, StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.Tools.Tests.ComponentMocks (9)
MockFeedPackage.cs (1)
18public Dictionary<string, string> AdditionalFiles { get; } = new();
ToolPackageDownloaderMock.cs (6)
45private readonly Dictionary<PackageId, IEnumerable<string>> _warningsMap; 46private readonly Dictionary<PackageId, IReadOnlyList<FilePath>> _packagedShimsMap; 47private readonly Dictionary<PackageId, IEnumerable<NuGetFramework>> _frameworksMap; 56Dictionary<PackageId, IEnumerable<string>>? warningsMap = null, 57Dictionary<PackageId, IReadOnlyList<FilePath>>? packagedShimsMap = null, 58Dictionary<PackageId, IEnumerable<NuGetFramework>>? frameworksMap = null
ToolPackageStoreMock.cs (2)
17private readonly Dictionary<PackageId, IEnumerable<NuGetFramework>> _frameworksMap; 22Dictionary<PackageId, IEnumerable<NuGetFramework>> frameworksMap = null)
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)
24private readonly Dictionary<IMethodInfo, string> _conditionCache = new();
Microsoft.DotNet.XUnitV3Extensions (3)
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\ConditionalTheoryDiscoverer.cs (1)
22private readonly Dictionary<MethodInfo, string> _conditionCache = new();
src\Microsoft.DotNet.XUnitExtensions.Shared\SkippedFactTestCase.cs (1)
37Dictionary<string, HashSet<string>> traits = null,
src\Microsoft.DotNet.XUnitExtensions.Shared\SkippedTestCase.cs (1)
38Dictionary<string, HashSet<string>> traits = null,
Microsoft.Extensions.AI (11)
ChatCompletion\FunctionInvokingChatClient.cs (11)
287(Dictionary<string, AITool>? toolMap, bool anyToolsRequireApproval) = CreateToolsMap(AdditionalTools, options?.Tools); // all available tools, indexed by name 427(Dictionary<string, AITool>? toolMap, bool anyToolsRequireApproval) = CreateToolsMap(AdditionalTools, options?.Tools); // all available tools, indexed by name 725private static (Dictionary<string, AITool>? ToolMap, bool AnyRequireApproval) CreateToolsMap(params ReadOnlySpan<IList<AITool>?> toolLists) 727Dictionary<string, AITool>? map = null; 827private bool ShouldTerminateLoopBasedOnHandleableFunctions(List<FunctionCallContent>? functionCalls, Dictionary<string, AITool>? toolMap) 885Dictionary<string, AITool>? toolMap, List<FunctionCallContent> functionCallContents, int iteration, int consecutiveErrorCount, 1013Dictionary<string, AITool>? toolMap, List<FunctionCallContent> callContents, 1286Dictionary<string, ChatMessage>? allApprovalRequestsMessages = null; 1416Dictionary<string, ChatMessage>? messagesById = null; 1543Dictionary<string, AITool> toolMap) 1616Dictionary<string, AITool>? toolMap,
Microsoft.Extensions.AI.Abstractions (15)
AdditionalPropertiesDictionary{TValue}.cs (3)
25private readonly Dictionary<string, TValue> _dictionary; 217private Dictionary<string, TValue>.Enumerator _dictionaryEnumerator; 221internal Enumerator(Dictionary<string, TValue>.Enumerator dictionaryEnumerator)
Functions\AIFunctionArguments.cs (4)
30private readonly Dictionary<string, object?> _arguments; 46/// already a <see cref="Dictionary{TKey, TValue}"/>, in which case all dictionary 73/// <see cref="Dictionary{TKey, TValue}"/> with the same <see cref="IEqualityComparer{T}"/> or if 82arguments is Dictionary<string, object?> dc && (comparer is null || ReferenceEquals(dc.Comparer, comparer)) ? dc :
Functions\AIFunctionFactory.cs (1)
677Dictionary<ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions>? boundParameters = null;
Image\ImageGeneratorExtensions.cs (1)
18private static readonly Dictionary<string, string> _extensionToMimeType = new(StringComparer.OrdinalIgnoreCase)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (2)
490private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new(); 583private static readonly Dictionary<Type, Func<JsonNumberHandling, JsonSchema>> _simpleTypeSchemaFactories = new()
src\Shared\JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
155Dictionary<ParameterLookupKey, ParameterInfo> dict = new(parameters.Length);
src\Shared\JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (2)
28private readonly Dictionary<Module, NotAnnotatedStatus> _publicOnlyModules = new(); 29private readonly Dictionary<MemberInfo, NullabilityState> _context = new();
Utilities\AIJsonUtilities.Defaults.cs (1)
116[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)
826yield return new TestData<Dictionary<string, int>>( 838yield return new TestData<Dictionary<string, SimplePoco>>( 861yield return new TestData<Dictionary<string, object>>( 1030public Dictionary<string, object>? ExtensionData { get; set; } 1307[JsonSerializable(typeof(Dictionary<string, int>))] 1309[JsonSerializable(typeof(Dictionary<string, SimplePoco>))] 1310[JsonSerializable(typeof(Dictionary<string, object>))]
TestJsonSerializerContext.cs (4)
27[JsonSerializable(typeof(Dictionary<string, object?>))] 31[JsonSerializable(typeof(Dictionary<string, JsonDocument>))] // Used in Content tests 32[JsonSerializable(typeof(Dictionary<string, JsonNode>))] // Used in Content tests 33[JsonSerializable(typeof(Dictionary<string, string>))] // Used in Content tests
Utilities\AIJsonUtilitiesTests.cs (1)
1134Dictionary<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)
53var 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)
90List<Dictionary<string, ChatMessage>> turns; 182List<Dictionary<string, ChatMessage>> turns; 260List<Dictionary<string, ChatMessage>> turns; 274IEnumerable<JsonObject> GetMessages(Dictionary<string, ChatMessage> turn, int turnIndex) 384(List<Dictionary<string, ChatMessage>> turns, 395List<Dictionary<string, ChatMessage>> turns = []; 396Dictionary<string, ChatMessage> currentTurn = []; 474foreach (var turn in turns)
Microsoft.Extensions.AI.Integration.Tests (5)
ChatClientIntegrationTests.cs (1)
443Dictionary<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)
330Dictionary<int, FunctionCallInfo>? functionCallInfos = null;
OpenAIClientExtensions.cs (1)
227public Dictionary<string, JsonElement> Properties { get; set; } = [];
OpenAIImageGenerator.cs (1)
26private static readonly Dictionary<string, string> _mimeTypeToExtension = new(StringComparer.OrdinalIgnoreCase)
OpenAIResponsesChatClient.cs (1)
646Dictionary<string, AIContent>? idToContentMapping = null;
Microsoft.Extensions.AI.OpenAI.Tests (5)
OpenAIConversionTests.cs (5)
564var complexArgs = new Dictionary<string, object?> 597var deserializedArgs = JsonSerializer.Deserialize<Dictionary<string, object?>>(toolCall.FunctionArguments.ToMemory().Span); 792var deserializedArgs = JsonSerializer.Deserialize<Dictionary<string, object?>>(
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\TestCommand.cs (1)
24public Dictionary<string, string> EnvironmentVariables = [];
Microsoft.Extensions.AI.Tests (7)
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
188var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
Image\OpenTelemetryImageGeneratorTests.cs (1)
115var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (1)
126var tags = activity.Tags.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
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)
692dictionaryType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); 740(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; 646private Dictionary<string, LibraryStub> ReadLibraries(ref Utf8JsonReader reader) 648var libraries = new Dictionary<string, LibraryStub>(); 750private IEnumerable<Library> CreateLibraries(IEnumerable<TargetLibrary>? libraries, bool runtime, Dictionary<string, LibraryStub>? libraryStubs) 759IEnumerable<Library> CreateLibrariesNotNull(IEnumerable<TargetLibrary> libraries, bool runtime, Dictionary<string, LibraryStub>? libraryStubs) 770private 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.Testing (1)
Metrics\CollectedMeasurement.cs (1)
28var d = new Dictionary<string, object?>();
Microsoft.Extensions.Diagnostics.Testing.Tests (1)
Logging\FakeLoggerTests.cs (1)
86var 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)
98var 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 (15)
Http\DownstreamDependencyMetadataManager.cs (6)
32Dictionary<string, RequestMetadataTrieNode> dependencyTrieMap = []; 88private static void AddRouteToTrie(RequestMetadata routeMetadata, Dictionary<string, RequestMetadataTrieNode> dependencyTrieMap) 176private static Dictionary<string, ProcessedMetadata> ProcessDownstreamDependencyMetadata(Dictionary<string, RequestMetadataTrieNode> dependencyTrieMap) 178Dictionary<string, ProcessedMetadata> finalArrayDict = []; 281private void AddDependency(IDownstreamDependencyMetadata downstreamDependencyMetadata, Dictionary<string, RequestMetadataTrieNode> dependencyTrieMap)
Latency\Internal\HttpRequestLatencyListener.cs (8)
114private static readonly Dictionary<string, string> _socketMap = new() 120private static readonly Dictionary<string, string> _nameResolutionMap = new() 126private static readonly Dictionary<string, string> _httpMap = new() 140private static readonly Dictionary<string, string> _httpMeasureMap = new() 150Dictionary<string, CheckpointToken> socket = new(); 156Dictionary<string, CheckpointToken> nameResolution = new(); 162Dictionary<string, CheckpointToken> http = new(); 168Dictionary<string, MeasureToken> httpMeasures = new();
Logging\LoggingOptions.cs (1)
43/// The default value is <see cref="System.Collections.Generic.Dictionary{TKey, TValue}"/>.
Microsoft.Extensions.Http.Diagnostics.Tests (12)
Logging\HttpClientLoggerTest.cs (7)
242var logRecordState = logRecord.GetStructuredState(); 340var logRecordRequest = logRecords[0].GetStructuredState(); 350var logRecordFull = logRecords[1].GetStructuredState(); 447var logRecordState = logRecord.GetStructuredState(); 563var logRecordState = logRecord.GetStructuredState(); 654var logRecordState = logRecord.GetStructuredState(); 928var logRecordState = logRecord.GetStructuredState();
Logging\HttpRequestReaderTest.cs (1)
781var state = logRecord.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)
44private 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.Logging.MSBuild (1)
MSBuildLoggerProvider.cs (1)
15private readonly Dictionary<string, MSBuildLogger> _loggers = [];
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 (3)
FallbackDnsResolver.cs (1)
54var lookupMapping = new Dictionary<string, List<AddressResult>>();
Resolver\DnsResolver.cs (2)
239Dictionary<EncodedDomainName, EncodedDomainName> aliasMap = new(); 240Dictionary<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)
22private 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 (27)
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) 353public TestValidationOptions(Dictionary<Type, ValidatableTypeInfo> typeInfoMappings) 365private readonly Dictionary<Type, ValidatableTypeInfo> _typeInfoMappings; 367public DictionaryBasedResolver(Dictionary<Type, ValidatableTypeInfo> typeInfoMappings)
ValidatableTypeInfoTests.cs (3)
878public TestValidationOptions(Dictionary<Type, ValidatableTypeInfo> typeInfoMappings) 890private readonly Dictionary<Type, ValidatableTypeInfo> _typeInfoMappings; 892public 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)
104var sensitivePropsFromCtor = new Dictionary<string, List<INamedTypeSymbol>>();
Microsoft.Gen.Logging.Generated.Tests (40)
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 (16)
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?> 603var state = _logger.Collector.LatestRecord.StructuredState!
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 (6)
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();
ComInterfaceGenerator.cs (1)
93Dictionary<ComMethodInfo, IMethodSymbol> methodSymbols = new();
ComMethodContext.cs (2)
177var ifaceToDeclaredMethodsMap = ifaceAndDeclaredMethods.ToDictionary(static pair => pair.Item1, static pair => pair.Item2); 178var 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)
452private 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\Phi2ForCausalLM.cs (1)
62var loadedParameters = new Dictionary<string, bool>();
Phi3\Config.cs (1)
129public Dictionary<string, object>? RopeScaling { get; set; }
Phi3\Phi3ForCausalLM.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 (118)
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 (2)
50Dictionary<string, int>? dictionary = JsonSerializer.Deserialize<Dictionary<string, int>>(vocabStream);
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(); 152Dictionary<StringSpanOrdinalKey, int> vocab = new Dictionary<StringSpanOrdinalKey, int>(1000); 242(Dictionary<StringSpanOrdinalKey, int>? vocab, Vec<(string, string)> merges) result = ReadModelDataAsync(vocabStream, mergesStream, useAsync: false).GetAwaiter().GetResult(); 278(Dictionary<StringSpanOrdinalKey, int>? vocab, Vec<(string, string)> merges) result = await ReadModelDataAsync(vocabStream, mergesStream, useAsync: true).ConfigureAwait(false); 299Dictionary<StringSpanOrdinalKey, int>? vocab, 1099internal static async ValueTask<(Dictionary<StringSpanOrdinalKey, int>?, Vec<(string, string)>)> ReadModelDataAsync(Stream vocab, Stream? merges, bool useAsync, CancellationToken cancellationToken = default) 1101Dictionary<StringSpanOrdinalKey, int>? dic = useAsync 1113private readonly Dictionary<StringSpanOrdinalKey, int> _vocab; 1118internal Dictionary<Pair<int>, (int, int)> Merges { get; } 1175private 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 (28)
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; 1065private static readonly Dictionary<string, ModelEncoding> _modelToEncoding = 1163private static Dictionary<string, int> CreateHarmonyEncodingSpecialTokens() => 1189private static (Dictionary<string, int> SpecialTokens, Regex Regex, string VocabFile, Type? DataType, string PackageName) GetTiktokenConfigurations(string modelName) => GetTiktokenConfigurations(GetModelEncoding(modelName), modelName); 1191private static (Dictionary<string, int> SpecialTokens, Regex Regex, string VocabFile, Type? DataType, string PackageName) GetTiktokenConfigurations(ModelEncoding modelEncoding, string? modelName = null) 1279private 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); 1291(Dictionary<string, int> SpecialTokens, Regex Regex, string VocabFile, Type? DataType, string PackageName) tiktokenConfiguration = GetTiktokenConfigurations(modelEncoding, modelName); 1303out (Dictionary<ReadOnlyMemory<byte>, int> encoder, Dictionary<StringSpanOrdinalKey, (int Id, string Token)> vocab, Dictionary<int, ReadOnlyMemory<byte>> decoder) cache)) 1394(Dictionary<ReadOnlyMemory<byte>, int> encoder, Dictionary<StringSpanOrdinalKey, (int Id, string Token)> vocab, Dictionary<int, ReadOnlyMemory<byte>> decoder) = 1451(Dictionary<string, int> SpecialTokens, Regex Regex, string _, Type? __, string ___) tiktokenConfiguration = GetTiktokenConfigurations(modelName); 1491(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);
ModelSourceGenerationContext.DictionaryStringSpanOrdinalKeyInt32.g.cs (9)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>>? _DictionaryStringSpanOrdinalKeyInt32; 18public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>> DictionaryStringSpanOrdinalKeyInt32 20get => _DictionaryStringSpanOrdinalKeyInt32 ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>)); 23private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>> Create_DictionaryStringSpanOrdinalKeyInt32(global::System.Text.Json.JsonSerializerOptions options) 25if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>> jsonTypeInfo)) 27var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>> 33jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>, global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>(options, info);
ModelSourceGenerationContext.GetJsonTypeInfo.g.cs (1)
30if (type == typeof(global::System.Collections.Generic.Dictionary<global::Microsoft.ML.Tokenizers.StringSpanOrdinalKey, int>))
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, 316var reverseVocabulary = bpe.Vocabulary.ToDictionary(kvp => kvp.Value, kvp => kvp.Key); 400Dictionary<string, int>? dictionary = JsonSerializer.Deserialize<Dictionary<string, int>>(jsonString); 589private static string WriteToVocabFile(Dictionary<string, int> dic) 592File.WriteAllText(fileName, JsonSerializer.Serialize<Dictionary<string, int>>(dic), Encoding.UTF8); 1073private static Dictionary<string, int>? GetSpecialTokens(JsonElement root) 1077Dictionary<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 (65)
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 (7)
137private static volatile Dictionary<ReadOnlyMemory<char>, StopWordsRemovingEstimator.Language> _langsDictionary; 164private static Dictionary<ReadOnlyMemory<char>, StopWordsRemovingEstimator.Language> LangsDictionary 168Dictionary<ReadOnlyMemory<char>, StopWordsRemovingEstimator.Language> result = _langsDictionary; 171var langsDictionary = Enum.GetValues(typeof(StopWordsRemovingEstimator.Language)).Cast<StopWordsRemovingEstimator.Language>() 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)
58private readonly Dictionary<string, string> _idvToTfMapping; 847public Dictionary<string, Tensor> Outputs; 1255var result = inputSchema.ToDictionary(x => x.Name); 1256var resultDic = inputSchema.ToDictionary(x => x.Name);
Microsoft.NET.Build.Containers (19)
AuthHandshakeMessageHandler.cs (5)
82var keyValues = ParseBearerArgs(header.Parameter); 96static bool TryParseBearerAuthInfo(Dictionary<string, string> authValues, [NotNullWhen(true)] out AuthInfo? authInfo) 114static Dictionary<string, string>? ParseBearerArgs(string? bearerHeaderArgs) 120Dictionary<string, string> keyValues = new(); 264Dictionary<string, string?> parameters = new()
ContainerBuilder.cs (2)
33Dictionary<string, string> labels, 35Dictionary<string, string> envVars,
Descriptor.cs (1)
63public Dictionary<string, string?>? Annotations { get; init; } = null;
ImageConfig.cs (6)
16private readonly Dictionary<string, string> _labels; 18private readonly Dictionary<string, string> _environmentVariables; 250private Dictionary<string, string> GetLabels() 252Dictionary<string, string> labels = new(); 267private Dictionary<string, string> GetEnvironmentVariables() 269Dictionary<string, string> envVars = new();
Layer.cs (1)
83var entryAttributes = new Dictionary<string, string>();
ManifestListV2.cs (1)
15public record struct PlatformSpecificOciManifest(string mediaType, long size, string digest, PlatformInformation platform, Dictionary<string, string> annotations);
Registry\Registry.cs (2)
265var ridDict = new Dictionary<string, PlatformSpecificManifest>(); 279var ridDict = new Dictionary<string, PlatformSpecificOciManifest>();
Tasks\ComputeDotnetBaseImageAndTag.cs (1)
352var telemetryProperties = new Dictionary<string, string?>
Microsoft.NET.Build.Containers.UnitTests (6)
AuthHandshakeMessageHandlerTests.cs (5)
202static Func<HttpRequestMessage, HttpResponseMessage> ServerWithBasicAuthForToken(string authenticateParameters, string requestUri, string username, string password, Dictionary<string, string> queryParameters) 205static Func<HttpRequestMessage, HttpResponseMessage> ServerWithOAuthForToken(string authenticateParameters, string requestUri, Dictionary<string, string> formParameters) 208static Func<HttpRequestMessage, HttpResponseMessage> ServerWithBearerAuth(string authenticateParameters, string requestUri, HttpMethod method, Dictionary<string, string> queryParameters, Dictionary<string, string> formParameters, AuthenticationHeaderValue? authHeader) 262static void AssertParametersAreEqual(Dictionary<string, string> expected, string actual)
RegistryTests.cs (1)
537var environment = new Dictionary<string, string>();
Microsoft.NET.Build.Extensions.Tasks (11)
AddFacadesToReferences.cs (1)
22Dictionary<string, ITaskItem> facadeDict = new(StringComparer.OrdinalIgnoreCase);
ConflictResolver.cs (2)
14private Dictionary<string, TConflictItem> _winningItemsByKey = new(); 18private Dictionary<string, List<TConflictItem>> _unresolvedConflictItems = new(StringComparer.Ordinal);
FileUtilities.MetadataReader.cs (1)
22private static Dictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_versionCache = new(StringComparer.OrdinalIgnoreCase /* Not strictly correct on *nix. Fix? */);
PackageOverride.cs (1)
26public Dictionary<string, OverrideVersion> OverriddenPackages { get; }
PackageOverrideResolver.cs (5)
22private Lazy<Dictionary<string, PackageOverride>?> _packageOverrides; 27_packageOverrides = new Lazy<Dictionary<string, PackageOverride>?>(() => BuildPackageOverrides()); 30public Dictionary<string, PackageOverride>? PackageOverrides => _packageOverrides.Value; 32private Dictionary<string, PackageOverride>? BuildPackageOverrides() 34Dictionary<string, PackageOverride>? result;
PackageRank.cs (1)
8private Dictionary<string, int> packageRanks;
Microsoft.NET.Build.Extensions.Tasks.UnitTests (3)
MockBuildEngine.cs (1)
78public Dictionary<object, object> RegisteredTaskObjects { get; } = new Dictionary<object, object>();
MockTaskItem.cs (2)
17private Dictionary<string, string> _metadata = new(StringComparer.OrdinalIgnoreCase); 23public MockTaskItem(string itemSpec, Dictionary<string, string> metadata)
Microsoft.NET.Build.Tasks (131)
ApplyImplicitVersions.cs (3)
35var implicitVersionTable = GetApplicableImplicitVersionTable(); 64private Dictionary<string, ImplicitPackageReferenceVersion> GetApplicableImplicitVersionTable() 66var result = new Dictionary<string, ImplicitPackageReferenceVersion>();
ConflictResolver.cs (2)
14private Dictionary<string, TConflictItem> _winningItemsByKey = new(); 18private Dictionary<string, List<TConflictItem>> _unresolvedConflictItems = new(StringComparer.Ordinal);
CreateComHost.cs (1)
30out Dictionary<int, string> typeLibIdMap,
CreateWindowsSdkKnownFrameworkReferences.cs (1)
71var knownFrameworkReferencesByWindowsSdkVersion = new Dictionary<Version, List<(Version minimumNetVersion, TaskItem[] knownFrameworkReferences)>>();
DependencyContextBuilder.cs (14)
24private Dictionary<string, List<ReferenceInfo>> _compileReferences; 25private Dictionary<string, List<ResolvedFile>> _resolvedNuGetFiles; 26private Dictionary<string, SingleProjectInfo> _referenceProjectInfos; 27private Dictionary<string, List<RuntimePackAssetInfo>> _runtimePackAssets; 30private Dictionary<PackageIdentity, string> _filteredPackages; 33private readonly Dictionary<string, DependencyLibrary> _dependencyLibraries; 34private readonly Dictionary<string, List<LibraryDependency>> _libraryDependencies; 45private Dictionary<ReferenceInfo, string> _referenceLibraryNames; 149private Dictionary<ReferenceInfo, string> ReferenceLibraryNames 204public DependencyContextBuilder WithReferenceProjectInfos(Dictionary<string, SingleProjectInfo> referenceProjectInfos) 260public DependencyContextBuilder WithPackagesThatWereFiltered(Dictionary<PackageIdentity, string> packagesThatWhereFiltered) 328var referenceNameToRealName = new Dictionary<string, string>(); 353var libraries = runtimeLibraries.ToDictionary(lib => lib.Library.Name, lib => lib); 867Dictionary<string, DependencyLibrary> libraries = _dependencyLibraries;
FileUtilities.MetadataReader.cs (1)
22private static Dictionary<string, (DateTime LastKnownWriteTimeUtc, Version? Version)> s_versionCache = new(StringComparer.OrdinalIgnoreCase /* Not strictly correct on *nix. Fix? */);
FrameworkPackages\FrameworkPackages.cs (1)
55public Dictionary<string, NuGetVersion> Packages { get; } = new Dictionary<string, NuGetVersion>(StringComparer.OrdinalIgnoreCase);
GenerateDepsFile.cs (3)
118private Dictionary<PackageIdentity, string> GetFilteredPackages() 120Dictionary<PackageIdentity, string> filteredPackages = null; 181Dictionary<string, SingleProjectInfo> referenceProjects =
GenerateRegFreeComManifest.cs (1)
33out Dictionary<int, string> typeLibIdMap,
GetPackagesToPrune.cs (8)
123Dictionary<string, NuGetVersion> packagesToPrune = new(); 150Dictionary<string, NuGetVersion> packagesForFrameworkReference; 234static Dictionary<string, NuGetVersion> LoadPackagesToPruneFromFrameworkPackages(string targetFrameworkIdentifier, string targetFrameworkVersion, string frameworkReference, bool acceptNearestMatch = false) 244var frameworkPackages = FrameworkPackages.GetFrameworkPackages(nugetFramework, [frameworkReference], acceptNearestMatch) 251static Dictionary<string, NuGetVersion> LoadPackagesToPruneFromPrunePackageData(string targetFrameworkIdentifier, string targetFrameworkVersion, string frameworkReference, string prunePackageDataRoot) 267static Dictionary<string, NuGetVersion> LoadPackagesToPruneFromTargetingPack(Logger log, string targetFrameworkIdentifier, string targetFrameworkVersion, string frameworkReference, string [] targetingPackRoots) 273var frameworkPackages = FrameworkPackages.LoadFrameworkPackagesFromPack(log, nugetFramework, frameworkReference, targetingPackRoot) 285static void AddPackagesToPrune(Dictionary<string, NuGetVersion> packagesToPrune, IEnumerable<(string id, NuGetVersion version)> packagesToAdd, Logger log)
IContentAssetPreprocessor.cs (1)
17void ConfigurePreprocessor(string outputDirectoryBase, Dictionary<string, string> preprocessorValues);
InstallStateContents.cs (1)
21public Dictionary<string, string>? Manifests { get; set; }
IWorkloadManifestProvider.cs (1)
19Dictionary<string, WorkloadSet> GetAvailableWorkloadSets();
LockFileLookup.cs (2)
14private readonly Dictionary<KeyValuePair<string, NuGetVersion>, LockFileLibrary> _packages; 15private readonly Dictionary<string, LockFileLibrary> _projects;
NugetContentAssetPreprocessor.cs (2)
13private Dictionary<string, string> _preprocessorValues = new(); 16public void ConfigurePreprocessor(string outputDirectoryBase, Dictionary<string, string> preprocessorValues)
PackageOverride.cs (1)
26public Dictionary<string, OverrideVersion> OverriddenPackages { get; }
PackageOverrideResolver.cs (5)
22private Lazy<Dictionary<string, PackageOverride>?> _packageOverrides; 27_packageOverrides = new Lazy<Dictionary<string, PackageOverride>?>(() => BuildPackageOverrides()); 30public Dictionary<string, PackageOverride>? PackageOverrides => _packageOverrides.Value; 32private Dictionary<string, PackageOverride>? BuildPackageOverrides() 34Dictionary<string, PackageOverride>? result;
PackageRank.cs (1)
8private Dictionary<string, int> packageRanks;
ParseTargetManifests.cs (1)
28var runtimeStorePackages = new Dictionary<PackageIdentity, StringBuilder>();
ProcessFrameworkReferences.cs (1)
194var frameworkReferenceMap = FrameworkReferences.ToDictionary(fr => fr.ItemSpec, StringComparer.OrdinalIgnoreCase);
ProduceContentAssets.cs (1)
122var preprocessorValues = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
ProjectContext.cs (5)
93Dictionary<string, LockFileTargetLibrary> libraryLookup = 126var filterLookup = new Dictionary<string, HashSet<PackageIdentity>>(StringComparer.OrdinalIgnoreCase); 156Dictionary<string, LockFileTargetLibrary> libraryLookup = 168Dictionary<string, LockFileTargetLibrary> libraryLookup = 189Dictionary<string, LockFileTargetLibrary> libraryLookup =
ReferenceInfo.cs (1)
128Dictionary<string, ReferenceInfo> directReferences = new();
ResolveAppHosts.cs (1)
104var packagesToDownload = new Dictionary<string, string>();
ResolveFrameworkReferences.cs (2)
29var resolvedTargetingPacks = ResolvedTargetingPacks.ToDictionary(tp => tp.ItemSpec, StringComparer.OrdinalIgnoreCase); 30var resolvedRuntimePacks = ResolvedRuntimePacks.ToDictionary(rp => rp.GetMetadata(MetadataKeys.FrameworkName), StringComparer.OrdinalIgnoreCase);
ResolvePackageAssets.cs (15)
696private Dictionary<string, int> _stringTable; 970private Dictionary<(string, NuGetVersion), LockFileTargetLibrary> _targetLibraries; 974private Dictionary<(string, NuGetVersion), LockFileTargetLibrary> TargetLibraries => 1452var diagnosticLevels = GetPackageDiagnosticLevels(); 1524Dictionary<string, LogLevel> GetPackageDiagnosticLevels() 1531var packageReverseDependencies = GetReverseDependencies(); 1532var result = new Dictionary<string, LogLevel>(); 1546Dictionary<string, HashSet<string>> GetReverseDependencies() 1548var packageReverseDependencies = new Dictionary<string, HashSet<string>>(_compileTimeTarget.Libraries.Count, StringComparer.OrdinalIgnoreCase); 1594void ApplyDiagnosticLevel(string package, LogLevel messageLevel, Dictionary<string, LogLevel> diagnosticLevels, Dictionary<string, HashSet<string>> reverseDependencies) 1738Dictionary<string, string> projectReferencePaths = null; 1893var libraryLookup = _runtimeTarget.Libraries 1992private static Dictionary<string, string> GetProjectReferencePaths(LockFile lockFile) 1994Dictionary<string, string> paths = new();
ResolvePackageDependencies.cs (4)
23private readonly Dictionary<string, string> _fileTypes = new(StringComparer.OrdinalIgnoreCase); 136private Dictionary<string, string> _targetNameToAliasMap; 296var resolvedPackageVersions = target.Libraries 331Dictionary<string, string> resolvedPackageVersions,
ResolveTargetingPackAssets.cs (1)
119var resolvedTargetingPacks = inputs.ResolvedTargetingPacks
SdkDirectoryWorkloadManifestProvider.cs (11)
23private readonly Dictionary<string, int>? _knownManifestIdsAndOrder; 130var availableWorkloadSets = GetAvailableWorkloadSets(_sdkVersionBand); 131var workloadSets80100 = GetAvailableWorkloadSets(new SdkFeatureBand("8.0.100")); 145var featureBandWorkloadSets = GetAvailableWorkloadSets(workloadSetFeatureBand); 296var manifestIdsToManifests = new Dictionary<string, ReadableWorkloadManifest>(StringComparer.OrdinalIgnoreCase); 338Dictionary<string, string> directoriesWithManifests = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 516public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() 521public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets(SdkFeatureBand workloadSetFeatureBand) 526Dictionary<string, WorkloadSet> GetAvailableWorkloadSetsInternal(SdkFeatureBand? workloadSetFeatureBand) 529Dictionary<string, WorkloadSet> availableWorkloadSets = new Dictionary<string, WorkloadSet>(); 551static void AddWorkloadSetsForFeatureBand(Dictionary<string, WorkloadSet> availableWorkloadSets, string featureBandDirectory)
SingleProjectInfo.cs (2)
71public static Dictionary<string, SingleProjectInfo> CreateProjectReferenceInfos( 76Dictionary<string, SingleProjectInfo> projectReferences = new(StringComparer.OrdinalIgnoreCase);
TempDirectoryWorkloadManifestProvider.cs (1)
57public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
TypeLibraryDictionaryBuilder.cs (1)
12public static bool TryCreateTypeLibraryIdDictionary(ITaskItem[] typeLibraries, out Dictionary<int, string> typeLibraryIdMap, out IEnumerable<string> errors)
ValidateExecutableReferences.cs (1)
45Dictionary<string, string> projectAdditionalProperties = new(StringComparer.OrdinalIgnoreCase);
WorkloadManifest.cs (6)
13internal WorkloadManifest(string id, FXVersion version, string? description, string manifestPath, Dictionary<WorkloadId, BaseWorkloadDefinition> workloads, Dictionary<WorkloadPackId, WorkloadPack> packs, Dictionary<string, FXVersion>? dependsOnManifests) 42internal Dictionary<string, FXVersion>? DependsOnManifests { get; } 48public Dictionary<WorkloadId, BaseWorkloadDefinition> Workloads { get; } 49public Dictionary<WorkloadPackId, WorkloadPack> Packs { get; }
WorkloadManifestReader.cs (14)
88Dictionary<WorkloadId, BaseWorkloadDefinition>? workloads = null; 89Dictionary<WorkloadPackId, WorkloadPack>? packs = null; 90Dictionary<string, FXVersion>? dependsOn = null; 216private static Dictionary<string, FXVersion> ReadDependsOn(ref Utf8JsonStreamReader reader) 220var dependsOn = new Dictionary<string, FXVersion>(StringComparer.OrdinalIgnoreCase); 248private static Dictionary<WorkloadId, BaseWorkloadDefinition> ReadWorkloadDefinitions(ref Utf8JsonStreamReader reader, LocalizationCatalog? localizationCatalog) 252var workloads = new Dictionary<WorkloadId, BaseWorkloadDefinition>(); 274private static Dictionary<WorkloadPackId, WorkloadPack> ReadWorkloadPacks(ref Utf8JsonStreamReader reader) 278var packs = new Dictionary<WorkloadPackId, WorkloadPack>(); 346private static Dictionary<string, string> ReadStringDictionary(ref Utf8JsonStreamReader reader) 350var dictionary = new Dictionary<string, string>(); 372private static Dictionary<string, TValue> ReadStringDictionary<TValue>(ref Utf8JsonStreamReader reader, Func<string, TValue> mapValue) 376var dictionary = new Dictionary<string, TValue>(); 506Dictionary<string, WorkloadPackId>? aliasTo = null;
WorkloadManifestReader.Localization.cs (2)
78readonly Dictionary<string, string> _catalog; 80public LocalizationCatalog(Dictionary<string, string> catalog)
WorkloadPack.cs (2)
8public WorkloadPack(WorkloadPackId id, string version, WorkloadPackKind kind, Dictionary<string, WorkloadPackId>? aliasTo) 20public Dictionary<string, WorkloadPackId>? AliasTo { get; }
WorkloadResolver.cs (6)
17private readonly Dictionary<string, (WorkloadManifest manifest, WorkloadManifestInfo info)> _manifests = new(StringComparer.OrdinalIgnoreCase); 18private readonly Dictionary<WorkloadId, (WorkloadDefinition workload, WorkloadManifest manifest)> _workloads = new(); 19private readonly Dictionary<WorkloadPackId, (WorkloadPack pack, WorkloadManifest manifest)> _packs = new(); 140Dictionary<WorkloadId, (WorkloadRedirect redirect, WorkloadManifest manifest)>? redirects = null; 780public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new(); 807public static TValue? TryGetValue<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key)
WorkloadSet.cs (4)
12public Dictionary<ManifestId, (ManifestVersion Version, SdkFeatureBand FeatureBand)> ManifestVersions = new(); 31var manifestVersions = dictionary 115public Dictionary<string, string> ToDictionaryForJson() 117var dictionary = ManifestVersions.ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.Version + "/" + kvp.Value.FeatureBand, StringComparer.OrdinalIgnoreCase);
Microsoft.NET.Build.Tasks.UnitTests (18)
GivenADependencyContextBuilder.cs (2)
219private static DependencyContext BuildDependencyContextFromDependenciesWithResources(Dictionary<string, List<string>> dependencies, List<string> withResources, List<string> references, bool dllReference) 252Dictionary<string, SingleProjectInfo> referenceProjectInfos = new();
GivenAProduceContentsAssetsTask.cs (6)
22var preprocessorValues = new Dictionary<string, string>() 73var preprocessorValues = new Dictionary<string, string>() 129var preprocessorValues = new Dictionary<string, string>() 208var preprocessorValues = new Dictionary<string, string>() 286var preprocessorValues = new Dictionary<string, string>() 488private static ITaskItem[] GetPreprocessorValueItems(Dictionary<string, string> values)
GivenAResolvePackageDependenciesTask.cs (2)
359var expectedTypes = new Dictionary<string, string>() 406var expectedFileGroups = new Dictionary<string, string>()
LockFileSnippets.cs (1)
198public static string CreateFileItem(string path, Dictionary<string, string> metadata = null)
Mocks\MockBuildEngine.cs (1)
78public Dictionary<object, object> RegisteredTaskObjects { get; } = new Dictionary<object, object>();
Mocks\MockContentAssetPreprocessor.cs (2)
12private Dictionary<string, string> _preprocessorValues = new(); 25public void ConfigurePreprocessor(string outputDirectoryBase, Dictionary<string, string> preprocessorValues)
Mocks\MockTaskItem.cs (2)
17private Dictionary<string, string> _metadata = new(StringComparer.OrdinalIgnoreCase); 23public MockTaskItem(string itemSpec, Dictionary<string, string> metadata)
ProcessFrameworkReferencesTests.cs (2)
96string? runtimePackPattern = null, string? runtimeIdentifiers = null, Dictionary<string, string>? additionalMetadata = null) 98var metadata = new Dictionary<string, string>
Microsoft.NET.Build.Tests (24)
DesignTimeBuildTests.cs (1)
181var nugetPackagingMetadata = valuesWithMetadata.Single(kvp => kvp.value.Equals("NuGet.Packaging/3.5.0")).metadata;
GivenFrameworkReferences.cs (10)
785var runtimeAssetTrimInfo = GetRuntimeAssetTrimInfo(testProject); 802var runtimeAssetTrimInfo = GetRuntimeAssetTrimInfo(testProject, 1141private Dictionary<string, List<(string asset, string isTrimmable)>> GetRuntimeAssetTrimInfo(TestProject testProject, 1176var trimInfo = new Dictionary<string, List<(string asset, string isTrimmable)>>(); 1192public Dictionary<string, string> RuntimeFramework { get; } = new Dictionary<string, string>(); 1193public Dictionary<string, string> PackageDownload { get; } = new Dictionary<string, string>(); 1194public Dictionary<string, string> TargetingPack { get; } = new Dictionary<string, string>(); 1195public Dictionary<string, string> RuntimePack { get; } = new Dictionary<string, string>(); 1196public Dictionary<string, string> AppHostPack { get; } = new Dictionary<string, string>(); 1209Dictionary<string, string> dict;
GivenThatWeWantACustomTFM.cs (1)
36var expectedValues = new Dictionary<string, string>
GivenThatWeWantToBuildACppCliProject.cs (3)
76var cppnProjProperties = GetPropertyValues(testAsset.TestRoot, "NETCoreCppCliTest", targetFramework: targetFramework); 250public Dictionary<string, string> GetPropertyValues(string testRoot, string project, string targetFramework = null, string configuration = "Debug") 252var propertyValues = new Dictionary<string, string>();
GivenThatWeWantToBuildAnAppWithLibrary.cs (1)
103Dictionary<string, string> cultureValueMap = new()
GivenThatWeWantToBuildAnAppWithSharedProject.cs (1)
33var itemDict = items.GroupBy(i => i.itemType)
GivenThatWeWantToBuildASelfContainedApp.cs (2)
403var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: targetFramework); 550var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: tfm);
GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs (3)
47var itemDict = items.GroupBy(i => i.itemType) 58var expectedItems = new Dictionary<string, List<string>>() 84var expectedItemMetadata = expectedItems.ToDictionary(
GivenThatWeWantToVerifyNuGetReferenceCompat.cs (1)
219Dictionary<string, string> additionalProperties = null,
GlobalPropertyFlowTests.cs (1)
229var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: thisTargetFramework);
Microsoft.NET.Publish.Tests (27)
GivenThatWeWantToPreserveCompilationContext.cs (1)
223Dictionary<string, string> CompileLibraryNames = new()
GivenThatWeWantToPublishAHelloWorldProject.cs (2)
625var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: "net8.0", configuration: "Release"); 650var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: tfm, configuration: tfm == "net7.0" ? "Debug" : "Release");
GivenThatWeWantToPublishAnAotApp.cs (10)
56var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 145var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework, projectConfiguration); 196var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework, projectConfiguration); 240var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 291var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 410var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 739var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 834var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 869var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 922var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework);
GivenThatWeWantToPublishASingleFileLibrary.cs (2)
42var referencedProjProperties = referencedProject.GetPropertyValues(testAsset.TestRoot, targetFramework: targetFramework); 43var mainProjProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: targetFramework);
GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs (9)
90var finalPropertyResults = new List<Dictionary<string, string>>(); 112var finalPropertyResults = new List<Dictionary<string, string>>(); 136var finalPropertyResults = new List<Dictionary<string, string>>(); 161var finalPropertyResults = new List<Dictionary<string, string>>(); 185var finalPropertyResults = new List<Dictionary<string, string>>(); 231var finalPropertyResults = new List<Dictionary<string, string>>(); 340var finalPropertyResults = new List<Dictionary<string, string>>(); 368var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: "net7.0", configuration: "Release"); // this will fail if configuration is debug and TFM code didn't work. 373private void VerifyCorrectConfiguration(List<Dictionary<string, string>> finalProperties, string expectedConfiguration)
RuntimeIdentifiersTests.cs (3)
223var properties = testProject.GetPropertyValues(testAsset.TestRoot, configuration: "Release", targetFramework: tfm); 253var properties = testProject.GetPropertyValues(testAsset.TestRoot, configuration: "Release", targetFramework: tfm); 299var properties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework: tfm, configuration: useFrameworkDependentDefaultTargetFramework ? "Release" : "Debug");
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (40)
BootJsonData.cs (38)
10using ResourceHashesByNameDictionary = System.Collections.Generic.Dictionary<string, string>; 119public Dictionary<string, Dictionary<string, object>> extensions { get; set; } 151public ResourceHashesByNameDictionary runtime { get; set; } 154public ResourceHashesByNameDictionary jsModuleWorker { get; set; } 157public ResourceHashesByNameDictionary jsModuleDiagnostics { get; set; } 160public ResourceHashesByNameDictionary jsModuleNative { get; set; } 163public ResourceHashesByNameDictionary jsModuleRuntime { get; set; } 166public ResourceHashesByNameDictionary wasmNative { get; set; } 169public ResourceHashesByNameDictionary wasmSymbols { get; set; } 172public ResourceHashesByNameDictionary icu { get; set; } 174public ResourceHashesByNameDictionary coreAssembly { get; set; } = new ResourceHashesByNameDictionary(); 179public ResourceHashesByNameDictionary assembly { get; set; } = new ResourceHashesByNameDictionary(); 182public ResourceHashesByNameDictionary corePdb { get; set; } 188public ResourceHashesByNameDictionary pdb { get; set; } 194public Dictionary<string, ResourceHashesByNameDictionary> satelliteResources { get; set; } 200public ResourceHashesByNameDictionary lazyAssembly { get; set; } 207public ResourceHashesByNameDictionary libraryInitializers { get; set; } 210public ResourceHashesByNameDictionary modulesAfterConfigLoaded { get; set; } 213public ResourceHashesByNameDictionary modulesAfterRuntimeReady { get; set; } 220public Dictionary<string, ResourceHashesByNameDictionary> extensions { get; set; } 226public Dictionary<string, AdditionalAsset> runtimeAssets { get; set; } 229public Dictionary<string, ResourceHashesByNameDictionary> coreVfs { get; set; } 232public Dictionary<string, ResourceHashesByNameDictionary> vfs { get; set; } 292public Dictionary<string, List<GeneralAsset>> satelliteResources { get; set; } 318public Dictionary<string, ResourceHashesByNameDictionary> extensions { get; set; } 422static Dictionary<string, ResourceHashesByNameDictionary> ConvertSatelliteResources(Dictionary<string, List<GeneralAsset>> satelliteResources) 427var result = new Dictionary<string, ResourceHashesByNameDictionary>(); 434static Dictionary<string, ResourceHashesByNameDictionary> ConvertVfsAssets(List<VfsAsset> vfsAssets)
WasmPublishIntegrationTestBase.cs (2)
8using ResourceHashesByNameDictionary = System.Collections.Generic.Dictionary<string, string>; 50static void VerifyBootManifestHashes(TestAsset testAsset, string blazorPublishDirectory, ResourceHashesByNameDictionary resources, string prefix = null)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (27)
BootJsonData.cs (11)
7using ResourceHashesByNameDictionary = System.Collections.Generic.Dictionary<string, string>; 65public ResourceHashesByNameDictionary runtime { get; set; } = new ResourceHashesByNameDictionary(); 70public ResourceHashesByNameDictionary assembly { get; set; } = new ResourceHashesByNameDictionary(); 76public ResourceHashesByNameDictionary pdb { get; set; } 82public Dictionary<string, ResourceHashesByNameDictionary> satelliteResources { get; set; } 88public ResourceHashesByNameDictionary lazyAssembly { get; set; } 94public ResourceHashesByNameDictionary libraryInitializers { get; set; } 101public Dictionary<string, ResourceHashesByNameDictionary> extensions { get; set; } 107public Dictionary<string, AdditionalAsset50> runtimeAssets { get; set; }
GenerateBlazorWebAssemblyBootJson50.cs (3)
9using ResourceHashesByNameDictionary = System.Collections.Generic.Dictionary<string, string>; 95ResourceHashesByNameDictionary resourceList; 110resourceData.satelliteResources ??= new Dictionary<string, ResourceHashesByNameDictionary>(StringComparer.OrdinalIgnoreCase);
StaticWebAsset.cs (9)
47private Dictionary<string, string> _additionalCustomMetadata; 1231internal static Dictionary<string, StaticWebAsset> ToAssetDictionary(ITaskItem[] candidateAssets, bool validate = false) 1233var dictionary = new Dictionary<string, StaticWebAsset>(candidateAssets.Length); 1254internal static Dictionary<string, (StaticWebAsset, List<StaticWebAsset>)> AssetsByTargetPath(ITaskItem[] assets, string source, string assetKind) 1257var result = new Dictionary<string, (StaticWebAsset selected, List<StaticWebAsset> all)>(); 1490var result = new Dictionary<string, string>(((ITaskItem)this).MetadataCount) 1565internal sealed class StaticWebAssetResolvedRoute(string pathLabel, string path, Dictionary<string, string> tokens) 1569public Dictionary<string, string> Tokens { get; set; } = tokens; 1571public void Deconstruct(out string pathLabel, out string path, out Dictionary<string, string> tokens)
StaticWebAssetPathPattern.cs (2)
218internal (string Path, Dictionary<string, string> PatternValues) ReplaceTokens(StaticWebAsset staticWebAsset, StaticWebAssetTokenResolver tokens, bool applyPreferences = false) 224var dictionary = new Dictionary<string, string>();
StaticWebAssetTokenResolver.cs (1)
12private static readonly Dictionary<string, string> _empty = [];
UpgradeLegacyWasmStaticWebAssets.cs (1)
24var assetsByFinalPath = legacyAssets
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (66)
BootJsonData.cs (38)
10using ResourceHashesByNameDictionary = System.Collections.Generic.Dictionary<string, string>; 119public Dictionary<string, Dictionary<string, object>> extensions { get; set; } 151public ResourceHashesByNameDictionary runtime { get; set; } 154public ResourceHashesByNameDictionary jsModuleWorker { get; set; } 157public ResourceHashesByNameDictionary jsModuleDiagnostics { get; set; } 160public ResourceHashesByNameDictionary jsModuleNative { get; set; } 163public ResourceHashesByNameDictionary jsModuleRuntime { get; set; } 166public ResourceHashesByNameDictionary wasmNative { get; set; } 169public ResourceHashesByNameDictionary wasmSymbols { get; set; } 172public ResourceHashesByNameDictionary icu { get; set; } 174public ResourceHashesByNameDictionary coreAssembly { get; set; } = new ResourceHashesByNameDictionary(); 179public ResourceHashesByNameDictionary assembly { get; set; } = new ResourceHashesByNameDictionary(); 182public ResourceHashesByNameDictionary corePdb { get; set; } 188public ResourceHashesByNameDictionary pdb { get; set; } 194public Dictionary<string, ResourceHashesByNameDictionary> satelliteResources { get; set; } 200public ResourceHashesByNameDictionary lazyAssembly { get; set; } 207public ResourceHashesByNameDictionary libraryInitializers { get; set; } 210public ResourceHashesByNameDictionary modulesAfterConfigLoaded { get; set; } 213public ResourceHashesByNameDictionary modulesAfterRuntimeReady { get; set; } 220public Dictionary<string, ResourceHashesByNameDictionary> extensions { get; set; } 226public Dictionary<string, AdditionalAsset> runtimeAssets { get; set; } 229public Dictionary<string, ResourceHashesByNameDictionary> coreVfs { get; set; } 232public Dictionary<string, ResourceHashesByNameDictionary> vfs { get; set; } 292public Dictionary<string, List<GeneralAsset>> satelliteResources { get; set; } 318public Dictionary<string, ResourceHashesByNameDictionary> extensions { get; set; } 422static Dictionary<string, ResourceHashesByNameDictionary> ConvertSatelliteResources(Dictionary<string, List<GeneralAsset>> satelliteResources) 427var result = new Dictionary<string, ResourceHashesByNameDictionary>(); 434static Dictionary<string, ResourceHashesByNameDictionary> ConvertVfsAssets(List<VfsAsset> vfsAssets)
StaticWebAssetsBaselineComparer.cs (8)
45var actualAssets = actual.Assets 52var duplicateAssets = actual.Assets 60var expectedAssets = expected.Assets 67var actualAssetsByIdentity = actual.Assets.GroupBy(a => a.Identity).ToDictionary(a => a.Key, a => a.Order().ToArray()); 82var actualEndpoints = actual.Endpoints 90var duplicateEndpoints = actual.Endpoints 104var expectedEndpoints = expected.Endpoints 134private static void SortEndpointProperties(Dictionary<string, StaticWebAssetEndpoint[]> endpoints)
StaticWebAssetsBaselineFactory.cs (2)
78var assetsByIdentity = manifest.Assets.ToDictionary(a => a.Identity); 79var endpointsByAssetFile = manifest.Endpoints.GroupBy(e => e.AssetFile).ToDictionary(g => g.Key, g => g.ToArray());
WasmBuildIncrementalismTest.cs (3)
151var satelliteResources = bootJsonFile.resources.satelliteResources; 193var satelliteResources = bootJsonFile.resources.satelliteResources; 244var satelliteResources = bootJsonFile.resources.satelliteResources;
WasmBuildIntegrationTest.cs (4)
212var assemblies = bootJsonData.resources.assembly; 217var pdb = bootJsonData.resources.pdb; 259var assemblies = bootJsonData.resources.assembly; 264var pdb = bootJsonData.resources.pdb;
WasmBuildLazyLoadTest.cs (8)
54var lazyAssemblies = bootJson.resources.lazyAssembly; 55var assemblies = bootJson.resources.assembly; 106var lazyAssemblies = bootJson.resources.lazyAssembly; 107var assemblies = bootJson.resources.assembly; 158var lazyAssemblies = bootJson.resources.lazyAssembly; 159var assemblies = bootJson.resources.assembly; 210var lazyAssemblies = bootJson.resources.lazyAssembly; 211var assemblies = bootJson.resources.assembly;
WasmPublishIntegrationTest.cs (1)
701var assemblies = bootJsonData.resources.assembly;
WasmPublishIntegrationTestBase.cs (2)
8using ResourceHashesByNameDictionary = System.Collections.Generic.Dictionary<string, string>; 50static void VerifyBootManifestHashes(TestAsset testAsset, string blazorPublishDirectory, ResourceHashesByNameDictionary resources, string prefix = null)
Microsoft.NET.Sdk.Publish.Tasks (14)
MsDeploy\CommonUtility.cs (7)
227static Dictionary<string, string?>? s_wellKnownNamesDict = null; 228static Dictionary<string, string?>? s_wellKnownNamesMsdeployDict = null; 1126Dictionary<string, string> nameValueDictionary = new(parameters.Count, StringComparer.OrdinalIgnoreCase); 1177Dictionary<string, string> nameValueDictionary = new(parameters.Count, StringComparer.OrdinalIgnoreCase); 1178Dictionary<string, string?> entryIdentityDictionary = new(parameters.Count); 1420Dictionary<string, bool> FoundDictionary = new(optimizedValueList.Count, StringComparer.OrdinalIgnoreCase); 1800Dictionary<string, string> versionsList = new();
MsDeploy\VsMSDeployObject.cs (1)
344private Dictionary<string, string?> m_NameValueDictionary = new(10, StringComparer.OrdinalIgnoreCase);
Tasks\MsDeploy\CreateParameterFile.cs (2)
105Dictionary<string, Xml.XmlElement> dictionaryLookup 244Dictionary<string, Xml.XmlElement> dictionaryLookup
Tasks\MsDeploy\MSDeploy.cs (4)
626Dictionary<string, string> lookupDictionary) 678Dictionary<string, string> lookupDictionary = new(items.Count); 754Dictionary<string, string> lookupDictionary = new(items.Count); 755Dictionary<string, string> nameValueDictionary = new(items.Count, StringComparer.OrdinalIgnoreCase);
Microsoft.NET.Sdk.Razor.Tasks (2)
ReferenceResolver.cs (2)
17private readonly Dictionary<AssemblyItem, Classification> _classifications; 32protected Dictionary<string, AssemblyItem> Lookup { get; }
Microsoft.NET.Sdk.Razor.Tests (1)
ReferenceResolverTest.cs (1)
206private readonly Dictionary<string, string[]> _references = [];
Microsoft.NET.Sdk.StaticWebAssets.Tasks (90)
ApplyCompressionNegotiation.cs (6)
26var assetsById = StaticWebAsset.ToAssetDictionary(CandidateAssets); 32var compressionHeadersByEncoding = new Dictionary<string, StaticWebAssetEndpointResponseHeader[]>(2); 128var endpointsByRoute = GetEndpointsByRoute(endpointsByAsset); 190private static Dictionary<string, List<StaticWebAssetEndpoint>> GetEndpointsByRoute( 193var result = new Dictionary<string, List<StaticWebAssetEndpoint>>(endpointsByAsset.Count); 211private static StaticWebAssetEndpointResponseHeader[] GetOrCreateCompressionHeaders(Dictionary<string, StaticWebAssetEndpointResponseHeader[]> compressionHeadersByEncoding, StaticWebAsset compressedAsset)
Compression\DiscoverPrecompressedAssets.cs (1)
35var candidatesByIdentity = candidates.ToDictionary(asset => asset.Identity, OSPath.PathComparer);
Compression\ResolveCompressedAssets.cs (3)
59var existingCompressionFormatsByAssetItemSpec = CollectCompressedAssets(candidates); 195private Dictionary<string, HashSet<string>> CollectCompressedAssets(StaticWebAsset[] candidates) 198var existingCompressionFormatsByAssetItemSpec = new Dictionary<string, HashSet<string>>();
ComputeEndpointsForReferenceStaticWebAssets.cs (1)
23var assets = StaticWebAsset.ToAssetDictionary(Assets);
ComputeReferenceStaticWebAssetItems.cs (1)
41var existingAssets = StaticWebAsset.AssetsByTargetPath(Assets, Source, AssetKind);
ComputeStaticWebAssetsForCurrentProject.cs (1)
31var currentProjectAssets = StaticWebAsset.AssetsByTargetPath(Assets, Source, AssetKind);
Data\ContentTypeProvider.cs (2)
13private static readonly Dictionary<string, ContentTypeMapping> _builtInMappings = 405private readonly Dictionary<string, ContentTypeMapping> _customMappings;
Data\StaticWebAsset.cs (9)
47private Dictionary<string, string> _additionalCustomMetadata; 1231internal static Dictionary<string, StaticWebAsset> ToAssetDictionary(ITaskItem[] candidateAssets, bool validate = false) 1233var dictionary = new Dictionary<string, StaticWebAsset>(candidateAssets.Length); 1254internal static Dictionary<string, (StaticWebAsset, List<StaticWebAsset>)> AssetsByTargetPath(ITaskItem[] assets, string source, string assetKind) 1257var result = new Dictionary<string, (StaticWebAsset selected, List<StaticWebAsset> all)>(); 1490var result = new Dictionary<string, string>(((ITaskItem)this).MetadataCount) 1565internal sealed class StaticWebAssetResolvedRoute(string pathLabel, string path, Dictionary<string, string> tokens) 1569public Dictionary<string, string> Tokens { get; set; } = tokens; 1571public void Deconstruct(out string pathLabel, out string path, out Dictionary<string, string> tokens)
Data\StaticWebAssetEndpoint.cs (3)
29private Dictionary<string, string> _additionalCustomMetadata; 152var result = new Dictionary<string, List<StaticWebAssetEndpoint>>(candidateEndpoints.Length / 2); 497var result = new Dictionary<string, string>(((ITaskItem)this).MetadataCount)
Data\StaticWebAssetPathPattern.cs (2)
220public (string Path, Dictionary<string, string> PatternValues) ReplaceTokens(StaticWebAsset staticWebAsset, StaticWebAssetTokenResolver tokens, bool applyPreferences = false) 224var dictionary = new Dictionary<string, string>();
Data\StaticWebAssetTokenResolver.cs (1)
12private static readonly Dictionary<string, string> _empty = [];
DefineStaticWebAssetEndpoints.cs (5)
26var existingEndpointsByAssetFile = CreateEndpointsByAssetFile(); 65private Dictionary<string, HashSet<string>> CreateEndpointsByAssetFile() 69Dictionary<string, HashSet<string>> existingEndpointsByAssetFile = new(ExistingEndpoints.Length, OSPath.PathComparer); 106Dictionary<string, HashSet<string>> existingEndpointsByAssetFile, 113public Dictionary<string, HashSet<string>> ExistingEndpointsByAssetFile { get; } = existingEndpointsByAssetFile;
DefineStaticWebAssets.Cache.cs (6)
63var inputHashes = HashingUtils.ComputeHashLookup(memoryStream, CandidateAssets ?? [], candidateAssetMetadata); 92public Dictionary<string, StaticWebAsset> CachedAssets { get; set; } = []; 93public Dictionary<string, CopyCandidate> CachedCopyCandidates { get; set; } = []; 148Dictionary<string, ITaskItem> inputHashes) 174private void PartialUpdate(Dictionary<string, ITaskItem> inputHashes) 202var remainingCandidates = new Dictionary<string, ITaskItem>();
DefineStaticWebAssets.cs (2)
102var assetsByRelativePath = new Dictionary<string, (ITaskItem First, ITaskItem Second)>(CandidateAssets.Length); 474Dictionary<string, (ITaskItem First, ITaskItem Second)> assetsByRelativePath,
FilterStaticWebAssetEndpoints.cs (2)
35var assetFiles = Assets != null ? StaticWebAsset.ToAssetDictionary(Assets) : []; 37var endpointFoundMatchingAsset = new Dictionary<string, StaticWebAsset>();
FingerprintPatternMatcher.cs (2)
16private readonly Dictionary<string, string> _tokensByPattern; 23var tokensByPattern = fingerprintPatterns
GenerateStaticWebAssetEndpointsManifest.cs (1)
67var manifestAssets = ComputeManifestAssets(assets, ManifestType)
GenerateStaticWebAssetEndpointsPropsFile.cs (3)
28var assets = StaticWebAsset.ToAssetDictionary(StaticWebAssets); 37private bool ExecuteCore(StaticWebAssetEndpoint[] endpoints, Dictionary<string, StaticWebAsset> assets) 122private bool ValidateArguments(StaticWebAssetEndpoint[] endpoints, Dictionary<string, StaticWebAsset> asset)
GenerateStaticWebAssetsDevelopmentManifest.cs (2)
173var contentRootIndex = new Dictionary<string, int>(); 363public Dictionary<string, StaticWebAssetNode> Children { get; set; }
GenerateStaticWebAssetsManifest.cs (4)
59var assetsByTargetPath = GroupAssetsByTargetPath(assets); 102var assetsByIdentity = assets.ToDictionary(a => a.Identity, a => a, OSPath.PathComparer); 155private static Dictionary<string, (StaticWebAsset First, StaticWebAsset Second, List<StaticWebAsset> Other)> GroupAssetsByTargetPath(StaticWebAsset[] assets) 157var result = new Dictionary<string, (StaticWebAsset First, StaticWebAsset Second, List<StaticWebAsset> Other)>(StringComparer.OrdinalIgnoreCase);
JSModules\ApplyJsModules.cs (2)
31var jsModulesByRazorItem = new Dictionary<string, IList<ITaskItem>>(); 103Dictionary<string, IList<ITaskItem>> jsModuleByItem,
Legacy\ValidateStaticWebAssetsUniquePaths.cs (1)
24var assetsByWebRootPaths = new Dictionary<string, ITaskItem>(StringComparer.OrdinalIgnoreCase);
MergeStaticWebAssets.cs (1)
33var assetsByTargetPath = assets
OverrideHtmlAssetPlaceholders.cs (16)
50var urlMappings = GroupResourcesByLabel(resources); 154private string GetFingerprintedAssetPath(Dictionary<string, ResourceAsset> urlMappings, string assetPath) 235Dictionary<string, string>? imports = new(); 236Dictionary<string, Dictionary<string, string>>? scopes = new(); 237Dictionary<string, string>? integrity = new(); 263private static Dictionary<string, ResourceAsset> GroupResourcesByLabel(List<ResourceAsset> resources) 265var mappings = new Dictionary<string, ResourceAsset>(StringComparer.OrdinalIgnoreCase); 296internal class ImportMap(Dictionary<string, string> imports, Dictionary<string, Dictionary<string, string>> scopes, Dictionary<string, string> integrity) 298public Dictionary<string, string> Imports { get; set; } = imports; 299public Dictionary<string, Dictionary<string, string>> Scopes { get; set; } = scopes; 300public Dictionary<string, string> Integrity { get; set; } = integrity;
ResolveFingerprintedStaticWebAssetEndpointsForAssets.cs (1)
32var endpointsByAsset = candidateEndpoints.GroupBy(e => e.AssetFile, OSPath.PathComparer)
ResolveStaticWebAssetEndpointRoutes.cs (1)
21var assets = StaticWebAsset.ToAssetDictionary(Assets);
ScopedCss\ApplyCssScopes.cs (2)
34var scopedCssByRazorItem = new Dictionary<string, IList<ITaskItem>>(); 115Dictionary<string, IList<ITaskItem>> scopedCssByItem,
UpdateExternallyDefinedStaticWebAssets.cs (1)
41var endpointByAsset = endpoints
UpdateStaticWebAssetEndpoints.cs (2)
44var endpointsToUpdate = StaticWebAssetEndpoint.FromItemGroup(EndpointsToUpdate) 47var allEndpoints = StaticWebAssetEndpoint.FromItemGroup(AllEndpoints)
Utils\Globbing\GlobNode.cs (4)
16public Dictionary<string, GlobNode> LiteralsDictionary { get; set; } 17public Dictionary<string, GlobNode>.AlternateLookup<ReadOnlySpan<char>> Literals { get; set; } 23public Dictionary<string, GlobNode> ExtensionsDictionary { get; set; } 24public Dictionary<string, GlobNode>.AlternateLookup<ReadOnlySpan<char>> Extensions { get; set; }
Utils\HashingUtils.cs (2)
50internal static Dictionary<string, ITaskItem> ComputeHashLookup( 59var hashSet = new Dictionary<string, ITaskItem>(candidateAssets.Length);
Microsoft.NET.Sdk.StaticWebAssets.Tests (17)
JsModulesIntegrationTest.cs (1)
152var thumbprintLookup = new Dictionary<string, FileThumbPrint>();
ScopedCssIntegrationTests.cs (1)
364var thumbprintLookup = new Dictionary<string, FileThumbPrint>();
StaticWebAssetEndpointsIntegrationTest.cs (2)
523var endpointsByAssetFile = endpoints.Endpoints.GroupBy(e => e.AssetFile).ToDictionary(g => g.Key, g => g.ToArray()); 607public Dictionary<string, StaticWebAssetNode> Children { get; set; }
StaticWebAssets\DiscoverStaticWebAssetsTest.cs (1)
881private (DefineStaticWebAssets.DefineStaticWebAssetsCache cache, Dictionary<string, ITaskItem> inputHashes) SetupCache(
StaticWebAssets\StaticWebAssetPathPatternTest.cs (1)
723private static StaticWebAssetTokenResolver CreateTestResolver(Dictionary<string, string> additionalTokens = null) => new(additionalTokens);
StaticWebAssetsBaselineComparer.cs (8)
45var actualAssets = actual.Assets 52var duplicateAssets = actual.Assets 60var expectedAssets = expected.Assets 67var actualAssetsByIdentity = actual.Assets.GroupBy(a => a.Identity).ToDictionary(a => a.Key, a => a.Order().ToArray()); 82var actualEndpoints = actual.Endpoints 90var duplicateEndpoints = actual.Endpoints 104var expectedEndpoints = expected.Endpoints 134private static void SortEndpointProperties(Dictionary<string, StaticWebAssetEndpoint[]> endpoints)
StaticWebAssetsBaselineFactory.cs (2)
78var assetsByIdentity = manifest.Assets.ToDictionary(a => a.Identity); 79var endpointsByAssetFile = manifest.Endpoints.GroupBy(e => e.AssetFile).ToDictionary(g => g.Key, g => g.ToArray());
StaticWebAssetsPackIntegrationTest.cs (1)
1644var thumbPrints = new Dictionary<string, FileThumbPrint>();
Microsoft.NET.Sdk.Web.Tests (3)
PublishTests.cs (3)
34var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 71var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework); 94var buildProperties = testProject.GetPropertyValues(testAsset.TestRoot, targetFramework);
Microsoft.NET.Sdk.WorkloadManifestReader (48)
InstallStateContents.cs (1)
21public Dictionary<string, string>? Manifests { get; set; }
IWorkloadManifestProvider.cs (1)
19Dictionary<string, WorkloadSet> GetAvailableWorkloadSets();
SdkDirectoryWorkloadManifestProvider.cs (11)
23private readonly Dictionary<string, int>? _knownManifestIdsAndOrder; 130var availableWorkloadSets = GetAvailableWorkloadSets(_sdkVersionBand); 131var workloadSets80100 = GetAvailableWorkloadSets(new SdkFeatureBand("8.0.100")); 145var featureBandWorkloadSets = GetAvailableWorkloadSets(workloadSetFeatureBand); 296var manifestIdsToManifests = new Dictionary<string, ReadableWorkloadManifest>(StringComparer.OrdinalIgnoreCase); 338Dictionary<string, string> directoriesWithManifests = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 516public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() 521public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets(SdkFeatureBand workloadSetFeatureBand) 526Dictionary<string, WorkloadSet> GetAvailableWorkloadSetsInternal(SdkFeatureBand? workloadSetFeatureBand) 529Dictionary<string, WorkloadSet> availableWorkloadSets = new Dictionary<string, WorkloadSet>(); 551static void AddWorkloadSetsForFeatureBand(Dictionary<string, WorkloadSet> availableWorkloadSets, string featureBandDirectory)
TempDirectoryWorkloadManifestProvider.cs (1)
57public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new();
WorkloadManifest.cs (6)
13internal WorkloadManifest(string id, FXVersion version, string? description, string manifestPath, Dictionary<WorkloadId, BaseWorkloadDefinition> workloads, Dictionary<WorkloadPackId, WorkloadPack> packs, Dictionary<string, FXVersion>? dependsOnManifests) 42internal Dictionary<string, FXVersion>? DependsOnManifests { get; } 48public Dictionary<WorkloadId, BaseWorkloadDefinition> Workloads { get; } 49public Dictionary<WorkloadPackId, WorkloadPack> Packs { get; }
WorkloadManifestReader.cs (14)
88Dictionary<WorkloadId, BaseWorkloadDefinition>? workloads = null; 89Dictionary<WorkloadPackId, WorkloadPack>? packs = null; 90Dictionary<string, FXVersion>? dependsOn = null; 216private static Dictionary<string, FXVersion> ReadDependsOn(ref Utf8JsonStreamReader reader) 220var dependsOn = new Dictionary<string, FXVersion>(StringComparer.OrdinalIgnoreCase); 248private static Dictionary<WorkloadId, BaseWorkloadDefinition> ReadWorkloadDefinitions(ref Utf8JsonStreamReader reader, LocalizationCatalog? localizationCatalog) 252var workloads = new Dictionary<WorkloadId, BaseWorkloadDefinition>(); 274private static Dictionary<WorkloadPackId, WorkloadPack> ReadWorkloadPacks(ref Utf8JsonStreamReader reader) 278var packs = new Dictionary<WorkloadPackId, WorkloadPack>(); 346private static Dictionary<string, string> ReadStringDictionary(ref Utf8JsonStreamReader reader) 350var dictionary = new Dictionary<string, string>(); 372private static Dictionary<string, TValue> ReadStringDictionary<TValue>(ref Utf8JsonStreamReader reader, Func<string, TValue> mapValue) 376var dictionary = new Dictionary<string, TValue>(); 506Dictionary<string, WorkloadPackId>? aliasTo = null;
WorkloadManifestReader.Localization.cs (2)
78readonly Dictionary<string, string> _catalog; 80public LocalizationCatalog(Dictionary<string, string> catalog)
WorkloadPack.cs (2)
8public WorkloadPack(WorkloadPackId id, string version, WorkloadPackKind kind, Dictionary<string, WorkloadPackId>? aliasTo) 20public Dictionary<string, WorkloadPackId>? AliasTo { get; }
WorkloadResolver.cs (6)
17private readonly Dictionary<string, (WorkloadManifest manifest, WorkloadManifestInfo info)> _manifests = new(StringComparer.OrdinalIgnoreCase); 18private readonly Dictionary<WorkloadId, (WorkloadDefinition workload, WorkloadManifest manifest)> _workloads = new(); 19private readonly Dictionary<WorkloadPackId, (WorkloadPack pack, WorkloadManifest manifest)> _packs = new(); 140Dictionary<WorkloadId, (WorkloadRedirect redirect, WorkloadManifest manifest)>? redirects = null; 780public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => new(); 807public static TValue? TryGetValue<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key)
WorkloadSet.cs (4)
12public Dictionary<ManifestId, (ManifestVersion Version, SdkFeatureBand FeatureBand)> ManifestVersions = new(); 31var manifestVersions = dictionary 115public Dictionary<string, string> ToDictionaryForJson() 117var dictionary = ManifestVersions.ToDictionary(kvp => kvp.Key.ToString(), kvp => kvp.Value.Version + "/" + kvp.Value.FeatureBand, StringComparer.OrdinalIgnoreCase);
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (6)
FakeManifestProvider.cs (2)
42public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => throw new NotImplementedException(); 69public Dictionary<string, WorkloadSet> GetAvailableWorkloadSets() => throw new NotImplementedException();
SdkDirectoryWorkloadManifestProviderTests.cs (1)
1460Dictionary<string, string> _mockedEnvironmentVariables = new(StringComparer.OrdinalIgnoreCase);
WorkloadPackGroupTests.cs (3)
39var definitionLocations = GetWorkloadPackDefinitionLocations(GetManifests()); 122Dictionary<WorkloadPackId, List<WorkloadId>> GetWorkloadPackDefinitionLocations(IEnumerable<WorkloadManifest> manifests) 124var ret = new Dictionary<WorkloadPackId, List<WorkloadId>>();
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (2)
CachingWorkloadResolver.cs (2)
162var itemsToAdd = new Dictionary<string, SdkResultItem>(); 170Dictionary<string, string> propertiesToAdd = new();
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.NET.TestFramework (13)
Commands\GetValuesCommand.cs (4)
28public Dictionary<string, string> Properties { get; } = new Dictionary<string, string>(); 150public List<(string value, Dictionary<string, string> metadata)> GetValuesWithMetadata() 170var dict = new Dictionary<string, string>(); 183return new List<(string value, Dictionary<string, string> metadata)>();
Commands\SdkCommandSpec.cs (1)
14public Dictionary<string, string> Environment { get; set; } = new Dictionary<string, string>();
Commands\TestCommand.cs (1)
12private Dictionary<string, string> _environment = new();
ProjectConstruction\TestProject.cs (7)
71public Dictionary<string, string> SourceFiles { get; } = new Dictionary<string, string>(); 73public Dictionary<string, string> EmbeddedResources { get; } = new Dictionary<string, string>(); 78public Dictionary<string, string> AdditionalProperties { get; } = new Dictionary<string, string>(); 80public List<KeyValuePair<string, Dictionary<string, string>>> AdditionalItems { get; } = new(); 484public void AddItem(string itemName, Dictionary<string, string> attributes) 498public Dictionary<string, string> GetPropertyValues(string testRoot, string? targetFramework = null, string configuration = "Debug") 500var propertyValues = new Dictionary<string, string>();
Microsoft.NET.ToolPack.Tests (3)
GivenThatWeWantToPackAToolProjectWithPackagedShim.cs (2)
29Dictionary<string, string> additionalProperty = null, 51Dictionary<string, string> additionalProperty = null)
PackWithShimsAndResultNugetPackageNuGetPackagexFixture.cs (1)
27public Dictionary<(bool multiTarget, string targetFramework), string> assetMap
Microsoft.TemplateEngine.Cli (34)
Alias\AliasModel.cs (1)
21internal Dictionary<string, IReadOnlyList<string>> CommandAliases { get; set; }
Alias\AliasRegistry.cs (2)
58Dictionary<string, IReadOnlyList<string>> aliasesWithCandidate = new(_aliases!.CommandAliases); 159Dictionary<string, IReadOnlyList<string>> result = new(comparer ?? StringComparer.Ordinal);
ChoiceTemplateParameter.cs (1)
19private Dictionary<string, ParameterChoice> _choices = new(StringComparer.OrdinalIgnoreCase);
CliEnvironment.cs (1)
15Dictionary<string, string> variables = new(StringComparer.OrdinalIgnoreCase)
CliTemplateEngineHost.cs (1)
16Dictionary<string, string> preferences,
CliTemplateInfo.cs (1)
95Dictionary<string, CliTemplateParameter> parameters = new();
Commands\BaseCommand.cs (1)
132Dictionary<FilterOptionDefinition, Option> options = new();
Commands\BaseFilterableArgs.cs (1)
55Dictionary<FilterOptionDefinition, OptionResult> filterValues = new();
Commands\create\CombinedChoiceTemplateParameter.cs (1)
15private Dictionary<string, ParameterChoice> _combinedParameters = new(StringComparer.OrdinalIgnoreCase);
Commands\create\InvalidTemplateOptionResult.cs (1)
131Dictionary<string, ParameterChoice> validChoices = new();
Commands\create\TemplateCommand.cs (1)
26private Dictionary<string, TemplateOption> _templateSpecificOptions = new();
Commands\create\TemplateCommandArgs.cs (1)
12private Dictionary<string, OptionResult> _templateOptions = new();
Commands\NewCommand.Legacy.cs (1)
142Dictionary<FilterOptionDefinition, Option> options = new();
Help\HelpBuilder.cs (1)
15private Dictionary<Symbol, Customization>? _customizationsBySymbol;
HostSpecificTemplateData.cs (6)
19var symbolsInfo = new Dictionary<string, IReadOnlyDictionary<string, string>>(); 41var symbolProperties = new Dictionary<string, string>(); 111public Dictionary<string, string> LongNameOverrides 115Dictionary<string, string> map = new(); 129public Dictionary<string, string> ShortNameOverrides 133Dictionary<string, string> map = new();
TabularOutput\TabularOutput.cs (1)
78Dictionary<int, int> columnWidthLookup = new();
TemplatePackageCoordinator.cs (4)
195var details = new Dictionary<string, string>(); 368Dictionary<IManagedTemplatePackageProvider, List<IManagedTemplatePackage>> sourcesToUninstall; 654private async Task<(NewCommandStatus, Dictionary<IManagedTemplatePackageProvider, List<IManagedTemplatePackage>>)> DetermineSourcesToUninstallAsync(UninstallCommandArgs commandArgs, CancellationToken cancellationToken) 663var packagesToUninstall = new Dictionary<IManagedTemplatePackageProvider, List<IManagedTemplatePackage>>();
TemplateResolution\TemplateGroupMatchInfo.cs (1)
266Dictionary<string, ParameterChoice> validChoices = new();
TemplateResolution\TemplateResolutionResult.cs (1)
263Dictionary<string, string?> parameterList = new();
TemplateSearch\CliHostSearchCacheData.cs (1)
29Dictionary<string, HostSpecificTemplateData> cliData = new();
TemplateSearch\CliSearchFiltersFactory.cs (2)
19Dictionary<string, string?> filterData = new(); 100Dictionary<string, HostSpecificTemplateData> hostSpecificData = new();
TemplateSearch\CliTemplateSearchCoordinatorFactory.cs (1)
14Dictionary<string, Func<object, object>> dataReaders = new()
WideTable.cs (1)
13private static readonly Dictionary<Unicode, uint[,]> _lookup;
ZeroTable.cs (1)
13private static readonly Dictionary<Unicode, uint[,]> _lookup;
Microsoft.TemplateEngine.Cli.UnitTests (42)
AliasAssignmentTests.cs (6)
58var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 76var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 94var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 111var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 126var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r); 200var result = AliasAssignmentCoordinator.AssignAliasesForParameter(paramList, InitiallyTakenAliases).ToDictionary(r => r.Parameter.Name, r => r);
CliMocks\MockHostSpecificTemplateData.cs (1)
8public MockHostSpecificTemplateData(Dictionary<string, IReadOnlyDictionary<string, string>> symbolInfo)
CliTestHostFactory.cs (1)
78internal Dictionary<string, string> HostParamDefaults { get; set; } = new Dictionary<string, string>();
HostDataLoaderTests.cs (2)
119var symbolInfo = new Dictionary<string, IReadOnlyDictionary<string, string>>() 162var symbolInfo = new Dictionary<string, IReadOnlyDictionary<string, string>>()
ParserTests\HelpTests.Resolution.cs (2)
75var defaultParams = new Dictionary<string, string> 105var defaultParams = new Dictionary<string, string>
ParserTests\InstantiateTests.cs (5)
217var defaultParams = new Dictionary<string, string>(); 604var defaultParams = new Dictionary<string, string>() 632var defaultParams = new Dictionary<string, string>() 662var defaultParams = new Dictionary<string, string>() 692var defaultParams = new Dictionary<string, string>()
ParserTests\InstantiateTests.Subcommand.cs (1)
41var defaultParams = new Dictionary<string, string>();
ParserTests\ListTests.cs (1)
12private static readonly Dictionary<string, FilterOptionDefinition> _stringToFilterDefMap = new()
ParserTests\MiscTests.cs (3)
68Dictionary<string, Func<GlobalArgs, bool>> optionsMap = new() 98Dictionary<string, Func<GlobalArgs, bool>> optionsMap = new() 128Dictionary<string, Func<GlobalArgs, bool>> optionsMap = new()
ParserTests\SearchTests.cs (1)
12private static Dictionary<string, FilterOptionDefinition> _stringToFilterDefMap = new()
ParserTests\TemplateCommandTests.cs (2)
24var paramSymbolInfo = new Dictionary<string, string>() 29var symbolInfo = new Dictionary<string, IReadOnlyDictionary<string, string>>
PostActionTests\AddJsonPropertyPostActionTests.cs (1)
442Dictionary<string, string> PostActionArgs,
TelemetryHelperTests.cs (10)
22Dictionary<string, string?> parameterValues = new() 40Dictionary<string, string?> parameterValues = new() 65Dictionary<string, string?> parameterValues = new() 90Dictionary<string, string?> parameterValues = new() 114Dictionary<string, string?> parameterValues = new() 140Dictionary<string, string?> parameterValues = new() 164Dictionary<string, string?> parameterValues = new() 190Dictionary<string, string?> parameterValues = new() 216Dictionary<string, string?> parameterValues = new() 242Dictionary<string, string?> parameterValues = new()
TemplateSearchCoordinatorTests.cs (6)
511Dictionary<string, PackToTemplateEntry> packToTemplateMap = new(); 532Dictionary<string, object> additionalData = new(); 536Dictionary<string, string> frameworkParamSymbolInfo = new() 549Dictionary<string, HostSpecificTemplateData> cliHostData = new() 567Dictionary<string, string> frameworkParamSymbolInfo = new() 580Dictionary<string, object> additionalData = new()
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 (36)
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)
23protected Dictionary<IVsTextView, DebuggerIntelliSenseFilter> filters = [];
Library\ObjectBrowser\AbstractListItemFactory.cs (1)
595var visitedAssemblies = new Dictionary<string, AssemblyIdentity>();
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
305private 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)
93private readonly Dictionary<string, List<ProjectSystemProject>> _projectSystemNameToProjectsMap = []; 99private 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;
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 (2)
DocumentOutline\DocumentOutlineTestsBase.cs (2)
102private EditorTestLspServer(EditorTestWorkspace testWorkspace, Dictionary<string, IList<LanguageServer.Protocol.Location>> locations, InitializationOptions options, AbstractLspLogger logger) : base(testWorkspace, locations, options, logger) 108var locations = await GetAnnotatedLocationsAsync(testWorkspace, testWorkspace.CurrentSolution);
Microsoft.VisualStudio.LanguageServices.DevKit (1)
Logging\VSCodeTelemetryLogger.cs (1)
151var kvp = new Dictionary<string, string>
Microsoft.VisualStudio.LanguageServices.Implementation (5)
CodeModel\AbstractCodeModelService.cs (1)
105var nameOrdinalMap = new Dictionary<string, int>();
CodeModel\CodeModelProjectCache.cs (1)
26private readonly Dictionary<string, CacheEntry> _cache = new(StringComparer.OrdinalIgnoreCase);
CodeModel\NodeKeyValidation.cs (1)
14private readonly Dictionary<ComHandle<EnvDTE80.FileCodeModel2, FileCodeModel>, List<GlobalNodeKey>> _nodeKeysMap = [];
SolutionExplorer\SourceGeneratedFileItems\SourceGeneratedFileItemSource.cs (1)
62var sourceGeneratedDocumentsForGeneratorById =
SolutionExplorer\SymbolTree\RootSymbolTreeItemSourceProvider.cs (1)
47private readonly Dictionary<string, List<RootSymbolTreeItemCollectionSource>> _filePathToCollectionSources = new(
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 = [];
Microsoft.WebTools.AspireService.Package (1)
Helpers\SocketConnectionManager.cs (1)
22private readonly Dictionary<string, WebSocketConnection> _webSocketConnections = new(StringComparer.Ordinal);
Microsoft.WebTools.AspireService.Tests (2)
Mocks\Mocks.cs (1)
11private readonly Dictionary<Type, IMockFactory> _mockFactories = new();
SocketConnectionManager.cs (1)
22private readonly Dictionary<string, WebSocketConnection> _webSocketConnections = new(StringComparer.Ordinal);
MSBuild (44)
CollectionHelpers.cs (1)
41internal static bool ContainsValueAndIsEqual(this Dictionary<string, string> dictionary, string key, string value, StringComparison comparer)
CommunicationsUtilities.cs (2)
482Dictionary<string, string> table = new(200, StringComparer.OrdinalIgnoreCase); // Razzle has 150 environment variables 625Dictionary<string, string> table = new(vars.Count, StringComparer.OrdinalIgnoreCase);
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
LogMessagePacketBase.cs (1)
279private static readonly Dictionary<LoggingEventType, MethodInfo> s_writeMethodCache = new Dictionary<LoggingEventType, MethodInfo>();
NodePacketFactory.cs (1)
19private Dictionary<NodePacketType, PacketFactoryRecord> _packetFactories;
ReadOnlyEmptyDictionary.cs (1)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>();
TaskHostConfiguration.cs (8)
33private Dictionary<string, string> _buildProcessEnvironment; 90private Dictionary<string, TaskParameter> _taskParameters; 92private Dictionary<string, string> _globalParameters; 160Dictionary<string, string> globalParameters, 173_buildProcessEnvironment = buildProcessEnvironment as Dictionary<string, string>; 240public Dictionary<string, string> BuildProcessEnvironment 353public Dictionary<string, TaskParameter> TaskParameters 363public Dictionary<string, string> GlobalProperties
TaskHostTaskComplete.cs (5)
85private Dictionary<string, TaskParameter> _taskOutputParameters = null; 90private Dictionary<string, string> _buildProcessEnvironment = null; 129_buildProcessEnvironment = buildProcessEnvironment as Dictionary<string, string>; 191public Dictionary<string, TaskParameter> TaskOutputParameters 208public Dictionary<string, string> BuildProcessEnvironment
TaskParameter.cs (2)
562private Dictionary<string, string> _customEscapedMetadata = null; 580_customEscapedMetadata = nonGenericEscapedMetadata as Dictionary<string, string>;
TranslatorHelpers.cs (9)
89ref Dictionary<string, T> dictionary, 98ref Dictionary<string, string> dictionary, 107dictionary = (Dictionary<string, string>)localDict; 112ref Dictionary<string, T> dictionary, 124dictionary = (Dictionary<string, T>)localDict; 129ref Dictionary<string, string> dictionary, 140dictionary = (Dictionary<string, string>)localDict; 145ref Dictionary<string, T> dictionary, 157dictionary = (Dictionary<string, T>)localDict;
TypeLoader.cs (2)
197Dictionary<string, string> assembliesDictionary = new(localAssemblies.Length + runtimeAssemblies.Length); 296private Dictionary<string, Type> _publicTypeNameToType;
XMake.cs (11)
676Dictionary<string, string> globalProperties = null; 677Dictionary<string, string> restoreProperties = null; 1268Dictionary<string, string> globalProperties, 1269Dictionary<string, string> restoreProperties, 1739private static bool PrintTargets(string projectFile, string toolsVersion, Dictionary<string, string> globalProperties, TextWriter targetsWriter, ProjectCollection projectCollection) 1867private static BuildResult ExecuteRestore(string projectFile, string toolsVersion, BuildManager buildManager, Dictionary<string, string> globalProperties, bool saveProjectResult = false) 1870Dictionary<string, string> restoreGlobalProperties = new Dictionary<string, string>(globalProperties); 2509ref Dictionary<string, string> globalProperties, 2531ref Dictionary<string, string> restoreProperties, 3836internal static Dictionary<string, string> ProcessPropertySwitch(string[] parameters) 3838Dictionary<string, string> properties = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
MSBuildTaskHost (57)
BinaryReaderExtensions.cs (2)
129public static Dictionary<string, TimeSpan> ReadDurationDictionary(this BinaryReader reader) 132var durations = new Dictionary<string, TimeSpan>(count);
BinaryTranslator.cs (9)
609public void TranslateDictionary(ref Dictionary<string, string> dictionary, IEqualityComparer<string> comparer) 617dictionary = (Dictionary<string, string>)copy; 631public void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys) 738public void TranslateDictionary<T>(ref Dictionary<string, T> dictionary, IEqualityComparer<string> comparer, ObjectTranslatorWithValueFactory<T> objectTranslator, NodePacketValueFactory<T> valueFactory) 805public void TranslateDictionary(ref Dictionary<string, DateTime> dictionary, StringComparer comparer) 1441public void TranslateDictionary(ref Dictionary<string, string> dictionary, IEqualityComparer<string> comparer) 1458public void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys) 1581public void TranslateDictionary<T>(ref Dictionary<string, T> dictionary, IEqualityComparer<string> comparer, ObjectTranslatorWithValueFactory<T> objectTranslator, NodePacketValueFactory<T> valueFactory) 1650public void TranslateDictionary(ref Dictionary<string, DateTime> dictionary, StringComparer comparer)
BinaryWriterExtensions.cs (1)
133public static void WriteDurationsDictionary(this BinaryWriter writer, Dictionary<string, TimeSpan> durations)
BuildExceptionSerializationHelper.cs (2)
24private static Dictionary<string, Func<string, Exception?, BuildExceptionBase>>? s_exceptionFactories; 49var exceptionFactories = new Dictionary<string, Func<string, Exception?, BuildExceptionBase>>();
CollectionHelpers.cs (1)
41internal static bool ContainsValueAndIsEqual(this Dictionary<string, string> dictionary, string key, string value, StringComparison comparer)
CommunicationsUtilities.cs (2)
439internal static Dictionary<string, string> GetEnvironmentVariables() 482Dictionary<string, string> table = new(200, StringComparer.OrdinalIgnoreCase); // Razzle has 150 environment variables
EscapingUtilities.cs (1)
29private static readonly Dictionary<string, string> s_unescapedToEscapedStrings = new Dictionary<string, string>(StringComparer.Ordinal);
IExtendedBuildEventArgs.cs (1)
25Dictionary<string, string?>? ExtendedMetadata { get; set; }
Immutable\ImmutableDictionary.cs (2)
37private Dictionary<K, V> _backing; 211var n = new Dictionary<K, V>(_backing, _backing.Comparer);
InterningReadTranslator.cs (1)
23private Dictionary<InternPathIds, string> _pathIdsToString = [];
InterningWriteTranslator.cs (2)
40private Dictionary<string, int> _stringToIds = []; 42private Dictionary<string, InternPathIds> _stringToPathIds = [];
ITranslator.cs (4)
344void TranslateDictionary(ref Dictionary<string, string> dictionary, IEqualityComparer<string> comparer); 357void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys); 361void TranslateDictionary(ref Dictionary<string, DateTime> dictionary, StringComparer comparer); 375void TranslateDictionary<T>(ref Dictionary<string, T> dictionary, IEqualityComparer<string> comparer, ObjectTranslatorWithValueFactory<T> objectTranslator, NodePacketValueFactory<T> valueFactory)
LogMessagePacketBase.cs (2)
273private static readonly Dictionary<LoggingEventType, MethodInfo> s_readMethodCache = new Dictionary<LoggingEventType, MethodInfo>(); 279private static readonly Dictionary<LoggingEventType, MethodInfo> s_writeMethodCache = new Dictionary<LoggingEventType, MethodInfo>();
NodePacketFactory.cs (1)
19private Dictionary<NodePacketType, PacketFactoryRecord> _packetFactories;
ReadOnlyEmptyDictionary.cs (1)
24private static readonly Dictionary<K, V> s_backing = new Dictionary<K, V>();
TaskHostConfiguration.cs (8)
33private Dictionary<string, string> _buildProcessEnvironment; 90private Dictionary<string, TaskParameter> _taskParameters; 92private Dictionary<string, string> _globalParameters; 160Dictionary<string, string> globalParameters, 173_buildProcessEnvironment = buildProcessEnvironment as Dictionary<string, string>; 240public Dictionary<string, string> BuildProcessEnvironment 353public Dictionary<string, TaskParameter> TaskParameters 363public Dictionary<string, string> GlobalProperties
TaskHostTaskComplete.cs (5)
85private Dictionary<string, TaskParameter> _taskOutputParameters = null; 90private Dictionary<string, string> _buildProcessEnvironment = null; 129_buildProcessEnvironment = buildProcessEnvironment as Dictionary<string, string>; 191public Dictionary<string, TaskParameter> TaskOutputParameters 208public Dictionary<string, string> BuildProcessEnvironment
TaskParameter.cs (2)
562private Dictionary<string, string> _customEscapedMetadata = null; 580_customEscapedMetadata = nonGenericEscapedMetadata as Dictionary<string, string>;
TranslatorHelpers.cs (9)
89ref Dictionary<string, T> dictionary, 98ref Dictionary<string, string> dictionary, 107dictionary = (Dictionary<string, string>)localDict; 112ref Dictionary<string, T> dictionary, 124dictionary = (Dictionary<string, T>)localDict; 129ref Dictionary<string, string> dictionary, 140dictionary = (Dictionary<string, string>)localDict; 145ref Dictionary<string, T> dictionary, 157dictionary = (Dictionary<string, T>)localDict;
TypeLoader.cs (1)
204private Dictionary<string, Type> _publicTypeNameToType;
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
88[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.Dictionary<,>))]
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)
44var idToFilePathMap = initialWalk(); 51Dictionary<Guid, List<FilePathInfo>> initialWalk() 63var 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)
511var temp = _removedManipulators; 699private Dictionary<int, Manipulator2D> _currentManipulators = new Dictionary<int, Manipulator2D>(2); 702private 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)
413private Dictionary<Uri, DictionaryInfo> UriMap 2033private 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;
Replay (4)
src\Compilers\Shared\BuildServerConnection.cs (4)
454private static IntPtr CreateEnvironmentBlock(Dictionary<string, string> environmentVariables) 484internal static Dictionary<string, string>? GetServerEnvironmentVariables(System.Collections.IDictionary currentEnvironment, ICompilerServerLogger? logger = null) 492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger);
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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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 (20)
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)
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 (23)
Services\AssetProviderTests.cs (4)
76var map = await solution.GetAssetMapAsync(projectConeId: null, CancellationToken.None); 104var map = await solution.GetAssetMapAsync(projectConeId: null, CancellationToken.None); 129var map = await project.GetAssetMapAsync(CancellationToken.None); 158var map = await project.GetAssetMapAsync(CancellationToken.None);
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 (2)
124private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, Workspace remoteWorkspace, Solution solution, Dictionary<Checksum, object> map = null) 2039var map = await solution.GetAssetMapAsync(projectConeId: null, CancellationToken.None);
Services\SolutionServiceTests.cs (12)
546var map = new Dictionary<Checksum, object>(); 587var map = new Dictionary<Checksum, object>(); 629var map = new Dictionary<Checksum, object>(); 662var map = new Dictionary<Checksum, object>(); 704var map = new Dictionary<Checksum, object>(); 744var map = new Dictionary<Checksum, object>(); 782var map = new Dictionary<Checksum, object>(); 815var map = new Dictionary<Checksum, object>(); 870var map = new Dictionary<Checksum, object>(); 939var map = new Dictionary<Checksum, object>(); 1274var map = new Dictionary<Checksum, object>(); 1307private 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>()); 233var 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)
83Dictionary<string, TimeSpan> testInfos = new();
rzc (6)
ConcurrentLruCache.cs (1)
19private readonly Dictionary<TKey, CacheValue> _cache;
DefaultExtensionAssemblyLoader.cs (4)
19private readonly Dictionary<string, (Assembly assembly, AssemblyIdentity identity)> _loadedByPath; 20private readonly Dictionary<AssemblyIdentity, Assembly> _loadedByIdentity; 21private readonly Dictionary<string, AssemblyIdentity> _identityCache; 22private readonly Dictionary<string, List<string>> _wellKnownAssemblies;
GenerateCommand.cs (1)
320var cssScopeAssociations = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase);
Sample (14)
artifacts\obj\Sample\Release\net10.0\generated\Microsoft.AspNetCore.Http.RequestDelegateGenerator\Microsoft.AspNetCore.Http.RequestDelegateGenerator.RequestDelegateGenerator\GeneratedRouteBuilderExtensions.g.cs (6)
1859options.EndpointBuilder.Metadata.Add(new ProducesResponseTypeMetadata(statusCode: StatusCodes.Status200OK, type: typeof(global::System.Collections.Generic.Dictionary<global::System.String, global::System.Int32>), contentTypes: GeneratedMetadataConstants.JsonContentType)); 1869var handler = Cast(del, global::System.Collections.Generic.Dictionary<global::System.String, global::System.Int32> () => throw null!); 1876var responseJsonTypeInfo = (JsonTypeInfo<global::System.Collections.Generic.Dictionary<global::System.String, global::System.Int32>?>)jsonSerializerOptions.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<global::System.String, global::System.Int32>)); 1900var result = handler(); 1922var castHandler = Cast(handler, global::System.Collections.Generic.Dictionary<global::System.String, global::System.Int32> () => throw null!);
artifacts\obj\Sample\Release\net10.0\generated\Microsoft.AspNetCore.OpenApi.SourceGenerators\Microsoft.AspNetCore.OpenApi.SourceGenerators.XmlCommentGenerator\OpenApiXmlCommentSupport.generated.cs (4)
66private static Dictionary<string, XmlComment>? _cache; 67public static Dictionary<string, XmlComment> Cache => _cache ??= GenerateCacheEntries(); 69private static Dictionary<string, XmlComment> GenerateCacheEntries() 71var cache = new Dictionary<string, XmlComment>();
Endpoints\MapSchemasEndpoints.cs (3)
157public Dictionary<string, object?>? Words { get; set; } 216public Dictionary<string, string?>? NullableDictionary { get; set; } 246public Dictionary<string, string?>? NullableDictionaryWithNullableValues { get; set; }
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();
sdk-tasks (1)
CalculateTemplateVersions.cs (1)
46var groups = BundledTemplates.GroupBy(bt => bt.GetMetadata("TemplateFrameworkVersion"))
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 (8)
JsonSchemaExporter\JsonSchemaExporter.cs (2)
490private readonly Dictionary<(JsonTypeInfo, JsonPropertyInfo?), string[]> _generated = new(); 583private static readonly Dictionary<Type, Func<JsonNumberHandling, JsonSchema>> _simpleTypeSchemaFactories = new()
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
155Dictionary<ParameterLookupKey, ParameterInfo> dict = new(parameters.Length);
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)
826yield return new TestData<Dictionary<string, int>>( 838yield return new TestData<Dictionary<string, SimplePoco>>( 861yield return new TestData<Dictionary<string, object>>( 1030public Dictionary<string, object>? ExtensionData { get; set; } 1307[JsonSerializable(typeof(Dictionary<string, int>))] 1309[JsonSerializable(typeof(Dictionary<string, SimplePoco>))] 1310[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.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.CommandLine.StaticCompletions (4)
CompletionsCommand.cs (4)
31private CompletionsCommand(Dictionary<string, IShellProvider> shellMap, string commandName, string commandDescription) : base(commandName, commandDescription) 59static IShellProvider LookupShellFromEnvironment(Dictionary<string, IShellProvider> shellMap) 81static Action<Parsing.ArgumentResult> OnlyAcceptSupportedShells(Dictionary<string, IShellProvider> shellMap) 97static Func<CompletionContext, IEnumerable<CompletionItem>> CreateCompletions(Dictionary<string, IShellProvider> shellMap)
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 (41)
System\ComponentModel\Composition\AttributedModelServices.cs (1)
120var metadata = new Dictionary<string, object?>();
System\ComponentModel\Composition\ContractNameServices.cs (1)
29private static Dictionary<Type, string> TypeIdentityCache => field ??= new();
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 (1)
25private static Dictionary<Type, Func<Export, object>?> CastSingleValueCache => field ??= new();
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)
36private static Dictionary<object, IntrinsicTypeConverterData>? s_intrinsicTypeConverters; 144private 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)
382Dictionary<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)
114private 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.DirectoryServices.Protocols (2)
System\DirectoryServices\Protocols\common\ResultCode.cs (1)
57private static readonly Dictionary<ResultCode, string> s_resultCodeMapping = new Dictionary<ResultCode, string>(capacity: 43)
System\DirectoryServices\Protocols\ldap\LdapException.cs (1)
40private static readonly Dictionary<LdapError, string> s_resultCodeMapping = new Dictionary<LdapError, string>(capacity: 20)
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)
101internal void ReplaceNormalAttributesWithExtended(Dictionary<string, string>? dictionaryFromExtendedAttributesHeader)
System\Formats\Tar\TarHeader.Write.cs (5)
496private void WriteAsPaxExtendedAttributes(Stream archiveStream, Span<byte> buffer, Dictionary<string, string> extendedAttributes, bool isGea, int globalExtendedAttributesEntryNumber) 504private Task WriteAsPaxExtendedAttributesAsync(Stream archiveStream, Memory<byte> buffer, Dictionary<string, string> extendedAttributes, bool isGea, int globalExtendedAttributesEntryNumber, CancellationToken cancellationToken) 513private void WriteAsPaxExtendedAttributesShared(bool isGea, int globalExtendedAttributesEntryNumber, Dictionary<string, string> extendedAttributes) 866private static MemoryStream? GenerateExtendedAttributesDataStream(Dictionary<string, string> extendedAttributes) 1005static 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)
29public static MethodInfo DictionaryOfStringInt32_Add_String_Int32 => field ??= typeof(Dictionary<string, int>).GetMethod(nameof(Dictionary<string, int>.Add), new[] { typeof(string), typeof(int) })!; 30public static ConstructorInfo DictionaryOfStringInt32_Ctor_Int32 => field ??= 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)
735private readonly Dictionary<T, int> _cases; 737internal IntSwitchInstruction(Dictionary<T, int> cases) 755private readonly Dictionary<string, int> _cases; 758internal 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; 209var 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 (19)
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)
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)
42private 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)
94Dictionary<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.Primitives (7)
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)
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)
74private Dictionary<string, IntPtr>? _sslSessions;
System.ObjectModel (1)
System\Collections\ObjectModel\KeyedCollection.cs (1)
19private Dictionary<TKey, TItem>? dict; // Do not rename (binary serialization)
System.Private.CoreLib (174)
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\Concurrent\ConcurrentDictionary.cs (2)
2565/// Removes the value with the specified alternate key from the <see cref="Dictionary{TKey, TValue}"/>, 2576/// Removes the value with the specified alternate key from the <see cref="Dictionary{TKey, TValue}"/>,
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; 640/// Gets an instance of a type that may be used to perform operations on the current <see cref="Dictionary{TKey, TValue}"/> 662/// Gets an instance of a type that may be used to perform operations on the current <see cref="Dictionary{TKey, TValue}"/> 687/// Provides a type that may be used to perform operations on a <see cref="Dictionary{TKey, TValue}"/> 694internal AlternateLookup(Dictionary<TKey, TValue> dictionary) 701/// <summary>Gets the <see cref="Dictionary{TKey, TValue}"/> against which this instance performs operations.</summary> 702public Dictionary<TKey, TValue> Dictionary { get; } 729internal static bool IsCompatibleKey(Dictionary<TKey, TValue> dictionary) 737internal static IAlternateEqualityComparer<TAlternateKey, TKey> GetAlternateComparer(Dictionary<TKey, TValue> dictionary) 790/// <summary>Determines whether the <see cref="Dictionary{TKey, TValue}"/> contains the specified alternate key.</summary> 803Dictionary<TKey, TValue> dictionary = Dictionary; 856/// <summary>Removes the value with the specified alternate key from the <see cref="Dictionary{TKey, TValue}"/>.</summary> 864/// Removes the value with the specified alternate key from the <see cref="Dictionary{TKey, TValue}"/>, 874Dictionary<TKey, TValue> dictionary = Dictionary; 959/// <inheritdoc cref="CollectionsMarshal.GetValueRefOrAddDefault{TKey, TValue}(Dictionary{TKey, TValue}, TKey, out bool)"/> 964Dictionary<TKey, TValue> dictionary = Dictionary; 1066/// the additional overhead on each <see cref="Dictionary{TKey, TValue}"/> instantiation, especially in AOT scenarios. 1070/// <inheritdoc cref="CollectionsMarshal.GetValueRefOrAddDefault{TKey, TValue}(Dictionary{TKey, TValue}, TKey, out bool)"/> 1071public static ref TValue? GetValueRefOrAddDefault(Dictionary<TKey, TValue> dictionary, TKey key, out bool exists) 1768private readonly Dictionary<TKey, TValue> _dictionary; 1777internal Enumerator(Dictionary<TKey, TValue> dictionary, int getEnumeratorRetType) 1888private readonly Dictionary<TKey, TValue> _dictionary; 1890public KeyCollection(Dictionary<TKey, TValue> dictionary) 2013private readonly Dictionary<TKey, TValue> _dictionary; 2018internal Enumerator(Dictionary<TKey, TValue> dictionary) 2083private readonly Dictionary<TKey, TValue> _dictionary; 2085public ValueCollection(Dictionary<TKey, TValue> dictionary) 2207private readonly Dictionary<TKey, TValue> _dictionary; 2212internal 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 2909Dictionary<int, bool> eventEnabled = new Dictionary<int, bool>(m_eventData.Count); 3170Dictionary<int, EventMetadata>? eventData = null; 3171Dictionary<string, string>? eventsByName = null; 3517[NotNull] ref Dictionary<int, EventMetadata> eventData, 3584Dictionary<int, bool>? enabledDict = null; 3600private static void DebugCheckEvent(ref Dictionary<string, string>? eventsByName, 3601Dictionary<int, EventMetadata> eventData, MethodInfo method, EventAttribute eventAttribute, 3918private static readonly Dictionary<Guid, EventSource.OverrideEventProvider> s_preregisteredEtwProviders = new Dictionary<Guid, EventSource.OverrideEventProvider>(); 3920private static readonly Dictionary<string, EventSource.OverrideEventProvider> s_preregisteredEventPipeProviders = new Dictionary<string, EventSource.OverrideEventProvider>(); 4528Dictionary<EventListener, bool> allListeners = new Dictionary<EventListener, bool>(); 5248internal EventDispatcher(EventDispatcher? next, Dictionary<int, bool>? eventEnabled, EventListener listener) 5257internal Dictionary<int, bool>? m_EventEnabled; // For every event in a the eventSource, is it enabled? 6191private readonly Dictionary<int, string> opcodeTab; 6192private Dictionary<int, string>? taskTab; 6193private Dictionary<int, ChannelInfo>? channelTab; 6194private Dictionary<ulong, string>? keywordTab; 6195private Dictionary<string, Type>? mapsTab; 6196private readonly Dictionary<string, string> stringTab; // Maps unlocalized strings to localized ones 6214private 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)
960private static readonly Dictionary<string, IntPtr> s_sortNameToSortHandleCache = new Dictionary<string, IntPtr>();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (8)
151private static Dictionary<string, string> RegionNames => 413private static volatile Dictionary<string, CultureData>? s_cachedRegions; 414private static Dictionary<string, string>? s_regionNames; 442Dictionary<string, CultureData>? tempHashTable = s_cachedRegions; 447var newTable = new Dictionary<string, CultureData>(); 658private static volatile Dictionary<string, CultureData>? s_cachedCultures; 679Dictionary<string, CultureData>? tempHashTable = s_cachedCultures; 683var newTable = new Dictionary<string, CultureData>();
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)
72/// 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"/>. 79/// Items should not be added or removed from the <see cref="Dictionary{TKey, TValue}"/> while the ref <typeparamref name="TValue"/> is in use. 82public static ref TValue GetValueRefOrNullRef<TKey, TValue>(Dictionary<TKey, TValue> dictionary, TKey key) where TKey : notnull 86/// 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"/>. 94/// Items should not be added or removed from the <see cref="Dictionary{TKey, TValue}"/> while the ref <typeparamref name="TValue"/> is in use. 97public static ref TValue GetValueRefOrNullRef<TKey, TValue, TAlternateKey>(Dictionary<TKey, TValue>.AlternateLookup<TAlternateKey> dictionary, TAlternateKey key) 103/// 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"/>. 110/// <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> 111public static ref TValue? GetValueRefOrAddDefault<TKey, TValue>(Dictionary<TKey, TValue> dictionary, TKey key, out bool exists) where TKey : notnull 112=> ref Dictionary<TKey, TValue>.CollectionsMarshalHelper.GetValueRefOrAddDefault(dictionary, key, out exists); 115/// 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"/>. 123/// <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> 124public 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)
1293private 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)
668private static Dictionary<string, LocalDataStoreSlot>? s_nameToSlotMap; 675private static Dictionary<string, LocalDataStoreSlot> EnsureNameToSlotMap() 677Dictionary<string, LocalDataStoreSlot>? nameToSlotMap = s_nameToSlotMap; 690Dictionary<string, LocalDataStoreSlot> nameToSlotMap = EnsureNameToSlotMap(); 700Dictionary<string, LocalDataStoreSlot> nameToSlotMap = EnsureNameToSlotMap(); 714Dictionary<string, LocalDataStoreSlot> nameToSlotMap = EnsureNameToSlotMap();
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (1)
615private readonly Dictionary<int, bool> _usedIdToTracksAllValuesMap = new Dictionary<int, bool>();
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (2)
152public Dictionary<string, TimeZoneInfo>? _systemTimeZones; 155public 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)
870internal Dictionary<string, object> Configurations; 888Dictionary<string, object> configurationDictionary = context.Configurations;
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (1)
49private readonly Dictionary<string, Type> _typeBuilderDict;
src\System\RuntimeType.CoreCLR.cs (4)
1147Dictionary<string, RuntimeEventInfo>? csEventInfos = filter.CaseSensitive() ? null : 1176Filter filter, RuntimeType declaringType, Dictionary<string, RuntimeEventInfo>? csEventInfos, ref ListBuilder<RuntimeEventInfo> list) 1257Dictionary<string, List<RuntimePropertyInfo>>? csPropertyInfos = filter.CaseSensitive() ? null : 1285Dictionary<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) 594private DataContractDictionary? _knownDataContracts; 802Dictionary<string, DataMember> memberNamesTable = new Dictionary<string, DataMember>(); 1204internal override DataContractDictionary? KnownDataContracts 1312internal override DataContract BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract>? boundContracts = null) 1419Dictionary<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>; 244public virtual DataContractDictionary? KnownDataContracts 302internal virtual DataContract BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract>? boundContracts = null) 323private static Dictionary<XmlQualifiedName, DataContract?>? s_nameToBuiltInContract; 324private static Dictionary<string, DataContract?>? s_typeNameToBuiltInContract; 326private static Dictionary<string, XmlDictionaryString>? s_clrTypeStrings; 1017internal virtual DataContractDictionary? KnownDataContracts 1957internal static DataContractDictionary? ImportKnownTypeAttributes(Type type) 1959DataContractDictionary? knownDataContracts = null; 1960Dictionary<Type, Type> typesChecked = new Dictionary<Type, Type>(); 1967private static void ImportKnownTypeAttributes(Type? type, Dictionary<Type, Type> typesChecked, ref DataContractDictionary? knownDataContracts) 2073internal 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; 21private DataContractDictionary? _knownTypesForObject; 57public DataContractDictionary Contracts => 60public Dictionary<DataContract, object> ProcessedContracts => 65public DataContractDictionary? KnownTypesForObject 202private void AddKnownDataContracts(DataContractDictionary? knownDataContracts) 308private Dictionary<XmlQualifiedName, object>? _referencedTypesDictionary; 309private Dictionary<XmlQualifiedName, object>? _referencedCollectionTypesDictionary; 313private Dictionary<XmlQualifiedName, object> GetReferencedTypes() 337private Dictionary<XmlQualifiedName, object> GetReferencedCollectionTypes() 360private void AddReferencedType(Dictionary<XmlQualifiedName, object> referencedTypes, Type type) 575Dictionary<XmlQualifiedName, object> referencedTypes = useReferencedCollectionTypes ? GetReferencedCollectionTypes() : GetReferencedTypes();
System\Runtime\Serialization\DataMember.cs (1)
290internal 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)
97internal static Type TypeOfDictionaryGeneric => field ??= 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. 150private SchemaObjectDictionary SchemaObjects 186Dictionary<Type, object> previousCollectionTypes = new Dictionary<Type, object>(); 224DataContractDictionary knownDataContracts = new DataContractDictionary(); 240internal SchemaObjectDictionary CreateSchemaObjects() 242SchemaObjectDictionary schemaObjects = new SchemaObjectDictionary(); 911DataContractDictionary 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>; 197private 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)
18private 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 (126)
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)
2094Dictionary<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>(); 1558private readonly Dictionary<string, LocalBuilder> _locals; 1608public 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)
1113internal static MemberMapping[] GetAllMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos) 1183internal static MemberMapping[] GetSettableMembers(StructMapping mapping, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos) 1191private static void PopulateMemberInfos(StructMapping structMapping, MemberMapping[] mappings, System.Collections.Generic.Dictionary<string, MemberInfo> memberInfos) 1211Dictionary<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 (3)
23private readonly Dictionary<string, string> _idNames = new Dictionary<string, string>(); 25private readonly Dictionary<string, FieldBuilder> _idNameFields = new Dictionary<string, FieldBuilder>(); 28internal Dictionary<string, EnumMapping> Enums => field ??= 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)
55public Dictionary<QilName, VarPar> AllGlobalVarPars = new Dictionary<QilName, VarPar>(); 56public Dictionary<QilName, Template> NamedTemplates = new Dictionary<QilName, Template>(); 57public Dictionary<QilName, AttributeSet> AttributeSets = new Dictionary<QilName, AttributeSet>(); 58public Dictionary<string, NsAlias> NsAliases = new Dictionary<string, NsAlias>(); 60private 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)
477Dictionary<VarPar, Template>? paramToTemplate = null; 478Dictionary<VarPar, QilFunction>? paramToFunction = null;
System\Xml\Xsl\Xslt\QilGeneratorEnv.cs (3)
302public static Dictionary<string, FunctionInfo> FunctionTable = CreateFunctionTable(); 303private static Dictionary<string, FunctionInfo> CreateFunctionTable() 305Dictionary<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)
41internal 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 (27)
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>();
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaManaged.cs (3)
26private static readonly Dictionary<CompositeMLDsaAlgorithm, AlgorithmMetadata> s_algorithmMetadata = CreateAlgorithmMetadata(); 554private static Dictionary<CompositeMLDsaAlgorithm, AlgorithmMetadata> CreateAlgorithmMetadata() 558Dictionary<CompositeMLDsaAlgorithm, AlgorithmMetadata> algorithmMetadata = new(count)
System\Security\Cryptography\CryptoConfig.cs (6)
40private static volatile Dictionary<string, string>? s_defaultOidHT; 41private static volatile Dictionary<string, object>? s_defaultNameHT; 45private static Dictionary<string, string> DefaultOidHT 55Dictionary<string, string> ht = new Dictionary<string, string>(capacity, StringComparer.OrdinalIgnoreCase); 108private static Dictionary<string, object> DefaultNameHT 119Dictionary<string, object> ht = new Dictionary<string, object>(capacity: capacity, comparer: StringComparer.OrdinalIgnoreCase);
System\Security\Cryptography\OidLookup.cs (2)
98private static readonly Dictionary<string, string> s_friendlyNameToOid = 101private static readonly Dictionary<string, string> s_oidToFriendlyName =
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 (21)
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 (6)
16private static readonly Dictionary<string, CmsSignature> s_lookup = 28static partial void PrepareRegistrationRsa(Dictionary<string, CmsSignature> lookup); 29static partial void PrepareRegistrationDsa(Dictionary<string, CmsSignature> lookup); 30static partial void PrepareRegistrationECDsa(Dictionary<string, CmsSignature> lookup); 31static partial void PrepareRegistrationMLDsa(Dictionary<string, CmsSignature> lookup); 32static 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.MLDsa.cs (1)
12static partial void PrepareRegistrationMLDsa(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.Http (1)
System\ServiceModel\Channels\HttpTransportSecurityHelpers.cs (1)
18private static Dictionary<string, int> s_targetNameCounter = new Dictionary<string, int>();
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 (42)
Internals\System\Runtime\GeneratedXmlSerializers.cs (2)
12private static Dictionary<string, Type> s_generatedSerializers = new Dictionary<string, Type>(); 14public static Dictionary<string, Type> GetGeneratedSerializers()
Internals\System\Runtime\MruCache.cs (1)
15private Dictionary<TKey, CacheEntry> _items;
Internals\System\Xml\XmlMtomReader.cs (4)
79private Dictionary<string, MimePart> _mimeParts; 2227private Dictionary<string, MimeHeader> headers = new Dictionary<string, MimeHeader>(); 2373private Dictionary<string, string> parameters; 2397public Dictionary<string, string> Parameters
System\IdentityModel\CryptoHelper.cs (1)
21private static Dictionary<string, Func<object>> s_algorithmDelegateDictionary = new Dictionary<string, Func<object>>();
System\IdentityModel\IdentityModelDictionary.cs (2)
18private Dictionary<string, int> _dictionary; 49Dictionary<string, int> dictionary = new Dictionary<string, int>(_count);
System\IdentityModel\Policy\DefaultEvaluationContext.cs (1)
16private Dictionary<string, object> _properties;
System\IdentityModel\SecurityUtils.cs (1)
332Dictionary<string, object> properties = new Dictionary<string, object>();
System\IdentityModel\Selectors\SecurityTokenRequirement.cs (1)
29private Dictionary<string, object> _properties;
System\ServiceModel\Channels\AddressHeaderCollection.cs (3)
139Dictionary<string, int> myHeaders = new Dictionary<string, int>(); 142Dictionary<string, int> otherHeaders = new Dictionary<string, int>(); 169internal void PopulateHeaderDictionary(StringBuilder builder, Dictionary<string, int> headers)
System\ServiceModel\Channels\DeliveryStrategy.cs (2)
50private Dictionary<Int64, ItemType> items; 126private static void DisposeItems(Dictionary<Int64, ItemType>.Enumerator items)
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (2)
480private Dictionary<IReliableChannelBinder, TState> _faultList = new Dictionary<IReliableChannelBinder, TState>(); 490Dictionary<IReliableChannelBinder, TState> tempFaultList;
System\ServiceModel\Channels\SecurityBindingElement.cs (2)
28private Dictionary<string, SupportingTokenParameters> _operationSupportingTokenParameters; 29private Dictionary<string, SupportingTokenParameters> _optionalOperationSupportingTokenParameters;
System\ServiceModel\Channels\ServiceChannelFactory.cs (1)
190Dictionary<Type, byte> supportedChannels = new Dictionary<Type, byte>();
System\ServiceModel\Description\TypeLoader.cs (2)
46private readonly Dictionary<Type, ContractDescription> _contracts; 47private readonly Dictionary<Type, MessageDescriptionItems> _messages;
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (2)
711private Dictionary<string, XmlMembersMapping> _xmlMappings; 746private Dictionary<string, XmlMembersMapping> XmlMappings
System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (1)
19private Dictionary<string, ProxyOperationRuntime> _operations;
System\ServiceModel\Dispatcher\OperationSelectorBehavior.cs (1)
38private Dictionary<IntPtr, string> _operationMap;
System\ServiceModel\MessageHeaderT.cs (1)
67private static Dictionary<Type, TypedHeaderManager> s_cache = new Dictionary<Type, TypedHeaderManager>();
System\ServiceModel\Security\ReceiveSecurityHeader.cs (2)
57private Dictionary<SecurityToken, ReadOnlyCollection<IAuthorizationPolicy>> _tokenPoliciesMapping; 258public Dictionary<SecurityToken, ReadOnlyCollection<IAuthorizationPolicy>> SecurityTokenAuthorizationPoliciesMapping
System\ServiceModel\Security\ScopedMessagePartSpecification.cs (2)
14private Dictionary<string, MessagePartSpecification> _actionParts; 15private Dictionary<string, MessagePartSpecification> _readOnlyNormalizedActionParts;
System\ServiceModel\Security\SecurityProtocol.cs (2)
31private Dictionary<string, Collection<SupportingTokenProviderSpecification>> _mergedSupportingTokenProvidersMap; 52public Dictionary<string, ICollection<SupportingTokenProviderSpecification>> ScopedSupportingTokenProviderSpecification { get; private set; }
System\ServiceModel\Security\SendSecurityHeaderElementContainer.cs (1)
22private Dictionary<SecurityToken, SecurityKeyIdentifierClause> _securityTokenMappedToIdentifierClause = null;
System\ServiceModel\Security\TransportSecurityProtocol.cs (1)
97IList<SecurityToken> signedEndorsingTokens, IList<SecurityToken> signedTokens, Dictionary<SecurityToken, ReadOnlyCollection<IAuthorizationPolicy>> tokenPoliciesMapping)
System\ServiceModel\Security\X509CertificateRecipientClientCredential.cs (1)
58public Dictionary<Uri, X509Certificate2> ScopedCertificates { get; }
System\ServiceModel\ServiceModelDictionary.cs (2)
18private Dictionary<string, int> _dictionary; 49Dictionary<string, int> dictionary = new Dictionary<string, int>(_count);
System\ServiceModel\SynchronizedKeyedCollection.cs (1)
18private Dictionary<K, T> _dictionary;
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 (40)
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)
194this Dictionary<string, TValue> dictionary, 201Dictionary<string, TValue>.AlternateLookup<ReadOnlySpan<char>> spanLookup = 231public static Dictionary<TKey, TValue> CreateDictionaryFromCollection<TKey, TValue>(
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
414private 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\JsonSerializer.Read.HandlePropertyName.cs (2)
154var newDict = new Dictionary<string, object>(); 174var newDict = new Dictionary<string, JsonElement>();
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; 1052public Dictionary<string, (JsonPropertyInfo, int index)> AddedProperties = new(options.PropertyNameCaseInsensitive ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal); 1053public Dictionary<string, JsonPropertyInfo>? IgnoredProperties; 1075Dictionary<string, JsonPropertyInfo> propertyIndex = new(properties.Count, comparer); 1153Dictionary<ParameterLookupKey, JsonParameterInfoValues> parameterIndex = new(parameterInfoValues.Length); 1191Dictionary<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 (8)
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 (1)
114var nodeIndex = new Dictionary<T, int>(comparer) { [entryNode] = 0 }; // the node-to-integer mapping
System.Text.RegularExpressions (20)
System\Text\RegularExpressions\RegexCharClass.cs (1)
119private 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)
30private readonly Dictionary<(int ordinal, BDD? one, BDD? zero), BDD> _bddCache = new(); 36private readonly Dictionary<(int op, BDD a, BDD? b), BDD> _operationCache = new(); // op is BooleanOperation; using int to reuse generic instantiation with _bddCache 360BDD 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)
40private readonly Dictionary<TSet, SymbolicRegexNode<TSet>> _singletonCache = new(); 47internal readonly Dictionary<NodeCacheKey, SymbolicRegexNode<TSet>> _nodeCache = new(); 95internal readonly Dictionary<(SymbolicRegexNode<TSet>, TSet elem, uint context), SymbolicRegexNode<TSet>> _derivativeCache = new(); 103internal readonly Dictionary<(SymbolicRegexNode<TSet>, uint), SymbolicRegexNode<TSet>> _pruneLowerPriorityThanNullabilityCache = new(); 111internal 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 (25)
RegexGenerator.cs (5)
108Dictionary<string, string[]> requiredHelpers = new(); 169var emittedExpressions = new Dictionary<(string Pattern, RegexOptions Options, int? Timeout), RegexMethod>(); 175Dictionary<string, string[]> requiredHelpers = new(); 184else if (result is ValueTuple<RegexMethod, string, Dictionary<string, string[]>, CompilationData> regexImpl) 249else if (result is ValueTuple<RegexMethod, string, Dictionary<string, string[]>, CompilationData> regexImpl)
RegexGenerator.Emitter.cs (18)
231private static void EmitRegexDerivedTypeRunnerFactory(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 341private static void AddWordCharHelpersSupport(Dictionary<string, string[]> requiredHelpers) 370private static void AddIsWordCharHelper(Dictionary<string, string[]> requiredHelpers) 394private static void AddIsBoundaryWordCharHelper(Dictionary<string, string[]> requiredHelpers) 418private static void AddIsECMABoundaryWordCharHelper(Dictionary<string, string[]> requiredHelpers) 434private static void AddIsBoundaryHelper(Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 456private static void AddIsPreWordCharBoundaryHelper(Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 478private static void AddIsPostWordCharBoundaryHelper(Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 497private static void AddIsECMABoundaryHelper(Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 519private static string EmitSearchValuesOrLiteral(ReadOnlySpan<char> chars, Dictionary<string, string[]> requiredHelpers) 533private static string EmitSearchValues(ReadOnlySpan<char> charsSpan, Dictionary<string, string[]> requiredHelpers, string? fieldName = null) 630private static string EmitIndexOfAnyCustomHelper(string set, Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 837private static void EmitTryFindNextPossibleStartingPosition(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 1572private static void EmitTryMatchAtCurrentPosition(IndentedTextWriter writer, RegexMethod rm, Dictionary<string, string[]> requiredHelpers, bool checkOverflow) 1603Dictionary<string, int> usedNames = new(); 1616Dictionary<string, string[]> additionalLocalFunctions = new(); 5046Dictionary<string, string[]> requiredHelpers, 5121private 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)
119private 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)
465private 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)
166private 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)) 469ResourceTable.TryGetValue(CultureInfo.InvariantCulture, out Dictionary<string, object?>? resourceSet); 545Dictionary<string, object?> invariant = GetResourceSet(CultureInfo.InvariantCulture)!; 546Dictionary<string, object?>? metadata; 619Dictionary<string, object?>? resourceSet = GetResourceSet(CultureInfo.InvariantCulture); 649Dictionary<string, object?>? resourceSet = GetResourceSet(CultureInfo.InvariantCulture); 687Dictionary<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)
1956private 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)
1388private Dictionary<string, bool> _extenderProperties; 1390private 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 (30)
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\BindingNavigatorDesignerTests.cs (2)
56Dictionary<string, object> defaultValues = new(); 70Dictionary<string, object> defaultValues = new();
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 (22)
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\FormTests.cs (1)
2679Dictionary<Task, Form> formControlTasks = [];
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())
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 (12)
ArrayBuilder.cs (4)
386internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 391var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 404var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 418var dictionary = new Dictionary<K, ImmutableArray<T>>(accumulator.Count, comparer);
RulesetToEditorconfigConverter.cs (3)
65var ruleIdToComments = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 104static void ProcessComments(RuleSet ruleset, HashSet<string> processedRulesetPaths, Dictionary<string, string> ruleIdToComments) 120static void PopulateRuleIdToComments(string rulesetFilePath, Dictionary<string, string> ruleIdToComments)
TemporaryDictionary`2.cs (5)
21private static readonly Dictionary<TKey, TValue> EmptyDictionary = new(); 62private readonly Dictionary<TKey, TValue> _dictionary; 64public Enumerable(Dictionary<TKey, TValue> dictionary) 75private Dictionary<TKey, TValue>.Enumerator _enumerator; 77public Enumerator(Dictionary<TKey, TValue>.Enumerator enumerator)
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; 279public 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)
764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 767var dictionary = new Dictionary<K, ImmutableArray<T>>(comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (7)
700this Dictionary<TKey, ImmutableArray<TValue>> dictionary, 798internal static void AddToMultiValueDictionaryBuilder<K, T>(Dictionary<K, object> accumulator, K key, T item) 826(Dictionary<TKey, object> dictionary, Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> result) 860internal static Dictionary<TKey, ImmutableArray<TNamedTypeSymbol>> GetTypesFromMemberMap<TKey, TNamespaceOrTypeSymbol, TNamedTypeSymbol> 861(Dictionary<TKey, ImmutableArray<TNamespaceOrTypeSymbol>> map, IEqualityComparer<TKey> comparer) 872var 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)
560internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 565var dictionary1 = new Dictionary<K, ImmutableArray<T>>(1, comparer); 578var accumulator = new Dictionary<K, ArrayBuilder<T>>(Count, comparer); 592var 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)
15public static Dictionary<K, V> ToDictionaryAndFree<K, V>(this PooledDictionary<K, V> builders) 18var dictionary = new Dictionary<K, V>(builders.Count); 29public static Dictionary<K, ImmutableArray<V>> ToMultiDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> builders) 32var 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)
579Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 600Dictionary<ISymbol, int> result, INamedTypeSymbol containingType, CancellationToken cancellationToken) 622Dictionary<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
vbc (4)
src\Compilers\Shared\BuildServerConnection.cs (4)
454private static IntPtr CreateEnvironmentBlock(Dictionary<string, string> environmentVariables) 484internal static Dictionary<string, string>? GetServerEnvironmentVariables(System.Collections.IDictionary currentEnvironment, ICompilerServerLogger? logger = null) 492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger);
VBCSCompiler (4)
src\Compilers\Shared\BuildServerConnection.cs (4)
454private static IntPtr CreateEnvironmentBlock(Dictionary<string, string> environmentVariables) 484internal static Dictionary<string, string>? GetServerEnvironmentVariables(System.Collections.IDictionary currentEnvironment, ICompilerServerLogger? logger = null) 492var environmentVariables = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger);
VBCSCompiler.UnitTests (17)
BuildServerConnectionTests.cs (2)
150var envVars = BuildServerConnection.GetServerEnvironmentVariables(currentEnvironment); 191var envVars = BuildServerConnection.GetServerEnvironmentVariables(testEnvironment);
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)
32var values = query
Wasm.Performance.TestApp (18)
Person.cs (1)
14public Dictionary<string, bool> SecurityClearances { get; set; }
PersonJsonContext.DictionaryStringBoolean.g.cs (10)
10private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, bool>>? _DictionaryStringBoolean; 16public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, bool>> DictionaryStringBoolean 19get => _DictionaryStringBoolean ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, bool>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.Dictionary<string, bool>)); 22private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, bool>> Create_DictionaryStringBoolean(global::System.Text.Json.JsonSerializerOptions options) 24if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.Dictionary<string, bool>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.Dictionary<string, bool>> jsonTypeInfo)) 26var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.Dictionary<string, bool>> 32jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateDictionaryInfo<global::System.Collections.Generic.Dictionary<string, bool>, string, bool>(options, info); 42private void DictionaryStringBooleanSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.Dictionary<string, bool>? value)
PersonJsonContext.GetJsonTypeInfo.g.cs (1)
23if (type == typeof(global::System.Collections.Generic.Dictionary<string, bool>))
PersonJsonContext.Person.g.cs (3)
128var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, bool>> 143AttributeProviderFactory = static () => typeof(global::Wasm.Performance.TestApp.Person).GetProperty("SecurityClearances", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, bool>), global::System.Array.Empty<global::System.Type>(), null), 146properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, bool>>(options, info4);
Shared_ComplexTable_Cell_razor.g.cs (2)
212private protected Dictionary<string, object> Attributes 216var attributes = new Dictionary<string, object>();
Shared_FastGrid_Grid_razor.g.cs (1)
206[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> Attributes { 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>();