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

◆ Complete()

void System.Threading.Tasks.TaskFactory< TResult >.FromAsyncTrimPromise< TInstance >.Complete ( TInstance thisRef,
Func< TInstance, IAsyncResult, TResult > endMethod,
IAsyncResult asyncResult,
bool requiresSynchronization )
inlinepackage

Definition at line 46 of file TaskFactory.cs.

47 {
48 try
49 {
51 bool flag;
53 {
54 flag = TrySetResult(result);
55 return;
56 }
57 DangerousSetResult(result);
58 flag = true;
59 }
60 catch (OperationCanceledException ex)
61 {
62 bool flag = TrySetCanceled(ex.CancellationToken, ex);
63 }
65 {
67 }
68 }
void DangerousSetResult(TResult result)
Definition Task.cs:181
bool TrySetCanceled(CancellationToken tokenToRecord)
Definition Task.cs:2555
bool TrySetException(object exceptionObject)
Definition Task.cs:2542
AggregateException? Exception
Definition Task.cs:1014

References System.asyncResult, System.Threading.Tasks.Task< TResult >.DangerousSetResult(), System.endMethod, System.Threading.Tasks.Task< TResult >.TrySetCanceled(), System.Threading.Tasks.Task< TResult >.TrySetException(), and System.Threading.Tasks.Task< TResult >.TrySetResult().