Share via


ArrayModelBinder<TElement> Constructors

Definition

Overloads

ArrayModelBinder<TElement>(IModelBinder)
Obsolete.

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

Creates a new ArrayModelBinder<TElement>.

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory)

Creates a new ArrayModelBinder<TElement>.

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Creates a new ArrayModelBinder<TElement>.

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

Creates a new ArrayModelBinder<TElement>.

ArrayModelBinder<TElement>(IModelBinder)

Source:
ArrayModelBinder.cs
Source:
ArrayModelBinder.cs

Caution

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

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

Creates a new 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)

Parameters

elementBinder
IModelBinder

The IModelBinder for binding TElement.

Attributes

Applies to

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory)

Source:
ArrayModelBinder.cs
Source:
ArrayModelBinder.cs
Source:
ArrayModelBinder.cs
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)

Parameters

elementBinder
IModelBinder

The IModelBinder for binding TElement.

loggerFactory
ILoggerFactory

The ILoggerFactory.

Remarks

The binder will not add an error for an unbound top-level model even if IsBindingRequired is true.

Applies to

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Source:
ArrayModelBinder.cs
Source:
ArrayModelBinder.cs
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)

Parameters

elementBinder
IModelBinder

The IModelBinder for binding TElement.

loggerFactory
ILoggerFactory

The ILoggerFactory.

allowValidatingTopLevelNodes
Boolean

Indication that validation of top-level models is enabled. If true and IsBindingRequired is true for a top-level model, the binder adds a ModelStateDictionary error when the model is not bound.

Remarks

The allowValidatingTopLevelNodes parameter is currently ignored. Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes is always true in ArrayModelBinder<TElement>.

Applies to

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

Source:
ArrayModelBinder.cs
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)

Parameters

elementBinder
IModelBinder

The IModelBinder for binding TElement.

loggerFactory
ILoggerFactory

The ILoggerFactory.

allowValidatingTopLevelNodes
Boolean

Indication that validation of top-level models is enabled. If true and IsBindingRequired is true for a top-level model, the binder adds a ModelStateDictionary error when the model is not bound.

mvcOptions
MvcOptions

The MvcOptions.

Remarks

This is the preferred ArrayModelBinder<TElement> constructor.

The allowValidatingTopLevelNodes parameter is currently ignored. Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes is always true in ArrayModelBinder<TElement>.

Applies to