Online and CHM
Saving a Baseline
//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);