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

◆ TrySetSlot()

static bool System.MulticastDelegate.TrySetSlot ( object[] a,
int index,
object o )
inlinestaticprivate

Definition at line 125 of file MulticastDelegate.cs.

126 {
127 if (a[index] == null && Interlocked.CompareExchange<object>(ref a[index], o, (object)null) == null)
128 {
129 return true;
130 }
131 object obj = a[index];
132 if (obj != null)
133 {
136 if (multicastDelegate2._methodPtr == multicastDelegate._methodPtr && multicastDelegate2._target == multicastDelegate._target && multicastDelegate2._methodPtrAux == multicastDelegate._methodPtrAux)
137 {
138 return true;
139 }
140 }
141 return false;
142 }
MulticastDelegate(object target, string method)
static int CompareExchange(ref int location1, int value, int comparand)

References System.MulticastDelegate.MulticastDelegate(), System.Threading.Interlocked.CompareExchange(), System.Runtime.Serialization.Dictionary, System.index, and System.obj.

Referenced by System.MulticastDelegate.CombineImpl().