//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");
//Save base line violations
string baselineFilePath = Path.Combine(Environment.CurrentDirectory, "BaselineViolations.json");
quality.SaveBaselineViolations(qualityResult.QualityViolations, baselineFilePath);
//Load the violations
List<QualityViolation> baseLineViolations = quality.LoadBaselineViolations(baselineFilePath);
//Get violations using baseline
QualityResult qualityResultUsingBaseline =
quality.GetQualityViolationsForDirectory(@"c:\_git\Compare-Net-Objects\Compare-Net-Objects",
baseLineViolations);
//Export the results to an HTML Report (there will be none since the baseline)
string htmlReportFilePath = Path.Combine(Environment.CurrentDirectory, "QualityResultWithBaseline.html");
quality.ExportViolationsToHtmlReportFile(qualityResultUsingBaseline, TemplateName.BlackAndBlue, htmlReportFilePath);
'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")
'Save base line violations
Dim baselineFilePath As String = Path.Combine(Environment.CurrentDirectory, "BaselineViolations.json")
quality.SaveBaselineViolations(qualityResult.QualityViolations, baselineFilePath)
'Load the violations
Dim baseLineViolations As List(Of QualityViolation) = quality.LoadBaselineViolations(baselineFilePath)
'Get violations using baseline
Dim qualityResultUsingBaseline As QualityResult = quality.GetQualityViolationsForDirectory("c:\_git\Compare-Net-Objects\Compare-Net-Objects", baseLineViolations)
'Export the results to an HTML Report (there will be none since the baseline)
Dim htmlReportFilePath As String = Path.Combine(Environment.CurrentDirectory, "QualityResultWithBaseline.html")
quality.ExportViolationsToHtmlReportFile(qualityResultUsingBaseline, TemplateName.BlackAndBlue, htmlReportFilePath)