CollectionModelBinder<TElement> Konstruktory

Definicja

Przeciążenia

CollectionModelBinder<TElement>(IModelBinder)
Przestarzałe.

Ten konstruktor jest przestarzały i zostanie usunięty w przyszłej wersji. Zalecaną alternatywą jest przeciążenie, które również przyjmuje ILoggerFactorywartość .

Tworzy nowy adres CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

Tworzy nowy adres CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Tworzy nowy adres CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean, MvcOptions)

Tworzy nowy adres CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder)

Źródło:
CollectionModelBinder.cs
Źródło:
CollectionModelBinder.cs

Przestroga

This constructor is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes an ILoggerFactory.

Ten konstruktor jest przestarzały i zostanie usunięty w przyszłej wersji. Zalecaną alternatywą jest przeciążenie, które również przyjmuje ILoggerFactorywartość .

Tworzy nowy adres CollectionModelBinder<TElement>.

public:
 CollectionModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ elementBinder);
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder);
[System.Obsolete("This constructor is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes an ILoggerFactory.")]
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
[<System.Obsolete("This constructor is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes an ILoggerFactory.")>]
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
Public Sub New (elementBinder As IModelBinder)

Parametry

elementBinder
IModelBinder

Element IModelBinder dla elementów powiązania.

Atrybuty

Dotyczy

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

Źródło:
CollectionModelBinder.cs
Źródło:
CollectionModelBinder.cs

Tworzy nowy adres CollectionModelBinder<TElement>.

public:
 CollectionModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ elementBinder, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
Public Sub New (elementBinder As IModelBinder, loggerFactory As ILoggerFactory)

Parametry

elementBinder
IModelBinder

Element IModelBinder dla powiązania TElement.

loggerFactory
ILoggerFactory

Element ILoggerFactory.

Uwagi

Powiązanie nie spowoduje dodania błędu dla niezwiązanego modelu najwyższego poziomu, nawet jeśli IsBindingRequired ma wartość true.

Dotyczy

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Źródło:
CollectionModelBinder.cs

Tworzy nowy adres CollectionModelBinder<TElement>.

public:
 CollectionModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ elementBinder, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, bool allowValidatingTopLevelNodes);
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.Extensions.Logging.ILoggerFactory * bool -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
Public Sub New (elementBinder As IModelBinder, loggerFactory As ILoggerFactory, allowValidatingTopLevelNodes As Boolean)

Parametry

elementBinder
IModelBinder

Element IModelBinder dla powiązania TElement.

loggerFactory
ILoggerFactory

Element ILoggerFactory.

allowValidatingTopLevelNodes
Boolean

Wskazuje, że włączono walidację modeli najwyższego poziomu. Jeśli true element i IsBindingRequired dotyczy true modelu najwyższego poziomu, binder dodaje ModelStateDictionary błąd, gdy model nie jest powiązany.

Dotyczy

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean, MvcOptions)

Tworzy nowy adres CollectionModelBinder<TElement>.

public:
 CollectionModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ elementBinder, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, bool allowValidatingTopLevelNodes, Microsoft::AspNetCore::Mvc::MvcOptions ^ mvcOptions);
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes, Microsoft.AspNetCore.Mvc.MvcOptions mvcOptions);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.Extensions.Logging.ILoggerFactory * bool * Microsoft.AspNetCore.Mvc.MvcOptions -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
Public Sub New (elementBinder As IModelBinder, loggerFactory As ILoggerFactory, allowValidatingTopLevelNodes As Boolean, mvcOptions As MvcOptions)

Parametry

elementBinder
IModelBinder

Element IModelBinder dla powiązania TElement.

loggerFactory
ILoggerFactory

Element ILoggerFactory.

allowValidatingTopLevelNodes
Boolean

Wskazuje, że włączono walidację modeli najwyższego poziomu. Jeśli true element i IsBindingRequired dotyczy true modelu najwyższego poziomu, binder dodaje ModelStateDictionary błąd, gdy model nie jest powiązany.

mvcOptions
MvcOptions

Element MvcOptions.

Uwagi

Jest to preferowany CollectionModelBinder<TElement> konstruktor.

Dotyczy