8 implementations of IImmutableDictionary
Microsoft.Build.Framework (1)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.Collections.Package (1)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
System.Collections.Immutable (2)
294 references to IImmutableDictionary
Microsoft.AspNetCore.Components.Endpoints (5)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Microsoft.AspNetCore.Http.Extensions (5)
Microsoft.Build.Framework (14)
ImmutableSegmentedDictionary`2.cs (14)
319IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Clear()
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Add(TKey key, TValue value)
325IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
328IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItem(TKey key, TValue value)
331IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
334IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.RemoveRange(IEnumerable<TKey> keys)
337IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Remove(TKey key) => Remove(key);
Microsoft.CodeAnalysis (14)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (14)
310IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Clear()
313IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Add(TKey key, TValue value)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
319IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItem(TKey key, TValue value)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
325IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.RemoveRange(IEnumerable<TKey> keys)
328IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Remove(TKey key) => Remove(key);
Microsoft.CodeAnalysis.CodeStyle (14)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (14)
310IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Clear()
313IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Add(TKey key, TValue value)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
319IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItem(TKey key, TValue value)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
325IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.RemoveRange(IEnumerable<TKey> keys)
328IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Remove(TKey key) => Remove(key);
Microsoft.CodeAnalysis.Collections.Package (14)
ImmutableSegmentedDictionary`2.cs (14)
310IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Clear()
313IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Add(TKey key, TValue value)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
319IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItem(TKey key, TValue value)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
325IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.RemoveRange(IEnumerable<TKey> keys)
328IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Remove(TKey key) => Remove(key);
Microsoft.CodeAnalysis.Scripting.UnitTests (2)
Microsoft.CodeAnalysis.UnitTests (61)
Collections\ImmutableDictionaryBuilderTestBase.cs (11)
80var map = this.GetEmptyImmutableDictionary<string, int>().Add("five", 5);
88var map = this.GetEmptyImmutableDictionary<string, int>().Add("five", 5).Add("six", 6);
99var map = this.GetEmptyImmutableDictionary<string, int>().Add("five", 5).Add("six", 6);
109var map = this.GetEmptyImmutableDictionary<string, int>().Add("five", 5);
129var map = this.GetEmptyImmutableDictionary<string, int>().Add("five", 5).Add("six", 6);
138var map = this.GetEmptyImmutableDictionary<string, int>().Add("five", 5).Add("six", 6);
147var map = this.GetEmptyImmutableDictionary<string, int>().Add("five", 5).Add("six", 6);
158var map = this.GetEmptyImmutableDictionary<string, int>().Add("five", 5).Add("six", 6);
269protected abstract IDictionary<TKey, TValue> GetBuilder<TKey, TValue>(IImmutableDictionary<TKey, TValue>? basis = null)
278protected abstract IImmutableDictionary<TKey, TValue> GetEmptyImmutableDictionary<TKey, TValue>()
281protected abstract IImmutableDictionary<string, TValue> Empty<TValue>(StringComparer comparer);
Collections\ImmutableDictionaryTestBase.cs (19)
43var map = this.Empty<string, int>()
53var sameMap = map.SetItem("Microsoft", 200);
65var map = this.Empty<string, int>().SetItems(template);
113var map = this.Empty<int, int>().Add(3, 5);
123var dictionary = Empty<string, int>();
225var dictionary = Empty<int>(StringComparer.OrdinalIgnoreCase)
237protected void EmptyTestHelper<K, V>(IImmutableDictionary<K, V?> empty, K someKey)
254protected void AddExistingKeySameValueTestHelper<TKey, TValue>(IImmutableDictionary<TKey, TValue> map, TKey key, TValue value1, TValue value2)
279protected void AddExistingKeyDifferentValueTestHelper<TKey, TValue>(IImmutableDictionary<TKey, TValue> map, TKey key, TValue value1, TValue value2)
286var map1 = map.Add(key, value1);
287var map2 = map.Add(key, value2);
292protected static void ContainsKeyTestHelper<TKey, TValue>(IImmutableDictionary<TKey, TValue> map, TKey key, TValue value)
298protected static void ContainsTestHelper<TKey, TValue>(IImmutableDictionary<TKey, TValue> map, TKey key, TValue value)
307protected void RemoveTestHelper<TKey, TValue>(IImmutableDictionary<TKey, TValue?> map, TKey key)
315var addedMap = map.Add(key, default(TValue));
316var removedMap = addedMap.Remove(key);
321protected abstract IImmutableDictionary<TKey, TValue> Empty<TKey, TValue>()
324protected abstract IImmutableDictionary<string, TValue> Empty<TValue>(StringComparer comparer);
326protected abstract IEqualityComparer<TValue> GetValueComparer<TKey, TValue>(IImmutableDictionary<TKey, TValue> dictionary)
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (17)
90var map = Empty<int, GenericParameterHelper>();
96var map2 = Empty<int, GenericParameterHelper>();
97var jointMap = map2.AddRange(map);
125private static IImmutableDictionary<TKey, TValue> AddTestHelper<TKey, TValue>(IImmutableDictionary<TKey, TValue> map, TKey key, TValue value) where TKey : IComparable<TKey>
130IImmutableDictionary<TKey, TValue> addedMap = map.Add(key, value);
140protected static void AddAscendingTestHelper(IImmutableDictionary<int, GenericParameterHelper> map)
156protected static void AddDescendingTestHelper(IImmutableDictionary<int, GenericParameterHelper> map)
170protected static void AddRemoveRandomDataTestHelper(IImmutableDictionary<double, GenericParameterHelper> map)
194protected void AddRemoveEnumerableTestHelper(IImmutableDictionary<int, int> empty)
201var nonEmpty = empty.AddRange(list);
202var halfRemoved = nonEmpty.RemoveRange(Enumerable.Range(1, 5));
207protected static void KeysTestHelper<TKey, TValue>(IImmutableDictionary<TKey, TValue?> map, TKey key)
213var nonEmpty = map.Add(key, default(TValue));
219protected static void ValuesTestHelper<TKey, TValue>(IImmutableDictionary<TKey, TValue?> map, TKey key)
224var nonEmpty = map.Add(key, default(TValue));
230protected static void EnumeratorTestHelper(IImmutableDictionary<int, GenericParameterHelper> map)
Collections\ImmutableSegmentedDictionaryTest.cs (5)
225IImmutableDictionary<string, int> empty = ImmutableSegmentedDictionary.Create<string, int>();
226IImmutableDictionary<string, int> populated = ImmutableSegmentedDictionary.Create<string, int>().Add("a", 5);
329protected override IImmutableDictionary<TKey, TValue> Empty<TKey, TValue>()
334protected override IImmutableDictionary<string, TValue> Empty<TValue>(StringComparer comparer)
339protected override IEqualityComparer<TValue> GetValueComparer<TKey, TValue>(IImmutableDictionary<TKey, TValue> dictionary)
Microsoft.CodeAnalysis.Workspaces (14)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (14)
310IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Clear()
313IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Add(TKey key, TValue value)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
319IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItem(TKey key, TValue value)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
325IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.RemoveRange(IEnumerable<TKey> keys)
328IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Remove(TKey key) => Remove(key);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (14)
src\Dependencies\Collections\ImmutableSegmentedDictionary`2.cs (14)
310IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Clear()
313IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Add(TKey key, TValue value)
316IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
319IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItem(TKey key, TValue value)
322IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
325IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.RemoveRange(IEnumerable<TKey> keys)
328IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Remove(TKey key) => Remove(key);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
Microsoft.DotNet.Helix.Client (42)
Microsoft.DotNet.XUnitAssert.Tests (4)
Roslyn.Compilers.Extension (3)
System.Collections.Immutable (83)
System\Collections\Immutable\IImmutableDictionary.cs (7)
19IImmutableDictionary<TKey, TValue> Clear();
31IImmutableDictionary<TKey, TValue> Add(TKey key, TValue value);
39IImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs);
51IImmutableDictionary<TKey, TValue> SetItem(TKey key, TValue value);
58IImmutableDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items);
65IImmutableDictionary<TKey, TValue> RemoveRange(IEnumerable<TKey> keys);
72IImmutableDictionary<TKey, TValue> Remove(TKey key);
System\Collections\Immutable\ImmutableDictionary.cs (3)
279public static bool Contains<TKey, TValue>(this IImmutableDictionary<TKey, TValue> map, TKey key, TValue value) where TKey : notnull
292public static TValue? GetValueOrDefault<TKey, TValue>(this IImmutableDictionary<TKey, TValue> dictionary, TKey key) where TKey : notnull
308public static TValue GetValueOrDefault<TKey, TValue>(this IImmutableDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue) where TKey : notnull
System\Collections\Immutable\ImmutableDictionary_2.cs (29)
121/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
204IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Clear()
296/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
307/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
317/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
341/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
352/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
405/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
414/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
423/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
455/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
502/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface
504IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Add(TKey key, TValue value)
510/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface
512IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItem(TKey key, TValue value)
522IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
528/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface
530IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
536/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface
538IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.RemoveRange(IEnumerable<TKey> keys)
544/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface
546IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Remove(TKey key)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (37)
80/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
98/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
106/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
114/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
122/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
130/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
132IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Clear()
171/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
243/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
253/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
276/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
286/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
296/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
319/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
350/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
379/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
381IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Add(TKey key, TValue value)
387/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
389IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItem(TKey key, TValue value)
399IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
405/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
407IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
413/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
415IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.RemoveRange(IEnumerable<TKey> keys)
421/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
423IImmutableDictionary<TKey, TValue> IImmutableDictionary<TKey, TValue>.Remove(TKey key)
429/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
438/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
446/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
455/// See the <see cref="IImmutableDictionary{TKey, TValue}"/> interface.
System.Text.Json.SourceGeneration (1)