/// <summary> /// Creates fingerprints from any matching diagnostics /// </summary> /// <param name="Job">The job that was run</param> /// <param name="JobStep">The job step that was run</param> /// <param name="Diagnostics">List of diagnostics that were produced by the build. Items should be removed from this list if they match.</param> /// <param name="Issues">List which receives all the matched issues.</param> public virtual void Match(InputJob Job, InputJobStep JobStep, List <InputDiagnostic> Diagnostics, List <Issue> Issues) { for (int Idx = 0; Idx < Diagnostics.Count; Idx++) { InputDiagnostic Diagnostic = Diagnostics[Idx]; if (TryMatch(Job, JobStep, Diagnostic, Issues)) { Diagnostics.RemoveAt(Idx); Idx--; } } }
/// <summary> /// Tries to create a fingerprint from an individual diagnostic. /// </summary> /// <param name="Job">The job that was run</param> /// <param name="JobStep">The job step that was run</param> /// <param name="Diagnostic">A diagnostic from the given job step</param> /// <param name="Issues">List which receives all the matched issues.</param> /// <returns>True if this diagnostic should be removed (usually because a fingerprint was created)</returns> public abstract bool TryMatch(InputJob Job, InputJobStep JobStep, InputDiagnostic Diagnostic, List <Issue> Issues);