ViewComponentHelperExtensions.InvokeAsync 方法

定义

重载

InvokeAsync(IViewComponentHelper, String)

使用指定的 name调用视图组件。

InvokeAsync(IViewComponentHelper, Type)

调用类型的 componentType视图组件。

InvokeAsync<TComponent>(IViewComponentHelper)

调用类型的 TComponent视图组件。

InvokeAsync<TComponent>(IViewComponentHelper, Object)

调用类型的 TComponent视图组件。

InvokeAsync(IViewComponentHelper, String)

Source:
ViewComponentHelperExtensions.cs
Source:
ViewComponentHelperExtensions.cs
Source:
ViewComponentHelperExtensions.cs

使用指定的 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)

Source:
ViewComponentHelperExtensions.cs
Source:
ViewComponentHelperExtensions.cs
Source:
ViewComponentHelperExtensions.cs

调用类型的 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)

参数

componentType
Type

视图组件 Type

返回

完成 Task 时返回呈现 IHtmlContent的 。

适用于

InvokeAsync<TComponent>(IViewComponentHelper)

Source:
ViewComponentHelperExtensions.cs
Source:
ViewComponentHelperExtensions.cs
Source:
ViewComponentHelperExtensions.cs

调用类型的 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)

Source:
ViewComponentHelperExtensions.cs
Source:
ViewComponentHelperExtensions.cs
Source:
ViewComponentHelperExtensions.cs

调用类型的 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的 。

适用于