这是我的代码:
<p-accordion [multiple]="true">
<p-accordionTab header="Godfather I">
The story begins as Don Vito Corleone, the head of a New York Mafia family, overseeshis daughter's wedding. His beloved son ichael has just come home from the war, but does not intend to become part of his father's business. T hrough Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those …Run Code Online (Sandbox Code Playgroud) 最近我想对服务调用列表实施健康检查。它们都是异步任务(例如Task<IHttpOperationResponse<XXX_Model>> method_name(...)
我想将它们全部放入一个列表中。我遵循了这篇文章的答案:Storing a list ofmethods in C#但是,它们是异步方法。
我是这样说的:异步方法的集合
List<Action> _functions = new List<Action> {
() => accountDetailsServiceProvider.GetEmployer(EmployerId),
() => accountServiceProvider.GetAccountStatus(EmployerId)
}
Run Code Online (Sandbox Code Playgroud)
有人可以指导我正确的方法来实现将异步方法放入列表中并迭代调用它们吗?
提前致谢!