语言

BindAttribute 类

定义

表示一个特性,该特性用于提供有关应如何进行模型绑定到参数的详细信息。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Parameter, AllowMultiple=false, Inherited=true)]
public sealed class BindAttribute : Attribute
type BindAttribute = class
    inherit Attribute
Public NotInheritable Class BindAttribute
Inherits Attribute
继承
BindAttribute
属性

构造函数

名称 说明
BindAttribute()

初始化 BindAttribute 类的新实例。

属性

名称 说明
Exclude

获取或设置不允许绑定的属性名称的列表(各属性名称之间用逗号分隔)。

Include

获取或设置允许绑定的属性名称的列表(各属性名称之间用逗号分隔)。

Prefix

获取或设置在呈现表示绑定到操作参数或模型属性的标记时要使用的前缀。

方法

名称 说明
IsPropertyAllowed(String)

确定是否允许使用指定属性。

适用于