AsyncTaskMethodBuilder

AsyncTaskMethodBuilder

Represents a builder for asynchronous methods that return a task.

public struct AsyncTaskMethodBuilder

This type and its members are intended for use by the compiler.

AsyncTaskMethodBuilder.Start(TStateMachine) Method

Begins running the builder with the associated state machine.

public void Start<TStateMachine> (ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine;

Type Parameters

TStateMachine

The type of the state machine.

Parameters

stateMachine

The state machine instance, passed by reference.

 

 

扩展阅读

C# Under the Hood: async/await    可以按照这篇文章新建一个git的repository,研究一下怎么使用

发现简单的async关键字编译出来的dll,再反编译的话,看到的就是上面这个类的使用。所以如果反编译看到这样的代码,那么说明这个地方使用了async的语法

 

原文地址:https://www.cnblogs.com/chucklu/p/11186638.html