public void LogMissingPackageDependencies(IBottlingDiagnostics diagnostics) { var missingDependencies = _graph.MissingDependencies(); missingDependencies.Each(name => { var dependentPackages = _packages.Where(pak => pak.Dependencies.Any(dep => dep.IsMandatory && dep.Name == name)); dependentPackages.Each(pak => diagnostics.LogFor(pak).LogMissingDependency(name)); }); }
public IEnumerable <IPackageInfo> FindAllPackages() { var result = new List <IPackageInfo>(); _diagnostics.LogExecutionOnEach(_packageLoaders, (currentLoader, log) => { IPackageInfo[] packageInfos = currentLoader.Load(log).ToArray(); _diagnostics.LogPackages(currentLoader, packageInfos); packageInfos.Each(pak => { if (result.Any(x => x.Name == pak.Name)) { _diagnostics.LogFor(pak) .Trace("Bottle named {0} already found by a previous loader. Ignoring.", pak.Name); } else { result.Add(pak); } }); }); return(result); }