CodeAnalysisServiceSettings Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines the optional configuration settings for a CodeAnalysisService. This can determine which rules are run, how to suppress certain problems, and where to save results to.
These settings can also be set on the CodeAnalysisService after it has been created, but are included here to make construction more convenient.
public sealed class CodeAnalysisServiceSettings
type CodeAnalysisServiceSettings = class
Public NotInheritable Class CodeAnalysisServiceSettings
- Inheritance
-
CodeAnalysisServiceSettings
Constructors
CodeAnalysisServiceSettings() |
Creates a new CodeAnalysisServiceSettings object. |
Properties
CodeAnalysisSucceededFile |
Optional path to a file that is created if analysis succeeds. This can be used to check whether analysis should be run or not - for instance if analyzing a dacpac, comparing the modification time for the dacpac versus the analysis success file can tell you whether the dacpac is more recent than the last analysis. This property directly maps to CodeAnalysisSucceededFile. |
ResultsFile |
Optional path to a results file. If this is specified, the analysis service will save all results to an XML file at the end of analysis. If no file path is specified then this will not be done automatically, but SerializeResultsToXml(String) can be used to output the results after analysis has completed. This property directly maps to ResultsFile. |
RuleSettings |
Optional rule settings define what rules should be run during analysis and the severity of the problems created. If no CodeAnalysisRuleSettings are specified the default behavior is to run all discovered rules. This property is applied using ApplyRuleSettings(CodeAnalysisRuleSettings). |
ShouldSuppressProblem |
An optional predicate that can be used to suppress problems raised by rules during analysis. See SetProblemSuppressor(Predicate<SqlRuleProblemSuppressionContext>) for more information. This property is applied using SetProblemSuppressor(Predicate<SqlRuleProblemSuppressionContext>). |
ValidationMode |
Determines the validation performed on the model prior to code analysis. This can be used to bypass the requirement that a TSqlModel be valid prior to analysis by a code analysis rule. |