ComplexTypeModelBinder 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ComplexTypeModelBinder(IDictionary<ModelMetadata,IModelBinder>)
- Source:
- ComplexTypeModelBinder.cs
- Source:
- ComplexTypeModelBinder.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。
创建一个新的 ComplexTypeModelBinder。
public:
ComplexTypeModelBinder(System::Collections::Generic::IDictionary<Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^> ^ propertyBinders);
public ComplexTypeModelBinder (System.Collections.Generic.IDictionary<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata,Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder> propertyBinders);
[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 ComplexTypeModelBinder (System.Collections.Generic.IDictionary<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata,Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder> propertyBinders);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder : System.Collections.Generic.IDictionary<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder> -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder
[<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.ComplexTypeModelBinder : System.Collections.Generic.IDictionary<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder> -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder
Public Sub New (propertyBinders As IDictionary(Of ModelMetadata, IModelBinder))
参数
- propertyBinders
- IDictionary<ModelMetadata,IModelBinder>
IDictionary<TKey,TValue>要用于绑定属性的绑定器的 。
- 属性
适用于
ComplexTypeModelBinder(IDictionary<ModelMetadata,IModelBinder>, ILoggerFactory)
- Source:
- ComplexTypeModelBinder.cs
- Source:
- ComplexTypeModelBinder.cs
- Source:
- ComplexTypeModelBinder.cs
创建一个新的 ComplexTypeModelBinder。
public:
ComplexTypeModelBinder(System::Collections::Generic::IDictionary<Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^> ^ propertyBinders, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public ComplexTypeModelBinder (System.Collections.Generic.IDictionary<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata,Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder> propertyBinders, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder : System.Collections.Generic.IDictionary<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder> * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder
Public Sub New (propertyBinders As IDictionary(Of ModelMetadata, IModelBinder), loggerFactory As ILoggerFactory)
参数
- propertyBinders
- IDictionary<ModelMetadata,IModelBinder>
IDictionary<TKey,TValue>要用于绑定属性的绑定器的 。
- loggerFactory
- ILoggerFactory
注解
即使 IsBindingRequired 为 true
,绑定器也不会为未绑定的顶级模型添加错误。
适用于
ComplexTypeModelBinder(IDictionary<ModelMetadata,IModelBinder>, ILoggerFactory, Boolean)
- Source:
- ComplexTypeModelBinder.cs
- Source:
- ComplexTypeModelBinder.cs
创建一个新的 ComplexTypeModelBinder。
public:
ComplexTypeModelBinder(System::Collections::Generic::IDictionary<Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^> ^ propertyBinders, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, bool allowValidatingTopLevelNodes);
public ComplexTypeModelBinder (System.Collections.Generic.IDictionary<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata,Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder> propertyBinders, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder : System.Collections.Generic.IDictionary<Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder> * Microsoft.Extensions.Logging.ILoggerFactory * bool -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinder
Public Sub New (propertyBinders As IDictionary(Of ModelMetadata, IModelBinder), loggerFactory As ILoggerFactory, allowValidatingTopLevelNodes As Boolean)
参数
- propertyBinders
- IDictionary<ModelMetadata,IModelBinder>
IDictionary<TKey,TValue>要用于绑定属性的绑定器的 。
- loggerFactory
- ILoggerFactory
- allowValidatingTopLevelNodes
- Boolean
指示已启用顶级模型的验证。 如果 true
和 IsBindingRequiredtrue
适用于顶级模型,则绑定器会在模型未绑定时添加错误 ModelStateDictionary 。
注解
参数 allowValidatingTopLevelNodes
当前被忽略。