共用方式為


ViewComponentContext 建構函式

定義

多載

ViewComponentContext()

建立新的 ViewComponentContext

ViewComponentContext(ViewComponentDescriptor, IDictionary<String,Object>, HtmlEncoder, ViewContext, TextWriter)

建立新的 ViewComponentContext

ViewComponentContext()

來源:
ViewComponentContext.cs
來源:
ViewComponentContext.cs
來源:
ViewComponentContext.cs

建立新的 ViewComponentContext

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

備註

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

適用於

ViewComponentContext(ViewComponentDescriptor, IDictionary<String,Object>, HtmlEncoder, ViewContext, TextWriter)

來源:
ViewComponentContext.cs
來源:
ViewComponentContext.cs
來源:
ViewComponentContext.cs

建立新的 ViewComponentContext

public:
 ViewComponentContext(Microsoft::AspNetCore::Mvc::ViewComponents::ViewComponentDescriptor ^ viewComponentDescriptor, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ arguments, System::Text::Encodings::Web::HtmlEncoder ^ htmlEncoder, Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, System::IO::TextWriter ^ writer);
public ViewComponentContext (Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor viewComponentDescriptor, System.Collections.Generic.IDictionary<string,object> arguments, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, System.IO.TextWriter writer);
public ViewComponentContext (Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor viewComponentDescriptor, System.Collections.Generic.IDictionary<string,object?> arguments, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, System.IO.TextWriter writer);
new Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext : Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentDescriptor * System.Collections.Generic.IDictionary<string, obj> * System.Text.Encodings.Web.HtmlEncoder * Microsoft.AspNetCore.Mvc.Rendering.ViewContext * System.IO.TextWriter -> Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext
Public Sub New (viewComponentDescriptor As ViewComponentDescriptor, arguments As IDictionary(Of String, Object), htmlEncoder As HtmlEncoder, viewContext As ViewContext, writer As TextWriter)

參數

viewComponentDescriptor
ViewComponentDescriptor

ViewComponentContext 叫用之檢視元件的 。

arguments
IDictionary<String,Object>

檢視元件引數。

htmlEncoder
HtmlEncoder

要使用的 HtmlEncoder

viewContext
ViewContext

ViewContext

writer
TextWriter

TextWriter用於寫入輸出的 。

適用於