ViewComponentHelperExtensions.InvokeAsync 方法

定義

多載

InvokeAsync(IViewComponentHelper, String)

使用指定的 name 叫用檢視元件。

InvokeAsync(IViewComponentHelper, Type)

叫用 類型的 componentType 檢視元件。

InvokeAsync<TComponent>(IViewComponentHelper)

叫用 類型的 TComponent 檢視元件。

InvokeAsync<TComponent>(IViewComponentHelper, Object)

叫用 類型的 TComponent 檢視元件。

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)

參數

componentType
Type

檢視元件 Type

傳回

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 的 。

適用於