6 instantiations of ImmutableSortedDictionary
System.Collections.Immutable (6)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (6)
24
public static readonly ImmutableSortedDictionary<TKey, TValue> Empty = new
ImmutableSortedDictionary
<TKey, TValue>();
337
return new
ImmutableSortedDictionary
<TKey, TValue>(_root, _count, _keyComparer, valueComparer);
343
var result = new
ImmutableSortedDictionary
<TKey, TValue>(Node.EmptyNode, 0, keyComparer, valueComparer);
743
: new
ImmutableSortedDictionary
<TKey, TValue>(root, count, keyComparer, valueComparer);
820
return root.IsEmpty ? this.Clear() : new
ImmutableSortedDictionary
<TKey, TValue>(root, adjustedCountIfDifferentRoot, _keyComparer, _valueComparer);
882
return new
ImmutableSortedDictionary
<TKey, TValue>(root, dictionary.Count, this.KeyComparer, this.ValueComparer);
146 references to ImmutableSortedDictionary
Microsoft.AspNetCore.Components.Endpoints (11)
FormMapping\Converters\DictionaryAdapters\ImmutableSortedDictionaryBufferAdapter.cs (7)
9
: IDictionaryBufferAdapter<
ImmutableSortedDictionary
<TKey, TValue>,
ImmutableSortedDictionary
<TKey, TValue>.Builder, TKey, TValue>
12
public static
ImmutableSortedDictionary
<TKey, TValue>.Builder Add(ref
ImmutableSortedDictionary
<TKey, TValue>.Builder buffer, TKey key, TValue value)
18
public static
ImmutableSortedDictionary
<TKey, TValue>.Builder CreateBuffer() => ImmutableSortedDictionary.CreateBuilder<TKey, TValue>();
20
public static
ImmutableSortedDictionary
<TKey, TValue> ToResult(
ImmutableSortedDictionary
<TKey, TValue>.Builder buffer) => buffer.ToImmutable();
FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (4)
47
var _ when type == (typeof(
ImmutableSortedDictionary
<TKey, TValue>)) => true,
121
var _ when type == (typeof(
ImmutableSortedDictionary
<TKey, TValue>)) =>
123
ImmutableSortedDictionary
<TKey, TValue>,
125
ImmutableSortedDictionary
<TKey, TValue>.Builder,
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Binding\FormDataMapperTests.cs (3)
921
var
expected = ImmutableSortedDictionary.CreateRange(new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, });
922
CanDeserialize_Dictionary<
ImmutableSortedDictionary
<int, int>,
ImmutableSortedDictionary
<int, int>, int, int>(expected);
Microsoft.AspNetCore.Http.Extensions (11)
src\Components\Endpoints\src\FormMapping\Converters\DictionaryAdapters\ImmutableSortedDictionaryBufferAdapter.cs (7)
9
: IDictionaryBufferAdapter<
ImmutableSortedDictionary
<TKey, TValue>,
ImmutableSortedDictionary
<TKey, TValue>.Builder, TKey, TValue>
12
public static
ImmutableSortedDictionary
<TKey, TValue>.Builder Add(ref
ImmutableSortedDictionary
<TKey, TValue>.Builder buffer, TKey key, TValue value)
18
public static
ImmutableSortedDictionary
<TKey, TValue>.Builder CreateBuffer() => ImmutableSortedDictionary.CreateBuilder<TKey, TValue>();
20
public static
ImmutableSortedDictionary
<TKey, TValue> ToResult(
ImmutableSortedDictionary
<TKey, TValue>.Builder buffer) => buffer.ToImmutable();
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (4)
47
var _ when type == (typeof(
ImmutableSortedDictionary
<TKey, TValue>)) => true,
121
var _ when type == (typeof(
ImmutableSortedDictionary
<TKey, TValue>)) =>
123
ImmutableSortedDictionary
<TKey, TValue>,
125
ImmutableSortedDictionary
<TKey, TValue>.Builder,
Microsoft.CodeAnalysis (9)
DiagnosticAnalyzer\AnalyzerFileReference.cs (9)
212
internal
ImmutableSortedDictionary
<string, ImmutableHashSet<string>> GetAnalyzerTypeNameMap()
223
private static
ImmutableSortedDictionary
<string, ImmutableHashSet<string>> GetAnalyzerTypeNameMap(string fullPath, Type attributeType, AttributeLanguagesFunc languagesFunc)
376
private
ImmutableSortedDictionary
<string, ImmutableHashSet<string>>? _lazyExtensionTypeNameMap;
451
internal
ImmutableSortedDictionary
<string, ImmutableHashSet<string>> GetExtensionTypeNameMap()
455
var
analyzerTypeNameMap = GetAnalyzerTypeNameMap(_reference.FullPath, _attributeType, _languagesFunc);
462
internal void AddExtensions(
ImmutableSortedDictionary
<string, ImmutableArray<TExtension>>.Builder builder)
464
ImmutableSortedDictionary
<string, ImmutableHashSet<string>> analyzerTypeNameMap;
512
ImmutableSortedDictionary
<string, ImmutableHashSet<string>> analyzerTypeNameMap;
576
private ImmutableArray<TExtension> GetLanguageSpecificAnalyzers(Assembly analyzerAssembly,
ImmutableSortedDictionary
<string, ImmutableHashSet<string>> analyzerTypeNameMap, string language, ref bool reportedError)
Microsoft.CodeAnalysis.UnitTests (2)
Analyzers\AnalyzerFileReferenceTests.cs (1)
99
var
analyzerTypeNameMap = reference.GetAnalyzerTypeNameMap();
Collections\TestExtensionsMethods.nonnetstandard.cs (1)
35
ImmutableSortedDictionary
<TKey, TValue> d => d.ToBuilder(),
Microsoft.CodeAnalysis.Workspaces (6)
Workspace\Solution\SourceGeneratorExecutionVersion.cs (3)
55
internal sealed class SourceGeneratorExecutionVersionMap(
ImmutableSortedDictionary
<ProjectId, SourceGeneratorExecutionVersion> map)
59
public
ImmutableSortedDictionary
<ProjectId, SourceGeneratorExecutionVersion> Map { get; } = map;
62
: this(
ImmutableSortedDictionary
<ProjectId, SourceGeneratorExecutionVersion>.Empty)
Workspace\Solution\TextDocumentStates.cs (3)
57
ImmutableSortedDictionary
<DocumentId, TState> map,
115
public
ImmutableSortedDictionary
<DocumentId, TState> States { get; }
263
private static IEnumerable<DocumentId> Except(ImmutableList<DocumentId> ids,
ImmutableSortedDictionary
<DocumentId, TState> map)
RunTests (8)
AssemblyScheduler.cs (8)
19
internal record struct WorkItemInfo(
ImmutableSortedDictionary
<AssemblyInfo, ImmutableArray<TestMethodInfo>> Filters, int PartitionIndex)
72
var
orderedTypeInfos = assemblies.ToImmutableSortedDictionary(assembly => assembly, GetTypeInfoList);
111
var
currentWorkItem =
ImmutableSortedDictionary
<AssemblyInfo, ImmutableArray<TestMethodInfo>>.Empty.Add(assembly, ImmutableArray<TestMethodInfo>.Empty);
119
private static
ImmutableSortedDictionary
<AssemblyInfo, ImmutableArray<TypeInfo>> UpdateTestsWithExecutionTimes(
120
ImmutableSortedDictionary
<AssemblyInfo, ImmutableArray<TypeInfo>> assemblyTypes,
132
var
updated = assemblyTypes.ToImmutableSortedDictionary(
183
ImmutableSortedDictionary
<AssemblyInfo, ImmutableArray<TypeInfo>> typeInfos,
System.Collections.Immutable (95)
System\Collections\Immutable\ImmutableList_1.Enumerator.cs (1)
17
/// <see cref="ImmutableList{T}.Enumerator"/>, <see cref="
ImmutableSortedDictionary
{TKey, TValue}.Enumerator"/>, and <see cref="ImmutableSortedSet{T}.Enumerator"/>.
System\Collections\Immutable\ImmutableSortedDictionary.cs (27)
11
/// A set of initialization methods for instances of <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/>.
21
public static
ImmutableSortedDictionary
<TKey, TValue> Create<TKey, TValue>() where TKey : notnull
23
return
ImmutableSortedDictionary
<TKey, TValue>.Empty;
33
public static
ImmutableSortedDictionary
<TKey, TValue> Create<TKey, TValue>(IComparer<TKey>? keyComparer) where TKey : notnull
35
return
ImmutableSortedDictionary
<TKey, TValue>.Empty.WithComparers(keyComparer);
46
public static
ImmutableSortedDictionary
<TKey, TValue> Create<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull
48
return
ImmutableSortedDictionary
<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer);
58
public static
ImmutableSortedDictionary
<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull
60
return
ImmutableSortedDictionary
<TKey, TValue>.Empty.AddRange(items);
71
public static
ImmutableSortedDictionary
<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull
73
return
ImmutableSortedDictionary
<TKey, TValue>.Empty.WithComparers(keyComparer).AddRange(items);
85
public static
ImmutableSortedDictionary
<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull
87
return
ImmutableSortedDictionary
<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(items);
96
public static
ImmutableSortedDictionary
<TKey, TValue>.Builder CreateBuilder<TKey, TValue>() where TKey : notnull
108
public static
ImmutableSortedDictionary
<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IComparer<TKey>? keyComparer) where TKey : notnull
121
public static
ImmutableSortedDictionary
<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull
138
public static
ImmutableSortedDictionary
<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull
144
return
ImmutableSortedDictionary
<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer)
153
public static
ImmutableSortedDictionary
<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this
ImmutableSortedDictionary
<TKey, TValue>.Builder builder) where TKey : notnull
171
public static
ImmutableSortedDictionary
<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IComparer<TKey>? keyComparer) where TKey : notnull
186
public static
ImmutableSortedDictionary
<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) where TKey : notnull
200
public static
ImmutableSortedDictionary
<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull
204
if (source is
ImmutableSortedDictionary
<TKey, TValue> existingDictionary)
209
return
ImmutableSortedDictionary
<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(source);
220
public static
ImmutableSortedDictionary
<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey>? keyComparer) where TKey : notnull
232
public static
ImmutableSortedDictionary
<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source) where TKey : notnull
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (10)
11
/// Contains the inner <see cref="
ImmutableSortedDictionary
{TKey, TValue}.Builder"/> class.
55
private
ImmutableSortedDictionary
<TKey, TValue>? _immutable;
71
internal Builder(
ImmutableSortedDictionary
<TKey, TValue> map)
306
ImmutableSortedDictionary
<TKey, TValue>.Node newRoot = Node.EmptyNode;
493
this.Root =
ImmutableSortedDictionary
<TKey, TValue>.Node.EmptyNode;
529
public
ImmutableSortedDictionary
<TKey, TValue>.Enumerator GetEnumerator()
555
/// Determines whether the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/>
559
/// The value to locate in the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/>.
563
/// true if the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/> contains
638
public
ImmutableSortedDictionary
<TKey, TValue> ToImmutable()
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (32)
24
public static readonly
ImmutableSortedDictionary
<TKey, TValue> Empty = new ImmutableSortedDictionary<TKey, TValue>();
47
/// Initializes a new instance of the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/> class.
59
/// Initializes a new instance of the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/> class.
82
public
ImmutableSortedDictionary
<TKey, TValue> Clear()
245
public
ImmutableSortedDictionary
<TKey, TValue> Add(TKey key, TValue value)
248
ImmutableSortedDictionary
<TKey, TValue>.Node result = _root.Add(key, value, _keyComparer, _valueComparer, out _);
255
public
ImmutableSortedDictionary
<TKey, TValue> SetItem(TKey key, TValue value)
259
ImmutableSortedDictionary
<TKey, TValue>.Node result = _root.SetItem(key, value, _keyComparer, _valueComparer, out replacedExistingValue, out _);
268
public
ImmutableSortedDictionary
<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
278
public
ImmutableSortedDictionary
<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items)
288
public
ImmutableSortedDictionary
<TKey, TValue> Remove(TKey value)
291
ImmutableSortedDictionary
<TKey, TValue>.Node result = _root.Remove(value, _keyComparer, out _);
298
public
ImmutableSortedDictionary
<TKey, TValue> RemoveRange(IEnumerable<TKey> keys)
302
ImmutableSortedDictionary
<TKey, TValue>.Node result = _root;
307
ImmutableSortedDictionary
<TKey, TValue>.Node newResult = result.Remove(key, _keyComparer, out mutated);
321
public
ImmutableSortedDictionary
<TKey, TValue> WithComparers(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer)
343
var
result = new ImmutableSortedDictionary<TKey, TValue>(Node.EmptyNode, 0, keyComparer, valueComparer);
352
public
ImmutableSortedDictionary
<TKey, TValue> WithComparers(IComparer<TKey>? keyComparer)
358
/// Determines whether the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/>
362
/// The value to locate in the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/>.
366
/// true if the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/> contains
739
private static
ImmutableSortedDictionary
<TKey, TValue> Wrap(Node root, int count, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer)
747
/// Attempts to discover an <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/> instance beneath some enumerable sequence
751
/// <param name="other">Receives the concrete <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/> typed value if one can be found.</param>
753
private static bool TryCastToImmutableMap(IEnumerable<KeyValuePair<TKey, TValue>> sequence, [NotNullWhen(true)] out
ImmutableSortedDictionary
<TKey, TValue>? other)
755
other = sequence as
ImmutableSortedDictionary
<TKey, TValue>;
776
private
ImmutableSortedDictionary
<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items, bool overwriteOnCollision, bool avoidToSortedMap)
788
ImmutableSortedDictionary
<TKey, TValue>.Node result = _root;
794
ImmutableSortedDictionary
<TKey, TValue>.Node newResult = overwriteOnCollision
816
private
ImmutableSortedDictionary
<TKey, TValue> Wrap(Node root, int adjustedCountIfDifferentRoot)
831
private
ImmutableSortedDictionary
<TKey, TValue> FillFromEmpty(IEnumerable<KeyValuePair<TKey, TValue>> items, bool overwriteOnCollision)
838
ImmutableSortedDictionary
<TKey, TValue>? other;
System\Collections\Immutable\ImmutableSortedDictionary_2.Enumerator.cs (4)
17
/// <see cref="ImmutableList{T}.Enumerator"/>, <see cref="
ImmutableSortedDictionary
{TKey, TValue}.Enumerator"/>, and <see cref="ImmutableSortedSet{T}.Enumerator"/>.
143
Stack<RefAsValueType<
ImmutableSortedDictionary
<TKey, TValue>.Node>> stack = _stack.Use(ref this);
168
Stack<RefAsValueType<
ImmutableSortedDictionary
<TKey, TValue>.Node>> stack = _stack.Use(ref this);
211
Stack<RefAsValueType<
ImmutableSortedDictionary
<TKey, TValue>.Node>> stack = _stack.Use(ref this);
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (17)
59
/// Initializes a new instance of the <see cref="
ImmutableSortedDictionary
{TKey, TValue}.Node"/> class
69
/// Initializes a new instance of the <see cref="
ImmutableSortedDictionary
{TKey, TValue}.Node"/> class
298
ImmutableSortedDictionary
<TKey, TValue>.Node match = this.Search(key, keyComparer);
319
ImmutableSortedDictionary
<TKey, TValue>.Node match = this.Search(key, keyComparer);
350
ImmutableSortedDictionary
<TKey, TValue>.Node match = this.Search(equalKey, keyComparer);
379
/// Determines whether the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/>
383
/// The value to locate in the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/>.
388
/// true if the <see cref="
ImmutableSortedDictionary
{TKey, TValue}"/> contains
419
ImmutableSortedDictionary
<TKey, TValue>.Node matchingNode = this.Search(pair.Key, keyComparer);
459
ImmutableSortedDictionary
<TKey, TValue>.Node right = tree._right;
478
ImmutableSortedDictionary
<TKey, TValue>.Node left = tree._left;
636
ImmutableSortedDictionary
<TKey, TValue>.Node newRight = _right!.SetOrAdd(key, value, keyComparer, valueComparer, overwriteExistingValue, out replacedExistingValue, out mutated);
644
ImmutableSortedDictionary
<TKey, TValue>.Node newLeft = _left!.SetOrAdd(key, value, keyComparer, valueComparer, overwriteExistingValue, out replacedExistingValue, out mutated);
717
ImmutableSortedDictionary
<TKey, TValue>.Node successor = _right;
723
ImmutableSortedDictionary
<TKey, TValue>.Node newRight = _right.Remove(successor._key, keyComparer, out _);
729
ImmutableSortedDictionary
<TKey, TValue>.Node newLeft = _left.Remove(key, keyComparer, out mutated);
737
ImmutableSortedDictionary
<TKey, TValue>.Node newRight = _right.Remove(key, keyComparer, out mutated);
System\Collections\Immutable\ImmutableSortedSet_1.Enumerator.cs (1)
16
/// <see cref="ImmutableList{T}.Enumerator"/>, <see cref="
ImmutableSortedDictionary
{TKey, TValue}.Enumerator"/>, and <see cref="ImmutableSortedSet{T}.Enumerator"/>.
System\Collections\Immutable\KeysOrValuesCollectionAccessor.cs (1)
204
if (this.Dictionary is
ImmutableSortedDictionary
<TKey, TValue> sortedDictionary)
System\Collections\Immutable\SortedInt32KeyNode.cs (1)
15
/// This is a trimmed down version of <see cref="
ImmutableSortedDictionary
{TKey, TValue}.Node"/>
System\Collections\Immutable\SortedInt32KeyNode.Enumerator.cs (1)
16
/// <see cref="ImmutableList{T}.Enumerator"/>, <see cref="
ImmutableSortedDictionary
{TKey, TValue}.Enumerator"/>, and <see cref="ImmutableSortedSet{T}.Enumerator"/>.
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
115
public INamedTypeSymbol? ImmutableSortedDictionaryType => GetOrResolveType(typeof(
ImmutableSortedDictionary
<,>), ref _ImmutableSortedDictionaryType);