共用方式為


ViewContext 建構函式

定義

多載

ViewContext()

建立空的 ViewContext

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

初始化 ViewContext 的新執行個體。

ViewContext(ActionContext, IView, ViewDataDictionary, ITempDataDictionary, TextWriter, HtmlHelperOptions)

初始化 ViewContext 的新執行個體。

ViewContext()

來源:
ViewContext.cs
來源:
ViewContext.cs
來源:
ViewContext.cs

建立空的 ViewContext

public:
 ViewContext();
public ViewContext ();
Public Sub New ()

備註

預設建構函式僅供單元測試之用。

適用於

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

來源:
ViewContext.cs
來源:
ViewContext.cs
來源:
ViewContext.cs

初始化 ViewContext 的新執行個體。

public:
 ViewContext(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::ViewEngines::IView ^ view, Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary ^ viewData, System::IO::TextWriter ^ writer);
public ViewContext (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, System.IO.TextWriter writer);
new Microsoft.AspNetCore.Mvc.Rendering.ViewContext : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewEngines.IView * Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * System.IO.TextWriter -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext
Public Sub New (viewContext As ViewContext, view As IView, viewData As ViewDataDictionary, writer As TextWriter)

參數

viewContext
ViewContext

ViewContext 從中複製值的 。

view
IView

正在 IView 轉譯的 。

writer
TextWriter

TextWriter 轉譯輸出的 。

適用於

ViewContext(ActionContext, IView, ViewDataDictionary, ITempDataDictionary, TextWriter, HtmlHelperOptions)

來源:
ViewContext.cs
來源:
ViewContext.cs
來源:
ViewContext.cs

初始化 ViewContext 的新執行個體。

public:
 ViewContext(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ViewEngines::IView ^ view, Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary ^ viewData, Microsoft::AspNetCore::Mvc::ViewFeatures::ITempDataDictionary ^ tempData, System::IO::TextWriter ^ writer, Microsoft::AspNetCore::Mvc::ViewFeatures::HtmlHelperOptions ^ htmlHelperOptions);
public ViewContext (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ViewEngines.IView view, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary viewData, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary tempData, System.IO.TextWriter writer, Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions htmlHelperOptions);
new Microsoft.AspNetCore.Mvc.Rendering.ViewContext : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ViewEngines.IView * Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary * Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionary * System.IO.TextWriter * Microsoft.AspNetCore.Mvc.ViewFeatures.HtmlHelperOptions -> Microsoft.AspNetCore.Mvc.Rendering.ViewContext
Public Sub New (actionContext As ActionContext, view As IView, viewData As ViewDataDictionary, tempData As ITempDataDictionary, writer As TextWriter, htmlHelperOptions As HtmlHelperOptions)

參數

actionContext
ActionContext

ActionContext

view
IView

正在 IView 轉譯的 。

writer
TextWriter

TextWriter 轉譯輸出的 。

htmlHelperOptions
HtmlHelperOptions

HtmlHelperOptions要套用至這個實例的 。

適用於