Sdílet prostřednictvím


ArrayModelBinder<TElement> Konstruktory

Definice

Přetížení

ArrayModelBinder<TElement>(IModelBinder)
Zastaralé.

Tento konstruktor je zastaralý a v budoucí verzi bude odebrán. Doporučenou alternativou je přetížení, které také přebírá ILoggerFactory.

Vytvoří nový objekt ArrayModelBinder<TElement>.

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory)

Vytvoří nový objekt ArrayModelBinder<TElement>.

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Vytvoří nový objekt ArrayModelBinder<TElement>.

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

Vytvoří nový objekt ArrayModelBinder<TElement>.

ArrayModelBinder<TElement>(IModelBinder)

Zdroj:
ArrayModelBinder.cs
Zdroj:
ArrayModelBinder.cs

Upozornění

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

Tento konstruktor je zastaralý a v budoucí verzi bude odebrán. Doporučenou alternativou je přetížení, které také přebírá ILoggerFactory.

Vytvoří nový objekt ArrayModelBinder<TElement>.

public:
 ArrayModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ elementBinder);
public ArrayModelBinder (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 ArrayModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinder<'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.ArrayModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinder<'Element>
Public Sub New (elementBinder As IModelBinder)

Parametry

elementBinder
IModelBinder

Pro IModelBinder vazbu TElement.

Atributy

Platí pro

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory)

Zdroj:
ArrayModelBinder.cs
Zdroj:
ArrayModelBinder.cs
Zdroj:
ArrayModelBinder.cs

Vytvoří nový objekt ArrayModelBinder<TElement>.

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

Parametry

elementBinder
IModelBinder

Pro IModelBinder vazbu TElement.

loggerFactory
ILoggerFactory

Hodnota ILoggerFactory

Poznámky

Vazač nepřidá chybu pro nevázaný model nejvyšší úrovně, i když IsBindingRequired je true.

Platí pro

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Zdroj:
ArrayModelBinder.cs
Zdroj:
ArrayModelBinder.cs

Vytvoří nový objekt ArrayModelBinder<TElement>.

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

Parametry

elementBinder
IModelBinder

Pro IModelBinder vazbu TElement.

loggerFactory
ILoggerFactory

Hodnota ILoggerFactory

allowValidatingTopLevelNodes
Boolean

Označení, že je povoleno ověřování modelů nejvyšší úrovně. Pokud true je true a IsBindingRequired pro model nejvyšší úrovně, vazač přidá ModelStateDictionary chybu, když model není vázán.

Poznámky

Parametr allowValidatingTopLevelNodes je nyní ignorován. Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes je vždy true v ArrayModelBinder<TElement>.

Platí pro

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

Zdroj:
ArrayModelBinder.cs

Vytvoří nový objekt ArrayModelBinder<TElement>.

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

Parametry

elementBinder
IModelBinder

Pro IModelBinder vazbu TElement.

loggerFactory
ILoggerFactory

Hodnota ILoggerFactory

allowValidatingTopLevelNodes
Boolean

Označení, že je povoleno ověřování modelů nejvyšší úrovně. Pokud true je true a IsBindingRequired pro model nejvyšší úrovně, vazač přidá ModelStateDictionary chybu, když model není vázán.

mvcOptions
MvcOptions

Hodnota MvcOptions

Poznámky

Toto je upřednostňovaný ArrayModelBinder<TElement> konstruktor.

Parametr allowValidatingTopLevelNodes je nyní ignorován. Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes je vždy true v ArrayModelBinder<TElement>.

Platí pro