ViewComponentContext 构造函数

定义

重载

ViewComponentContext()

创建一个新的 ViewComponentContext

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

创建一个新的 ViewComponentContext

ViewComponentContext()

创建一个新的 ViewComponentContext

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

注解

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

适用于

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

创建一个新的 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 写入输出。

适用于