ViewExecutor.ExecuteAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ExecuteAsync(ViewContext, String, Nullable<Int32>) |
以非同步方式執行檢視。 |
ExecuteAsync(ActionContext, IView, ViewDataDictionary, ITempDataDictionary, String, Nullable<Int32>) |
以非同步方式執行檢視。 |
ExecuteAsync(ViewContext, String, Nullable<Int32>)
以非同步方式執行檢視。
protected:
System::Threading::Tasks::Task ^ ExecuteAsync(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, System::String ^ contentType, Nullable<int> statusCode);
protected System.Threading.Tasks.Task ExecuteAsync (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string contentType, int? statusCode);
protected System.Threading.Tasks.Task ExecuteAsync (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string? contentType, int? statusCode);
member this.ExecuteAsync : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * Nullable<int> -> System.Threading.Tasks.Task
Protected Function ExecuteAsync (viewContext As ViewContext, contentType As String, statusCode As Nullable(Of Integer)) As Task
參數
- viewContext
- ViewContext
ViewContext與目前要求相關聯的 。
- contentType
- String
回應中要設定的內容類型標頭值。 如果是 null
, DefaultContentType 則會使用 。
傳回
, Task 會在檢視執行完成時完成。
適用於
ExecuteAsync(ActionContext, IView, ViewDataDictionary, ITempDataDictionary, String, Nullable<Int32>)
以非同步方式執行檢視。
public:
virtual System::Threading::Tasks::Task ^ ExecuteAsync(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ViewEngines::IView ^ view, Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary ^ viewData, Microsoft::AspNetCore::Mvc::ViewFeatures::ITempDataDictionary ^ tempData, System::String ^ contentType, Nullable<int> statusCode);
public virtual System.Threading.Tasks.Task ExecuteAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, string contentType, int? statusCode);
public virtual System.Threading.Tasks.Task ExecuteAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, string? contentType, int? statusCode);
abstract member ExecuteAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ViewEngines.IView * Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary * string * Nullable<int> -> System.Threading.Tasks.Task
override this.ExecuteAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ViewEngines.IView * Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary * string * Nullable<int> -> System.Threading.Tasks.Task
Public Overridable Function ExecuteAsync (actionContext As ActionContext, view As IView, viewData As ViewDataDictionary, tempData As ITempDataDictionary, contentType As String, statusCode As Nullable(Of Integer)) As Task
參數
- actionContext
- ActionContext
ActionContext與目前要求相關聯的 。
- viewData
- ViewDataDictionary
- tempData
- ITempDataDictionary
- contentType
- String
回應中要設定的內容類型標頭值。 如果是 null
, DefaultContentType 則會使用 。
傳回
, Task 會在檢視執行完成時完成。