Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetOrAdd< TKey, TValue >() [1/2]

static TValue System.Collections.Immutable.ImmutableInterlocked.GetOrAdd< TKey, TValue > ( ref ImmutableDictionary< TKey, TValue > location,
TKey key,
Func< TKey, TValue > valueFactory )
inlinestatic
Type Constraints
TKey :notnull 

Definition at line 118 of file ImmutableInterlocked.cs.

118 : notnull
119 {
120 Requires.NotNull(valueFactory, "valueFactory");
122 Requires.NotNull(immutableDictionary, "location");
124 {
125 return value;
126 }
128 return GetOrAdd(ref location, key, value);
129 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
static bool Read(ref bool location)
Definition Volatile.cs:67

References System.key, System.Threading.Volatile.Read(), System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), and System.value.