<PackageReference Include="Microsoft.Identity.Client" Version="4.83.1" />

Microsoft.Identity.Client.Utils.ConcurrentHashSet<T>

Represents a thread-safe hash-based unique collection.
public int Count { get; }

Gets the number of items contained in the ConcurrentHashSet<T>.

public bool IsEmpty { get; }

Gets a value that indicates whether the ConcurrentHashSet<T> is empty.

Initializes a new instance of the ConcurrentHashSet<T> class that is empty, has the default concurrency level, has the default initial capacity, and uses the default comparer for the item type.

public ConcurrentHashSet(int concurrencyLevel, int capacity)

Initializes a new instance of the ConcurrentHashSet<T> class that is empty, has the specified concurrency level and capacity, and uses the default comparer for the item type.

public ConcurrentHashSet(IEnumerable<T> collection)

Initializes a new instance of the ConcurrentHashSet<T> class that contains elements copied from the specified IEnumerable{T}, has the default concurrency level, has the default initial capacity, and uses the default comparer for the item type.

Initializes a new instance of the ConcurrentHashSet<T> class that is empty, has the specified concurrency level and capacity, and uses the specified IEqualityComparer{T}.

public ConcurrentHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)

Initializes a new instance of the ConcurrentHashSet<T> class that contains elements copied from the specified IEnumerable, has the default concurrency level, has the default initial capacity, and uses the specified IEqualityComparer{T}.

public ConcurrentHashSet(int concurrencyLevel, IEnumerable<T> collection, IEqualityComparer<T> comparer)

Initializes a new instance of the ConcurrentHashSet<T> class that contains elements copied from the specified IEnumerable, has the specified concurrency level, has the specified initial capacity, and uses the specified IEqualityComparer{T}.

public ConcurrentHashSet(int concurrencyLevel, int capacity, IEqualityComparer<T> comparer)

Initializes a new instance of the ConcurrentHashSet<T> class that is empty, has the specified concurrency level, has the specified initial capacity, and uses the specified IEqualityComparer{T}.

public bool Add(T item)

Adds the specified item to the ConcurrentHashSet<T>.

public void Clear()

Removes all items from the ConcurrentHashSet<T>.

public bool Contains(T item)

Determines whether the ConcurrentHashSet<T> contains the specified item.

Returns an enumerator that iterates through the ConcurrentHashSet<T>.

public bool TryRemove(T item)

Attempts to remove the item from the ConcurrentHashSet<T>.