示例#1
0
            static public List <TemplateGroup> GetTemplates(TemplateCollection templates)
            {
                var items = GetGroupNames(templates);
                var list  = new List <TemplateGroup>();

                items.Sort();
                foreach (string g in items)
                {
                    list.Add(new TemplateGroup {
                        GroupName = g, Templates = templates.Templates.Where(tpl => tpl.Group == g).OrderBy(tpl => tpl.Alias)
                    });
                }
                return(list);
            }
示例#2
0
 static TemplateGroup GetGroup(TemplateCollection templates, string groupOn)
 {
     return(new TemplateGroup {
         GroupName = groupOn, Templates = templates.Templates.Where(tpl => tpl.Group == groupOn)
     });
 }