ViewComponentHelperExtensions.InvokeAsync 方法     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| InvokeAsync(IViewComponentHelper, String) | 使用指定的  | 
| InvokeAsync(IViewComponentHelper, Type) | 调用类型的  | 
| InvokeAsync<TComponent>(IViewComponentHelper) | 调用类型的  | 
| InvokeAsync<TComponent>(IViewComponentHelper, Object) | 调用类型的  | 
InvokeAsync(IViewComponentHelper, String)
使用指定的 name调用视图组件。
public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Html::IHtmlContent ^> ^ InvokeAsync(Microsoft::AspNetCore::Mvc::IViewComponentHelper ^ helper, System::String ^ name);public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, string name);static member InvokeAsync : Microsoft.AspNetCore.Mvc.IViewComponentHelper * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent><Extension()>
Public Function InvokeAsync (helper As IViewComponentHelper, name As String) As Task(Of IHtmlContent)参数
- name
- String
视图组件的名称。
返回
完成 Task 时返回呈现 IHtmlContent的 。
适用于
InvokeAsync(IViewComponentHelper, Type)
调用类型的 componentType视图组件。
public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Html::IHtmlContent ^> ^ InvokeAsync(Microsoft::AspNetCore::Mvc::IViewComponentHelper ^ helper, Type ^ componentType);public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> InvokeAsync(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, Type componentType);static member InvokeAsync : Microsoft.AspNetCore.Mvc.IViewComponentHelper * Type -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent><Extension()>
Public Function InvokeAsync (helper As IViewComponentHelper, componentType As Type) As Task(Of IHtmlContent)参数
返回
完成 Task 时返回呈现 IHtmlContent的 。
适用于
InvokeAsync<TComponent>(IViewComponentHelper)
调用类型的 TComponent视图组件。
public:
generic <typename TComponent>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Html::IHtmlContent ^> ^ InvokeAsync(Microsoft::AspNetCore::Mvc::IViewComponentHelper ^ helper);public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> InvokeAsync<TComponent>(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper);static member InvokeAsync : Microsoft.AspNetCore.Mvc.IViewComponentHelper -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent><Extension()>
Public Function InvokeAsync(Of TComponent) (helper As IViewComponentHelper) As Task(Of IHtmlContent)类型参数
- TComponent
Type视图组件的 。
参数
返回
完成 Task 时返回呈现 IHtmlContent的 。
适用于
InvokeAsync<TComponent>(IViewComponentHelper, Object)
调用类型的 TComponent视图组件。
public:
generic <typename TComponent>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Html::IHtmlContent ^> ^ InvokeAsync(Microsoft::AspNetCore::Mvc::IViewComponentHelper ^ helper, System::Object ^ arguments);public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> InvokeAsync<TComponent>(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, object arguments);public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent> InvokeAsync<TComponent>(this Microsoft.AspNetCore.Mvc.IViewComponentHelper helper, object? arguments);static member InvokeAsync : Microsoft.AspNetCore.Mvc.IViewComponentHelper * obj -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.IHtmlContent><Extension()>
Public Function InvokeAsync(Of TComponent) (helper As IViewComponentHelper, arguments As Object) As Task(Of IHtmlContent)类型参数
- TComponent
Type视图组件的 。
参数
- arguments
- Object
要传递给调用的视图组件方法的参数。
返回
完成 Task 时返回呈现 IHtmlContent的 。