protected virtual void InitializeActions(Layouts.ActionItemCollection layoutItems) { foreach (Layouts.ActionItem layoutItem in layoutItems) { Actions.ActionItem actionItem = Layouts.LayoutActivator.Activate(layoutItem, DependencyContainer); Actions.Add(actionItem); } }
public static Actions.ActionGroup Activate(ActionGroup item, IDependencyContainer container) { Type type = item.Type; Actions.ActionGroup group; if (type == null) { group = new Actions.ActionGroup(); } else { group = (Actions.ActionGroup)container.Resolve(item.Type); } group.Name = item.Name; group.Order = item.Order; foreach (ActionItem childItem in item.Items) { Actions.ActionItem actionItem = Activate(childItem, container); group.Add(actionItem); } return(group); }