ColumnProvider.AddDefaultAttributes Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds default attributes.
protected:
static System::ComponentModel::AttributeCollection ^ AddDefaultAttributes(System::Web::DynamicData::ModelProviders::ColumnProvider ^ columnProvider, System::ComponentModel::AttributeCollection ^ attributes);
protected static System.ComponentModel.AttributeCollection AddDefaultAttributes (System.Web.DynamicData.ModelProviders.ColumnProvider columnProvider, System.ComponentModel.AttributeCollection attributes);
static member AddDefaultAttributes : System.Web.DynamicData.ModelProviders.ColumnProvider * System.ComponentModel.AttributeCollection -> System.ComponentModel.AttributeCollection
Protected Shared Function AddDefaultAttributes (columnProvider As ColumnProvider, attributes As AttributeCollection) As AttributeCollection
Parameters
- columnProvider
- ColumnProvider
The column provider.
- attributes
- AttributeCollection
The attribute collection.
Returns
The attribute collection.
Remarks
If the attributes
parameter does not contain the RequiredAttribute collection, but the model provider requires this attribute, the RequiredAttribute object is added. If the attributes
parameter does not contain the StringLengthAttribute collection and the column that is represented by this provider is a string, the StringLengthAttribute object is added.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈