public static IList <LibraryDescription> Walk(IList <IDependencyProvider> providers, string name, SemanticVersion version, FrameworkName targetFramework) { var libraries = new List <LibraryDescription>(); var sw = Stopwatch.StartNew(); Logger.TraceInformation($"[{nameof(DependencyWalker)}]: Walking dependency graph for '{name} {targetFramework}'."); var context = new WalkContext(); var walkSw = Stopwatch.StartNew(); context.Walk( providers, name, version, targetFramework); walkSw.Stop(); Logger.TraceInformation($"[{nameof(DependencyWalker)}]: Graph walk took {walkSw.ElapsedMilliseconds}ms."); context.Populate(targetFramework, libraries); sw.Stop(); Logger.TraceInformation($"$[{ nameof(DependencyWalker)}]: Resolved dependencies for {name} in { sw.ElapsedMilliseconds}ms"); return(libraries); }
public void Walk(string name, SemanticVersion version, FrameworkName targetFramework) { var sw = Stopwatch.StartNew(); Logger.TraceInformation("[{0}]: Walking dependency graph for '{1} {2}'.", GetType().Name, name, targetFramework); var context = new WalkContext(); var walkSw = Stopwatch.StartNew(); context.Walk( _dependencyProviders, name, version, targetFramework); walkSw.Stop(); Logger.TraceInformation("[{0}]: Graph walk took {1}ms.", GetType().Name, walkSw.ElapsedMilliseconds); context.Populate(targetFramework, Libraries); sw.Stop(); Logger.TraceInformation("[{0}]: Resolved dependencies for {1} in {2}ms", GetType().Name, name, sw.ElapsedMilliseconds); }