예제 #1
0
        public int Execute(String inputFilePath, RegexFilter craftFilter, RegexFilter partFilter)
        {
            ui.DisplayUserMessage($"Searching for crafts matching '{craftFilter}'...");

            var kspObjTree = CraftLoader.LoadFromFile(inputFilePath);
            var crafts     = new CraftLookup(kspObjTree).LookupCrafts(craftFilter);

            ui.DisplayUserMessage($"Searching for parts with dependencies to '{partFilter}'...");

            var partDependencies = crafts.ToDictionary(craft => craft, craft => FindPartDependencies(craft, partFilter));

            if (partDependencies.Any(entry => entry.Value.Count > 0))
            {
                ui.DisplayPartDependencyList(partDependencies);
            }

            return(0);
        }