4 instantiations of ImmutableSortedSet
System.Collections.Immutable (4)
System\Collections\Immutable\ImmutableSortedSet_1.cs (4)
39public static readonly ImmutableSortedSet<T> Empty = new ImmutableSortedSet<T>(); 357var result = new ImmutableSortedSet<T>(Node.EmptyNode, comparer); 1029: new ImmutableSortedSet<T>(root, comparer); 1091return root.IsEmpty ? this.Clear() : new ImmutableSortedSet<T>(root, _comparer);
151 references to ImmutableSortedSet
Microsoft.AspNetCore.Components.Endpoints (11)
FormMapping\Converters\CollectionAdapters\ImmutableSortedSetBufferAdapter.cs (7)
8internal sealed class ImmutableSortedSetBufferAdapter<TElement> : ICollectionBufferAdapter<ImmutableSortedSet<TElement>, ImmutableSortedSet<TElement>.Builder, TElement> 10public static ImmutableSortedSet<TElement>.Builder CreateBuffer() => ImmutableSortedSet.CreateBuilder<TElement>(); 12public static ImmutableSortedSet<TElement>.Builder Add(ref ImmutableSortedSet<TElement>.Builder buffer, TElement element) 18public static ImmutableSortedSet<TElement> ToResult(ImmutableSortedSet<TElement>.Builder buffer) => buffer.ToImmutable();
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (4)
59var _ when type == (typeof(ImmutableSortedSet<TElement>)) => true, 155var _ when type.IsAssignableTo(typeof(ImmutableSortedSet<TElement>)) => 156new CollectionConverter<ImmutableSortedSet<TElement>, ImmutableSortedSetBufferAdapter<TElement>, ImmutableSortedSet<TElement>.Builder, TElement>(elementTypeConverter),
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Binding\FormDataMapperTests.cs (3)
833var expected = ImmutableSortedSet.CreateRange(new[] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }); 834CanDeserialize_Collection<ImmutableSortedSet<int>, ImmutableSortedSet<int>, int>(expected);
Microsoft.AspNetCore.Http.Extensions (11)
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ImmutableSortedSetBufferAdapter.cs (7)
8internal sealed class ImmutableSortedSetBufferAdapter<TElement> : ICollectionBufferAdapter<ImmutableSortedSet<TElement>, ImmutableSortedSet<TElement>.Builder, TElement> 10public static ImmutableSortedSet<TElement>.Builder CreateBuffer() => ImmutableSortedSet.CreateBuilder<TElement>(); 12public static ImmutableSortedSet<TElement>.Builder Add(ref ImmutableSortedSet<TElement>.Builder buffer, TElement element) 18public static ImmutableSortedSet<TElement> ToResult(ImmutableSortedSet<TElement>.Builder buffer) => buffer.ToImmutable();
src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (4)
59var _ when type == (typeof(ImmutableSortedSet<TElement>)) => true, 155var _ when type.IsAssignableTo(typeof(ImmutableSortedSet<TElement>)) => 156new CollectionConverter<ImmutableSortedSet<TElement>, ImmutableSortedSetBufferAdapter<TElement>, ImmutableSortedSet<TElement>.Builder, TElement>(elementTypeConverter),
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
1268var diagnosticIds = ImmutableSortedSet<string>.Empty.WithComparer(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
61nameof(ImmutableSortedSet<int>),
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
61nameof(ImmutableSortedSet<int>),
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Rename\CSharpRenameRewriterLanguageService.cs (3)
93private readonly ImmutableDictionary<TextSpan, ImmutableSortedSet<TextSpan>?> _stringAndCommentTextSpans; 635private SyntaxToken RenameInStringLiteral(SyntaxToken oldToken, SyntaxToken newToken, ImmutableSortedSet<TextSpan>? subSpansToReplace, Func<SyntaxTriviaList, string, string, SyntaxTriviaList, SyntaxToken> createNewStringLiteral) 680ImmutableSortedSet<TextSpan>? subSpansToReplace = null;
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (3)
PDB\MethodDebugInfo.cs (3)
82public ImmutableSortedSet<int> GetInScopeHoistedLocalIndices(int ilOffset, ref ILSpan methodContextReuseSpan) 86return ImmutableSortedSet<int>.Empty; 107var result = scopesBuilder.ToImmutableSortedSet();
Microsoft.CodeAnalysis.UnitTests (3)
Collections\ImmutableSegmentedHashSetTest.cs (1)
64var sorted = System.Collections.Immutable.ImmutableSortedSet.ToImmutableSortedSet(set);
Collections\ImmutableSetTest.nonnetstandard.cs (2)
70System.Collections.Immutable.ImmutableSortedSet<T> s => s.KeyComparer, 86System.Collections.Immutable.ImmutableSortedSet<T> => null,
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (7)
CompilationContext.vb (3)
51inScopeHoistedLocalSlots As ImmutableSortedSet(Of Integer), 1049inScopeHoistedLocalSlots As ImmutableSortedSet(Of Integer), 1227inScopeHoistedLocalSlots As ImmutableSortedSet(Of Integer),
EvaluationContext.vb (4)
43Private ReadOnly _inScopeHoistedLocalSlots As ImmutableSortedSet(Of Integer) 52inScopeHoistedLocalSlots As ImmutableSortedSet(Of Integer), 176Dim inScopeHoistedLocalSlots As ImmutableSortedSet(Of Integer) 202Private Shared Function GetInScopeHoistedLocalSlots(allLocalNames As ImmutableArray(Of String)) As ImmutableSortedSet(Of Integer)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
Rename\VisualBasicRenameRewriterLanguageService.vb (3)
80Private ReadOnly _stringAndCommentTextSpans As ImmutableDictionary(Of TextSpan, ImmutableSortedSet(Of TextSpan)) 589Private Function RenameInStringLiteral(oldToken As SyntaxToken, newToken As SyntaxToken, subSpansToReplace As ImmutableSortedSet(Of TextSpan), createNewStringLiteral As Func(Of SyntaxTriviaList, String, String, SyntaxTriviaList, SyntaxToken)) As SyntaxToken 626Dim subSpansToReplace As ImmutableSortedSet(Of TextSpan) = Nothing
Microsoft.CodeAnalysis.Workspaces (5)
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
888private static ImmutableSortedSet<TextSpan>? GetSubSpansToRenameInStringAndCommentTextSpans(
Rename\RenameRewriterParameters.cs (2)
22ImmutableDictionary<TextSpan, ImmutableSortedSet<TextSpan>?> stringAndCommentTextSpans, 47internal readonly ImmutableDictionary<TextSpan, ImmutableSortedSet<TextSpan>?> StringAndCommentTextSpans = stringAndCommentTextSpans;
Rename\RenameUtilities.cs (1)
246ImmutableSortedSet<TextSpan>? subSpansToReplace = null)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
206public static void MultiRemove<TKey, TValue>(this IDictionary<TKey, ImmutableSortedSet<TValue>> dictionary, TKey key, TValue value)
System.Collections.Immutable (94)
System\Collections\Frozen\FrozenSetInternalBase.cs (1)
166ImmutableSortedSet<T> iss => _thisSet.Comparer.Equals(iss.KeyComparer),
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_2.Enumerator.cs (1)
17/// <see cref="ImmutableList{T}.Enumerator"/>, <see cref="ImmutableSortedDictionary{TKey, TValue}.Enumerator"/>, and <see cref="ImmutableSortedSet{T}.Enumerator"/>.
System\Collections\Immutable\ImmutableSortedSet.cs (27)
9/// A set of initialization methods for instances of <see cref="ImmutableSortedSet{T}"/>. 18public static ImmutableSortedSet<T> Create<T>() 20return ImmutableSortedSet<T>.Empty; 31public static ImmutableSortedSet<T> Create<T>(IComparer<T>? comparer) 33return ImmutableSortedSet<T>.Empty.WithComparer(comparer); 42public static ImmutableSortedSet<T> Create<T>(T item) 44return ImmutableSortedSet<T>.Empty.Add(item); 54public static ImmutableSortedSet<T> Create<T>(IComparer<T>? comparer, T item) 56return ImmutableSortedSet<T>.Empty.WithComparer(comparer).Add(item); 65public static ImmutableSortedSet<T> CreateRange<T>(IEnumerable<T> items) 67return ImmutableSortedSet<T>.Empty.Union(items); 77public static ImmutableSortedSet<T> CreateRange<T>(IComparer<T>? comparer, IEnumerable<T> items) 79return ImmutableSortedSet<T>.Empty.WithComparer(comparer).Union(items); 88public static ImmutableSortedSet<T> Create<T>(params T[] items) 100public static ImmutableSortedSet<T> Create<T>(params ReadOnlySpan<T> items) 102return ImmutableSortedSet<T>.Empty.Union(items); 112public static ImmutableSortedSet<T> Create<T>(IComparer<T>? comparer, params T[] items) 126public static ImmutableSortedSet<T> Create<T>(IComparer<T>? comparer, params ReadOnlySpan<T> items) 128return ImmutableSortedSet<T>.Empty.WithComparer(comparer).Union(items); 136public static ImmutableSortedSet<T>.Builder CreateBuilder<T>() 149public static ImmutableSortedSet<T>.Builder CreateBuilder<T>(IComparer<T>? comparer) 161public static ImmutableSortedSet<TSource> ToImmutableSortedSet<TSource>(this IEnumerable<TSource> source, IComparer<TSource>? comparer) 163if (source is ImmutableSortedSet<TSource> existingSet) 168return ImmutableSortedSet<TSource>.Empty.WithComparer(comparer).Union(source); 177public static ImmutableSortedSet<TSource> ToImmutableSortedSet<TSource>(this IEnumerable<TSource> source) 187public static ImmutableSortedSet<TSource> ToImmutableSortedSet<TSource>(this ImmutableSortedSet<TSource>.Builder builder)
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (14)
11/// Contains the inner <see cref="ImmutableSortedSet{T}.Builder"/> class. 36private ImmutableSortedSet<T>.Node _root = ImmutableSortedSet<T>.Node.EmptyNode; 47private ImmutableSortedSet<T>? _immutable; 63internal Builder(ImmutableSortedSet<T> set) 135/// Gets or sets the <see cref="IComparer{T}"/> object that is used to determine equality for the values in the <see cref="ImmutableSortedSet{T}"/>. 155ImmutableSortedSet<T>.Node newRoot = Node.EmptyNode; 241ImmutableSortedSet<T>.Node result = ImmutableSortedSet<T>.Node.EmptyNode; 352this.Root = ImmutableSortedSet<T>.Node.EmptyNode; 389public ImmutableSortedSet<T>.Enumerator GetEnumerator() 438/// An enumerator that iterates over the <see cref="ImmutableSortedSet{T}.Builder"/> 454public ImmutableSortedSet<T> ToImmutable() 459return _immutable ??= ImmutableSortedSet<T>.Wrap(this.Root, _comparer);
System\Collections\Immutable\ImmutableSortedSet_1.Builder.DebuggerProxy.cs (2)
16private readonly ImmutableSortedSet<T>.Builder _set; 22public ImmutableSortedSetBuilderDebuggerProxy(ImmutableSortedSet<T>.Builder builder)
System\Collections\Immutable\ImmutableSortedSet_1.cs (32)
24public sealed partial class ImmutableSortedSet<T> : IImmutableSet<T>, IReadOnlySet<T>, IReadOnlyList<T>, IList<T>, ISet<T>, IList, IStrongEnumerable<T, ImmutableSortedSet<T>.Enumerator> 39public static readonly ImmutableSortedSet<T> Empty = new ImmutableSortedSet<T>(); 52/// Initializes a new instance of the <see cref="ImmutableSortedSet{T}"/> class. 62/// Initializes a new instance of the <see cref="ImmutableSortedSet{T}"/> class. 79public ImmutableSortedSet<T> Clear() 179public ImmutableSortedSet<T> Add(T value) 187public ImmutableSortedSet<T> Remove(T value) 222public ImmutableSortedSet<T> Intersect(IEnumerable<T> other) 226ImmutableSortedSet<T> newSet = this.Clear(); 242public ImmutableSortedSet<T> Except(IEnumerable<T> other) 246ImmutableSortedSet<T>.Node result = _root; 261public ImmutableSortedSet<T> SymmetricExcept(IEnumerable<T> other) 265ImmutableSortedSet<T> otherAsSet = ImmutableSortedSet.CreateRange(_comparer, other); 267ImmutableSortedSet<T> result = this.Clear(); 290public ImmutableSortedSet<T> Union(IEnumerable<T> other) 294ImmutableSortedSet<T>? immutableSortedSet; 330internal ImmutableSortedSet<T> Union(ReadOnlySpan<T> other) 347public ImmutableSortedSet<T> WithComparer(IComparer<T>? comparer) 357var result = new ImmutableSortedSet<T>(Node.EmptyNode, comparer); 560/// An enumerator that iterates over the <see cref="ImmutableSortedSet{T}"/> 1002private static bool TryCastToImmutableSortedSet(IEnumerable<T> sequence, [NotNullWhen(true)] out ImmutableSortedSet<T>? other) 1004other = sequence as ImmutableSortedSet<T>; 1025private static ImmutableSortedSet<T> Wrap(Node root, IComparer<T> comparer) 1028? ImmutableSortedSet<T>.Empty.WithComparer(comparer) 1043private ImmutableSortedSet<T> UnionIncremental(IEnumerable<T> items) 1049ImmutableSortedSet<T>.Node result = _root; 1069private ImmutableSortedSet<T> UnionIncremental(ReadOnlySpan<T> items) 1073ImmutableSortedSet<T>.Node result = _root; 1087private ImmutableSortedSet<T> Wrap(Node root) 1104private ImmutableSortedSet<T> LeafToRootRefill(IEnumerable<T> addedItems) 1169private ImmutableSortedSet<T> LeafToRootRefill(ReadOnlySpan<T> addedItems) 1233/// Initializes a new instance of the <see cref="ImmutableSortedSet{T}.ReverseEnumerable"/> class.
System\Collections\Immutable\ImmutableSortedSet_1.Enumerator.cs (4)
16/// <see cref="ImmutableList{T}.Enumerator"/>, <see cref="ImmutableSortedDictionary{TKey, TValue}.Enumerator"/>, and <see cref="ImmutableSortedSet{T}.Enumerator"/>. 151Stack<RefAsValueType<ImmutableSortedSet<T>.Node>> stack = _stack!.Use(ref this); 175Stack<RefAsValueType<ImmutableSortedSet<T>.Node>> stack = _stack!.Use(ref this); 216Stack<RefAsValueType<ImmutableSortedSet<T>.Node>> stack = _stack!.Use(ref this);
System\Collections\Immutable\ImmutableSortedSet_1.Node.cs (11)
64/// Initializes a new instance of the <see cref="ImmutableSortedSet{T}.Node"/> class 74/// Initializes a new instance of the <see cref="ImmutableSortedSet{T}.Node"/> class 354ImmutableSortedSet<T>.Node newRight = _right!.Add(key, comparer, out mutated); 362ImmutableSortedSet<T>.Node newLeft = _left!.Add(key, comparer, out mutated); 423ImmutableSortedSet<T>.Node successor = _right; 429ImmutableSortedSet<T>.Node newRight = _right.Remove(successor._key, comparer, out _); 435ImmutableSortedSet<T>.Node newLeft = _left.Remove(key, comparer, out mutated); 443ImmutableSortedSet<T>.Node newRight = _right.Remove(key, comparer, out mutated); 566/// An enumerator that iterates over the <see cref="ImmutableSortedSet{T}"/> 591ImmutableSortedSet<T>.Node right = tree._right; 610ImmutableSortedSet<T>.Node left = tree._left;
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)
103public INamedTypeSymbol? ImmutableSortedType => GetOrResolveType(typeof(ImmutableSortedSet<>), ref _ImmutableSortedType);
xunit.assert (2)
SetAsserts.cs (2)
124 ImmutableSortedSet<T> set) => 231 ImmutableSortedSet<T> set) =>