Share via


ViewContext Constructors

Definition

Overloads

ViewContext()

Creates an empty ViewContext.

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

Initializes a new instance of ViewContext.

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

Initializes a new instance of ViewContext.

ViewContext()

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

Creates an empty ViewContext.

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

Remarks

The default constructor is provided for unit test purposes only.

Applies to

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

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

Initializes a new instance of 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)

Parameters

viewContext
ViewContext

The ViewContext to copy values from.

view
IView

The IView being rendered.

writer
TextWriter

The TextWriter to render output to.

Applies to

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

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

Initializes a new instance of 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)

Parameters

actionContext
ActionContext

The ActionContext.

view
IView

The IView being rendered.

writer
TextWriter

The TextWriter to render output to.

htmlHelperOptions
HtmlHelperOptions

The HtmlHelperOptions to apply to this instance.

Applies to