TriLib
Search Results for

    Show / Hide Table of Contents

    Class ConcurrentDictionary<TKey, TValue>

    Represents a concurrent (thread-safe) Dictionary.

    Inheritance
    object
    ConcurrentDictionary<TKey, TValue>
    Implements
    IEnumerable<KeyValuePair<TKey, TValue>>
    IEnumerable
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: TriLibCore.General
    Assembly: TriLibCore.dll
    Syntax
    public class ConcurrentDictionary<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
    Type Parameters
    Name Description
    TKey

    The type of the t key.

    TValue

    The type of the t value.

    Constructors

    ConcurrentDictionary()

    Declaration
    public ConcurrentDictionary()

    Properties

    Count

    Gets the Dicitionary item count.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int

    this[TKey]

    Gets or sets the TValue with the specified key.

    Declaration
    public TValue this[TKey key] { get; set; }
    Parameters
    Type Name Description
    TKey key

    The key.

    Property Value
    Type Description
    TValue

    TValue.

    Keys

    Gets the Dictionary Keys.

    Declaration
    public Dictionary<TKey, TValue>.KeyCollection Keys { get; }
    Property Value
    Type Description
    Dictionary<TKey, TValue>.KeyCollection

    Values

    Gets the Dictionary Values.

    Declaration
    public Dictionary<TKey, TValue>.ValueCollection Values { get; }
    Property Value
    Type Description
    Dictionary<TKey, TValue>.ValueCollection

    Methods

    Add(TKey, TValue)

    Adds the specified key to the Dictionary.

    Declaration
    public void Add(TKey key, TValue val)
    Parameters
    Type Name Description
    TKey key

    The Key to add.

    TValue val

    The value to add.

    ContainsKey(TKey)

    Determines whether this Dictionary contains the given Key.

    Declaration
    public bool ContainsKey(TKey id)
    Parameters
    Type Name Description
    TKey id

    The Key value.

    Returns
    Type Description
    bool

    true if the specified identifier contains key; otherwise, false.

    OrderBy(Func<KeyValuePair<TKey, TValue>, TKey>)

    Orders the Dictionary using the given callback.

    Declaration
    public List<KeyValuePair<TKey, TValue>> OrderBy(Func<KeyValuePair<TKey, TValue>, TKey> func)
    Parameters
    Type Name Description
    Func<KeyValuePair<TKey, TValue>, TKey> func

    The OrderBy callback Method.

    Returns
    Type Description
    List<KeyValuePair<TKey, TValue>>

    List<KeyValuePair<TKey, TValue>>.

    TryAdd(TKey, TValue)

    Tries to add a Value to the Dictionary using the given Key

    Declaration
    public bool TryAdd(TKey key, TValue value)
    Parameters
    Type Name Description
    TKey key

    The Key to try to add.

    TValue value

    The value to try to add.

    Returns
    Type Description
    bool

    true if XXXX, false otherwise.

    TryGetValue(TKey, out TValue)

    Tries to get the value from the given Key on the Dictionary.

    Declaration
    public bool TryGetValue(TKey key, out TValue value)
    Parameters
    Type Name Description
    TKey key

    The Key to look for.

    TValue value

    The value, if found.

    Returns
    Type Description
    bool

    true if XXXX, false otherwise.

    TryRemove(TKey)

    Tries to remove the given Item from the Dictionary.

    Declaration
    public bool TryRemove(TKey key)
    Parameters
    Type Name Description
    TKey key

    The Key to try to remove.

    Returns
    Type Description
    bool

    true if XXXX, false otherwise.

    Implements

    IEnumerable<T>
    IEnumerable

    Extension Methods

    IObjectExtensions.TryToDispose<T>(object)
    In this article
    Back to top Generated by DocFX