Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros
System.Collections.Concurrent.ConcurrentDictionary< TKey, TValue > Class Template Reference

Classes

class  DictionaryEnumerator
 
class  Enumerator
 
class  Node
 
class  Tables
 

Public Member Functions

 ConcurrentDictionary ()
 
 ConcurrentDictionary (int concurrencyLevel, int capacity)
 
 ConcurrentDictionary (IEnumerable< KeyValuePair< TKey, TValue > > collection)
 
 ConcurrentDictionary (IEqualityComparer< TKey >? comparer)
 
 ConcurrentDictionary (IEnumerable< KeyValuePair< TKey, TValue > > collection, IEqualityComparer< TKey >? comparer)
 
 ConcurrentDictionary (int concurrencyLevel, IEnumerable< KeyValuePair< TKey, TValue > > collection, IEqualityComparer< TKey >? comparer)
 
 ConcurrentDictionary (int concurrencyLevel, int capacity, IEqualityComparer< TKey >? comparer)
 
bool TryAdd (TKey key, TValue value)
 
bool ContainsKey (TKey key)
 
bool TryRemove (TKey key, [MaybeNullWhen(false)] out TValue value)
 
bool TryRemove (KeyValuePair< TKey, TValue > item)
 
bool TryGetValue (TKey key, [MaybeNullWhen(false)] out TValue value)
 
bool TryUpdate (TKey key, TValue newValue, TValue comparisonValue)
 
void Clear ()
 
KeyValuePair< TKey, TValue >[] ToArray ()
 
IEnumerator< KeyValuePair< TKey, TValue > > GetEnumerator ()
 
TValue GetOrAdd (TKey key, Func< TKey, TValue > valueFactory)
 
TValue GetOrAdd< TArg > (TKey key, Func< TKey, TArg, TValue > valueFactory, TArg factoryArgument)
 
TValue GetOrAdd (TKey key, TValue value)
 
TValue AddOrUpdate< TArg > (TKey key, Func< TKey, TArg, TValue > addValueFactory, Func< TKey, TValue, TArg, TValue > updateValueFactory, TArg factoryArgument)
 
TValue AddOrUpdate (TKey key, Func< TKey, TValue > addValueFactory, Func< TKey, TValue, TValue > updateValueFactory)
 
TValue AddOrUpdate (TKey key, TValue addValue, Func< TKey, TValue, TValue > updateValueFactory)
 
void Add (object key, object? value)
 
void Add (object key, object? value)
 

Package Functions

 ConcurrentDictionary (int concurrencyLevel, int capacity, bool growLockArray, IEqualityComparer< TKey > comparer)
 

Properties

TValue this[TKey key] [get, set]
 
IEqualityComparer< TKey > Comparer [get]
 
int Count [get]
 
bool IsEmpty [get]
 
ICollection< TKey > Keys [get]
 
IEnumerable< TKey > IReadOnlyDictionary< TKey, TValue >. Keys [get]
 
ICollection< TValue > Values [get]
 
IEnumerable< TValue > IReadOnlyDictionary< TKey, TValue >. Values [get]
 
bool ICollection< KeyValuePair< TKey, TValue > >. IsReadOnly [get]
 
bool IDictionary. IsFixedSize [get]
 
bool IDictionary. IsReadOnly [get]
 
ICollection IDictionary. Keys [get]
 
ICollection IDictionary. Values [get]
 
object? IDictionary. this[object key] [get, set]
 
bool ICollection. IsSynchronized [get]
 
object ICollection. SyncRoot [get]
 
static int DefaultConcurrencyLevel [get]
 

Private Member Functions

void InitializeFromCollection (IEnumerable< KeyValuePair< TKey, TValue > > collection)
 
bool TryRemoveInternal (TKey key, [MaybeNullWhen(false)] out TValue value, bool matchValue, TValue oldValue)
 
bool TryGetValueInternal (TKey key, int hashcode, [MaybeNullWhen(false)] out TValue value)
 
bool TryUpdateInternal (TKey key, int? nullableHashcode, TValue newValue, TValue comparisonValue)
 
void ICollection< KeyValuePair< TKey, TValue > >. CopyTo (KeyValuePair< TKey, TValue >[] array, int index)
 
void CopyToPairs (KeyValuePair< TKey, TValue >[] array, int index)
 
void CopyToEntries (DictionaryEntry[] array, int index)
 
void CopyToObjects (object[] array, int index)
 
bool TryAddInternal (TKey key, int? nullableHashcode, TValue value, bool updateIfExists, bool acquireLock, out TValue resultingValue)
 
int GetCountInternal ()
 
void IDictionary< TKey, TValue >. Add (TKey key, TValue value)
 
bool IDictionary< TKey, TValue >. Remove (TKey key)
 
void ICollection< KeyValuePair< TKey, TValue > >. Add (KeyValuePair< TKey, TValue > keyValuePair)
 
bool ICollection< KeyValuePair< TKey, TValue > >. Contains (KeyValuePair< TKey, TValue > keyValuePair)
 
bool ICollection< KeyValuePair< TKey, TValue > >. Remove (KeyValuePair< TKey, TValue > keyValuePair)
 
IEnumerator IEnumerable. GetEnumerator ()
 
void IDictionary. Add (object key, object value)
 
bool IDictionary. Contains (object key)
 
IDictionaryEnumerator IDictionary. GetEnumerator ()
 
void IDictionary. Remove (object key)
 
void ICollection. CopyTo (Array array, int index)
 
bool AreAllBucketsEmpty ()
 
void GrowTable (Tables tables)
 
void AcquireAllLocks (ref int locksAcquired)
 
void AcquireLocks (int fromInclusive, int toExclusive, ref int locksAcquired)
 
void ReleaseLocks (int fromInclusive, int toExclusive)
 
ReadOnlyCollection< TKey > GetKeys ()
 
ReadOnlyCollection< TValue > GetValues ()
 

Static Private Member Functions

static bool IsValueWriteAtomic ()
 
static void ThrowKeyNotFoundException (TKey key)
 
static void ThrowIfInvalidObjectValue (object value)
 

Private Attributes

volatile Tables _tables
 
readonly IEqualityComparer< TKey > _comparer
 
readonly EqualityComparer< TKey > _defaultComparer
 
readonly bool _growLockArray
 
int _budget
 

Static Private Attributes

static readonly bool s_isValueWriteAtomic = IsValueWriteAtomic()
 

Detailed Description

Type Constraints
TKey :notnull 

Definition at line 12 of file ConcurrentDictionary.cs.


The documentation for this class was generated from the following file: