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

◆ CompleteFromAsyncResult()

static void System.Threading.Tasks.TaskFactory< TResult >.FromAsyncTrimPromise< TInstance >.CompleteFromAsyncResult ( IAsyncResult asyncResult)
inlinestaticpackage

Definition at line 21 of file TaskFactory.cs.

22 {
23 if (asyncResult == null)
24 {
25 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.asyncResult);
26 }
28 if (fromAsyncTrimPromise == null)
29 {
30 ThrowHelper.ThrowArgumentException(ExceptionResource.InvalidOperation_WrongAsyncResultOrEndCalledMultiple, ExceptionArgument.asyncResult);
31 }
32 TInstance thisRef = fromAsyncTrimPromise.m_thisRef;
34 fromAsyncTrimPromise.m_thisRef = null;
35 fromAsyncTrimPromise.m_endMethod = null;
36 if (endMethod == null)
37 {
38 ThrowHelper.ThrowArgumentException(ExceptionResource.InvalidOperation_WrongAsyncResultOrEndCalledMultiple, ExceptionArgument.asyncResult);
39 }
40 if (!asyncResult.CompletedSynchronously)
41 {
43 }
44 }

References System.asyncResult, System.endMethod, System.ThrowHelper.ThrowArgumentException(), and System.ThrowHelper.ThrowArgumentNullException().