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

◆ GetOrAdd< TKey, TValue, TArg >()

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

Definition at line 105 of file ImmutableInterlocked.cs.

105 : notnull
106 {
107 Requires.NotNull(valueFactory, "valueFactory");
109 Requires.NotNull(immutableDictionary, "location");
111 {
112 return value;
113 }
115 return GetOrAdd(ref location, key, value);
116 }
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.