Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AsyncIteratorMethodBuilder.cs
Go to the documentation of this file.
3
5
6[StructLayout(LayoutKind.Auto)]
8{
10
12
14 {
15 return default(AsyncIteratorMethodBuilder);
16 }
17
18 [MethodImpl(MethodImplOptions.AggressiveInlining)]
19 public void MoveNext<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine
20 {
22 }
23
24 public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine
25 {
26 AsyncTaskMethodBuilder<VoidTaskResult>.AwaitOnCompleted(ref awaiter, ref stateMachine, ref m_task);
27 }
28
29 public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine
30 {
31 AsyncTaskMethodBuilder<VoidTaskResult>.AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine, ref m_task);
32 }
33
34 public void Complete()
35 {
36 if (m_task == null)
37 {
39 return;
40 }
42 if (m_task is IAsyncStateMachineBox asyncStateMachineBox)
43 {
44 asyncStateMachineBox.ClearStateUponCompletion();
45 }
46 }
47}
static readonly Task< VoidTaskResult > s_cachedCompleted
Definition Task.cs:966
void AwaitOnCompleted< TAwaiter, TStateMachine >(ref TAwaiter awaiter, ref TStateMachine stateMachine)
void AwaitUnsafeOnCompleted< TAwaiter, TStateMachine >(ref TAwaiter awaiter, ref TStateMachine stateMachine)
static void SetExistingTaskResult(Task< TResult > task, TResult result)