Class ConcurrentSet<T>
Class representing a thread-safe unordered ICollection<T> implementation.
Namespace: Tableau.Migration.Content
Assembly: Tableau.Migration.dll
Syntax
public sealed class ConcurrentSet<T> : ICollection<T>, IEnumerable<T>, IEnumerable where T : notnull
Type Parameters
Name | Description |
---|---|
T | The item type. |
Properties
Count
Gets the number of elements contained in the set.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
IsReadOnly
Gets a value indicating whether the set is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Add(T)
Adds an item to the set.
Declaration
public void Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to add to the set. |
Clear()
Removes all items from the set.
Declaration
public void Clear()
Contains(T)
Determines whether the set contains a specific value.
Declaration
public bool Contains(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to locate in the set. |
Returns
Type | Description |
---|---|
bool | true if item is found in the set; otherwise, false. |
CopyTo(T[], int)
Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
T[] | array | The one-dimensional Array that is the destination of the elements copied from the set. The Array must have zero-based indexing. |
int | arrayIndex | The zero-based index in array at which copying begins. |
GetEnumerator()
Returns an enumerator that iterates through the set.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<T> | An enumerator that can be used to iterate through the set. |
Remove(T)
Removes the first occurrence of a specific object from the set.
Declaration
public bool Remove(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The object to remove from the set. |
Returns
Type | Description |
---|---|
bool | True if item was successfully removed from the set; otherwise, false. This method also returns false if item is not found in the original set. |