internal TableEntriesSnapshot(AccessibilityResult result) { _dte = (DTE2)Package.GetGlobalService(typeof(DTE)); _projectName = result.Project; Errors.AddRange(result.Violations); Url = result.Url; }
public void ProcessResult(string jsonResult) { try { AccessibilityResult result = JsonConvert.DeserializeObject <AccessibilityResult>(jsonResult); ErrorListService.ProcessLintingResults(result); } catch (Exception ex) { Logger.Log(ex); } }
public void AddErrors(AccessibilityResult result) { if (result == null || !result.Violations.Any()) { return; } result.Violations = result.Violations.Where(v => !_snapshots.Any(s => s.Value.Errors.Contains(v))); var snapshot = new TableEntriesSnapshot(result); _snapshots[result.Url] = snapshot; UpdateAllSinks(); }
public static void ProcessLintingResults(AccessibilityResult result) { TableDataSource.Instance.CleanErrors(result.Url); if (!VSPackage.Options.ShowWarnings) { result.Violations = result.Violations.Where(r => r.GetSeverity() != __VSERRORCATEGORY.EC_WARNING); } if (!VSPackage.Options.ShowMessages) { result.Violations = result.Violations.Where(r => r.GetSeverity() != __VSERRORCATEGORY.EC_MESSAGE); } if (result.Violations.Any()) { TableDataSource.Instance.AddErrors(result); } }