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

◆ ProtectedInvokeCallback() [3/3]

void System.Net.LazyAsyncResult.ProtectedInvokeCallback ( object result,
IntPtr userToken )
inlineprotectedinherited

Definition at line 144 of file LazyAsyncResult.cs.

145 {
146 if (result == DBNull.Value)
147 {
148 throw new ArgumentNullException("result");
149 }
150 if (((uint)_intCompleted & 0x7FFFFFFFu) != 0 || (Interlocked.Increment(ref _intCompleted) & 0x7FFFFFFF) != 1)
151 {
152 return;
153 }
154 if (_result == DBNull.Value)
155 {
156 _result = result;
157 }
158 ManualResetEvent manualResetEvent = (ManualResetEvent)_event;
159 if (manualResetEvent != null)
160 {
161 try
162 {
163 manualResetEvent.Set();
164 }
165 catch (ObjectDisposedException)
166 {
167 }
168 }
169 Complete(userToken);
170 }
virtual void Complete(IntPtr userToken)
static int Increment(ref int location)

References System.Net.LazyAsyncResult._event, System.Net.LazyAsyncResult._intCompleted, System.Net.LazyAsyncResult._result, System.Net.LazyAsyncResult.Complete(), System.Threading.Interlocked.Increment(), System.Threading.EventWaitHandle.Set(), and System.DBNull.Value.