ProjectProblemSuppressor Class

SQL Server 2014
 

Updated: April 20, 2017

Represents the problem suppressor used by SSDT projects. The ShouldSuppressProblem method can be passed to ShouldSuppressProblem in order to use this class. This reads suppression information from a file with a name matching SuppressionFilename ("StaticCodeAnalysis.SuppressMessages.xml") in the root directory. All relative paths will be resolved relative to the project folder defined in the constructor.

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

System::Object
  Microsoft.SqlServer.Dac.CodeAnalysis::ProjectProblemSuppressor

public ref class ProjectProblemSuppressor sealed 

NameDescription
System_CAPS_pubpropertyShouldSuppressProblem

Gets the predicate that can be used to suppress the errors.

NameDescription
System_CAPS_pubmethodAddSuppressedProblems(IEnumerable<SuppressedProblemInfo^>^)

Adds one or more instances of SuppressedProblemInfo to the set of suppressed problems. The full set of suppressed problems will be immediately written out to the backing XML file.

System_CAPS_pubmethodSystem_CAPS_staticCreateSuppressor(String^)

Creates a new ProjectProblemSuppressor.

System_CAPS_pubmethodSystem_CAPS_staticCreateSuppressor(String^, String^)

Creates a new ProjectProblemSuppressor.

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetSuppressedProblems()

Gets information on what problems will be suppressed. Specifically, a set of SuppressedProblemInfo objects will be returned that defines each combination of a rule being suppressed and the file name for which the rule is suppressed.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodResetSuppressedProblems()

Resets the suppressed problems to their default state. If an XML suppression file for the project existed already then the state will be reloaded from there, otherwise it will be reset so that no problems are suppressed.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUnsuppressRulesFromFile(String^)

Removes all problem suppression directives for a particular filename. The updated set of problems to suppress will be immediately written out to the backing XML file that describes what rules should be suppressed for a given file.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticSuppressionFilename

The default file name for a message suppression file within a project.

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: