ViewContext 构造函数

定义

重载

ViewContext()

创建一个空的 ViewContext

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

初始化 ViewContext 的新实例。

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

初始化 ViewContext 的新实例。

ViewContext()

Source:
ViewContext.cs
Source:
ViewContext.cs
Source:
ViewContext.cs

创建一个空的 ViewContext

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

注解

默认构造函数仅用于单元测试目的。

适用于

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

Source:
ViewContext.cs
Source:
ViewContext.cs
Source:
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)

Source:
ViewContext.cs
Source:
ViewContext.cs
Source:
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要应用于此实例的 。

适用于