Condividi tramite


SqlRuleExecutionContext.ScriptFragment Property

Definition

Gets the script fragment which defines the element being analyzed, if this is available. May be null.

Tries to get the most suitable TSqlFragment for use during the rule analysis process. If the TSqlObject was originally built from a scripted source then the original source fragment will be returned. Otherwise a new AST will be generated from the ModelElement/>. This ensures that when reporting SqlRuleProblems the most accurate source information can be included in the error messages.

public Microsoft.SqlServer.TransactSql.ScriptDom.TSqlFragment ScriptFragment { get; }
member this.ScriptFragment : Microsoft.SqlServer.TransactSql.ScriptDom.TSqlFragment
Public ReadOnly Property ScriptFragment As TSqlFragment

Property Value

Remarks

See TryGetFragmentForAnalysis(TSqlObject, TSqlFragment) for implementation details

Applies to