Megosztás a következőn keresztül:


CollectionModelBinder<TElement> Constructors

Definition

Overloads

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

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

Creates a new CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Creates a new CollectionModelBinder<TElement>.

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

Creates a new CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder)

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

Parameters

elementBinder
IModelBinder

The IModelBinder for binding elements.

Attributes

Applies to

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

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

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

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

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

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.

Applies to

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

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

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

Applies to