Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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;
        }