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

◆ Set()

IAsyncLocalValueMap System.Threading.AsyncLocalValueMap.TwoElementAsyncLocalValueMap.Set ( IAsyncLocal key,
object value,
bool treatNullValueAsNonexistent )
inline

Implements System.Threading.IAsyncLocalValueMap.

Definition at line 84 of file AsyncLocalValueMap.cs.

85 {
86 if (value != null || !treatNullValueAsNonexistent)
87 {
88 if (key != _key1)
89 {
90 if (key != _key2)
91 {
92 return new ThreeElementAsyncLocalValueMap(_key1, _value1, _key2, _value2, key, value);
93 }
95 }
97 }
98 if (key != _key1)
99 {
100 if (key != _key2)
101 {
102 return this;
103 }
104 return new OneElementAsyncLocalValueMap(_key1, _value1);
105 }
106 return new OneElementAsyncLocalValueMap(_key2, _value2);
107 }
TwoElementAsyncLocalValueMap(IAsyncLocal key1, object value1, IAsyncLocal key2, object value2)

References System.Threading.AsyncLocalValueMap.TwoElementAsyncLocalValueMap.TwoElementAsyncLocalValueMap(), System.Threading.AsyncLocalValueMap.TwoElementAsyncLocalValueMap._key1, System.Threading.AsyncLocalValueMap.TwoElementAsyncLocalValueMap._key2, System.Threading.AsyncLocalValueMap.TwoElementAsyncLocalValueMap._value1, System.Threading.AsyncLocalValueMap.TwoElementAsyncLocalValueMap._value2, System.key, and System.value.