ViewComponentContext 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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
- writer
- TextWriter
TextWriter用於寫入輸出的 。