ViewContext ViewContext ViewContext Constructors

Definition

Overloads

ViewContext() ViewContext()

Creates an empty ViewContext.

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter) ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

Initializes a new instance of ViewContext.

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

Initializes a new instance of ViewContext.

ViewContext() ViewContext()

Creates an empty ViewContext.

public ViewContext ();
Public Sub New ()

Remarks

The default constructor is provided for unit test purposes only.

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter) ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

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);
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

Parameters

viewContext
ViewContext ViewContext ViewContext

The ViewContext to copy values from.

view
IView IView IView

The IView being rendered.

writer
TextWriter TextWriter TextWriter

The TextWriter to render output to.

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

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);
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

Parameters

view
IView IView IView

The IView being rendered.

writer
TextWriter TextWriter TextWriter

The TextWriter to render output to.

htmlHelperOptions
HtmlHelperOptions HtmlHelperOptions HtmlHelperOptions

The HtmlHelperOptions to apply to this instance.

Applies to