Поделиться через


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 , используемый для создания маркеров защиты от подделки.

optionsAccessor
IOptions<MvcViewOptions>

Метод доступа для MvcViewOptions.

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 , используемый для создания маркеров защиты от подделки.

optionsAccessor
IOptions<MvcViewOptions>

Метод доступа для MvcViewOptions.

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 , используемый для создания маркеров защиты от подделки.

optionsAccessor
IOptions<MvcViewOptions>

Метод доступа для MvcViewOptions.

htmlEncoder
HtmlEncoder

HtmlEncoder.

clientValidatorCache
Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache

Объект Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache , предоставляющий список IClientModelValidatorобъектов .

Применяется к