5 interfaces inheriting from IDictionary
Microsoft.AspNetCore.Http.Features (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.Maui (1)
Microsoft.ML.GenAI.Core (1)
System.Xaml (1)
180 implementations of IDictionary
dotnet-svcutil-lib (1)
GenerateDocumentationAndConfigFiles (5)
Metrics (5)
Metrics.Legacy (5)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Connections.Abstractions (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Microsoft.AspNetCore.Http (3)
Microsoft.AspNetCore.Http.Abstractions (1)
Microsoft.AspNetCore.Mvc.Abstractions (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.Owin (2)
Microsoft.AspNetCore.Razor.Runtime (1)
Microsoft.AspNetCore.Shared.Tests (3)
Microsoft.Build.Framework (3)
Microsoft.CodeAnalysis (5)
Microsoft.CodeAnalysis.Analyzers (5)
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
Microsoft.CodeAnalysis.CodeStyle (5)
Microsoft.CodeAnalysis.Collections.Package (5)
Microsoft.CodeAnalysis.Extensions.Package (5)
Microsoft.CodeAnalysis.InteractiveHost (5)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (5)
Microsoft.CodeAnalysis.PublicApiAnalyzers (5)
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
Microsoft.CodeAnalysis.Threading.Package (5)
Microsoft.CodeAnalysis.Workspaces (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions (3)
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.Ollama (1)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
Microsoft.Gen.Metrics.Unit.Tests (1)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
Microsoft.Interop.SourceGeneration (1)
Microsoft.Maui.Controls (3)
Microsoft.ML.Core (1)
Microsoft.ML.SearchSpace (3)
Microsoft.ML.TorchSharp (1)
PresentationCore (4)
PresentationFramework (2)
Roslyn.Diagnostics.Analyzers (5)
Shared (1)
System.Collections (3)
System.Collections.Concurrent (1)
System.Collections.Immutable (8)
System.Composition.Hosting (1)
System.Diagnostics.DiagnosticSource (1)
System.Linq.Expressions (1)
System.Net.Http (1)
artifacts\obj\System.Net.Http\Debug\net10.0\System.Net.Http.notsupported.cs (1)
304public sealed partial class HttpRequestOptions : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object?>>, System.Collections.Generic.IDictionary<string, object?>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object?>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<string, object?>>, System.Collections.Generic.IReadOnlyDictionary<string, object?>, System.Collections.IEnumerable
System.Private.CoreLib (3)
System.Security.Cryptography.Cose (1)
System.ServiceModel.Primitives (1)
System.Speech (1)
System.Text.Json (1)
System.Xaml.Tests (2)
Test.Utilities (5)
Text.Analyzers (5)
3709 references to IDictionary
AnalyzerRunner (1)
aspire (4)
DotNetCliRunner.cs (4)
24Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken);
189public async Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
208IDictionary<string, string>? finalEnv = env;
394public virtual async Task<int> ExecuteAsync(string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
Aspire.Cli.Tests (4)
DotNet\DotNetCliRunnerTests.cs (2)
273Action<string[], IDictionary<string, string>?, DirectoryInfo, TaskCompletionSource<IAppHostBackchannel>?, DotNetCliRunnerInvocationOptions> assertionCallback,
277public override Task<int> ExecuteAsync(string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
TestServices\TestDotNetCliRunner.cs (2)
19public Func<FileInfo, bool, bool, string[], IDictionary<string, string>?, TaskCompletionSource<IAppHostBackchannel>?, DotNetCliRunnerInvocationOptions, CancellationToken, Task<int>>? RunAsyncCallback { get; set; }
74public Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
Aspire.Dashboard (9)
Aspire.Dashboard.Tests (1)
Aspire.EndToEnd.Tests (2)
Aspire.Hosting (9)
Aspire.Hosting.Azure (4)
Aspire.Hosting.Azure.CosmosDB (5)
Aspire.Hosting.Azure.EventHubs (4)
Aspire.Hosting.Azure.ServiceBus (5)
Aspire.Hosting.Azure.Storage (4)
Aspire.Hosting.Azure.Tests (1)
Aspire.Hosting.Tests (1)
Aspire.Hosting.Yarp (1)
Aspire.RabbitMQ.Client (4)
Aspire.Templates.Tests (2)
ClientSample (1)
ConfigurationSchemaGenerator (1)
ConfigurationSchemaGenerator.Tests (4)
CSharpSyntaxGenerator (4)
dotnet-openapi (5)
dotnet-svcutil-lib (67)
dotnet-user-jwts (4)
dotnet-user-secrets (3)
FilesWebSite (1)
GenerateDocumentationAndConfigFiles (50)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (4)
263private static bool TryGetValue(IDictionary<string, string>? dictionary, string key, [NotNullWhen(true)] out string? value)
271private static bool TryGetValue(IDictionary<string, ISymbol>? dictionary, string key, [NotNullWhen(true)] out string? value)
340IDictionary<string, ISymbol>? parameterToExistingFieldMap,
341IDictionary<string, string>? parameterToNewFieldMap,
HelixTestRunner (1)
http2cat (2)
Identity.DefaultUI.WebSite (2)
IIS.FunctionalTests (2)
IIS.LongTests (2)
IIS.NewHandler.FunctionalTests (2)
IIS.NewShim.FunctionalTests (2)
IISExpress.FunctionalTests (2)
illink (2)
InMemory.FunctionalTests (11)
Interop.FunctionalTests (1)
InteropTests (1)
Metrics (38)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
Metrics.Legacy (38)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
Microsoft.Analyzers.Local (1)
Microsoft.Arcade.Test.Common (1)
Microsoft.AspNetCore (5)
Microsoft.AspNetCore.Analyzer.Testing (1)
Microsoft.AspNetCore.App.Analyzers.Test (7)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (7)
53string input, out string output, out int? position, out IDictionary<string, List<TextSpan>> spans)
178private static V GetOrAdd<K, V>(IDictionary<K, V> dictionary, K key, Func<K, V> function)
191IDictionary<string, List<TextSpan>> spans,
212Parse(input, out output, out cursorPositionOpt, out var dictionary);
220string input, out string output, out int? cursorPositionOpt, out IDictionary<string, ImmutableArray<TextSpan>> spans)
222Parse(input, out output, out cursorPositionOpt, out var dictionary);
226public static void GetSpans(string input, out string output, out IDictionary<string, ImmutableArray<TextSpan>> spans)
Microsoft.AspNetCore.Authentication.Abstractions (6)
Microsoft.AspNetCore.Authentication.Core (2)
Microsoft.AspNetCore.Authentication.Google (5)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (3)
Microsoft.AspNetCore.Authentication.Negotiate (3)
Microsoft.AspNetCore.Authentication.Negotiate.Test (2)
Microsoft.AspNetCore.Authentication.OAuth (4)
Microsoft.AspNetCore.Authentication.OpenIdConnect (4)
Microsoft.AspNetCore.Authentication.Test (24)
OpenIdConnect\TestSettings.cs (21)
49public IDictionary<string, string> ValidateChallengeFormPost(string responseBody, params string[] parametersToValidate)
51IDictionary<string, string> formInputs = null;
87public IDictionary<string, string> ValidateSignoutFormPost(TestTransaction transaction, params string[] parametersToValidate)
89IDictionary<string, string> formInputs = null;
125public IDictionary<string, string> ValidateChallengeRedirect(Uri redirectUri, params string[] parametersToValidate) =>
128public IDictionary<string, string> ValidateSignoutRedirect(Uri redirectUri, params string[] parametersToValidate) =>
131private IDictionary<string, string> ValidateRedirectCore(Uri redirectUri, OpenIdConnectRequestType requestType, string[] parametersToValidate)
165IDictionary<string, string> actualValues,
238private void ValidateClientId(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
241private void ValidateResponseType(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
244private void ValidateResponseMode(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
247private void ValidateScope(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
250private void ValidateRedirectUri(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
253private void ValidateResource(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
256private void ValidateState(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
259private static void ValidateSkuTelemetry(IDictionary<string, string> actualParams, ICollection<string> errors)
267private void ValidateVersionTelemetry(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
270private void ValidatePostLogoutRedirectUri(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
273private void ValidateMaxAge(IDictionary<string, string> actualQuery, ICollection<string> errors, bool htmlEncoded)
287private void ValidatePrompt(IDictionary<string, string> actualParams, ICollection<string> errors, bool htmlEncoded) =>
293IDictionary<string, string> actualParams,
Microsoft.AspNetCore.BrowserTesting (3)
Microsoft.AspNetCore.Components (24)
Microsoft.AspNetCore.Components.Authorization.Tests (1)
Microsoft.AspNetCore.Components.Endpoints (18)
FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (6)
35var _ when type == (typeof(IDictionary<TKey, TValue>)) => true,
61var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null => true,
92var _ when type == (typeof(IDictionary<TKey, TValue>)) =>
93new DictionaryConverter<IDictionary<TKey, TValue>,
95IDictionary<TKey, TValue>,
143var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null =>
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
Microsoft.AspNetCore.Components.Forms.Tests (1)
Microsoft.AspNetCore.Components.Server (11)
Microsoft.AspNetCore.Components.Server.Tests (18)
Circuits\ComponentHubTest.cs (9)
153handleRegistryMock.Setup(m => m.SetCircuit(It.IsAny<IDictionary<object, object>>(), It.IsAny<object>(), It.IsAny<CircuitHost>()))
154.Callback<IDictionary<object, object>, object, CircuitHost>((circuitHandles, circuitKey, circuitHost) =>
158handleRegistryMock.Setup(m => m.GetCircuit(It.IsAny<IDictionary<object, object>>(), It.IsAny<object>()))
160handleRegistryMock.Setup(m => m.GetCircuitHandle(It.IsAny<IDictionary<object, object>>(), It.IsAny<object>()))
258handleRegistryMock.Setup(m => m.SetCircuit(It.IsAny<IDictionary<object, object>>(), It.IsAny<object>(), It.IsAny<CircuitHost>()))
259.Callback<IDictionary<object, object>, object, CircuitHost>((circuitHandles, circuitKey, circuitHost) =>
339public CircuitHandle GetCircuitHandle(IDictionary<object, object> circuitHandles, object circuitKey)
344public CircuitHost GetCircuit(IDictionary<object, object> circuitHandles, object circuitKey)
353public void SetCircuit(IDictionary<object, object> circuitHandles, object circuitKey, CircuitHost circuitHost)
Microsoft.AspNetCore.Components.Tests (15)
Microsoft.AspNetCore.Components.Web (1)
Microsoft.AspNetCore.Components.Web.Tests (1)
Microsoft.AspNetCore.Components.WebAssembly (7)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.Components.WebView (8)
Microsoft.AspNetCore.Components.WebView.Maui (2)
Microsoft.AspNetCore.Components.WebView.Photino (2)
Microsoft.AspNetCore.Components.WebView.Test (3)
Microsoft.AspNetCore.Components.WebView.WindowsForms (6)
Microsoft.AspNetCore.Components.WebView.Wpf (4)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (2)
Microsoft.AspNetCore.Connections.Abstractions (15)
ConnectionItems.cs (9)
30public ConnectionItems(IDictionary<object, object?> items)
38public IDictionary<object, object?> Items { get; }
41object? IDictionary<object, object?>.this[object key]
54void IDictionary<object, object?>.Add(object key, object? value)
59bool IDictionary<object, object?>.ContainsKey(object key)
64ICollection<object> IDictionary<object, object?>.Keys
69bool IDictionary<object, object?>.Remove(object key)
74bool IDictionary<object, object?>.TryGetValue(object key, out object? value)
79ICollection<object?> IDictionary<object, object?>.Values
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Diagnostics.HealthChecks (4)
Microsoft.AspNetCore.Diagnostics.Middleware (5)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (5)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Microsoft.AspNetCore.Grpc.Swagger (1)
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.HeaderPropagation (5)
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
Microsoft.AspNetCore.Hosting (3)
Microsoft.AspNetCore.Hosting.Tests (2)
Microsoft.AspNetCore.Http (26)
Internal\ItemsDictionary.cs (11)
15private IDictionary<object, object?>? _items;
20public ItemsDictionary(IDictionary<object, object?> items)
25public IDictionary<object, object?> Items => this;
28object? IDictionary<object, object?>.this[object key]
45void IDictionary<object, object?>.Add(object key, object? value)
51bool IDictionary<object, object?>.ContainsKey(object key)
54ICollection<object> IDictionary<object, object?>.Keys
67bool IDictionary<object, object?>.Remove(object key)
70bool IDictionary<object, object?>.TryGetValue(object key, out object? value)
76ICollection<object?> IDictionary<object, object?>.Values
163public static readonly IDictionary<object, object?> Dictionary = new Dictionary<object, object?>();
Microsoft.AspNetCore.Http.Abstractions (14)
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
Microsoft.AspNetCore.Http.Connections (2)
Microsoft.AspNetCore.Http.Connections.Client (3)
Microsoft.AspNetCore.Http.Extensions (10)
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (6)
35var _ when type == (typeof(IDictionary<TKey, TValue>)) => true,
61var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null => true,
92var _ when type == (typeof(IDictionary<TKey, TValue>)) =>
93new DictionaryConverter<IDictionary<TKey, TValue>,
95IDictionary<TKey, TValue>,
143var _ when type.IsAssignableTo(typeof(IDictionary<TKey, TValue>)) && type.GetConstructor(Type.EmptyTypes) != null =>
Microsoft.AspNetCore.Http.Features (4)
Microsoft.AspNetCore.Http.Results (6)
Microsoft.AspNetCore.Http.Results.Tests (2)
Microsoft.AspNetCore.Http.Tests (3)
Microsoft.AspNetCore.Identity (1)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
Microsoft.AspNetCore.Identity.Test (1)
Microsoft.AspNetCore.InternalTesting (2)
Microsoft.AspNetCore.JsonPatch (12)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (12)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (34)
TestObjectModels\DynamicTestObject.cs (16)
13public object this[string key] { get => ((IDictionary<string, object>)_dictionary)[key]; set => ((IDictionary<string, object>)_dictionary)[key] = value; }
15public ICollection<string> Keys => ((IDictionary<string, object>)_dictionary).Keys;
17public ICollection<object> Values => ((IDictionary<string, object>)_dictionary).Values;
19public int Count => ((IDictionary<string, object>)_dictionary).Count;
21public bool IsReadOnly => ((IDictionary<string, object>)_dictionary).IsReadOnly;
25((IDictionary<string, object>)_dictionary).Add(key, value);
30((IDictionary<string, object>)_dictionary).Add(item);
35((IDictionary<string, object>)_dictionary).Clear();
40return ((IDictionary<string, object>)_dictionary).Contains(item);
45return ((IDictionary<string, object>)_dictionary).ContainsKey(key);
50((IDictionary<string, object>)_dictionary).CopyTo(array, arrayIndex);
55return ((IDictionary<string, object>)_dictionary).GetEnumerator();
60return ((IDictionary<string, object>)_dictionary).Remove(key);
65return ((IDictionary<string, object>)_dictionary).Remove(item);
70return ((IDictionary<string, object>)_dictionary).TryGetValue(key, out value);
WriteOnceDynamicTestObject.cs (13)
27public object this[string key] { get => ((IDictionary<string, object>)_dictionary)[key]; set => SetValueForKey(key, value); }
29public ICollection<string> Keys => ((IDictionary<string, object>)_dictionary).Keys;
31public ICollection<object> Values => ((IDictionary<string, object>)_dictionary).Values;
33public int Count => ((IDictionary<string, object>)_dictionary).Count;
35public bool IsReadOnly => ((IDictionary<string, object>)_dictionary).IsReadOnly;
49((IDictionary<string, object>)_dictionary).Clear();
54return ((IDictionary<string, object>)_dictionary).Contains(item);
59return ((IDictionary<string, object>)_dictionary).ContainsKey(key);
64((IDictionary<string, object>)_dictionary).CopyTo(array, arrayIndex);
69return ((IDictionary<string, object>)_dictionary).GetEnumerator();
74return ((IDictionary<string, object>)_dictionary).Remove(key);
79return ((IDictionary<string, object>)_dictionary).Remove(item);
84return ((IDictionary<string, object>)_dictionary).TryGetValue(key, out value);
Microsoft.AspNetCore.JsonPatch.Tests (44)
TestObjectModels\DynamicTestObject.cs (16)
13public object this[string key] { get => ((IDictionary<string, object>)_dictionary)[key]; set => ((IDictionary<string, object>)_dictionary)[key] = value; }
15public ICollection<string> Keys => ((IDictionary<string, object>)_dictionary).Keys;
17public ICollection<object> Values => ((IDictionary<string, object>)_dictionary).Values;
19public int Count => ((IDictionary<string, object>)_dictionary).Count;
21public bool IsReadOnly => ((IDictionary<string, object>)_dictionary).IsReadOnly;
25((IDictionary<string, object>)_dictionary).Add(key, value);
30((IDictionary<string, object>)_dictionary).Add(item);
35((IDictionary<string, object>)_dictionary).Clear();
40return ((IDictionary<string, object>)_dictionary).Contains(item);
45return ((IDictionary<string, object>)_dictionary).ContainsKey(key);
50((IDictionary<string, object>)_dictionary).CopyTo(array, arrayIndex);
55return ((IDictionary<string, object>)_dictionary).GetEnumerator();
60return ((IDictionary<string, object>)_dictionary).Remove(key);
65return ((IDictionary<string, object>)_dictionary).Remove(item);
70return ((IDictionary<string, object>)_dictionary).TryGetValue(key, out value);
WriteOnceDynamicTestObject.cs (13)
27public object this[string key] { get => ((IDictionary<string, object>)_dictionary)[key]; set => SetValueForKey(key, value); }
29public ICollection<string> Keys => ((IDictionary<string, object>)_dictionary).Keys;
31public ICollection<object> Values => ((IDictionary<string, object>)_dictionary).Values;
33public int Count => ((IDictionary<string, object>)_dictionary).Count;
35public bool IsReadOnly => ((IDictionary<string, object>)_dictionary).IsReadOnly;
49((IDictionary<string, object>)_dictionary).Clear();
54return ((IDictionary<string, object>)_dictionary).Contains(item);
59return ((IDictionary<string, object>)_dictionary).ContainsKey(key);
64((IDictionary<string, object>)_dictionary).CopyTo(array, arrayIndex);
69return ((IDictionary<string, object>)_dictionary).GetEnumerator();
74return ((IDictionary<string, object>)_dictionary).Remove(key);
79return ((IDictionary<string, object>)_dictionary).Remove(item);
84return ((IDictionary<string, object>)_dictionary).TryGetValue(key, out value);
Microsoft.AspNetCore.MiddlewareAnalysis (1)
Microsoft.AspNetCore.Mvc.Abstractions (18)
ModelBinding\Validation\ValidationStateDictionary.cs (9)
46ValidationStateEntry IDictionary<object, ValidationStateEntry>.this[object key]
58public bool IsReadOnly => ((IDictionary<object, ValidationStateEntry>)_inner).IsReadOnly;
61public ICollection<object> Keys => ((IDictionary<object, ValidationStateEntry>)_inner).Keys;
64public ICollection<ValidationStateEntry> Values => ((IDictionary<object, ValidationStateEntry>)_inner).Values;
77((IDictionary<object, ValidationStateEntry>)_inner).Add(item);
95return ((IDictionary<object, ValidationStateEntry>)_inner).Contains(item);
107((IDictionary<object, ValidationStateEntry>)_inner).CopyTo(array, arrayIndex);
113return ((IDictionary<object, ValidationStateEntry>)_inner).GetEnumerator();
137return ((IDictionary<object, ValidationStateEntry>)_inner).GetEnumerator();
Microsoft.AspNetCore.Mvc.Core (68)
Microsoft.AspNetCore.Mvc.Core.Test (65)
ModelBinding\Binders\DictionaryModelBinderTest.cs (25)
45var dictionary = Assert.IsAssignableFrom<IDictionary<int, string>>(bindingContext.Result.Model);
97public static TheoryData<string, string, IDictionary<string, string>> StringToStringData
112return new TheoryData<string, string, IDictionary<string, string>>
129IDictionary<string, string> dictionary)
153var resultDictionary = Assert.IsAssignableFrom<IDictionary<string, string>>(bindingContext.Result.Model);
162IDictionary<string, string> dictionary)
187var resultDictionary = Assert.IsAssignableFrom<IDictionary<string, string>>(bindingContext.Result.Model);
224var resultDictionary = Assert.IsAssignableFrom<IDictionary<string, string>>(bindingContext.Result.Model);
264public static TheoryData<IDictionary<long, int>> LongToIntData
279return new TheoryData<IDictionary<long, int>> { dictionaryWithOne, dictionaryWithThree };
285public async Task BindModel_FallsBackToBindingValues_WithValueTypes(IDictionary<long, int> dictionary)
311var resultDictionary = Assert.IsAssignableFrom<IDictionary<long, int>>(bindingContext.Result.Model);
361var resultDictionary = Assert.IsAssignableFrom<IDictionary<int, ModelWithProperties>>(bindingContext.Result.Model);
382IDictionary<string, string> dictionary)
594{ typeof(IDictionary<int, int>), true },
638IDictionary<string, string> dictionary)
654private static IValueProvider CreateTestValueProvider(string keyFormat, IDictionary<string, string> dictionary)
666IDictionary<string, string> values = null)
692public IDictionary<int, string> DictionaryProperty { get; set; }
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
Microsoft.AspNetCore.Mvc.IntegrationTests (23)
DictionaryModelBinderIntegrationTest.cs (20)
1089typeof(IDictionary<string, string>),
1119typeof(IDictionary<string, string>),
1186var model = modelBindingResult.Model as IDictionary<string, string>;
1518private readonly IDictionary<string, string> _data = new Dictionary<string, string>();
1520string IDictionary<string, string>.this[string key]
1549ICollection<string> IDictionary<string, string>.Keys
1557ICollection<string> IDictionary<string, string>.Values
1570void IDictionary<string, string>.Add(string key, string value)
1585bool IDictionary<string, string>.ContainsKey(string key)
1610bool IDictionary<string, string>.Remove(string key)
1615bool IDictionary<string, string>.TryGetValue(string key, out string value)
1623private readonly IDictionary<TKey, TValue> _data = new Dictionary<TKey, TValue>();
1625TValue IDictionary<TKey, TValue>.this[TKey key]
1654ICollection<TKey> IDictionary<TKey, TValue>.Keys
1662ICollection<TValue> IDictionary<TKey, TValue>.Values
1675void IDictionary<TKey, TValue>.Add(TKey key, TValue value)
1690bool IDictionary<TKey, TValue>.ContainsKey(TKey key)
1715bool IDictionary<TKey, TValue>.Remove(TKey key)
1720bool IDictionary<TKey, TValue>.TryGetValue(TKey key, out TValue value)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (6)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (26)
Microsoft.AspNetCore.Mvc.Razor (8)
Microsoft.AspNetCore.Mvc.Razor.Test (3)
Microsoft.AspNetCore.Mvc.RazorPages (15)
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
Microsoft.AspNetCore.Mvc.TagHelpers (16)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (16)
FormActionTagHelperTest.cs (8)
165public static TheoryData<IDictionary<string, string>, IDictionary<string, object>> RouteValuesData
169return new TheoryData<IDictionary<string, string>, IDictionary<string, object>>
197IDictionary<string, string> routeValues,
198IDictionary<string, object> expectedRouteValues)
257IDictionary<string, string> routeValues,
258IDictionary<string, object> expectedRouteValues)
Microsoft.AspNetCore.Mvc.TestDiagnosticListener (2)
Microsoft.AspNetCore.Mvc.Testing (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (201)
HtmlHelper.cs (21)
129/// If the <paramref name="value"/> is already an <see cref="IDictionary{String, Object}"/> instance, then it
138public static IDictionary<string, object> ObjectToDictionary(object value)
150/// If the object is already an <see cref="IDictionary{String, Object}"/> instance, then a shallow copy is
157public static IDictionary<string, object> AnonymousObjectToHtmlAttributes(object htmlAttributes)
159if (htmlAttributes is IDictionary<string, object> dictionary)
474/// <param name="additionalViewData">The additional view data, either an <see cref="IDictionary{String, Object}"/> or some other object whose public properties will be merged with the <see cref="T:ViewDataDictionary" />.</param>
711/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
813/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
877/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
888/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
935/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
946/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
991/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
1036/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
1088/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
1132/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
1164/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
1198/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
1232/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
1266/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
1298/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
IHtmlGenerator.cs (23)
55/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
59/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
89/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
93/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
128/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
161/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
166/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
190/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
196/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
220/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
225/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
249/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
271/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
292/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
314/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
338/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
342/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
378/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
426/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
475/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
498/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
527/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
550/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
Rendering\HtmlHelperFormExtensions.cs (11)
99/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the HTML
138/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the HTML
173/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
235/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
303/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
341/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the HTML
377/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
407/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
496/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
558/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
593/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the HTML
Rendering\HtmlHelperLinkExtensions.cs (12)
49/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
83/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
88/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the HTML
152/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
188/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
193/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the HTML
228/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
285/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
317/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
322/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the HTML
355/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the route
360/// <see cref="System.Collections.Generic.IDictionary{String, Object}"/> instance containing the HTML
Rendering\IHtmlHelper.cs (21)
71/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
75/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
105/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
116/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
141/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
152/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
184/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
209/// An anonymous <see cref="object"/> or <see cref="IDictionary{String, Object}"/> that can contain additional
272/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
301/// An anonymous <see cref="object"/> or <see cref="IDictionary{String, Object}"/> that can contain additional
413/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
437/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
460/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
503/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
542/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
594/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
598/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
625/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
653/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
675/// Alternatively, an <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
698/// Alternatively, an <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
Rendering\IHtmlHelperOfT.cs (12)
36/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
59/// An anonymous <see cref="object"/> or <see cref="IDictionary{String, Object}"/> that can contain additional
133/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
160/// An anonymous <see cref="object"/> or <see cref="IDictionary{String, Object}"/> that can contain additional
198/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
226/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
252/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
284/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
317/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
349/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
379/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
405/// Alternatively, an <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (55)
ExpressionHelperTest.cs (5)
80(Expression<Func<IDictionary<string, TestModel>, string>>)(model => model[key].SelectedCategory.CategoryName.MainCategory),
215(Expression<Func<IDictionary<string, TestModel>, string>>)(model => model[key].SelectedCategory.CategoryName.MainCategory),
338(Expression<Func<IDictionary<string, TestModel>, string>>)(model => model[key].SelectedCategory.CategoryName.MainCategory),
342(Expression<Func<IDictionary<string, TestModel>, string>>)(model => model[key].SelectedCategory.CategoryName.MainCategory),
343(Expression<Func<IDictionary<string, LowerModel>, string>>)(model => model[key].selectedcategory.CategoryName.MainCategory)
Microsoft.AspNetCore.OpenApi.Tests (27)
Microsoft.AspNetCore.OutputCaching (3)
Microsoft.AspNetCore.Owin (66)
DictionaryStringArrayWrapper.cs (9)
26string[] IDictionary<string, string[]>.this[string key]
28get { return ((IDictionary<string, StringValues>)Inner)[key]; }
36ICollection<string> IDictionary<string, string[]>.Keys => Inner.Keys;
38ICollection<string[]> IDictionary<string, string[]>.Values => Inner.Values.Select(Convert).ToList();
42void IDictionary<string, string[]>.Add(string key, string[] value) => Inner.Add(key, value);
48bool IDictionary<string, string[]>.ContainsKey(string key) => Inner.ContainsKey(key);
66bool IDictionary<string, string[]>.Remove(string key) => Inner.Remove(key);
68bool IDictionary<string, string[]>.TryGetValue(string key, out string[] value)
85internal ConvertingEnumerator(IDictionary<string, StringValues> inner)
DictionaryStringValuesWrapper.cs (10)
14public readonly IDictionary<string, string[]> Inner;
16public DictionaryStringValuesWrapper(IDictionary<string, string[]> inner)
37StringValues IDictionary<string, StringValues>.this[string key]
81ICollection<string> IDictionary<string, StringValues>.Keys => Inner.Keys;
83ICollection<StringValues> IDictionary<string, StringValues>.Values => Inner.Values.Select(Convert).ToList();
87void IDictionary<string, StringValues>.Add(string key, StringValues value) => Inner.Add(key, value);
93bool IDictionary<string, StringValues>.ContainsKey(string key) => Inner.ContainsKey(key);
111bool IDictionary<string, StringValues>.Remove(string key) => Inner.Remove(key);
113bool IDictionary<string, StringValues>.TryGetValue(string key, out StringValues value)
130internal ConvertingEnumerator(IDictionary<string, string[]> inner)
OwinEnvironment.cs (14)
71public IDictionary<string, FeatureMap> FeatureMaps => _owinEntries.GetFeatureMaps();
73void IDictionary<string, object>.Add(string key, object value)
82bool IDictionary<string, object>.ContainsKey(string key) => ((IDictionary<string, object>)this).TryGetValue(key, out _);
84ICollection<string> IDictionary<string, object>.Keys
90bool IDictionary<string, object>.Remove(string key)
99bool IDictionary<string, object>.TryGetValue(string key, out object value)
108ICollection<object> IDictionary<string, object>.Values
113object IDictionary<string, object>.this[string key]
415{ OwinConstants.RequestHeaders, new FeatureMap<IHttpRequestFeature>(feature => Utilities.MakeDictionaryStringArray(feature.Headers), (feature, value) => feature.Headers = Utilities.MakeHeaderDictionary((IDictionary<string, string[]>)value)) },
421{ OwinConstants.ResponseHeaders, new FeatureMap<IHttpResponseFeature>(feature => Utilities.MakeDictionaryStringArray(feature.Headers), (feature, value) => feature.Headers = Utilities.MakeHeaderDictionary((IDictionary<string, string[]>)value)) },
464private IDictionary<string, FeatureMap> _contextEntries;
477private readonly IDictionary<string, FeatureMap> _contextDependentEntries;
507public IDictionary<string, FeatureMap> GetFeatureMaps()
OwinExtensions.cs (6)
11Func<IDictionary<string, object>, Task>,
12Func<IDictionary<string, object>, Task>
14using AppFunc = Func<IDictionary<string, object>, Task>;
16Func<IDictionary<string, object>, Task>,
17Func<IDictionary<string, object>, Task>
46IDictionary<string, object> env;
WebSockets\WebSocketAcceptAdapter.cs (7)
9using AppFunc = Func<IDictionary<string, object>, Task>;
13IDictionary<string, object>, // WebSocket Accept parameters
16IDictionary<string, object>, // WebSocket environment
33private readonly IDictionary<string, object> _env;
36private IDictionary<string, object> _options;
43public WebSocketAcceptAdapter(IDictionary<string, object> env, WebSocketAcceptAlt accept)
49private void AcceptWebSocket(IDictionary<string, object> options, AppFunc callback)
Microsoft.AspNetCore.Owin.Microbenchmarks (2)
Microsoft.AspNetCore.Owin.Tests (25)
OwinEnvironmentTests.cs (18)
13private T Get<T>(IDictionary<string, object> environment, string key)
36IDictionary<string, object> env = new OwinEnvironment(context);
42var requestHeaders = Get<IDictionary<string, string[]>>(env, "owin.RequestHeaders");
52var responseHeaders = Get<IDictionary<string, string[]>>(env, "owin.ResponseHeaders");
62IDictionary<string, object> env = new OwinEnvironment(context);
71var requestHeaders = Get<IDictionary<string, string[]>>(env, "owin.RequestHeaders");
80var responseHeaders = Get<IDictionary<string, string[]>>(env, "owin.ResponseHeaders");
104IDictionary<string, object> env = new OwinEnvironment(context);
119IDictionary<string, object> env = new OwinEnvironment(context);
167IDictionary<string, object> env1 = new OwinEnvironment(httpContext1);
179IDictionary<string, object> env2 = new OwinEnvironment(httpContext2);
201IDictionary<string, object> owinEnvironment1 = new OwinEnvironment(httpContext1);
206IDictionary<string, object> owinEnvironment2 = new OwinEnvironment(httpContext2);
214IDictionary<string, object> owinEnvironment = new OwinEnvironment(httpContext);
OwinExtensionTests.cs (6)
11Func<IDictionary<string, object>, Task>,
12Func<IDictionary<string, object>, Task>
14using AppFunc = Func<IDictionary<string, object>, Task>;
16Func<IDictionary<string, object>, Task>,
17Func<IDictionary<string, object>, Task>
126IDictionary<string, object> environment = null;
Microsoft.AspNetCore.Razor (14)
TagHelpers\TagHelperContext.cs (8)
24IDictionary<object, object> items,
41IDictionary<object, object> items,
67/// This <see cref="IDictionary{Object, Object}" /> is copy-on-write in order to ensure items added to this
70public IDictionary<object, object> Items { get; private set; }
81/// <param name="items">The <see cref="IDictionary{Object, Object}"/> to use.</param>
83public void Reinitialize(string tagName, IDictionary<object, object> items, string uniqueId)
92/// <param name="items">The <see cref="IDictionary{Object, Object}"/> to use.</param>
94public void Reinitialize(IDictionary<object, object> items, string uniqueId)
Microsoft.AspNetCore.Razor.Runtime (13)
Microsoft.AspNetCore.Razor.Runtime.Test (8)
Microsoft.AspNetCore.RequestDecompression (2)
Microsoft.AspNetCore.RequestDecompression.Tests (1)
Microsoft.AspNetCore.ResponseCaching.Tests (1)
Microsoft.AspNetCore.Rewrite (3)
Microsoft.AspNetCore.Rewrite.Tests (2)
Microsoft.AspNetCore.Routing (25)
Microsoft.AspNetCore.Routing.Abstractions (3)
Microsoft.AspNetCore.Routing.Tests (21)
Microsoft.AspNetCore.Server.HttpSys (17)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (11)
18private IDictionary<string, StringValues>? _extra;
30private IDictionary<string, StringValues> Extra
44StringValues IDictionary<string, StringValues>.this[string key]
66private void GetUnknownHeaders(IDictionary<string, StringValues> extra)
71void IDictionary<string, StringValues>.Add(string key, StringValues value)
110ICollection<StringValues> IDictionary<string, StringValues>.Values
147((IDictionary<string, StringValues>)this).Add(item.Key, item.Value);
161return ((IDictionary<string, StringValues>)this).TryGetValue(item.Key, out var value) && Equals(value, item.Value);
241return ((IDictionary<string, StringValues>)this).Contains(item) &&
242((IDictionary<string, StringValues>)this).Remove(item.Key);
252return ((IDictionary<string, StringValues>)this).GetEnumerator();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (4)
Microsoft.AspNetCore.Server.IIS (16)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (11)
18private IDictionary<string, StringValues>? _extra;
30private IDictionary<string, StringValues> Extra
44StringValues IDictionary<string, StringValues>.this[string key]
66private void GetUnknownHeaders(IDictionary<string, StringValues> extra)
71void IDictionary<string, StringValues>.Add(string key, StringValues value)
110ICollection<StringValues> IDictionary<string, StringValues>.Values
147((IDictionary<string, StringValues>)this).Add(item.Key, item.Value);
161return ((IDictionary<string, StringValues>)this).TryGetValue(item.Key, out var value) && Equals(value, item.Value);
241return ((IDictionary<string, StringValues>)this).Contains(item) &&
242((IDictionary<string, StringValues>)this).Remove(item.Key);
252return ((IDictionary<string, StringValues>)this).GetEnumerator();
Microsoft.AspNetCore.Server.IntegrationTesting (8)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
Microsoft.AspNetCore.Server.Kestrel.Core (24)
Internal\Http\HttpHeaders.cs (10)
78StringValues IDictionary<string, StringValues>.this[string key]
119ICollection<string> IDictionary<string, StringValues>.Keys => ((IDictionary<string, StringValues>)this).Select(pair => pair.Key).ToHashSet(StringComparer.OrdinalIgnoreCase);
121ICollection<StringValues> IDictionary<string, StringValues>.Values => ((IDictionary<string, StringValues>)this).Select(pair => pair.Value).ToList();
186((IDictionary<string, StringValues>)this).Add(item.Key, item.Value);
189void IDictionary<string, StringValues>.Add(string key, StringValues value)
222bool IDictionary<string, StringValues>.ContainsKey(string key)
253bool IDictionary<string, StringValues>.Remove(string key)
262bool IDictionary<string, StringValues>.TryGetValue(string key, out StringValues value)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (52)
HttpRequestHeadersTests.cs (15)
23IDictionary<string, StringValues> headers = new HttpRequestHeaders();
32IDictionary<string, StringValues> headers = new HttpRequestHeaders();
43IDictionary<string, StringValues> headers = new HttpRequestHeaders();
57IDictionary<string, StringValues> headers = new HttpRequestHeaders();
69IDictionary<string, StringValues> headers = new HttpRequestHeaders();
95IDictionary<string, StringValues> headers = new HttpRequestHeaders();
125EnumerateEntries((IDictionary<string, StringValues>)headers);
129EnumerateEntries((IDictionary<string, StringValues>)headers);
192private static void EnumerateEntries(IDictionary<string, StringValues> headers)
213IDictionary<string, StringValues> headers = new HttpRequestHeaders();
233IDictionary<string, StringValues> headers = new HttpRequestHeaders();
285IDictionary<string, StringValues> headers = new HttpRequestHeaders();
310IDictionary<string, StringValues> headers = new HttpRequestHeaders();
332IDictionary<string, StringValues> headers = new HttpRequestHeaders();
370IDictionary<string, StringValues> headers = new HttpRequestHeaders();
HttpResponseHeadersTests.cs (26)
47IDictionary<string, StringValues> headers = http1Connection.ResponseHeaders;
122((IDictionary<string, StringValues>)responseHeaders)[key] = value;
134((IDictionary<string, StringValues>)responseHeaders).Add(key, value);
216((IDictionary<string, StringValues>)responseHeaders)["Unknown"] = value;
228((IDictionary<string, StringValues>)responseHeaders).Add("Unknown", value);
250((IDictionary<string, StringValues>)responseHeaders)["Unknown"] = value;
258((IDictionary<string, StringValues>)responseHeaders).Add("Unknown", value);
267Assert.Throws<InvalidOperationException>(() => ((IDictionary<string, StringValues>)headers).Add("my-header", new[] { "value" }));
283var dictionary = (IDictionary<string, StringValues>)headers;
294var dictionary = (IDictionary<string, StringValues>)headers;
305var dictionary = (IDictionary<string, StringValues>)headers;
317var dictionary = (IDictionary<string, StringValues>)headers;
328var dictionary = (IDictionary<string, StringValues>)headers;
349var dictionary = (IDictionary<string, StringValues>)headers;
360var dictionary = (IDictionary<string, StringValues>)headers;
381var dictionary = (IDictionary<string, StringValues>)headers;
393var dictionary = (IDictionary<string, StringValues>)headers;
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (9)
Microsoft.AspNetCore.Server.Kestrel.Tests (4)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (3)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (8)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (3)
Microsoft.AspNetCore.Shared.Tests (51)
ClosedGenericMatcherTest.cs (15)
49typeof(IDictionary<string, object>),
56typeof(IDictionary<,>),
57typeof(IDictionary<string, object>)
72typeof(IDictionary<,>),
73typeof(IDictionary<string, object>)
88typeof(IDictionary<,>),
89typeof(IDictionary<string, object>)
155typeof(IDictionary<string, object>),
238object IDictionary<string, object>.this[string key]
267ICollection<string> IDictionary<string, object>.Keys
275ICollection<object> IDictionary<string, object>.Values
293void IDictionary<string, object>.Add(string key, object value)
308bool IDictionary<string, object>.ContainsKey(string key)
333bool IDictionary<string, object>.Remove(string key)
338bool IDictionary<string, object>.TryGetValue(string key, out object value)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (11)
18private IDictionary<string, StringValues>? _extra;
30private IDictionary<string, StringValues> Extra
44StringValues IDictionary<string, StringValues>.this[string key]
66private void GetUnknownHeaders(IDictionary<string, StringValues> extra)
71void IDictionary<string, StringValues>.Add(string key, StringValues value)
110ICollection<StringValues> IDictionary<string, StringValues>.Values
147((IDictionary<string, StringValues>)this).Add(item.Key, item.Value);
161return ((IDictionary<string, StringValues>)this).TryGetValue(item.Key, out var value) && Equals(value, item.Value);
241return ((IDictionary<string, StringValues>)this).Contains(item) &&
242((IDictionary<string, StringValues>)this).Remove(item.Key);
252return ((IDictionary<string, StringValues>)this).GetEnumerator();
Microsoft.AspNetCore.SignalR.Client.Tests (3)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.SignalR.Common.Tests (15)
Microsoft.AspNetCore.SignalR.Core (6)
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
Microsoft.AspNetCore.SignalR.Specification.Tests (4)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (4)
102public async Task<IList<HubMessage>> StreamAsync(string methodName, string[] streamIds, IDictionary<string, string> headers, params object[] args)
194public Task<string> SendInvocationAsync(string methodName, IDictionary<string, string> headers, params object[] args)
204public Task<string> SendInvocationAsync(string methodName, bool nonBlocking, IDictionary<string, string> headers, params object[] args)
220public Task<string> SendStreamInvocationAsync(string methodName, string[] streamIds, IDictionary<string, string> headers, params object[] args)
Microsoft.AspNetCore.SignalR.Tests (1)
Microsoft.AspNetCore.SignalR.Tests.Utils (4)
TestClient.cs (4)
102public async Task<IList<HubMessage>> StreamAsync(string methodName, string[] streamIds, IDictionary<string, string> headers, params object[] args)
194public Task<string> SendInvocationAsync(string methodName, IDictionary<string, string> headers, params object[] args)
204public Task<string> SendInvocationAsync(string methodName, bool nonBlocking, IDictionary<string, string> headers, params object[] args)
220public Task<string> SendStreamInvocationAsync(string methodName, string[] streamIds, IDictionary<string, string> headers, params object[] args)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.AspNetCore.StaticFiles (2)
Microsoft.AspNetCore.WebUtilities (1)
Microsoft.AspNetCore.WebUtilities.Tests (2)
Microsoft.Build.Framework (91)
BinaryTranslator.cs (17)
583IDictionary<string, string> copy = dictionary;
603public void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys)
639public void TranslateDictionary(ref IDictionary<string, string> dictionary, NodePacketCollectionCreator<IDictionary<string, string>> dictionaryCreator)
660ref IDictionary<K, V> dictionary,
663NodePacketCollectionCreator<IDictionary<K, V>> dictionaryCreator)
719where D : IDictionary<string, T>, new()
749where D : IDictionary<string, T>
1371IDictionary<string, string> copy = dictionary;
1372TranslateDictionary(ref copy, (NodePacketCollectionCreator<IDictionary<string, string>>)null);
1386public void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys)
1441public void TranslateDictionary(ref IDictionary<string, string> dictionary, NodePacketCollectionCreator<IDictionary<string, string>> dictionaryCreator)
1461ref IDictionary<K, V> dictionary,
1464NodePacketCollectionCreator<IDictionary<K, V>> collectionCreator)
1518where D : IDictionary<string, T>, new()
1547where D : IDictionary<string, T>
ITranslator.cs (7)
321void TranslateDictionary(ref IDictionary<string, string> dictionary, IEqualityComparer<string> comparer, ref Dictionary<string, string> additionalEntries, HashSet<string> additionalEntriesKeys);
323void TranslateDictionary(ref IDictionary<string, string> dictionary, NodePacketCollectionCreator<IDictionary<string, string>> collectionCreator);
327void TranslateDictionary<K, V>(ref IDictionary<K, V> dictionary, ObjectTranslator<K> keyTranslator, ObjectTranslator<V> valueTranslator, NodePacketCollectionCreator<IDictionary<K, V>> dictionaryCreator);
347where D : IDictionary<string, T>, new()
359where D : IDictionary<string, T>
Sdk\SdkResultFactory.cs (10)
37IDictionary<string, string> propertiesToAdd,
38IDictionary<string, SdkResultItem> itemsToAdd,
61IDictionary<string, string> propertiesToAdd,
62IDictionary<string, SdkResultItem> itemsToAdd,
90IDictionary<string, string> propertiesToAdd,
91IDictionary<string, SdkResultItem> itemsToAdd,
93IDictionary<string, string> environmentVariablesToAdd = null)
120IDictionary<string, string> propertiesToAdd = null,
121IDictionary<string, SdkResultItem> itemsToAdd = null,
123IDictionary<string, string> environmentVariablesToAdd = null)
Microsoft.Build.Tasks.CodeAnalysis (2)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
Microsoft.Cci.Extensions (2)
Microsoft.CodeAnalysis (36)
Collections\CachingDictionary.cs (10)
41private IDictionary<TKey, ImmutableArray<TElement>>? _map;
137private IDictionary<TKey, ImmutableArray<TElement>> CreateDictionaryForFullyPopulatedMap(int capacity)
153var localMap = _map;
204private static bool IsNotFullyPopulatedMap([NotNullWhen(returnValue: false)] IDictionary<TKey, ImmutableArray<TElement>>? existingMap)
214private IDictionary<TKey, ImmutableArray<TElement>> CreateFullyPopulatedMap(ConcurrentDictionary<TKey, ImmutableArray<TElement>>? existingMap)
222var fullyPopulatedMap = CreateDictionaryForFullyPopulatedMap(capacity: allKeys.Count);
249private IDictionary<TKey, ImmutableArray<TElement>> EnsureFullyPopulated()
251var currentMap = _map;
254IDictionary<TKey, ImmutableArray<TElement>> fullyPopulatedMap = CreateFullyPopulatedMap((ConcurrentDictionary<TKey, ImmutableArray<TElement>>?)currentMap);
256var replacedMap = Interlocked.CompareExchange(ref _map, fullyPopulatedMap, currentMap);
Microsoft.CodeAnalysis.Analyzers (50)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (4)
263private static bool TryGetValue(IDictionary<string, string>? dictionary, string key, [NotNullWhen(true)] out string? value)
271private static bool TryGetValue(IDictionary<string, ISymbol>? dictionary, string key, [NotNullWhen(true)] out string? value)
340IDictionary<string, ISymbol>? parameterToExistingFieldMap,
341IDictionary<string, string>? parameterToNewFieldMap,
Microsoft.CodeAnalysis.AnalyzerUtilities (70)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (6)
469IDictionary<AnalysisEntity, PointsToAbstractValue>? pointsToValues,
470IDictionary<AnalysisEntity, CopyAbstractValue>? copyValues,
471IDictionary<AnalysisEntity, ValueContentAbstractValue>? valueContentValues,
643IDictionary<AnalysisEntity, TAbstractAnalysisValue> existingValues,
672protected void ApplyInterproceduralAnalysisResultHelper(IDictionary<AnalysisEntity, TAbstractAnalysisValue> resultToApply)
730protected DictionaryAnalysisData<AnalysisEntity, TAbstractAnalysisValue> GetClonedAnalysisDataHelper(IDictionary<AnalysisEntity, TAbstractAnalysisValue> analysisData)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (5)
2092protected static bool EqualsHelper<TKey, TValue>(IDictionary<TKey, TValue> dict1, IDictionary<TKey, TValue> dict2)
2131IDictionary<AnalysisEntity, PointsToAbstractValue>? pointsToValues,
2132IDictionary<AnalysisEntity, CopyAbstractValue>? copyValues,
2133IDictionary<AnalysisEntity, ValueContentAbstractValue>? valueContentValues,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
Microsoft.CodeAnalysis.BannedApiAnalyzers (50)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (4)
263private static bool TryGetValue(IDictionary<string, string>? dictionary, string key, [NotNullWhen(true)] out string? value)
271private static bool TryGetValue(IDictionary<string, ISymbol>? dictionary, string key, [NotNullWhen(true)] out string? value)
340IDictionary<string, ISymbol>? parameterToExistingFieldMap,
341IDictionary<string, string>? parameterToNewFieldMap,
Microsoft.CodeAnalysis.CodeStyle (39)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
Microsoft.CodeAnalysis.CodeStyle.Fixes (16)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (4)
263private static bool TryGetValue(IDictionary<string, string>? dictionary, string key, [NotNullWhen(true)] out string? value)
271private static bool TryGetValue(IDictionary<string, ISymbol>? dictionary, string key, [NotNullWhen(true)] out string? value)
340IDictionary<string, ISymbol>? parameterToExistingFieldMap,
341IDictionary<string, string>? parameterToNewFieldMap,
Microsoft.CodeAnalysis.Collections.Package (16)
Microsoft.CodeAnalysis.CSharp (24)
Compilation\SyntaxAndDeclarationManager.cs (13)
160IDictionary<SyntaxTree, int> ordinalMapBuilder,
161IDictionary<SyntaxTree, ImmutableArray<LoadDirective>> loadDirectiveMapBuilder,
162IDictionary<string, SyntaxTree> loadedSyntaxTreeMapBuilder,
163IDictionary<SyntaxTree, Lazy<RootSingleNamespaceDeclaration>> declMapBuilder,
164IDictionary<SyntaxTree, OneOrMany<WeakReference<StrongBox<ImmutableSegmentedHashSet<string>>>>> lastComputedMemberNamesMap,
195IDictionary<SyntaxTree, int> ordinalMapBuilder,
196IDictionary<SyntaxTree, ImmutableArray<LoadDirective>> loadDirectiveMapBuilder,
197IDictionary<string, SyntaxTree> loadedSyntaxTreeMapBuilder,
198IDictionary<SyntaxTree, Lazy<RootSingleNamespaceDeclaration>> declMapBuilder,
199IDictionary<SyntaxTree, OneOrMany<WeakReference<StrongBox<ImmutableSegmentedHashSet<string>>>>> lastComputedMemberNamesMap,
295IDictionary<SyntaxTree, Lazy<RootSingleNamespaceDeclaration>> declMapBuilder,
458IDictionary<SyntaxTree, Lazy<RootSingleNamespaceDeclaration>> declMap,
677IDictionary<SyntaxTree, int> ordinalMapBuilder,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (23)
Diagnostics\DiagnosticTest.cs (22)
575IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
619IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
679IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
730IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
786IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
842IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
900IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
958IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1017IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1087IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1158IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1223IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1276IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1330IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1380IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1487IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1554IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1604IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1660IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1707IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1744IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
1777IDictionary<string, ReportDiagnostic> warnings = new Dictionary<string, ReportDiagnostic>();
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Microsoft.CodeAnalysis.EditorFeatures (5)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (12)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.Extensions.Package (20)
Microsoft.CodeAnalysis.Features (35)
ExtractMethod\MethodExtractor.Analyzer.cs (7)
585private static void AddVariableToMap(IDictionary<ISymbol, VariableInfo> variableInfoMap, ISymbol localOrParameter, VariableInfo variableInfo)
722private void AddTypeParametersToMap(IEnumerable<ITypeParameterSymbol> typeParameters, IDictionary<int, ITypeParameterSymbol> sortedMap)
728private void AddTypeParameterToMap(ITypeParameterSymbol typeParameter, IDictionary<int, ITypeParameterSymbol> sortedMap)
748IDictionary<ISymbol, VariableInfo> variableInfoMap,
749IDictionary<int, ITypeParameterSymbol> sortedMap)
778private void AppendMethodTypeParameterUsedDirectly(MultiDictionary<ISymbol, SyntaxToken> symbolMap, IDictionary<int, ITypeParameterSymbol> sortedMap)
785IDictionary<ISymbol, VariableInfo> variableInfoMap,
Microsoft.CodeAnalysis.InteractiveHost (16)
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (50)
Microsoft.CodeAnalysis.PublicApiAnalyzers (38)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
Microsoft.CodeAnalysis.ResxSourceGenerator (38)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
Microsoft.CodeAnalysis.Test.Utilities (7)
MarkedSource\MarkupTestFile.cs (7)
53string input, bool treatPositionIndicatorsAsCode, out string output, out int? position, out IDictionary<string, ArrayBuilder<TextSpan>> spans)
180private static V GetOrAdd<K, V>(IDictionary<K, V> dictionary, K key, Func<K, V> function)
193IDictionary<string, ArrayBuilder<TextSpan>> spans,
215Parse(input, treatPositionIndicatorsAsCode, out output, out cursorPositionOpt, out var dictionary);
223string input, out string output, out int? cursorPositionOpt, out IDictionary<string, ImmutableArray<TextSpan>> spans,
226Parse(input, treatPositionIndicatorsAsCode, out output, out cursorPositionOpt, out var dictionary);
230public static void GetSpans(string input, out string output, out IDictionary<string, ImmutableArray<TextSpan>> spans,
Microsoft.CodeAnalysis.Threading.Package (16)
Microsoft.CodeAnalysis.UnitTests (32)
Collections\ImmutableDictionaryBuilderTestBase.cs (18)
25var builder = this.GetBuilder<string, int>();
44var builder = this.GetBuilder<string, int>();
53var builder = this.GetBuilder<string, int>();
61var builder = this.GetBuilder<string, int>();
81var builder = this.GetBuilder(map);
89var builder = this.GetBuilder(map);
100var builder = this.GetBuilder(map);
110var builder = this.GetBuilder(map);
122var builder = this.GetBuilder<string, int>();
130var builder = this.GetBuilder(map);
139var builder = this.GetBuilder(map);
148var builder = this.GetBuilder(map);
159var builder = this.GetBuilder(map);
177var builder = this.GetBuilder<string, int>();
195var builder = this.GetBuilder<string, int>();
237var builder = this.GetBuilder<string, int>();
260protected abstract bool TryGetKeyHelper<TKey, TValue>(IDictionary<TKey, TValue> dictionary, TKey equalKey, out TKey actualKey)
269protected abstract IDictionary<TKey, TValue> GetBuilder<TKey, TValue>(IImmutableDictionary<TKey, TValue>? basis = null)
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (5)
49IDictionary<int, int> map = this.Empty<int, int>().Add(5, 3).ToReadOnlyDictionary();
56IDictionary<int, int> map = this.Empty<int, int>().ToReadOnlyDictionary();
63IDictionary<int, int> map = this.Empty<int, int>().ToReadOnlyDictionary();
216KeysOrValuesTestHelper(((IDictionary<TKey, TValue>)nonEmpty).Keys, key);
227KeysOrValuesTestHelper(((IDictionary<TKey, TValue?>)nonEmpty).Values, default(TValue));
Microsoft.CodeAnalysis.Workspaces (58)
Rename\IRenameRewriterLanguageService.cs (2)
59IDictionary<Location, Location> reverseMappedLocations,
124public abstract Task<ImmutableArray<Location>> ComputeDeclarationConflictsAsync(string replacementText, ISymbol renamedSymbol, ISymbol renameSymbol, IEnumerable<ISymbol> referencedSymbols, Solution baseSolution, Solution newSolution, IDictionary<Location, Location> reverseMappedLocations, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (4)
263private static bool TryGetValue(IDictionary<string, string>? dictionary, string key, [NotNullWhen(true)] out string? value)
271private static bool TryGetValue(IDictionary<string, ISymbol>? dictionary, string key, [NotNullWhen(true)] out string? value)
340IDictionary<string, ISymbol>? parameterToExistingFieldMap,
341IDictionary<string, string>? parameterToNewFieldMap,
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (20)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (6)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.CSharp (1)
Microsoft.Data.Analysis (2)
Microsoft.Data.Analysis.Interactive (1)
Microsoft.Data.Analysis.Interactive.Tests (1)
Microsoft.DotNet.Build.Manifest (11)
Microsoft.DotNet.Build.Tasks.Packaging (3)
Microsoft.DotNet.Build.Tasks.Templating (3)
Microsoft.DotNet.Helix.JobSender (3)
Microsoft.DotNet.Helix.Sdk (6)
Microsoft.DotNet.Open.Api.Tools.Tests (4)
Microsoft.DotNet.RemoteExecutor (1)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Microsoft.DotNet.XliffTasks (1)
Microsoft.DotNet.XUnitAssert.Tests (7)
Sdk\ArgumentFormatterTests.cs (3)
212 { typeof(IDictionary<,>), "typeof(System.Collections.Generic.IDictionary<,>)" },
213 { typeof(IDictionary<string, DateTime>), "typeof(System.Collections.Generic.IDictionary<string, DateTime>)" },
214 { typeof(IDictionary<string[,], DateTime[,][]>), "typeof(System.Collections.Generic.IDictionary<string[,], DateTime[,][]>)" },
Microsoft.Extensions.AI (6)
Microsoft.Extensions.AI.Abstractions (16)
Microsoft.Extensions.AI.Abstractions.Tests (3)
Microsoft.Extensions.AI.AzureAIInference (8)
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
Microsoft.Extensions.AI.Evaluation (6)
Microsoft.Extensions.AI.Evaluation.Safety (2)
Microsoft.Extensions.AI.Integration.Tests (2)
Microsoft.Extensions.AI.Ollama (8)
Microsoft.Extensions.AI.Ollama.Tests (3)
Microsoft.Extensions.AI.OpenAI (8)
Microsoft.Extensions.AI.OpenAI.Tests (2)
Microsoft.Extensions.AI.Tests (2)
Microsoft.Extensions.ApiDescription.Client.Tests (23)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Microsoft.Extensions.Configuration (6)
Microsoft.Extensions.Configuration.Abstractions (1)
Microsoft.Extensions.Configuration.Binder (3)
Microsoft.Extensions.Configuration.CommandLine (4)
Microsoft.Extensions.Configuration.Ini (2)
Microsoft.Extensions.Configuration.Json (1)
Microsoft.Extensions.Configuration.Xml (3)
Microsoft.Extensions.DependencyInjection (6)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Features (1)
Microsoft.Extensions.Hosting (3)
Microsoft.Extensions.Hosting.Abstractions (5)
Microsoft.Extensions.Hosting.Testing (1)
Microsoft.Extensions.Hosting.Testing.Tests (1)
Microsoft.Extensions.Http.Diagnostics (8)
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Microsoft.Extensions.Http.Resilience.Tests (4)
Microsoft.Extensions.Logging.Console (1)
Microsoft.Extensions.SecretManager.Tools.Tests (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (5)
Microsoft.Gen.ContextualOptions.Unit.Tests (5)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.Gen.Logging.Unit.Tests (5)
Microsoft.Gen.MetadataExtractor.Unit.Tests (5)
Microsoft.Gen.Metrics.Unit.Tests (5)
Microsoft.Gen.MetricsReports.Unit.Tests (5)
Microsoft.Interop.SourceGeneration (6)
Microsoft.Maui (1)
Microsoft.Maui.Controls (12)
Microsoft.Maui.Controls.SourceGen (5)
CodeBehindGenerator.cs (5)
242 static IDictionary<XmlType, string> GetTypeCache(Compilation compilation, CancellationToken cancellationToken)
247 static void GenerateXamlCodeBehind(XamlProjectItem? xamlItem, Compilation compilation, SourceProductionContext context, AssemblyCaches xmlnsCache, IDictionary<XmlType, string> typeCache)
380 static bool TryParseXaml(XamlProjectItem parseResult, string uid, Compilation compilation, AssemblyCaches xmlnsCache, IDictionary<XmlType, string> typeCache, CancellationToken cancellationToken, out string? accessModifier, out string? rootType, out string? rootClrNamespace, out bool generateDefaultCtor, out bool addXamlCompilationAttribute, out bool hideFromIntellisense, out bool xamlResourceIdOnly, out string? baseType, out IEnumerable<(string, string, string)>? namedFields)
460 static IEnumerable<(string name, string type, string accessModifier)> GetNamedFields(XmlNode root, XmlNamespaceManager nsmgr, Compilation compilation, AssemblyCaches xmlnsCache, IDictionary<XmlType, string> typeCache, CancellationToken cancellationToken)
495 static string GetTypeName(XmlType xmlType, Compilation compilation, AssemblyCaches xmlnsCache, IDictionary<XmlType, string> typeCache)
Microsoft.Maui.Controls.Xaml (2)
Microsoft.Maui.Essentials (8)
Microsoft.Maui.Graphics (1)
Microsoft.Maui.Resizetizer (1)
Microsoft.ML.AutoML (18)
API\Pipeline.cs (6)
38public IDictionary<string, object> Properties { get; set; }
42IDictionary<string, object> properties = null)
52string inColumn, string outColumn, IDictionary<string, object> properties = null) :
58string[] inColumns, string outColumn, IDictionary<string, object> properties = null) :
78public IDictionary<string, object> Properties { get; set; }
80public CustomProperty(string name, IDictionary<string, object> properties)
TrainerExtensions\TrainerExtensionUtil.cs (8)
118string labelColumn, string weightColumn = null, IDictionary<string, object> additionalProperties = null)
120var properties = BuildBasePipelineNodeProps(sweepParams, labelColumn, weightColumn);
141private static IDictionary<string, object> BuildBasePipelineNodeProps(IEnumerable<SweepableParam> sweepParams,
160private static IDictionary<string, object> BuildLightGbmPipelineNodeProps(IEnumerable<SweepableParam> sweepParams,
193public static ParameterSet BuildParameterSet(TrainerName trainerName, IDictionary<string, object> props)
208public static ColumnInformation BuildColumnInfo(IDictionary<string, object> props)
220private static ParameterSet BuildLightGbmParameterSet(IDictionary<string, object> props)
230var treeProps = ((CustomProperty)props[LightGbmBoosterPropName]).Properties;
Microsoft.ML.AutoML.SourceGenerator (10)
Microsoft.ML.CodeGenerator (47)
CodeGenerator\CSharp\TrainerGenerators.cs (14)
19internal override IDictionary<string, string> NamedParameters
90internal override IDictionary<string, string> NamedParameters
121internal override IDictionary<string, string> NamedParameters
233internal override IDictionary<string, string> NamedParameters
260internal override IDictionary<string, string> NamedParameters
319internal override IDictionary<string, string> NamedParameters
353internal override IDictionary<string, string> NamedParameters
383internal override IDictionary<string, string> NamedParameters
413internal override IDictionary<string, string> NamedParameters
484internal override IDictionary<string, string> NamedParameters
517internal override IDictionary<string, string> NamedParameters
551internal override IDictionary<string, string> NamedParameters => null;
595internal override IDictionary<string, string> NamedParameters
614internal override IDictionary<string, string> NamedParameters
Microsoft.ML.CodeGenerator.Tests (6)
ApprovalTests\ConsoleCodeGeneratorTests.cs (6)
295(var pipeline, var columnInference, var mapping) = GetMockedAzurePipelineAndInference();
332(var pipelineSanitized, var columnInferenceSanitized, var mappingSanitized) = this.GetMockedAzurePipelineAndInference();
334(var pipelineUnsatinized, var columnInferenceUnsatinized, var mappingUnsatinized) = this.GetMockedAzurePipelineAndInferenceUnsanitizedColumnNames();
340IDictionary<string, CodeGeneratorSettings.ColumnMapping> mapping, string info)
808private (Pipeline, ColumnInferenceResults, IDictionary<string, CodeGeneratorSettings.ColumnMapping>) GetMockedAzurePipelineAndInference()
978private (Pipeline, ColumnInferenceResults, IDictionary<string, CodeGeneratorSettings.ColumnMapping>) GetMockedAzurePipelineAndInferenceUnsanitizedColumnNames()
Microsoft.ML.Core (3)
Microsoft.ML.NugetPackageVersionUpdater (3)
Microsoft.ML.OnnxTransformer (29)
Microsoft.ML.OnnxTransformerTest (15)
Microsoft.ML.SearchSpace (29)
Option\NestOption.cs (8)
21public OptionBase this[string key] { get => ((IDictionary<string, OptionBase>)_options)[key]; set => ((IDictionary<string, OptionBase>)_options)[key] = value; }
80public ICollection<string> Keys => ((IDictionary<string, OptionBase>)_options).Keys;
83public ICollection<OptionBase> Values => ((IDictionary<string, OptionBase>)_options).Values;
94((IDictionary<string, OptionBase>)_options).Add(key, value);
118return ((IDictionary<string, OptionBase>)_options).ContainsKey(key);
136return ((IDictionary<string, OptionBase>)_options).Remove(key);
148return ((IDictionary<string, OptionBase>)_options).TryGetValue(key, out value);
Parameter.cs (12)
241return (_value as IDictionary<string, Parameter>)?.IsReadOnly ?? false;
250ICollection<Parameter> IDictionary<string, Parameter>.Values
255return (_value as IDictionary<string, Parameter>).Values;
265return (_value as IDictionary<string, Parameter>).Keys;
275return (_value as IDictionary<string, Parameter>)[key];
281(_value as IDictionary<string, Parameter>)[key] = value;
341return (_value as IDictionary<string, Parameter>).Remove(item);
348return (_value as IDictionary<string, Parameter>).GetEnumerator();
355return (_value as IDictionary<string, Parameter>).GetEnumerator();
367(_value as IDictionary<string, Parameter>).CopyTo(array, arrayIndex);
374return (_value as IDictionary<string, Parameter>).ContainsKey(key);
381return (_value as IDictionary<string, Parameter>).Remove(key);
SearchSpace.cs (8)
83public ICollection<string> Keys => ((IDictionary<string, OptionBase>)_options).Keys;
86public ICollection<OptionBase> Values => ((IDictionary<string, OptionBase>)_options).Values;
106public OptionBase this[string key] { get => ((IDictionary<string, OptionBase>)_options)[key]; set => ((IDictionary<string, OptionBase>)_options)[key] = value; }
313((IDictionary<string, OptionBase>)_options).Add(key, value);
319return ((IDictionary<string, OptionBase>)_options).ContainsKey(key);
325return ((IDictionary<string, OptionBase>)_options).Remove(key);
331return ((IDictionary<string, OptionBase>)_options).TryGetValue(key, out value);
Microsoft.ML.Tests (3)
Microsoft.Net.Http.Headers (1)
Microsoft.VisualStudio.LanguageServices (2)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
mscorlib (1)
netstandard (1)
PresentationBuildTasks (1)
PresentationCore (48)
System\Windows\Media\CultureSpecificStringDictionary.cs (10)
15private IDictionary<XmlLanguage, string> _innerDictionary;
20internal LanguageSpecificStringDictionary(IDictionary<XmlLanguage, string> innerDictionary)
351protected IDictionary<XmlLanguage, string> _innerDictionary;
354internal EntryEnumerator(IDictionary<XmlLanguage, string> names)
429protected IDictionary<XmlLanguage, string> _innerDictionary;
431internal BaseCollection(IDictionary<XmlLanguage, string> names)
469internal KeyCollection(IDictionary<XmlLanguage, string> names) : base(names)
483internal KeyEnumerator(IDictionary<XmlLanguage, string> names) : base(names)
502internal ValueCollection(IDictionary<XmlLanguage, string> names)
517internal ValueEnumerator(IDictionary<XmlLanguage, string> names) : base(names)
System\Windows\Media\GlyphTypeface.cs (26)
306public IDictionary<CultureInfo,string> FamilyNames
334public IDictionary<CultureInfo, string> FaceNames
363public IDictionary<CultureInfo, string> Win32FamilyNames
379IDictionary<XmlLanguage, string> ITypefaceMetrics.AdjustedFaceNames
385IDictionary<CultureInfo, string> adjustedFaceNames = _font.FaceNames;
386IDictionary<XmlLanguage, string> adjustedLanguageFaceNames = new Dictionary<XmlLanguage, string>(adjustedFaceNames.Count);
405public IDictionary<CultureInfo, string> Win32FaceNames
421public IDictionary<CultureInfo, string> VersionStrings
434public IDictionary<CultureInfo, string> Copyrights
447public IDictionary<CultureInfo, string> ManufacturerNames
462public IDictionary<CultureInfo, string> Trademarks
475public IDictionary<CultureInfo, string> DesignerNames
489public IDictionary<CultureInfo, string> Descriptions
504public IDictionary<CultureInfo, string> VendorUrls
517public IDictionary<CultureInfo, string> DesignerUrls
532public IDictionary<CultureInfo, string> LicenseDescriptions
546public IDictionary<CultureInfo, string> SampleTexts
823public IDictionary<ushort, double> AdvanceWidths
835public IDictionary<ushort, double> AdvanceHeights
850public IDictionary<ushort, double> LeftSideBearings
865public IDictionary<ushort, double> RightSideBearings
881public IDictionary<ushort, double> TopSideBearings
897public IDictionary<ushort, double> BottomSideBearings
909public IDictionary<ushort, double> DistancesFromHorizontalBaselineToBlackBoxBottom
921public IDictionary<int, ushort> CharacterToGlyphMap
1628private IDictionary<CultureInfo, string> GetFontInfo(MS.Internal.Text.TextInterface.InformationalStringID informationalStringID)
PresentationFramework (13)
PresentationUI (19)
ReachFramework (16)
PrintConfig\PrintSchemaShim.cs (13)
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>() {
1145private static bool TrySet<TKey, TValue>(IDictionary<TKey, TValue> dictionary, TKey key, Action<TValue> setter)
1157private static bool TrySet<TKey, TValue>(IDictionary<TKey, TValue> dictionary, TValue value, Action<TKey> setter)
Roslyn.Diagnostics.Analyzers (50)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (4)
263private static bool TryGetValue(IDictionary<string, string>? dictionary, string key, [NotNullWhen(true)] out string? value)
271private static bool TryGetValue(IDictionary<string, ISymbol>? dictionary, string key, [NotNullWhen(true)] out string? value)
340IDictionary<string, ISymbol>? parameterToExistingFieldMap,
341IDictionary<string, string>? parameterToNewFieldMap,
Roslyn.Diagnostics.CSharp.Analyzers (1)
Roslyn.VisualStudio.Next.UnitTests (1)
Shared (5)
Shared.Tests (2)
SimpleWebSite (1)
System.CodeDom (11)
System.Collections (18)
System\Collections\Generic\OrderedDictionary.cs (8)
141/// the specified <see cref="IDictionary{TKey, TValue}"/> and uses the default equality comparer for the key type.
144/// The <see cref="IDictionary{TKey, TValue}"/> whose elements are copied to the new <see cref="OrderedDictionary{TKey, TValue}"/>.
148public OrderedDictionary(IDictionary<TKey, TValue> dictionary) : this(dictionary, null)
154/// the specified <see cref="IDictionary{TKey, TValue}"/> and uses the specified <see cref="IEqualityComparer{TKey}"/>.
157/// The <see cref="IDictionary{TKey, TValue}"/> whose elements are copied to the new <see cref="OrderedDictionary{TKey, TValue}"/>.
165public OrderedDictionary(IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey>? comparer) :
266ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
278ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
System.Collections.Concurrent (9)
System\Collections\Concurrent\ConcurrentDictionary.cs (9)
1534/// cref="IDictionary{TKey,TValue}"/>.
1545void IDictionary<TKey, TValue>.Add(TKey key, TValue value)
1555/// cref="IDictionary{TKey,TValue}"/>.
1561/// cref="IDictionary{TKey,TValue}"/>.
1565bool IDictionary<TKey, TValue>.Remove(TKey key) => TryRemove(key, out _);
1602void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair) => ((IDictionary<TKey, TValue>)this).Add(keyValuePair.Key, keyValuePair.Value);
1690((IDictionary<TKey, TValue>)this).Add((TKey)key, (TValue)value!);
2701private readonly IDictionary<TKey, TValue> _dictionary;
2703public IDictionaryDebugView(IDictionary<TKey, TValue> dictionary)
System.Collections.Immutable (85)
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (21)
169/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
171/// <returns>An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.</returns>
172ICollection<TKey> IDictionary<TKey, TValue>.Keys
192/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
194/// <returns>An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.</returns>
195ICollection<TValue> IDictionary<TKey, TValue>.Values
224/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
227/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
235/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
238/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
406/// <exception cref="NotSupportedException">The property is set and the <see cref="IDictionary{TKey, TValue}"/> is read-only.</exception>
516/// Adds an element with the provided key and value to the <see cref="IDictionary{TKey, TValue}"/>.
521/// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="IDictionary{TKey, TValue}"/>.</exception>
522/// <exception cref="NotSupportedException">The <see cref="IDictionary{TKey, TValue}"/> is read-only.</exception>
530/// Determines whether the <see cref="IDictionary{TKey, TValue}"/> contains an element with the specified key.
532/// <param name="key">The key to locate in the <see cref="IDictionary{TKey, TValue}"/>.</param>
534/// true if the <see cref="IDictionary{TKey, TValue}"/> contains an element with the key; otherwise, false.
567/// Removes the element with the specified key from the <see cref="IDictionary{TKey, TValue}"/>.
571/// true if the element is successfully removed; otherwise, false. This method also returns false if <paramref name="key"/> was not found in the original <see cref="IDictionary{TKey, TValue}"/>.
575/// <exception cref="NotSupportedException">The <see cref="IDictionary{TKey, TValue}"/> is read-only.</exception>
588/// true if the object that implements <see cref="IDictionary{TKey, TValue}"/> contains an element with the specified key; otherwise, false.
System\Collections\Immutable\ImmutableDictionary_2.cs (15)
218ICollection<TKey> IDictionary<TKey, TValue>.Keys
226ICollection<TValue> IDictionary<TKey, TValue>.Values
263TValue IDictionary<TKey, TValue>.this[TKey key]
563/// Adds an element with the provided key and value to the <see cref="IDictionary{TKey, TValue}"/>.
570/// An element with the same key already exists in the <see cref="IDictionary{TKey, TValue}"/>.
573/// The <see cref="IDictionary{TKey, TValue}"/> is read-only.
575void IDictionary<TKey, TValue>.Add(TKey key, TValue value)
581/// Removes the element with the specified key from the <see cref="IDictionary{TKey, TValue}"/>.
585/// true if the element is successfully removed; otherwise, false. This method also returns false if <paramref name="key"/> was not found in the original <see cref="IDictionary{TKey, TValue}"/>.
590/// The <see cref="IDictionary{TKey, TValue}"/> is read-only.
592bool IDictionary<TKey, TValue>.Remove(TKey key)
652/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
655/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
663/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
666/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (20)
84/// See <see cref="IDictionary{TKey, TValue}"/>
86ICollection<TKey> IDictionary<TKey, TValue>.Keys
100/// See <see cref="IDictionary{TKey, TValue}"/>
102ICollection<TValue> IDictionary<TKey, TValue>.Values
235/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
238/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
246/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
249/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
428/// See <see cref="IDictionary{TKey, TValue}"/>
441/// See <see cref="IDictionary{TKey, TValue}"/>
449/// See <see cref="IDictionary{TKey, TValue}"/>
464/// See <see cref="IDictionary{TKey, TValue}"/>
481/// See <see cref="IDictionary{TKey, TValue}"/>
489/// See <see cref="IDictionary{TKey, TValue}"/>
498/// See <see cref="IDictionary{TKey, TValue}"/>
506/// See <see cref="IDictionary{TKey, TValue}"/>
514/// See <see cref="IDictionary{TKey, TValue}"/>
527/// See <see cref="IDictionary{TKey, TValue}"/>
535/// See <see cref="IDictionary{TKey, TValue}"/>
543/// See <see cref="IDictionary{TKey, TValue}"/>
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (16)
144ICollection<TKey> IDictionary<TKey, TValue>.Keys
152ICollection<TValue> IDictionary<TKey, TValue>.Values
217TValue IDictionary<TKey, TValue>.this[TKey key]
468/// Adds an element with the provided key and value to the <see cref="IDictionary{TKey, TValue}"/>.
475/// An element with the same key already exists in the <see cref="IDictionary{TKey, TValue}"/>.
478/// The <see cref="IDictionary{TKey, TValue}"/> is read-only.
480void IDictionary<TKey, TValue>.Add(TKey key, TValue value)
486/// Removes the element with the specified key from the <see cref="IDictionary{TKey, TValue}"/>.
490/// true if the element is successfully removed; otherwise, false. This method also returns false if <paramref name="key"/> was not found in the original <see cref="IDictionary{TKey, TValue}"/>.
495/// The <see cref="IDictionary{TKey, TValue}"/> is read-only.
497bool IDictionary<TKey, TValue>.Remove(TKey key)
557/// Gets an <see cref="ICollection{T}"/> containing the keys of the <see cref="IDictionary{TKey, TValue}"/>.
560/// An <see cref="ICollection{T}"/> containing the keys of the object that implements <see cref="IDictionary{TKey, TValue}"/>.
568/// Gets an <see cref="ICollection{T}"/> containing the values in the <see cref="IDictionary{TKey, TValue}"/>.
571/// An <see cref="ICollection{T}"/> containing the values in the object that implements <see cref="IDictionary{TKey, TValue}"/>.
845if (items is IDictionary<TKey, TValue> itemsAsDictionary)
System.ComponentModel.Annotations (10)
System\ComponentModel\DataAnnotations\ValidationContext.cs (4)
65public ValidationContext(object instance, IDictionary<object, object?>? items)
87public ValidationContext(object instance, IServiceProvider? serviceProvider, IDictionary<object, object?>? items)
122public ValidationContext(object instance, string displayName, IServiceProvider? serviceProvider, IDictionary<object, object?>? items)
208public IDictionary<object, object?> Items => _items;
System.ComponentModel.Composition (98)
System\ComponentModel\Composition\Hosting\CompositionServices.cs (5)
185internal static IDictionary<string, object?> GetPartMetadataForType(this Type type, CreationPolicy creationPolicy)
257internal static void TryExportMetadataForMember(this MemberInfo member, out IDictionary<string, object?> dictionary)
335private static bool TryContributeMetadataValue(this IDictionary<string, object?> dictionary, string name, object? value, Type? valueType, bool allowsMultiple)
490internal static IDictionary<string, object?> GetImportMetadata(ImportType importType, IAttributedImport attributedImport)
495internal static IDictionary<string, object?> GetImportMetadata(Type type, IAttributedImport? attributedImport)
System\ComponentModel\Composition\Primitives\Export.cs (6)
59: this(new ExportDefinition(contractName, (IDictionary<string, object?>?)null), exportedValueGetter)
72/// An <see cref="IDictionary{TKey, TValue}"/> containing the metadata of the
75/// <see cref="IDictionary{TKey, TValue}"/>.
91public Export(string contractName, IDictionary<string, object?>? metadata, Func<object?> exportedValueGetter)
157/// An <see cref="IDictionary{TKey, TValue}"/> containing the metadata of the
169public IDictionary<string, object?> Metadata
System\ComponentModel\Composition\Primitives\ExportDefinition.cs (9)
17private readonly IDictionary<string, object?> _metadata = MetadataServices.EmptyMetadata;
43/// An <see cref="IDictionary{TKey, TValue}"/> containing the metadata of the
46/// <see cref="IDictionary{TKey, TValue}"/>.
54public ExportDefinition(string contractName, IDictionary<string, object?>? metadata)
99/// An <see cref="IDictionary{TKey, TValue}"/> containing the metadata of the
101/// <see cref="IDictionary{TKey, TValue}"/>.
107/// <see cref="IDictionary{TKey, TValue}"/> object with a case-sensitive,
111/// return an empty <see cref="IDictionary{TKey, TValue}"/> instead.
115public virtual IDictionary<string, object?> Metadata
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (8)
25private readonly IDictionary<string, object?> _metadata = MetadataServices.EmptyMetadata;
89public ImportDefinition(Expression<Func<ExportDefinition, bool>> constraint, string? contractName, ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, IDictionary<string, object?>? metadata)
97internal ImportDefinition(string? contractName, ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, IDictionary<string, object?>? metadata)
143/// An <see cref="IDictionary{TKey, TValue}"/> containing the metadata of the
145/// <see cref="IDictionary{TKey, TValue}"/>.
151/// <see cref="IDictionary{TKey, TValue}"/> object with a case-sensitive,
155/// return an empty <see cref="IDictionary{TKey, TValue}"/> instead.
159public virtual IDictionary<string, object?> Metadata
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (12)
131Lazy<IDictionary<string, object?>>? metadata,
149Lazy<IDictionary<string, object?>> metadata,
182IDictionary<string, object?> metadata,
209IDictionary<string, object?> metadata,
266IDictionary<string, object?> metadata,
322private readonly Lazy<IDictionary<string, object?>>? _metadata;
332Lazy<IDictionary<string, object?>>? metadata,
395public IDictionary<string, object?>? GetMetadata()
465private readonly Lazy<IDictionary<string, object?>> _metadata;
467public LazyExportDefinition(string contractName, Lazy<IDictionary<string, object?>> metadata)
468: base(contractName, (IDictionary<string, object?>?)null)
473public override IDictionary<string, object?> Metadata
System.Composition.Hosting (18)
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (8)
19public static Func<IDictionary<string, object>, TMetadata> GetMetadataViewProvider<TMetadata>()
21if (typeof(TMetadata) == typeof(IDictionary<string, object>))
31return ci.IsPublic && ps.Length == 1 && ps[0].ParameterType == typeof(IDictionary<string, object>);
36var providerArg = Expression.Parameter(typeof(IDictionary<string, object>), "metadata");
37return Expression.Lambda<Func<IDictionary<string, object>, TMetadata>>(
46var providerArg = Expression.Parameter(typeof(IDictionary<string, object>), "metadata");
68return Expression.Lambda<Func<IDictionary<string, object>, TMetadata>>(
76private static TValue GetMetadataValue<TValue>(IDictionary<string, object> metadata, string name, DefaultValueAttribute defaultValue)
System.Composition.Runtime (5)
System.Composition.TypedParts (28)
System\Composition\TypedParts\Discovery\TypeInspector.cs (6)
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>();
102private static void ReadLooseMetadata(object[] appliedAttributes, IDictionary<string, object> metadata)
122private static void AddMetadata(IDictionary<string, object> metadata, string name, Type valueType, object value)
148private static void ReadMetadataAttribute(Attribute attribute, IDictionary<string, object> metadata)
System.Diagnostics.DiagnosticSource (10)
System\Diagnostics\Metrics\MetricsEventSource.cs (10)
534private bool ParseMetrics(IDictionary<string, string> arguments, out string? metricsSpecs)
546private bool ParseBase2ExponentialHistogramSpecs(IDictionary<string, string> arguments, out string? base2ExponentialHistogramSpec)
589private bool SetSharedMaxTimeSeries(IDictionary<string, string> arguments, int sharedValue, out int maxTimeSeries)
594private void SetUniqueMaxTimeSeries(IDictionary<string, string> arguments, int defaultValue, out int maxTimeSeries)
599private bool SetSharedMaxHistograms(IDictionary<string, string> arguments, int sharedValue, out int maxHistograms)
604private void SetUniqueMaxHistograms(IDictionary<string, string> arguments, int defaultValue, out int maxHistograms)
609private bool SetMaxValue(IDictionary<string, string> arguments, string argumentsKey, string valueDescriptor, int defaultValue, out int maxValue)
635private void SetRefreshIntervalSecs(IDictionary<string, string> arguments, double minValue, double defaultValue, out double refreshIntervalSeconds)
645private bool SetSharedRefreshIntervalSecs(IDictionary<string, string> arguments, double sharedValue, out double refreshIntervalSeconds)
656private bool GetRefreshIntervalSecs(IDictionary<string, string> arguments, string valueDescriptor, double defaultValue, out double refreshIntervalSeconds)
System.Diagnostics.Process (1)
System.IO.Packaging (1)
System.Linq.Expressions (7)
System.Net.Http (10)
artifacts\obj\System.Net.Http\Debug\net10.0\System.Net.Http.notsupported.cs (10)
139public System.Collections.Generic.IDictionary<string, object?> Properties { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } }
296public System.Collections.Generic.IDictionary<string, object?> Properties { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } }
309object? System.Collections.Generic.IDictionary<string, object?>.this[string key] { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } set { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } }
310System.Collections.Generic.ICollection<string> System.Collections.Generic.IDictionary<string, object?>.Keys { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } }
311System.Collections.Generic.ICollection<object?> System.Collections.Generic.IDictionary<string, object?>.Values { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } }
322void System.Collections.Generic.IDictionary<string, object?>.Add(string key, object? value) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); }
323bool System.Collections.Generic.IDictionary<string, object?>.ContainsKey(string key) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); }
324bool System.Collections.Generic.IDictionary<string, object?>.Remove(string key) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); }
325bool System.Collections.Generic.IDictionary<string, object?>.TryGetValue(string key, out object value) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); }
448public System.Collections.Generic.IDictionary<string, object?> Properties { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_NetHttp); } }
System.Net.Http.WinHttpHandler (1)
System.ObjectModel (1)
System.Private.CoreLib (29)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\CollectionExtensions.cs (4)
24public static bool TryAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue value)
40public static bool Remove<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, [MaybeNullWhen(false)] out TValue value)
86/// <returns>An object that acts as a read-only wrapper around the current <see cref="IDictionary{TKey, TValue}"/>.</returns>
88public static ReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this IDictionary<TKey, TValue> dictionary) where TKey : notnull =>
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (10)
17private readonly IDictionary<TKey, TValue> m_dictionary; // Do not rename (binary serialization)
24public ReadOnlyDictionary(IDictionary<TKey, TValue> dictionary)
36protected IDictionary<TKey, TValue> Dictionary => m_dictionary;
44ICollection<TKey> IDictionary<TKey, TValue>.Keys => Keys;
51ICollection<TValue> IDictionary<TKey, TValue>.Values => Values;
55void IDictionary<TKey, TValue>.Add(TKey key, TValue value)
60bool IDictionary<TKey, TValue>.Remove(TKey key)
65TValue IDictionary<TKey, TValue>.this[TKey key]
216private readonly IDictionary<TKey, TValue> _dictionary;
219public DictionaryEnumerator(IDictionary<TKey, TValue> dictionary)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (6)
495public static void SendCommand(EventSource eventSource, EventCommand command, IDictionary<string, string?>? commandArguments)
2482internal override void OnControllerCommand(ControllerCommand command, IDictionary<string, string?>? arguments,
2604IDictionary<string, string?>? commandArguments)
4223public void EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary<string, string?>? arguments)
4692public IDictionary<string, string?>? Arguments { get; internal set; }
4720internal EventCommandEventArgs(EventCommand command, IDictionary<string, string?>? arguments, EventSource eventSource,
System.Private.DataContractSerialization (4)
System.Private.Windows.Core (7)
System.Private.Xml (29)
System.Resources.Extensions (7)
System.Runtime (1)
System.Runtime.Caching (3)
System.Runtime.Serialization.Schema (2)
System.Security.Claims (1)
System.ServiceModel.Primitives (3)
System.Speech (7)
System.Text.Json (21)
System.Text.Json.SourceGeneration (2)
System.Windows.Forms (4)
System.Windows.Forms.Design.Tests (4)
System.Xaml (13)
System.Xaml.Tests (15)
System\Xaml\XamlTypeTests.cs (15)
1754yield return new object?[] { new SubXamlType(typeof(IDictionary<int, int>), new XamlSchemaContext()), XamlCollectionKind.Dictionary };
3138int IDictionary<string, int>.this[string key] { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
3140string IDictionary<int, string>.this[int key] { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
3142ICollection<string> IDictionary<string, int>.Keys => throw new NotImplementedException();
3144ICollection<int> IDictionary<int, string>.Keys => throw new NotImplementedException();
3146ICollection<int> IDictionary<string, int>.Values => throw new NotImplementedException();
3148ICollection<string> IDictionary<int, string>.Values => throw new NotImplementedException();
3158void IDictionary<string, int>.Add(string key, int value) => throw new NotImplementedException();
3162void IDictionary<int, string>.Add(int key, string value) => throw new NotImplementedException();
3174bool IDictionary<string, int>.ContainsKey(string key) => throw new NotImplementedException();
3176bool IDictionary<int, string>.ContainsKey(int key) => throw new NotImplementedException();
3188bool IDictionary<string, int>.Remove(string key) => throw new NotImplementedException();
3192bool IDictionary<int, string>.Remove(int key) => throw new NotImplementedException();
3196bool IDictionary<string, int>.TryGetValue(string key, out int value) => throw new NotImplementedException();
3198bool IDictionary<int, string>.TryGetValue(int key, out string value) => throw new NotImplementedException();
TagHelpersWebSite (1)
Templates.Blazor.Tests (5)
Templates.Blazor.WebAssembly.Auth.Tests (5)
Templates.Blazor.WebAssembly.Tests (5)
Templates.Mvc.Tests (5)
Templates.Tests (5)
Test.Utilities (38)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
Text.Analyzers (50)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (15)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
40public static TValue? GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
63public static void MultiAdd<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
76public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, TValue value)
88public static void MultiAddRange<TKey, TValue>(this IDictionary<TKey, ArrayBuilder<TValue>> dictionary, TKey key, IEnumerable<TValue> values)
100public static bool MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value, IEqualityComparer<TValue>? comparer = null)
119public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
131public static void MultiAdd<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value, ImmutableArray<TValue> defaultArray)
143public static void MultiRemove<TKey, TValue, TCollection>(this IDictionary<TKey, TCollection> dictionary, TKey key, TValue value)
180/// and would conflict with <see cref="MultiRemove{TKey, TValue, TCollection}(IDictionary{TKey, TCollection}, TKey, TValue)"/>
182private static void MultiRemoveSet<TKey, TValue, TSet>(this IDictionary<TKey, TSet> dictionary, TKey key, TValue value)
200public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableHashSet<TValue>> dictionary, TKey key, TValue value)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
212public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableArray<TValue>> dictionary, TKey key, TValue value)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (4)
263private static bool TryGetValue(IDictionary<string, string>? dictionary, string key, [NotNullWhen(true)] out string? value)
271private static bool TryGetValue(IDictionary<string, ISymbol>? dictionary, string key, [NotNullWhen(true)] out string? value)
340IDictionary<string, ISymbol>? parameterToExistingFieldMap,
341IDictionary<string, string>? parameterToNewFieldMap,
XmlFileLogger (1)
xunit.assert (2)
xunit.console (6)
common\DictionaryExtensions.cs (3)
10public static void Add<TKey, TValue>(this IDictionary<TKey, List<TValue>> dictionary, TKey key, TValue value)
15public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key)
21public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, Func<TValue> newValue)
Xunit.NetCore.Extensions (1)