Sdílet prostřednictvím


CollectionModelBinder<TElement> Konstruktory

Definice

Přetížení

CollectionModelBinder<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 CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

Vytvoří nový objekt CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Vytvoří nový objekt CollectionModelBinder<TElement>.

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

Vytvoří nový objekt CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder)

Zdroj:
CollectionModelBinder.cs
Zdroj:
CollectionModelBinder.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 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

Pro IModelBinder prvky vazby.

Atributy

Platí pro

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

Zdroj:
CollectionModelBinder.cs
Zdroj:
CollectionModelBinder.cs

Vytvoří nový objekt 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

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

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Zdroj:
CollectionModelBinder.cs

Vytvoří nový objekt 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

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.

Platí pro

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

Vytvoří nový objekt 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

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ý CollectionModelBinder<TElement> konstruktor.

Platí pro