class ConcurrentDictionary<TKey,TValue>
in global :: System . Collections . Concurrent
Represents a thread-safe collection of key/value pairs that can be accessed by multiple threads concurrently.
TKeyThe type of the keys in the dictionary.TValueThe type of the values in the dictionary.
public ConcurrentDictionary<TKey,TValue>( int concurrencyLevel, int capacity )
Initializes a new instance of the class that is empty, has the specified concurrency level and capacity, and uses the default comparer for the key type.
concurrencyLevelThe estimated number of threads that will update the concurrently.capacityThe initial number of elements that the can contain.
public int Count { get; }
Gets the number of key/value pairs contained in the .
- Returns The number of key/value pairs contained in the .
public bool IsEmpty { get; }
Gets a value that indicates whether the is empty.
- Returns if the is empty; otherwise, .
public ICollection<TKey> Keys { get; }
Gets a collection containing the keys in the .
- Returns A collection of keys in the .
public ICollection<TValue> Values { get; }
Gets a collection that contains the values in the .
- Returns A collection that contains the values in the .
public TValue AddOrUpdate( TKey key, Func<TKey,TArg,TValue> addValueFactory, Func<TKey,TValue,TArg,TValue> updateValueFactory, TArg factoryArgument )
😔 No documentation found.
public TValue AddOrUpdate( TKey key, TValue addValue, Func<TKey,TValue,TValue> updateValueFactory )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public ConcurrentDictionary<TKey,TValue>( )
😔 No documentation found.
public ConcurrentDictionary<TKey,TValue>( IEnumerable<KeyValuePair<TKey,TValue>> collection )
😔 No documentation found.
public ConcurrentDictionary<TKey,TValue>( IEqualityComparer<TKey> comparer )
😔 No documentation found.
public ConcurrentDictionary<TKey,TValue>( IEnumerable<KeyValuePair<TKey,TValue>> collection, IEqualityComparer<TKey> comparer )
😔 No documentation found.
public TValue AddOrUpdate( TKey key, Func<TKey,TValue> addValueFactory, Func<TKey,TValue,TValue> updateValueFactory )
😔 No documentation found.
public ConcurrentDictionary<TKey,TValue>( int concurrencyLevel, int capacity, IEqualityComparer<TKey> comparer )
😔 No documentation found.
public TValue GetOrAdd( TKey key, TValue value )
😔 No documentation found.
public TValue GetOrAdd( TKey key, Func<TKey,TArg,TValue> valueFactory, TArg factoryArgument )
😔 No documentation found.
public TValue GetOrAdd( TKey key, Func<TKey,TValue> valueFactory )
😔 No documentation found.
public IEqualityComparer<TKey> Comparer { get; }
😔 No documentation found.
public TValue Item { get; set; }
😔 No documentation found.
public IEnumerator<KeyValuePair<TKey,TValue>> GetEnumerator( )
😔 No documentation found.
public KeyValuePair<TKey,TValue>[] ToArray( )
😔 No documentation found.
public void Clear( )
😔 No documentation found.
public bool TryUpdate( TKey key, TValue newValue, TValue comparisonValue )
😔 No documentation found.
public bool TryGetValue( TKey key, ref TValue value )
😔 No documentation found.
public bool TryRemove( KeyValuePair<TKey,TValue> item )
😔 No documentation found.
public bool TryRemove( TKey key, ref TValue value )
😔 No documentation found.
public bool ContainsKey( TKey key )
😔 No documentation found.
public bool TryAdd( TKey key, TValue value )
😔 No documentation found.
public bool TryGetAlternateLookup( ref ConcurrentDictionary<TKey,TValue>.AlternateLookup<TAlternateKey> lookup )
😔 No documentation found.
public ConcurrentDictionary<TKey,TValue>( int concurrencyLevel, IEnumerable<KeyValuePair<TKey,TValue>> collection, IEqualityComparer<TKey> comparer )
😔 No documentation found.
public ConcurrentDictionary<TKey,TValue>.AlternateLookup<TAlternateKey> GetAlternateLookup( )
😔 No documentation found.