DataRuleAttribute 类

为相关规则定义可本地化的命名空间、类别和标识符。

继承层次结构

System.Object
  System.Attribute
    Microsoft.Data.Schema.StaticCodeAnalysis.DataRuleAttribute

命名空间:  Microsoft.Data.Schema.StaticCodeAnalysis
程序集:  Microsoft.Data.Schema(在 Microsoft.Data.Schema.dll 中)

语法

声明
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False)> _
Public NotInheritable Class DataRuleAttribute _
    Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)]
public sealed class DataRuleAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = false)]
public ref class DataRuleAttribute sealed : public Attribute
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)>]
type DataRuleAttribute =  
    class
        inherit Attribute
    end
public final class DataRuleAttribute extends Attribute

DataRuleAttribute 类型公开以下成员。

构造函数

  名称 说明
公共方法 DataRuleAttribute 创建 DataRuleAttribute 类的新实例。

页首

属性

  名称 说明
公共属性 CategoryResourceId 获取或设置类别的资源标识符。
公共属性 DescriptionResourceId 获取或设置描述的资源标识符。
公共属性 DisplayNameResourceId 获取或设置显示名称的资源标识符。
公共属性 FullId 获取 Namespace 属性、类别和 Id 属性的值。
公共属性 HelpKeyword 获取或设置一个关键字,使用该关键字可将规则与帮助文件中的特定页联系在一起。
公共属性 HelpUrl 获取或设置帮助文件的 URL。
公共属性 Id 获取或设置规则的标识符。
公共属性 Namespace 获取或设置规则的命名空间。
公共属性 ResourceBaseName 获取或设置此类中使用的资源的基名称。
公共属性 RuleScope 获取或设置相关规则的范围。
公共属性 TypeId 当在派生类中实现时,获取该 Attribute 的唯一标识符。 (继承自 Attribute。)

页首

方法

  名称 说明
公共方法 Equals 基础结构。返回一个值,该值指示此实例是否与指定的对象相等。 (继承自 Attribute。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetHashCode 返回此实例的哈希代码。 (继承自 Attribute。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 IsDefaultAttribute 当在派生类中重写时,指示此实例的值是否是派生类的默认值。 (继承自 Attribute。)
公共方法 Match 当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。 (继承自 Attribute。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

显式接口实现

  名称 说明
显式接口实现私有方法 _Attribute.GetIDsOfNames 将一组名称映射为对应的一组调度标识符。 (继承自 Attribute。)
显式接口实现私有方法 _Attribute.GetTypeInfo 检索对象的类型信息,然后可以使用该信息获取接口的类型信息。 (继承自 Attribute。)
显式接口实现私有方法 _Attribute.GetTypeInfoCount 检索对象提供的类型信息接口的数量(0 或 1)。 (继承自 Attribute。)
显式接口实现私有方法 _Attribute.Invoke 提供对某一对象公开的属性和方法的访问。 (继承自 Attribute。)

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.Data.Schema.StaticCodeAnalysis 命名空间

DataRule

StaticCodeAnalysisRule