Method EmitAwait
EmitAwait(ILGenerator, Type)
Emits a runtime async await sequence to
il.public static void EmitAwait(ILGenerator il, Type awaitableType)
Parameters
ilILGenerator- The ILGenerator to emit to/
awaitableTypeType- The type of the awaitable on stack.
Remarks
The awaitable is expected to be a valie on the top of the IL stack, even if its a value type. After the emitted code, the result (if any) of the awaitable will be on the top of the stack.
EmitAwait(ILProcessor, TypeReference)
Emits a runtime async await sequence to
il.public static void EmitAwait(ILProcessor il, TypeReference awaitableType)
Parameters
ilILProcessor- The ILProcessor to emit to/
awaitableTypeTypeReference- The type of the awaitable on stack.
Remarks
The awaitable is expected to be a valie on the top of the IL stack, even if its a value type. After the emitted code, the result (if any) of the awaitable will be on the top of the stack.