public PluginDefinition(string name) { Require.NotNullOrEmpty(name, "name"); Name = name; Assemblies = new List<Assembly>(); Widgets = new List<WidgetDefinition>(); Menu = new XmlMenu(); PermissionGroups = new PermissionGroupCollection(); ResourcesFolder = new ResourceFolder(HostingEnvironment.MapPath(ResourceFolderVirtualPath)); }
public static XmlMenu LoadMenu(IEnumerable<XElement> menuItemElements) { Require.NotNull(menuItemElements, "rootMenuElements"); XmlMenu menu = new XmlMenu(); foreach (var element in menuItemElements) { XmlMenuItem item = LoadMenuItem(element); menu.Items.Add(item); } return menu; }