namespace zero.Pages; public class PageModuleOptions : List { public void Add(PageModuleType moduleType) where T : PageModule, new() { Add(PageModuleType.Convert(moduleType)); } public void Add(string alias, string name, string description, string icon, string group = null, List tags = null, List disallowedPageTypes = null) where T : PageModule, new() { Add(new PageModuleType(typeof(T)) { Alias = alias, Name = name, Description = description, Icon = icon, Group = group, Tags = tags ?? new List(), DisallowedPageTypes = disallowedPageTypes ?? new List() }); } public void Add(Type type, string alias, string name, string description, string icon, string group = null, List tags = null, List disallowedPageTypes = null) { Add(new PageModuleType(type) { Alias = alias, Name = name, Description = description, Icon = icon, Group = group, Tags = tags ?? new List(), DisallowedPageTypes = disallowedPageTypes ?? new List() }); } }