2 types derived from FrozenSet
System.Collections.Immutable (2)
125 references to FrozenSet
Aspire.Hosting (1)
Aspire.TypeSystem (1)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.Build (6)
Microsoft.Build.Engine.UnitTests (1)
Microsoft.Build.Framework (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.Razor.Compiler (9)
Microsoft.CodeAnalysis.Razor.Workspaces (18)
Completion\CompletionTriggerAndCommitCharacters.cs (8)
22private static readonly FrozenSet<char> _csharpTriggerCharacters = [' ', '(', '=', '#', '.', '<', '[', '{', '"', '/', ':', '~'];
23private static readonly FrozenSet<char> _vsHtmlTriggerCharacters = [TransitionCharacter, ':', '#', '.', '!', '*', ',', '(', '[', '-', '<', '&', '\\', '/', '\'', '"', '=', ':', ' ', '`'];
24private static readonly FrozenSet<char> _vsCodeHtmlTriggerCharacters = [TransitionCharacter, '#', '.', '!', ',', '<'];
25private static readonly FrozenSet<char> _razorTriggerCharacters = [TransitionCharacter, '<', ':', ' '];
27private FrozenSet<char> HtmlTriggerCharacters => _clientCapabilitiesService.ClientCapabilities.SupportsVisualStudioExtensions
31private FrozenSet<char> DelegationTriggerCharacters => field ??= ComputeDelegationTriggerCharacters();
50private FrozenSet<char> ComputeDelegationTriggerCharacters()
82private static bool IsValidTrigger(CompletionContext completionContext, FrozenSet<char> triggerCharacters)
Microsoft.CodeAnalysis.Remote.Razor (1)
Microsoft.CodeAnalysis.Workspaces (17)
FindSymbols\TopLevelSyntaxTree\NavigateToSearchIndex.NavigateToSearchInfo.cs (15)
66/// present in the document, so it stays small in practice. A <see cref="FrozenSet{T}"/> provides
70private readonly FrozenSet<string> _humpSet;
101/// 'S', 'G', 'B', 'Q'. A <see cref="FrozenSet{T}"/> of chars handles any Unicode character (not
104private readonly FrozenSet<char> _containerCharSet;
157FrozenSet<string> humpSet,
160FrozenSet<char> containerCharSet,
577private static bool MixedCaseHumpCheckPasses(ReadOnlySpan<char> pattern, FrozenSet<string>? humpSet)
712private static bool ContainsChar(FrozenSet<string> set, char c)
721private static bool ContainsBigram(FrozenSet<string> set, char c1, char c2)
829private static void WriteStringSet(ObjectWriter writer, FrozenSet<string> set)
836private static void WriteCharSet(ObjectWriter writer, FrozenSet<char> set)
853var humpSet = ReadStringSet(reader);
856var containerCharSet = ReadCharSet(reader);
867private static FrozenSet<string> ReadStringSet(ObjectReader reader)
878private static FrozenSet<char> ReadCharSet(ObjectReader reader)
Microsoft.DotNet.Build.Tasks.Feed (5)
Microsoft.DotNet.Internal.SymbolHelper (6)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Http.Diagnostics (3)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Microsoft.VisualStudio.LanguageServices.Razor (1)
MSBuild (1)
System.Collections.Immutable (46)
System\Collections\Frozen\FrozenSet.cs (27)
14/// Provides a set of initialization methods for instances of the <see cref="FrozenSet{T}"/> class.
18/// <summary>Creates a <see cref="FrozenSet{T}"/> with the specified values.</summary>
22public static FrozenSet<T> Create<T>(params ReadOnlySpan<T> source) => Create(null, source);
24/// <summary>Creates a <see cref="FrozenSet{T}"/> with the specified values.</summary>
29public static FrozenSet<T> Create<T>(IEqualityComparer<T>? equalityComparer, params ReadOnlySpan<T> source)
33return equalityComparer is null || ReferenceEquals(equalityComparer, FrozenSet<T>.Empty.Comparer) ?
34FrozenSet<T>.Empty :
52/// <summary>Creates a <see cref="FrozenSet{T}"/> with the specified values.</summary>
57public static FrozenSet<T> ToFrozenSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer = null) =>
61/// <summary>Extracts from the source either an existing <see cref="FrozenSet{T}"/> instance or a <see cref="HashSet{T}"/> containing the values and the specified <paramref name="comparer"/>.</summary>
62private static FrozenSet<T>? GetExistingFrozenOrNewSet<T>(IEnumerable<T> source, IEqualityComparer<T>? comparer, out HashSet<T>? newSet)
68if (source is FrozenSet<T> fs && fs.Comparer.Equals(comparer))
85return ReferenceEquals(comparer, FrozenSet<T>.Empty.Comparer) ?
86FrozenSet<T>.Empty :
95private static FrozenSet<T> CreateFromSet<T>(HashSet<T> source)
112return (FrozenSet<T>)(object)new SmallValueTypeComparableFrozenSet<T>(source);
116return (FrozenSet<T>)(object)new SmallValueTypeDefaultComparerFrozenSet<T>(source);
124return (FrozenSet<T>)(object)new Int32FrozenSet((HashSet<int>)(object)source);
157FrozenSet<string>? frozenSet = LengthBucketsFrozenSet.CreateLengthBucketsFrozenSetIfAppropriate(entries, stringComparer, minLength, maxLength);
160return (FrozenSet<T>)(object)frozenSet;
212return (FrozenSet<T>)(object)frozenSet;
230/// <see cref="FrozenSet{T}"/> is immutable and is optimized for situations where a set
234/// the remainder of the life of the application. <see cref="FrozenSet{T}"/> should only be initialized
250/// <summary>Gets an empty <see cref="FrozenSet{T}"/>.</summary>
251public static FrozenSet<T> Empty { get; } = new EmptyFrozenSet<T>(EqualityComparer<T>.Default);
361internal delegate int AlternateLookupDelegate<TAlternate>(FrozenSet<T> set, TAlternate key)
484/// <summary>Enumerates the values of a <see cref="FrozenSet{T}"/>.</summary>