private List<IVisibleCommand> CreateGroup(IAppItemsPlugin plugin) { return plugin.GetCommands() .Pipeline(cmd => cmd.As<IExecutedCallback>(c => c.SetCallback(ToggleAppMenu))) .Pipeline(cmd => { if (cmd.HasKeyBinding) _keyBindings.Add(cmd.KeyBinding); }) .ToList(); }
public AppItemsViewModel(IAppItemsPlugin[] plugins, Func<IGestureService> svc) { _svc = svc; _appItemsGroups = plugins.Select(CreateGroup).ToList(); }