void SelectTemplateInCategory(string categoryPath, Func <SolutionTemplate, bool> isTemplateMatch) { List <string> parts = new TemplateCategoryPath(categoryPath).GetParts().ToList(); if (parts.Count < 2) { return; } string topLevelCategoryId = parts [0]; string secondLevelCategoryId = parts [1]; SelectTemplate( isTemplateMatch, category => category.Id == topLevelCategoryId, category => category.Id == secondLevelCategoryId); }
void SelectFirstTemplateInCategory(string categoryPath) { List <string> parts = new TemplateCategoryPath(categoryPath).GetParts().ToList(); if (parts.Count < 2) { return; } string topLevelCategoryId = parts [0]; string secondLevelCategoryId = parts [1]; SelectTemplate( template => true, category => category.Id == topLevelCategoryId, category => category.Id == secondLevelCategoryId); }