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 matching '{partFilter}'..."); var filteredParts = crafts.ToDictionary(craft => craft, craft => FindParts(craft, partFilter)); if (filteredParts.Any(entry => entry.Value.Count > 0)) { ui.DisplayPartList(filteredParts); } return(0); }