ViewComponentHelperExtensions.InvokeAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
InvokeAsync(IViewComponentHelper, String) |
Invokes a view component with the specified |
InvokeAsync(IViewComponentHelper, Type) |
Invokes a view component of type |
InvokeAsync<TComponent>(IViewComponentHelper) |
Invokes a view component of type |
InvokeAsync<TComponent>(IViewComponentHelper, Object) |
Invokes a view component of type |
InvokeAsync(IViewComponentHelper, String)
Invokes a view component with the specified 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)
Parameters
- helper
- IViewComponentHelper
The IViewComponentHelper.
- name
- String
The name of the view component.
Returns
A Task that on completion returns the rendered IHtmlContent.
Applies to
InvokeAsync(IViewComponentHelper, Type)
Invokes a view component of 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)
Parameters
- helper
- IViewComponentHelper
The IViewComponentHelper.
Returns
A Task that on completion returns the rendered IHtmlContent.
Applies to
InvokeAsync<TComponent>(IViewComponentHelper)
Invokes a view component of type 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)
Type Parameters
- TComponent
The Type of the view component.
Parameters
- helper
- IViewComponentHelper
The IViewComponentHelper.
Returns
A Task that on completion returns the rendered IHtmlContent.
Applies to
InvokeAsync<TComponent>(IViewComponentHelper, Object)
Invokes a view component of type 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)
Type Parameters
- TComponent
The Type of the view component.
Parameters
- helper
- IViewComponentHelper
The IViewComponentHelper.
- arguments
- Object
Arguments to be passed to the invoked view component method.
Returns
A Task that on completion returns the rendered IHtmlContent.