示例#1
0
 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();
 }
示例#2
0
 public AppItemsViewModel(IAppItemsPlugin[] plugins, Func<IGestureService> svc)
 {
     _svc = svc;
     _appItemsGroups = plugins.Select(CreateGroup).ToList();
 }