AX#

Search Results for

    Show / Hide Table of Contents

    Class ConcurrentSet<T>

    Concurent implementation HasSet comes from:
    https://stackoverflow.com/questions/18922985/concurrent-hashsett-in-net-framework https://stackoverflow.com/questions/4306936/how-to-implement-concurrenthashset-in-net

    Inheritance
    object
    ConcurrentSet<T>
    Implements
    ISet<T>
    ICollection<T>
    IEnumerable<T>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: AXSharp.Connector
    Assembly: AXSharp.Connector.dll
    Syntax
    public class ConcurrentSet<T> : ISet<T>, ICollection<T>, IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    Properties

    | Edit this page View Source

    Count

    Gets the number of elements in the set.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    IsEmpty

    Gets a value that indicates if the set is empty.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsReadOnly

    Gets a value indicating whether the ICollection<T> is read-only.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    bool

    true if the ICollection<T> is read-only; otherwise, false.

    | Edit this page View Source

    Values

    Declaration
    public ICollection<T> Values { get; }
    Property Value
    Type Description
    ICollection<T>

    Methods

    | Edit this page View Source

    Add(T)

    Adds an element to the current set and returns a value to indicate if the element was successfully added.

    Declaration
    public bool Add(T item)
    Parameters
    Type Name Description
    T item

    The element to add to the set.

    Returns
    Type Description
    bool

    true if the element is added to the set; false if the element is already in the set.

    | Edit this page View Source

    Clear()

    Removes all items from the ICollection<T>.

    Declaration
    public void Clear()
    Exceptions
    Type Condition
    NotSupportedException

    The ICollection<T> is read-only.

    | Edit this page View Source

    Contains(T)

    Determines whether the ICollection<T> contains a specific value.

    Declaration
    public bool Contains(T item)
    Parameters
    Type Name Description
    T item

    The object to locate in the ICollection<T>.

    Returns
    Type Description
    bool

    true if item is found in the ICollection<T>; otherwise, false.

    | Edit this page View Source

    CopyTo(T[], int)

    Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

    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 ICollection<T>. The Array must have zero-based indexing.

    int arrayIndex

    The zero-based index in array at which copying begins.

    Exceptions
    Type Condition
    ArgumentNullException

    array is null.

    ArgumentOutOfRangeException

    arrayIndex is less than 0.

    ArgumentException

    array is multidimensional.-or-The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array.

    | Edit this page View Source

    ExceptWith(IEnumerable<T>)

    Removes all elements in the specified collection from the current set.

    Declaration
    public void ExceptWith(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection of items to remove from the set.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    | Edit this page View Source

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    IEnumerator<T>

    A IEnumerator<T> that can be used to iterate through the collection.

    | Edit this page View Source

    IntersectWith(IEnumerable<T>)

    Modifies the current set so that it contains only elements that are also in a specified collection.

    Declaration
    public void IntersectWith(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection to compare to the current set.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    | Edit this page View Source

    IsProperSubsetOf(IEnumerable<T>)

    Determines whether the current set is a property (strict) subset of a specified collection.

    Declaration
    public bool IsProperSubsetOf(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection to compare to the current set.

    Returns
    Type Description
    bool

    true if the current set is a correct subset of other; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    | Edit this page View Source

    IsProperSupersetOf(IEnumerable<T>)

    Determines whether the current set is a correct superset of a specified collection.

    Declaration
    public bool IsProperSupersetOf(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection to compare to the current set.

    Returns
    Type Description
    bool

    true if the ISet<T> object is a correct superset of other; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    | Edit this page View Source

    IsSubsetOf(IEnumerable<T>)

    Determines whether a set is a subset of a specified collection.

    Declaration
    public bool IsSubsetOf(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection to compare to the current set.

    Returns
    Type Description
    bool

    true if the current set is a subset of other; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    | Edit this page View Source

    IsSupersetOf(IEnumerable<T>)

    Determines whether the current set is a superset of a specified collection.

    Declaration
    public bool IsSupersetOf(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection to compare to the current set.

    Returns
    Type Description
    bool

    true if the current set is a superset of other; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    | Edit this page View Source

    Overlaps(IEnumerable<T>)

    Determines whether the current set overlaps with the specified collection.

    Declaration
    public bool Overlaps(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection to compare to the current set.

    Returns
    Type Description
    bool

    true if the current set and other share at least one common element; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    | Edit this page View Source

    Remove(T)

    Removes the first occurrence of a specific object from the ICollection<T>.

    Declaration
    public bool Remove(T item)
    Parameters
    Type Name Description
    T item

    The object to remove from the ICollection<T>.

    Returns
    Type Description
    bool

    true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>.

    Exceptions
    Type Condition
    NotSupportedException

    The ICollection<T> is read-only.

    | Edit this page View Source

    SetEquals(IEnumerable<T>)

    Determines whether the current set and the specified collection contain the same elements.

    Declaration
    public bool SetEquals(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection to compare to the current set.

    Returns
    Type Description
    bool

    true if the current set is equal to other; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    | Edit this page View Source

    SymmetricExceptWith(IEnumerable<T>)

    Modifies the current set so that it contains only elements that are present either in the current set or in the specified collection, but not both.

    Declaration
    public void SymmetricExceptWith(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection to compare to the current set.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    | Edit this page View Source

    ToArray()

    Declaration
    public T[] ToArray()
    Returns
    Type Description
    T[]
    | Edit this page View Source

    TryAdd(T)

    Declaration
    public bool TryAdd(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    bool
    | Edit this page View Source

    TryRemove(T)

    Declaration
    public bool TryRemove(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    bool
    | Edit this page View Source

    UnionWith(IEnumerable<T>)

    Modifies the current set so that it contains all elements that are present in both the current set and in the specified collection.

    Declaration
    public void UnionWith(IEnumerable<T> other)
    Parameters
    Type Name Description
    IEnumerable<T> other

    The collection to compare to the current set.

    Exceptions
    Type Condition
    ArgumentNullException

    other is null.

    Implements

    ISet<T>
    ICollection<T>
    IEnumerable<T>
    IEnumerable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFx. © MTS spol. s r.o., MTS spol. s r.o., and awesome contributors