public abstract IEnumerable <Checkup> Contribute(Manifest.Manifest manifest, SharedState sharedState);
public abstract Task <DiagnosticResult> Examine(SharedState history);
public virtual Task Implement(SharedState sharedState, System.Threading.CancellationToken cancellationToken) => Task.CompletedTask;
public virtual bool ShouldExamine(SharedState history) { return(true); }
public static IEnumerable <Checkup> BuildCheckupGraph(Manifest.Manifest manifest, SharedState sharedState) { var checkups = new List <Checkup>(); checkups.AddRange(registeredCheckups); foreach (var c in registeredCheckupContributors) { var contributed = c.Contribute(manifest, sharedState); if (contributed?.Any() ?? false) { checkups.AddRange(contributed); } } var filtered = checkups.Where(c => c.IsPlatformSupported(Util.Platform)); var checkupIds = filtered.Select(c => c.Id); var sorted = TopologicalSort <Checkup>(filtered, c => filtered.Where(dc => c.DeclareDependencies(checkupIds).Any(d => dc.IsPlatformSupported(Util.Platform) && d.CheckupId.StartsWith(dc.Id, StringComparison.OrdinalIgnoreCase)))); return(sorted); }