Esempio n. 1
0
        private void activatePackages(IList <IPackageInfo> packages, IList <IActivator> discoveredActivators)
        {
            var discoveredPlusRegisteredActivators = discoveredActivators.Union(_activators);

            _diagnostics.LogExecutionOnEach(discoveredPlusRegisteredActivators,
                                            activator => activator.Activate(packages, _diagnostics.LogFor(activator)));
        }
Esempio n. 2
0
 public static void LogExecutionOnEach <TItem>(this IPackagingDiagnostics diagnostics, IEnumerable <TItem> targets, Action <TItem, IPackageLog> continuation)
 {
     targets.Each(currentTarget =>
     {
         var log = diagnostics.LogFor(currentTarget);
         diagnostics.LogExecution(currentTarget, () => continuation(currentTarget, log));
     });
 }
 public void LogMissingPackageDependencies(IPackagingDiagnostics diagnostics)
 {
     var missingDependencies = _graph.MissingDependencies();
     missingDependencies.Each(name =>
     {
         var dependentPackages = _packages.Where(pak => pak.GetDependencies().Any(dep => dep.IsMandatory && dep.Name == name));
         dependentPackages.Each(pak => diagnostics.LogFor(pak).LogMissingDependency(name));
     });
 }
Esempio n. 4
0
        public void LogMissingPackageDependencies(IPackagingDiagnostics diagnostics)
        {
            var missingDependencies = _graph.MissingDependencies();

            missingDependencies.Each(name =>
            {
                var dependentPackages = _packages.Where(pak => pak.GetDependencies().Any(dep => dep.IsMandatory && dep.Name == name));
                dependentPackages.Each(pak => diagnostics.LogFor(pak).LogMissingDependency(name));
            });
        }
Esempio n. 5
0
 private void activatePackages(IList <IPackageInfo> packages, IList <IActivator> discoveredActivators)
 {
     _diagnostics.LogExecutionOnEach(discoveredActivators.Union(_activators),
                                     a => { a.Activate(packages, _diagnostics.LogFor(a)); });
 }