System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="7.0.0-preview.7.22375.6" />

.NET API 195,744 bytes

 ImmutableHashSet

public static class ImmutableHashSet
Provides a set of initialization methods for instances of the ImmutableHashSet<T> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install)
public static ImmutableHashSet<T> Create<T>()

Creates an empty immutable hash set.

public static ImmutableHashSet<T> Create<T>(IEqualityComparer<T> equalityComparer)

Creates an empty immutable hash set that uses the specified equality comparer.

public static ImmutableHashSet<T> Create<T>(T item)

Creates a new immutable hash set that contains the specified item.

public static ImmutableHashSet<T> Create<T>(IEqualityComparer<T> equalityComparer, T item)

Creates a new immutable hash set that contains the specified item and uses the specified equality comparer for the set type.

public static ImmutableHashSet<T> Create<T>(T[] items)

Creates a new immutable hash set that contains the specified array of items.

public static ImmutableHashSet<T> Create<T>(IEqualityComparer<T> equalityComparer, T[] items)

Creates a new immutable hash set that contains the items in the specified collection and uses the specified equality comparer for the set type.

public static Builder<T> CreateBuilder<T>()

Creates a new immutable hash set builder.

public static Builder<T> CreateBuilder<T>(IEqualityComparer<T> equalityComparer)

Creates a new immutable hash set builder.

public static ImmutableHashSet<T> CreateRange<T>(IEnumerable<T> items)

Creates a new immutable hash set prefilled with the specified items.

public static ImmutableHashSet<T> CreateRange<T>(IEqualityComparer<T> equalityComparer, IEnumerable<T> items)

Creates a new immutable hash set that contains the specified items and uses the specified equality comparer for the set type.

public static ImmutableHashSet<TSource> ToImmutableHashSet<TSource>(this IEnumerable<TSource> source, IEqualityComparer<TSource> equalityComparer)

Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type.

public static ImmutableHashSet<TSource> ToImmutableHashSet<TSource>(this Builder<TSource> builder)

public static ImmutableHashSet<TSource> ToImmutableHashSet<TSource>(this IEnumerable<TSource> source)

Enumerates a sequence and produces an immutable hash set of its contents.