コード例 #1
0
ファイル: DependencyListOperation.cs プロジェクト: voloda/dnx
        public bool Execute()
        {
            var libDictionary = _hostContext.DependencyWalker.Libraries.ToDictionary(desc => desc.Identity);

            // 1. Walk the graph of library dependencies
            var librariesTreeBuilder = new LibraryDependencyFinder(libDictionary);
            var root = librariesTreeBuilder.Build(new Library
            {
                Name    = _options.Project.Name,
                Version = _options.Project.Version
            });

            if (!_options.ShowAssemblies)
            {
                Render(root);
                return(true);
            }

            // 2. Walk the local dependencies
            var assemblyWalker = new AssemblyWalker(_framework, _hostContext, libDictionary, _options.RuntimeFolder);
            var assemblies     = assemblyWalker.Walk(root);

            foreach (var assemblyName in assemblies.OrderBy(assemblyName => assemblyName))
            {
                _options.Reports.Information.WriteLine(assemblyName);
            }

            return(true);
        }
コード例 #2
0
        public bool Execute()
        {
            // 1. Walk the graph of library dependencies
            var root = LibraryDependencyFinder.Build(_hostContext.DependencyWalker.Libraries, _options.Project);

            if (!_options.ShowAssemblies)
            {
                Render(root);
                return(true);
            }

            // 2. Walk the local dependencies and print the assemblies list
            var assemblyWalker = new AssemblyWalker(_framework,
                                                    _hostContext,
                                                    _options.RuntimeFolder,
                                                    _options.Details,
                                                    _options.Reports);

            assemblyWalker.Walk(root);

            return(true);
        }