Sdílet prostřednictvím


ViewContext Konstruktory

Definice

Přetížení

ViewContext()

Vytvoří prázdný ViewContextobjekt .

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

Inicializuje novou instanci objektu ViewContext.

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

Inicializuje novou instanci objektu ViewContext.

ViewContext()

Zdroj:
ViewContext.cs
Zdroj:
ViewContext.cs
Zdroj:
ViewContext.cs

Vytvoří prázdný ViewContextobjekt .

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

Poznámky

Výchozí konstruktor je k dispozici pouze pro účely testování částí.

Platí pro

ViewContext(ViewContext, IView, ViewDataDictionary, TextWriter)

Zdroj:
ViewContext.cs
Zdroj:
ViewContext.cs
Zdroj:
ViewContext.cs

Inicializuje novou instanci objektu 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)

Parametry

viewContext
ViewContext

Hodnota ViewContext , ze které chcete kopírovat hodnoty.

view
IView

Vykreslení IView .

writer
TextWriter

Výstup TextWriter se má vykreslovat do.

Platí pro

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

Zdroj:
ViewContext.cs
Zdroj:
ViewContext.cs
Zdroj:
ViewContext.cs

Inicializuje novou instanci objektu 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)

Parametry

actionContext
ActionContext

Hodnota ActionContext

view
IView

Vykreslení IView .

writer
TextWriter

Výstup TextWriter se má vykreslovat do.

htmlHelperOptions
HtmlHelperOptions

Použije HtmlHelperOptions se pro tuto instanci.

Platí pro