DataRule Class

Provides a base class for data rules.

Inheritance Hierarchy

System.Object
  Microsoft.Data.Schema.StaticCodeAnalysis.DataRule
    Microsoft.Data.Schema.StaticCodeAnalysis.StaticCodeAnalysisRule

Namespace:  Microsoft.Data.Schema.StaticCodeAnalysis
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

Syntax

'Declaration
Public MustInherit Class DataRule
public abstract class DataRule
public ref class DataRule abstract
[<AbstractClass>]
type DataRule =  class end
public abstract class DataRule

The DataRule type exposes the following members.

Constructors

  Name Description
Protected method DataRule Creates a new default instance of a class that is derived from the DataRule.

Top

Properties

  Name Description
Public property RuleProperties Gets or sets an object that contains the values of all data rule properties.

Top

Methods

  Name Description
Public method Analyze Analyzes a model element and returns any problems that were detected in the element.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method PopulateProperties Populates the values of the properties for the rule.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

Notes to Implementers

Use the DataRule class as the basis to create a base abstract class in each of any number of categories. From this class you can create the concrete classes for rules in those categories for a specific data source provider.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Data.Schema.StaticCodeAnalysis Namespace

Other Resources

Walkthrough: Authoring a Custom Static Code Analysis Rule Assembly for SQL