ComplexTypeModelBinder 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ComplexTypeModelBinder(IDictionary<ModelMetadata,IModelBinder>)
警告
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)
建立新的 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)
建立新的 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
參數目前會被忽略。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應