6 instantiations of ImmutableSortedDictionary
System.Collections.Immutable (6)
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (6)
24public static readonly ImmutableSortedDictionary<TKey, TValue> Empty = new ImmutableSortedDictionary<TKey, TValue>(); 337return new ImmutableSortedDictionary<TKey, TValue>(_root, _count, _keyComparer, valueComparer); 343var result = new ImmutableSortedDictionary<TKey, TValue>(Node.EmptyNode, 0, keyComparer, valueComparer); 743: new ImmutableSortedDictionary<TKey, TValue>(root, count, keyComparer, valueComparer); 820return root.IsEmpty ? this.Clear() : new ImmutableSortedDictionary<TKey, TValue>(root, adjustedCountIfDifferentRoot, _keyComparer, _valueComparer); 882return new ImmutableSortedDictionary<TKey, TValue>(root, dictionary.Count, this.KeyComparer, this.ValueComparer);
147 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> 12public static ImmutableSortedDictionary<TKey, TValue>.Builder Add(ref ImmutableSortedDictionary<TKey, TValue>.Builder buffer, TKey key, TValue value) 18public static ImmutableSortedDictionary<TKey, TValue>.Builder CreateBuffer() => ImmutableSortedDictionary.CreateBuilder<TKey, TValue>(); 20public static ImmutableSortedDictionary<TKey, TValue> ToResult(ImmutableSortedDictionary<TKey, TValue>.Builder buffer) => buffer.ToImmutable();
FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (4)
47var _ when type == (typeof(ImmutableSortedDictionary<TKey, TValue>)) => true, 121var _ when type == (typeof(ImmutableSortedDictionary<TKey, TValue>)) => 123ImmutableSortedDictionary<TKey, TValue>, 125ImmutableSortedDictionary<TKey, TValue>.Builder,
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Binding\FormDataMapperTests.cs (3)
921var expected = ImmutableSortedDictionary.CreateRange(new Dictionary<int, int>() { [0] = 10, [1] = 11, [2] = 12, [3] = 13, [4] = 14, [5] = 15, [6] = 16, [7] = 17, [8] = 18, [9] = 19, }); 922CanDeserialize_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> 12public static ImmutableSortedDictionary<TKey, TValue>.Builder Add(ref ImmutableSortedDictionary<TKey, TValue>.Builder buffer, TKey key, TValue value) 18public static ImmutableSortedDictionary<TKey, TValue>.Builder CreateBuffer() => ImmutableSortedDictionary.CreateBuilder<TKey, TValue>(); 20public static ImmutableSortedDictionary<TKey, TValue> ToResult(ImmutableSortedDictionary<TKey, TValue>.Builder buffer) => buffer.ToImmutable();
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (4)
47var _ when type == (typeof(ImmutableSortedDictionary<TKey, TValue>)) => true, 121var _ when type == (typeof(ImmutableSortedDictionary<TKey, TValue>)) => 123ImmutableSortedDictionary<TKey, TValue>, 125ImmutableSortedDictionary<TKey, TValue>.Builder,
Microsoft.CodeAnalysis (9)
DiagnosticAnalyzer\AnalyzerFileReference.cs (9)
212internal ImmutableSortedDictionary<string, ImmutableHashSet<string>> GetAnalyzerTypeNameMap() 223private static ImmutableSortedDictionary<string, ImmutableHashSet<string>> GetAnalyzerTypeNameMap(string fullPath, Type attributeType, AttributeLanguagesFunc languagesFunc) 376private ImmutableSortedDictionary<string, ImmutableHashSet<string>>? _lazyExtensionTypeNameMap; 451internal ImmutableSortedDictionary<string, ImmutableHashSet<string>> GetExtensionTypeNameMap() 455var analyzerTypeNameMap = GetAnalyzerTypeNameMap(_reference.FullPath, _attributeType, _languagesFunc); 462internal void AddExtensions(ImmutableSortedDictionary<string, ImmutableArray<TExtension>>.Builder builder) 464ImmutableSortedDictionary<string, ImmutableHashSet<string>> analyzerTypeNameMap; 512ImmutableSortedDictionary<string, ImmutableHashSet<string>> analyzerTypeNameMap; 576private ImmutableArray<TExtension> GetLanguageSpecificAnalyzers(Assembly analyzerAssembly, ImmutableSortedDictionary<string, ImmutableHashSet<string>> analyzerTypeNameMap, string language, ref bool reportedError)
Microsoft.CodeAnalysis.UnitTests (2)
Analyzers\AnalyzerFileReferenceTests.cs (1)
99var analyzerTypeNameMap = reference.GetAnalyzerTypeNameMap();
Collections\TestExtensionsMethods.nonnetstandard.cs (1)
35ImmutableSortedDictionary<TKey, TValue> d => d.ToBuilder(),
Microsoft.CodeAnalysis.Workspaces (7)
Workspace\Solution\SourceGeneratorExecutionVersion.cs (3)
55internal sealed class SourceGeneratorExecutionVersionMap(ImmutableSortedDictionary<ProjectId, SourceGeneratorExecutionVersion> map) 59public ImmutableSortedDictionary<ProjectId, SourceGeneratorExecutionVersion> Map { get; } = map; 62: this(ImmutableSortedDictionary<ProjectId, SourceGeneratorExecutionVersion>.Empty)
Workspace\Solution\TextDocumentStates.cs (4)
56ImmutableSortedDictionary<DocumentId, TState> map, 114public ImmutableSortedDictionary<DocumentId, TState> States { get; } 122var map = States; 252private static IEnumerable<DocumentId> Except(ImmutableList<DocumentId> ids, ImmutableSortedDictionary<DocumentId, TState> map)
RunTests (8)
AssemblyScheduler.cs (8)
19internal record struct WorkItemInfo(ImmutableSortedDictionary<AssemblyInfo, ImmutableArray<TestMethodInfo>> Filters, int PartitionIndex) 72var orderedTypeInfos = assemblies.ToImmutableSortedDictionary(assembly => assembly, GetTypeInfoList); 111var currentWorkItem = ImmutableSortedDictionary<AssemblyInfo, ImmutableArray<TestMethodInfo>>.Empty.Add(assembly, ImmutableArray<TestMethodInfo>.Empty); 119private static ImmutableSortedDictionary<AssemblyInfo, ImmutableArray<TypeInfo>> UpdateTestsWithExecutionTimes( 120ImmutableSortedDictionary<AssemblyInfo, ImmutableArray<TypeInfo>> assemblyTypes, 132var updated = assemblyTypes.ToImmutableSortedDictionary( 183ImmutableSortedDictionary<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}"/>. 21public static ImmutableSortedDictionary<TKey, TValue> Create<TKey, TValue>() where TKey : notnull 23return ImmutableSortedDictionary<TKey, TValue>.Empty; 33public static ImmutableSortedDictionary<TKey, TValue> Create<TKey, TValue>(IComparer<TKey>? keyComparer) where TKey : notnull 35return ImmutableSortedDictionary<TKey, TValue>.Empty.WithComparers(keyComparer); 46public static ImmutableSortedDictionary<TKey, TValue> Create<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 48return ImmutableSortedDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer); 58public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 60return ImmutableSortedDictionary<TKey, TValue>.Empty.AddRange(items); 71public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 73return ImmutableSortedDictionary<TKey, TValue>.Empty.WithComparers(keyComparer).AddRange(items); 85public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 87return ImmutableSortedDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(items); 96public static ImmutableSortedDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>() where TKey : notnull 108public static ImmutableSortedDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IComparer<TKey>? keyComparer) where TKey : notnull 121public static ImmutableSortedDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 138public 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 144return ImmutableSortedDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer) 153public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this ImmutableSortedDictionary<TKey, TValue>.Builder builder) where TKey : notnull 171public 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 186public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) where TKey : notnull 200public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 204if (source is ImmutableSortedDictionary<TKey, TValue> existingDictionary) 209return ImmutableSortedDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(source); 220public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey>? keyComparer) where TKey : notnull 232public 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. 55private ImmutableSortedDictionary<TKey, TValue>? _immutable; 71internal Builder(ImmutableSortedDictionary<TKey, TValue> map) 306ImmutableSortedDictionary<TKey, TValue>.Node newRoot = Node.EmptyNode; 493this.Root = ImmutableSortedDictionary<TKey, TValue>.Node.EmptyNode; 529public 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 638public ImmutableSortedDictionary<TKey, TValue> ToImmutable()
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (32)
24public 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. 82public ImmutableSortedDictionary<TKey, TValue> Clear() 245public ImmutableSortedDictionary<TKey, TValue> Add(TKey key, TValue value) 248ImmutableSortedDictionary<TKey, TValue>.Node result = _root.Add(key, value, _keyComparer, _valueComparer, out _); 255public ImmutableSortedDictionary<TKey, TValue> SetItem(TKey key, TValue value) 259ImmutableSortedDictionary<TKey, TValue>.Node result = _root.SetItem(key, value, _keyComparer, _valueComparer, out replacedExistingValue, out _); 268public ImmutableSortedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 278public ImmutableSortedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items) 288public ImmutableSortedDictionary<TKey, TValue> Remove(TKey value) 291ImmutableSortedDictionary<TKey, TValue>.Node result = _root.Remove(value, _keyComparer, out _); 298public ImmutableSortedDictionary<TKey, TValue> RemoveRange(IEnumerable<TKey> keys) 302ImmutableSortedDictionary<TKey, TValue>.Node result = _root; 307ImmutableSortedDictionary<TKey, TValue>.Node newResult = result.Remove(key, _keyComparer, out mutated); 321public ImmutableSortedDictionary<TKey, TValue> WithComparers(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) 343var result = new ImmutableSortedDictionary<TKey, TValue>(Node.EmptyNode, 0, keyComparer, valueComparer); 352public 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 739private 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> 753private static bool TryCastToImmutableMap(IEnumerable<KeyValuePair<TKey, TValue>> sequence, [NotNullWhen(true)] out ImmutableSortedDictionary<TKey, TValue>? other) 755other = sequence as ImmutableSortedDictionary<TKey, TValue>; 776private ImmutableSortedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> items, bool overwriteOnCollision, bool avoidToSortedMap) 788ImmutableSortedDictionary<TKey, TValue>.Node result = _root; 794ImmutableSortedDictionary<TKey, TValue>.Node newResult = overwriteOnCollision 816private ImmutableSortedDictionary<TKey, TValue> Wrap(Node root, int adjustedCountIfDifferentRoot) 831private ImmutableSortedDictionary<TKey, TValue> FillFromEmpty(IEnumerable<KeyValuePair<TKey, TValue>> items, bool overwriteOnCollision) 838ImmutableSortedDictionary<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"/>. 143Stack<RefAsValueType<ImmutableSortedDictionary<TKey, TValue>.Node>> stack = _stack.Use(ref this); 168Stack<RefAsValueType<ImmutableSortedDictionary<TKey, TValue>.Node>> stack = _stack.Use(ref this); 211Stack<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 298ImmutableSortedDictionary<TKey, TValue>.Node match = this.Search(key, keyComparer); 319ImmutableSortedDictionary<TKey, TValue>.Node match = this.Search(key, keyComparer); 350ImmutableSortedDictionary<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 419ImmutableSortedDictionary<TKey, TValue>.Node matchingNode = this.Search(pair.Key, keyComparer); 459ImmutableSortedDictionary<TKey, TValue>.Node right = tree._right; 478ImmutableSortedDictionary<TKey, TValue>.Node left = tree._left; 636ImmutableSortedDictionary<TKey, TValue>.Node newRight = _right!.SetOrAdd(key, value, keyComparer, valueComparer, overwriteExistingValue, out replacedExistingValue, out mutated); 644ImmutableSortedDictionary<TKey, TValue>.Node newLeft = _left!.SetOrAdd(key, value, keyComparer, valueComparer, overwriteExistingValue, out replacedExistingValue, out mutated); 717ImmutableSortedDictionary<TKey, TValue>.Node successor = _right; 723ImmutableSortedDictionary<TKey, TValue>.Node newRight = _right.Remove(successor._key, keyComparer, out _); 729ImmutableSortedDictionary<TKey, TValue>.Node newLeft = _left.Remove(key, keyComparer, out mutated); 737ImmutableSortedDictionary<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)
204if (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)
115public INamedTypeSymbol? ImmutableSortedDictionaryType => GetOrResolveType(typeof(ImmutableSortedDictionary<,>), ref _ImmutableSortedDictionaryType);