SqlRuleProblem Class

SQL Server 2014
 

Updated: April 20, 2017

Describes a problem found by a rule during analysis. Contains relevant information such as the Rule that found the problem, the SqlObject causing the problem, the severity, and the error message to display. Source position information (source name, start line and column) are initially inferred based on the ModelElement and Fragment passed into the constructor. Note that if a Fragment is passed in then the start line/column for that TSqlFragment will be used (if present), otherwise the TSqlObject's values will be used (if present). Note that certain models such as those generated from a dacpac may not have source position information.

Namespace:   Microsoft.SqlServer.Dac.CodeAnalysis
Assembly:  Microsoft.SqlServer.Dac.Extensions (in Microsoft.SqlServer.Dac.Extensions.dll)

System.Object
  Microsoft.SqlServer.Dac.CodeAnalysis.SqlRuleProblem

public sealed class SqlRuleProblem

NameDescription
System_CAPS_pubpropertyDescription

Gets the problem description.

System_CAPS_pubpropertyErrorMessageString

Gets the string for displaying the error message, based on rule information and the problem description.

System_CAPS_pubpropertyFragment

Gets the TSqlFragment causing the problem.

System_CAPS_pubpropertyModelElement

Gets the TSqlObject causing the current problem.

System_CAPS_pubpropertyRuleId

Gets the ID of the rule that created this SqlRuleProblem.

System_CAPS_pubpropertySeverity

Gets or sets the severity of this problem, can be error, warning.

System_CAPS_pubpropertySourceName

Gets the name of the source this problem was found in. This is determined based on the model element passed into the constructor. May be null if no source information was available. For instance models loaded from Dacpac files may not have source information available.

System_CAPS_pubpropertyStartColumn

Gets the column the problem begins at, if known.

System_CAPS_pubpropertyStartLine

Gets the line the problem begins at, if known.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodSetSourceInformation(SourceInformation)

Sets source position information (source name, start line and column) for this SqlRuleProblem, overriding any position information inferred when the rule was created.

System_CAPS_pubmethodToString()

(Inherited from Object.)

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

Return to top

Community Additions

ADD
Show: