共用方式為


DefaultHtmlGenerator 建構函式

定義

多載

DefaultHtmlGenerator(IAntiforgery, IOptions<MvcViewOptions>, IModelMetadataProvider, IUrlHelperFactory, HtmlEncoder, ClientValidatorCache)
已淘汰.

初始化 DefaultHtmlGenerator 類別的新執行個體。

此建構函式已過時,未來版本將會移除。 建議的替代做法是使用 DefaultHtmlGenerator(IAntiforgery, IOptions<MvcViewOptions>, IModelMetadataProvider, IUrlHelperFactory, HtmlEncoder, ClientValidatorCache, ValidationHtmlAttributeProvider)

DefaultHtmlGenerator(IAntiforgery, IOptions<MvcViewOptions>, IModelMetadataProvider, IUrlHelperFactory, HtmlEncoder, ValidationHtmlAttributeProvider)

初始化 DefaultHtmlGenerator 類別的新執行個體。

DefaultHtmlGenerator(IAntiforgery, IOptions<MvcViewOptions>, IModelMetadataProvider, IUrlHelperFactory, HtmlEncoder, ClientValidatorCache, ValidationHtmlAttributeProvider)

初始化 DefaultHtmlGenerator 類別的新執行個體。

DefaultHtmlGenerator(IAntiforgery, IOptions<MvcViewOptions>, IModelMetadataProvider, IUrlHelperFactory, HtmlEncoder, ClientValidatorCache)

警告

This constructor is obsolete and will be removed in a future version. The recommended alternative is to use the other public constructor.

初始化 DefaultHtmlGenerator 類別的新執行個體。

此建構函式已過時,未來版本將會移除。 建議的替代做法是使用 DefaultHtmlGenerator(IAntiforgery, IOptions<MvcViewOptions>, IModelMetadataProvider, IUrlHelperFactory, HtmlEncoder, ClientValidatorCache, ValidationHtmlAttributeProvider)

public:
 DefaultHtmlGenerator(Microsoft::AspNetCore::Antiforgery::IAntiforgery ^ antiforgery, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Mvc::MvcViewOptions ^> ^ optionsAccessor, Microsoft::AspNetCore::Mvc::ModelBinding::IModelMetadataProvider ^ metadataProvider, Microsoft::AspNetCore::Mvc::Routing::IUrlHelperFactory ^ urlHelperFactory, System::Text::Encodings::Web::HtmlEncoder ^ htmlEncoder, Microsoft::AspNetCore::Mvc::Internal::ClientValidatorCache ^ clientValidatorCache);
public DefaultHtmlGenerator (Microsoft.AspNetCore.Antiforgery.IAntiforgery antiforgery, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.MvcViewOptions> optionsAccessor, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache clientValidatorCache);
[System.Obsolete("This constructor is obsolete and will be removed in a future version. The recommended alternative is to use the other public constructor.")]
public DefaultHtmlGenerator (Microsoft.AspNetCore.Antiforgery.IAntiforgery antiforgery, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.MvcViewOptions> optionsAccessor, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache clientValidatorCache);
new Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator : Microsoft.AspNetCore.Antiforgery.IAntiforgery * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.MvcViewOptions> * Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory * System.Text.Encodings.Web.HtmlEncoder * Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache -> Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator
[<System.Obsolete("This constructor is obsolete and will be removed in a future version. The recommended alternative is to use the other public constructor.")>]
new Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator : Microsoft.AspNetCore.Antiforgery.IAntiforgery * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.MvcViewOptions> * Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory * System.Text.Encodings.Web.HtmlEncoder * Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache -> Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator
Public Sub New (antiforgery As IAntiforgery, optionsAccessor As IOptions(Of MvcViewOptions), metadataProvider As IModelMetadataProvider, urlHelperFactory As IUrlHelperFactory, htmlEncoder As HtmlEncoder, clientValidatorCache As ClientValidatorCache)

參數

antiforgery
IAntiforgery

IAntiforgery用來產生反forgery 權杖的實例。

optionsAccessor
IOptions<MvcViewOptions>

MvcViewOptions 存取子。

urlHelperFactory
IUrlHelperFactory

IUrlHelperFactory

htmlEncoder
HtmlEncoder

HtmlEncoder

clientValidatorCache
Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache

Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache 提供 IClientModelValidator 的清單。

屬性

適用於

DefaultHtmlGenerator(IAntiforgery, IOptions<MvcViewOptions>, IModelMetadataProvider, IUrlHelperFactory, HtmlEncoder, ValidationHtmlAttributeProvider)

來源:
DefaultHtmlGenerator.cs
來源:
DefaultHtmlGenerator.cs
來源:
DefaultHtmlGenerator.cs

初始化 DefaultHtmlGenerator 類別的新執行個體。

public:
 DefaultHtmlGenerator(Microsoft::AspNetCore::Antiforgery::IAntiforgery ^ antiforgery, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Mvc::MvcViewOptions ^> ^ optionsAccessor, Microsoft::AspNetCore::Mvc::ModelBinding::IModelMetadataProvider ^ metadataProvider, Microsoft::AspNetCore::Mvc::Routing::IUrlHelperFactory ^ urlHelperFactory, System::Text::Encodings::Web::HtmlEncoder ^ htmlEncoder, Microsoft::AspNetCore::Mvc::ViewFeatures::ValidationHtmlAttributeProvider ^ validationAttributeProvider);
public DefaultHtmlGenerator (Microsoft.AspNetCore.Antiforgery.IAntiforgery antiforgery, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.MvcViewOptions> optionsAccessor, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider validationAttributeProvider);
new Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator : Microsoft.AspNetCore.Antiforgery.IAntiforgery * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.MvcViewOptions> * Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory * System.Text.Encodings.Web.HtmlEncoder * Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider -> Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator
Public Sub New (antiforgery As IAntiforgery, optionsAccessor As IOptions(Of MvcViewOptions), metadataProvider As IModelMetadataProvider, urlHelperFactory As IUrlHelperFactory, htmlEncoder As HtmlEncoder, validationAttributeProvider As ValidationHtmlAttributeProvider)

參數

antiforgery
IAntiforgery

IAntiforgery用來產生反forgery 權杖的實例。

optionsAccessor
IOptions<MvcViewOptions>

MvcViewOptions 存取子。

urlHelperFactory
IUrlHelperFactory

IUrlHelperFactory

htmlEncoder
HtmlEncoder

HtmlEncoder

適用於

DefaultHtmlGenerator(IAntiforgery, IOptions<MvcViewOptions>, IModelMetadataProvider, IUrlHelperFactory, HtmlEncoder, ClientValidatorCache, ValidationHtmlAttributeProvider)

初始化 DefaultHtmlGenerator 類別的新執行個體。

public:
 DefaultHtmlGenerator(Microsoft::AspNetCore::Antiforgery::IAntiforgery ^ antiforgery, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Mvc::MvcViewOptions ^> ^ optionsAccessor, Microsoft::AspNetCore::Mvc::ModelBinding::IModelMetadataProvider ^ metadataProvider, Microsoft::AspNetCore::Mvc::Routing::IUrlHelperFactory ^ urlHelperFactory, System::Text::Encodings::Web::HtmlEncoder ^ htmlEncoder, Microsoft::AspNetCore::Mvc::Internal::ClientValidatorCache ^ clientValidatorCache, Microsoft::AspNetCore::Mvc::ViewFeatures::ValidationHtmlAttributeProvider ^ validationAttributeProvider);
public DefaultHtmlGenerator (Microsoft.AspNetCore.Antiforgery.IAntiforgery antiforgery, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.MvcViewOptions> optionsAccessor, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory urlHelperFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache clientValidatorCache, Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider validationAttributeProvider);
new Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator : Microsoft.AspNetCore.Antiforgery.IAntiforgery * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Mvc.MvcViewOptions> * Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * Microsoft.AspNetCore.Mvc.Routing.IUrlHelperFactory * System.Text.Encodings.Web.HtmlEncoder * Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache * Microsoft.AspNetCore.Mvc.ViewFeatures.ValidationHtmlAttributeProvider -> Microsoft.AspNetCore.Mvc.ViewFeatures.DefaultHtmlGenerator
Public Sub New (antiforgery As IAntiforgery, optionsAccessor As IOptions(Of MvcViewOptions), metadataProvider As IModelMetadataProvider, urlHelperFactory As IUrlHelperFactory, htmlEncoder As HtmlEncoder, clientValidatorCache As ClientValidatorCache, validationAttributeProvider As ValidationHtmlAttributeProvider)

參數

antiforgery
IAntiforgery

IAntiforgery用來產生反forgery 權杖的實例。

optionsAccessor
IOptions<MvcViewOptions>

MvcViewOptions 存取子。

urlHelperFactory
IUrlHelperFactory

IUrlHelperFactory

htmlEncoder
HtmlEncoder

HtmlEncoder

clientValidatorCache
Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache

Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache 提供 IClientModelValidator 的清單。

適用於