ArrayModelBinder<TElement> 构造函数

定义

重载

ArrayModelBinder<TElement>(IModelBinder)
已过时.

此构造函数已过时,将在将来的版本中删除。 建议的替代方法是重载,该重载也采用 ILoggerFactory

创建一个新的 ArrayModelBinder<TElement>

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory)

创建一个新的 ArrayModelBinder<TElement>

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

创建一个新的 ArrayModelBinder<TElement>

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

创建一个新的 ArrayModelBinder<TElement>

ArrayModelBinder<TElement>(IModelBinder)

Source:
ArrayModelBinder.cs
Source:
ArrayModelBinder.cs

注意

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

此构造函数已过时,将在将来的版本中删除。 建议的替代方法是重载,该重载也采用 ILoggerFactory

创建一个新的 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)

参数

elementBinder
IModelBinder

IModelBinder用于绑定 TElement的 。

属性

适用于

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory)

Source:
ArrayModelBinder.cs
Source:
ArrayModelBinder.cs
Source:
ArrayModelBinder.cs

创建一个新的 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)

参数

elementBinder
IModelBinder

IModelBinder用于绑定 TElement的 。

loggerFactory
ILoggerFactory

ILoggerFactory

注解

即使 IsBindingRequiredtrue,绑定器也不会为未绑定的顶级模型添加错误。

适用于

ArrayModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Source:
ArrayModelBinder.cs
Source:
ArrayModelBinder.cs

创建一个新的 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)

参数

elementBinder
IModelBinder

IModelBinder用于绑定 TElement的 。

loggerFactory
ILoggerFactory

ILoggerFactory

allowValidatingTopLevelNodes
Boolean

指示已启用顶级模型的验证。 如果 trueIsBindingRequiredtrue 适用于顶级模型,则绑定器会在模型未绑定时添加错误 ModelStateDictionary

注解

参数 allowValidatingTopLevelNodes 当前被忽略。 Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes 始终 true 在 中 ArrayModelBinder<TElement>

适用于

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

Source:
ArrayModelBinder.cs

创建一个新的 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)

参数

elementBinder
IModelBinder

IModelBinder用于绑定 TElement的 。

loggerFactory
ILoggerFactory

ILoggerFactory

allowValidatingTopLevelNodes
Boolean

指示已启用顶级模型的验证。 如果 trueIsBindingRequiredtrue 适用于顶级模型,则绑定器会在模型未绑定时添加错误 ModelStateDictionary

mvcOptions
MvcOptions

MvcOptions

注解

这是首选 ArrayModelBinder<TElement> 构造函数。

参数 allowValidatingTopLevelNodes 当前被忽略。 Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes 始终 true 在 中 ArrayModelBinder<TElement>

适用于