public void AddErrors(IEnumerable <LintingError> errors) { if (errors == null || !errors.Any()) { return; } foreach (var error in errors.GroupBy(t => t.FileName)) { var snapshot = new TableEntriesSnapshot(error.Key, error); _snapshots[error.Key] = snapshot; } UpdateAllSinks(); }
public void AddErrors(IEnumerable <LintingError> errors) { if (errors == null || !errors.Any()) { return; } var cleanErrors = errors.Where(e => e != null && !string.IsNullOrEmpty(e.FileName)); foreach (var error in cleanErrors.GroupBy(t => t.FileName)) { var snapshot = new TableEntriesSnapshot(error.Key, error); _snapshots[error.Key] = snapshot; } UpdateAllSinks(); }
public void AddErrors(IEnumerable <LintingError> errors, Dictionary <string, string> fileToProjectMap) { CheckThread(); if (errors == null || !errors.Any()) { return; } var cleanErrors = errors.Where(e => e != null && !string.IsNullOrEmpty(e.FileName)); //DebugDumpMap(fileNameToProjectNameMap); foreach (IGrouping <string, LintingError> error in cleanErrors.GroupBy(t => t.FileName)) { fileToProjectMap.TryGetValue(error.Key, out string projectName); TableEntriesSnapshot snapshot = new TableEntriesSnapshot(error.Key, projectName, error); Snapshots[error.Key] = snapshot; } UpdateAllSinks(); Benchmark.Log("After UpdateAllSinks"); }
public void AddErrors(IEnumerable <LintingError> errors) { if (errors == null || !errors.Any()) { return; } var cleanErrors = errors.Where(e => e != null && !string.IsNullOrEmpty(e.FileName)); Dictionary <string, string> fileNameToProjectNameMap = CreateFileNameToProjectNameMap(); //DebugDumpMap(fileNameToProjectNameMap); foreach (var error in cleanErrors.GroupBy(t => t.FileName)) { fileNameToProjectNameMap.TryGetValue(error.Key, out string projectName); TableEntriesSnapshot snapshot = new TableEntriesSnapshot(error.Key, projectName ?? "", error); _snapshots[error.Key] = snapshot; } UpdateAllSinks(); }
public void AddErrors(IEnumerable<LintingError> errors) { if (errors == null || !errors.Any()) return; var cleanErrors = errors.Where(e => e != null && !string.IsNullOrEmpty(e.FileName)); foreach (var error in cleanErrors.GroupBy(t => t.FileName)) { var snapshot = new TableEntriesSnapshot(error.Key, error); _snapshots[error.Key] = snapshot; } UpdateAllSinks(); }