2 types derived from FrozenSet
System.Collections.Immutable (2)
System\Collections\Frozen\EmptyFrozenSet.cs (1)
10internal sealed class EmptyFrozenSet<T> : FrozenSet<T>
System\Collections\Frozen\FrozenSetInternalBase.cs (1)
18internal abstract class FrozenSetInternalBase<T, TThisWrapper> : FrozenSet<T>
91 references to FrozenSet
Aspire.Hosting (1)
Health\ResourceHealthCheckService.cs (1)
133var registrationKeysToCheck = annotations.DistinctBy(a => a.Key).Select(a => a.Key).ToFrozenSet();
Aspire.TypeSystem (1)
AtsConstants.cs (1)
399private static readonly FrozenSet<Type> s_primitiveTypes = new HashSet<Type>
Microsoft.AspNetCore.Components (1)
ResourceAssetCollection.cs (1)
20private readonly FrozenSet<string> _contentSpecificUrls;
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheEntryFormatter.cs (1)
501private static readonly FrozenSet<string> IgnoredHeaders = FrozenSet.ToFrozenSet(new[] {
Microsoft.Build (6)
BackEnd\Components\RequestBuilder\BatchingEngine.cs (1)
315FrozenSet<string> itemNames = itemListsToBeBatched.Keys.ToFrozenSet(MSBuildNameIgnoreCaseComparer.Default);
BackEnd\Components\RequestBuilder\ItemBucket.cs (1)
78FrozenSet<string> itemNames,
BackEnd\Components\RequestBuilder\Lookup.cs (3)
714?? FrozenSet<string>.Empty; 1447private FrozenSet<string> _itemTypesToTruncateAtThisScope; 1544internal FrozenSet<string> ItemTypesToTruncateAtThisScope
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
130private readonly FrozenSet<string> _versionHandshakeGroup = [
Microsoft.Build.Framework (1)
XMakeElements.cs (1)
47internal static readonly FrozenSet<string> ReservedItemNames = FrozenSet.Create(StringComparer.Ordinal,
Microsoft.CodeAnalysis.Razor.Compiler (9)
Language\Components\ComponentMarkupEncodingPass.cs (1)
51private static readonly FrozenSet<char> EncodedCharacters = ['\r', '\n', '\t', '<', '>'];
Language\Legacy\CSharpCodeParser.cs (1)
21private static readonly FrozenSet<char> InvalidNonWhitespaceNameCharacters = FrozenSet.Create(
Language\Legacy\LegacySyntaxNodeExtensions.cs (6)
28private static readonly FrozenSet<SyntaxKind> s_transitionSpanKinds = FrozenSet.Create( 32private static readonly FrozenSet<SyntaxKind> s_commentSpanKinds = FrozenSet.Create( 37private static readonly FrozenSet<SyntaxKind> s_codeSpanKinds = FrozenSet.Create( 42private static readonly FrozenSet<SyntaxKind> s_markupSpanKinds = FrozenSet.Create( 46private static readonly FrozenSet<SyntaxKind> s_allSpanKinds = CreateAllSpanKindsSet(); 48private static FrozenSet<SyntaxKind> CreateAllSpanKindsSet()
Language\Legacy\ParserHelpers.cs (1)
41public static readonly FrozenSet<string> VoidElements = FrozenSet.Create(StringComparer.OrdinalIgnoreCase,
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)
Workspace\Solution\ProjectCone.cs (2)
17public readonly FrozenSet<ProjectId> ProjectIds; 19public ProjectCone(ProjectId rootProjectId, FrozenSet<ProjectId> projectIds)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\Network\WindowsTcpStateInfo.cs (2)
17private readonly FrozenSet<uint> _localIPAddresses; 18private readonly FrozenSet<byte[]> _iPv6localIPAddresses;
Microsoft.Extensions.Http.Diagnostics (3)
Logging\Internal\HttpRequestBodyReader.cs (1)
23private readonly FrozenSet<string> _readableRequestContentTypes;
Logging\Internal\HttpResponseBodyReader.cs (1)
30private readonly FrozenSet<string> _readableResponseContentTypes;
Logging\Internal\MediaTypeCollectionExtensions.cs (1)
20public static bool Covers(this FrozenSet<string> collection, string? sample)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\MediaTypeCollectionExtensionsTest.cs (2)
27var collection = new HashSet<string>(_readableContentTypes, StringComparer.OrdinalIgnoreCase).ToFrozenSet(StringComparer.OrdinalIgnoreCase); 44var collection = new HashSet<string>(_readableContentTypes, StringComparer.OrdinalIgnoreCase).ToFrozenSet(StringComparer.OrdinalIgnoreCase);
MSBuild (1)
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
130private readonly FrozenSet<string> _versionHandshakeGroup = [
System.Collections.Immutable (46)
System\Collections\Frozen\DefaultFrozenSet.cs (2)
8/// <summary>Provides the default <see cref="FrozenSet{T}"/> implementation to use when no other special-cases apply.</summary> 44public void Store(FrozenSet<T> set) => _set = (DefaultFrozenSet<T>)set;
System\Collections\Frozen\EmptyFrozenSet.cs (1)
9/// <summary>Provides an empty <see cref="FrozenSet{T}"/> to use when there are zero values to be stored.</summary>
System\Collections\Frozen\FrozenSet.AlternateLookup.cs (6)
14/// Gets an instance of a type that may be used to perform operations on a <see cref="FrozenSet{T}"/> 35/// Gets an instance of a type that may be used to perform operations on a <see cref="FrozenSet{T}"/> 73/// Provides a type that may be used to perform operations on a <see cref="FrozenSet{T}"/> 82internal AlternateLookup(FrozenSet<T> set, AlternateLookupDelegate<TAlternate> alternateLookupDelegate) 91/// <summary>Gets the <see cref="FrozenSet{T}"/> against which this instance performs operations.</summary> 92public FrozenSet<T> Set { get; }
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>
System\Collections\Frozen\FrozenSetInternalBase.cs (2)
167FrozenSet<T> fs => _thisSet.Comparer.Equals(fs.Comparer), 274void Store(FrozenSet<T> @this);
System\Collections\Frozen\Int32\Int32FrozenSet.cs (1)
64public void Store(FrozenSet<int> set) => _set = (Int32FrozenSet)set;
System\Collections\Frozen\SmallFrozenSet.cs (2)
10/// <summary>Provides a <see cref="FrozenSet{T}"/> implementation to use with small item counts.</summary> 46public void Store(FrozenSet<T> set) => _set = (SmallFrozenSet<T>)set;
System\Collections\Frozen\SmallValueTypeComparableFrozenSet.cs (1)
68public void Store(FrozenSet<T> set) => _set = (SmallValueTypeComparableFrozenSet<T>)set;
System\Collections\Frozen\SmallValueTypeDefaultComparerFrozenSet.cs (1)
48public void Store(FrozenSet<T> set) => _set = (SmallValueTypeDefaultComparerFrozenSet<T>)set;
System\Collections\Frozen\String\LengthBucketsFrozenSet.cs (1)
112public void Store(FrozenSet<string> set) => _set = (LengthBucketsFrozenSet)set;
System\Collections\Frozen\String\OrdinalStringFrozenSet.cs (1)
114public void Store(FrozenSet<string> set) => _set = (OrdinalStringFrozenSet)set;
System\Collections\Frozen\ValueTypeDefaultComparerFrozenSet.cs (1)
44public void Store(FrozenSet<T> set) => _set = (ValueTypeDefaultComparerFrozenSet<T>)set;