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);
160 references to ImmutableSortedSet
GenerateDocumentationAndConfigFiles (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)
Metrics (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)
Metrics.Legacy (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.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)
1409var diagnosticIds = ImmutableSortedSet<string>.Empty.WithComparer(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.Analyzers (2)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (1)
472ImmutableSortedSet<string> sortedAnalyzerNames = analyzerToDescriptorLocationsMap.Keys.ToImmutableSortedSet();
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.AnalyzerUtilities (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.BannedApiAnalyzers (7)
RestrictedInternalsVisibleToAnalyzer.cs (6)
117private static ImmutableDictionary<IAssemblySymbol, ImmutableSortedSet<string>> GetRestrictedInternalsVisibleToMap(Compilation compilation) 122return ImmutableDictionary<IAssemblySymbol, ImmutableSortedSet<string>>.Empty; 125var builder = ImmutableDictionary.CreateBuilder<IAssemblySymbol, ImmutableSortedSet<string>>(); 190ImmutableDictionary<IAssemblySymbol, ImmutableSortedSet<string>> restrictedInternalsVisibleToMap, 206ImmutableDictionary<IAssemblySymbol, ImmutableSortedSet<string>> restrictedInternalsVisibleToMap, 212!restrictedInternalsVisibleToMap.TryGetValue(symbol.ContainingAssembly, out var allowedNamespaces) ||
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.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)
60nameof(ImmutableSortedSet<>),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
3360var sortedSymbolNames = analyzer1.SymbolsStarted.Select(s => s.Name).ToImmutableSortedSet();
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
60nameof(ImmutableSortedSet<>),
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Rename\CSharpRenameRewriterLanguageService.cs (3)
91private readonly ImmutableDictionary<TextSpan, ImmutableSortedSet<TextSpan>?> _stringAndCommentTextSpans; 634private SyntaxToken RenameInStringLiteral(SyntaxToken oldToken, SyntaxToken newToken, ImmutableSortedSet<TextSpan>? subSpansToReplace, Func<SyntaxTriviaList, string, string, SyntaxTriviaList, SyntaxToken> createNewStringLiteral) 679ImmutableSortedSet<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.PerformanceSensitiveAnalyzers (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.PublicApiAnalyzers (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.ResxSourceGenerator (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.UnitTests (4)
Collections\ImmutableSegmentedHashSetBuilderTest.cs (1)
326var set = System.Collections.Immutable.ImmutableSortedSet.ToImmutableSortedSet(builder);
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.Workspaces (5)
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
867private 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)
Roslyn.Diagnostics.Analyzers (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)
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)
12/// Contains the inner <see cref="ImmutableSortedSet{T}.Builder"/> class. 37private ImmutableSortedSet<T>.Node _root = ImmutableSortedSet<T>.Node.EmptyNode; 48private ImmutableSortedSet<T>? _immutable; 59internal Builder(ImmutableSortedSet<T> set) 131/// Gets or sets the <see cref="IComparer{T}"/> object that is used to determine equality for the values in the <see cref="ImmutableSortedSet{T}"/>. 151ImmutableSortedSet<T>.Node newRoot = Node.EmptyNode; 237ImmutableSortedSet<T>.Node result = ImmutableSortedSet<T>.Node.EmptyNode; 348this.Root = ImmutableSortedSet<T>.Node.EmptyNode; 385public ImmutableSortedSet<T>.Enumerator GetEnumerator() 434/// An enumerator that iterates over the <see cref="ImmutableSortedSet{T}.Builder"/> 450public ImmutableSortedSet<T> ToImmutable() 455return _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);
Test.Utilities (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)
Text.Analyzers (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)