コード例 #1
0
 private bool DoesDeviceHaveControlInAnActionGroup(
     QueueControl[] controls,
     GroupedActionsToBeQueued[] actionGroups)
 {
     return controls.Any(control => actionGroups.Any(g => g.ActionToBeQueued.Control.ControlId == control.ControlId));
 }
コード例 #2
0
 private IEnumerable<ActionToBeQueued> GetNotGroupedActions(GroupedActionsToBeQueued[] actionGroups) => InvokeActions
     .Select(a => ControlConfiguration[a.DeviceId])
     .Where(controls => !DoesDeviceHaveControlInAnActionGroup(controls, actionGroups))
     .Select(GetFirstControlWhichSupportsActionOrNull)
     .Where(control => control != null)
     .Select(control => new ActionToBeQueued(control, ControlAction));