Online and CHM
ExportViolationsToCsvStream Method
Example 



KellermanSoftware.StaticCodeAnalysis Namespace > QualityLogic Class : ExportViolationsToCsvStream Method
Export violations to a CSV stream
Syntax
'Declaration
 
Public Sub ExportViolationsToCsvStream( _
   ByVal result As QualityResult, _
   ByVal outputStream As Stream _
) 
'Usage
 
Dim instance As QualityLogic
Dim result As QualityResult
Dim outputStream As Stream
 
instance.ExportViolationsToCsvStream(result, outputStream)
public void ExportViolationsToCsvStream( 
   QualityResult result,
   Stream outputStream
)
public:
void ExportViolationsToCsvStream( 
   QualityResult^ result,
   Stream^ outputStream
) 

Parameters

result
outputStream
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 reportPath = Path.Combine(Environment.CurrentDirectory, "QualityViolations.csv");
 
using (Stream reportStream = new FileStream(reportPath, FileMode.Create))
{
    quality.ExportViolationsToCsvStream(qualityResult, reportStream);
}
'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 reportPath As String = Path.Combine(Environment.CurrentDirectory, "QualityViolations.csv")
 
Using reportStream As Stream = New FileStream(reportPath, FileMode.Create)
    quality.ExportViolationsToCsvStream(qualityResult, reportStream)
End Using
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