Online and CHM
ExportViolationsToString Method
Example 



KellermanSoftware.StaticCodeAnalysis Namespace > QualityLogic Class : ExportViolationsToString Method
Export a Quality Check result to a string
Syntax
'Declaration
 
Public Function ExportViolationsToString( _
   ByVal result As QualityResult _
) As String
'Usage
 
Dim instance As QualityLogic
Dim result As QualityResult
Dim value As String
 
value = instance.ExportViolationsToString(result)
public string ExportViolationsToString( 
   QualityResult result
)
public:
String^ ExportViolationsToString( 
   QualityResult^ result
) 

Parameters

result
Example
//Trial Mode
QualityLogic quality = new QualityLogic();
 
//Licensed Mode
//QualityLogic quality = new QualityLogic("User Name from Receipt", "License Key from Receipt");
 
//Test using this open source project:  https://github.com/GregFinzer/Compare-Net-Objects
QualityResult qualityResult =
    quality.GetQualityViolationsForDirectory(@"c:\_git\Compare-Net-Objects\Compare-Net-Objects");
 
string outputString = quality.ExportViolationsToString(qualityResult);
string reportPath = Path.Combine(Environment.CurrentDirectory, "QualityResult.txt");
File.WriteAllText(reportPath, outputString);
'Trial Mode
Dim quality As New QualityLogic()
 
'Licensed Mode
'QualityLogic quality = new QualityLogic("User Name from Receipt", "License Key from Receipt");
 
'Test using this open source project:  https://github.com/GregFinzer/Compare-Net-Objects
Dim qualityResult As QualityResult = quality.GetQualityViolationsForDirectory("c:\_git\Compare-Net-Objects\Compare-Net-Objects")
 
Dim outputString As String = quality.ExportViolationsToString(qualityResult)
Dim reportPath As String = Path.Combine(Environment.CurrentDirectory, "QualityResult.txt")
File.WriteAllText(reportPath, outputString)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

QualityLogic Class
QualityLogic Members