private QueueControl CreatePluginControlIds(ControlEntry entry) { var controlId = entry.Id; var pluginControlId = entry.Control.Id; var pluginId = Controls.GetPluginId(entry); var simpleActions = entry.Control.SimpleActions; var slidingActions = entry.Control.SlidingActions; return new QueueControl(controlId, pluginControlId, pluginId, simpleActions, slidingActions); }
private static object CreateDeviceState() { var pluginId = Guid.NewGuid(); var controls = new PluginControlEntryDictionary(); var controlEntry = new ControlEntry( Guid.NewGuid(), new Control("1", "name1", new[] { "action1" }, new[] { "action2" })); controls[pluginId].Add(controlEntry); var devices = new DeviceEntryList { new DeviceEntry(Guid.NewGuid(), "device1", new[] {controlEntry}) }; return new DeviceStoreState(devices, controls); }
public Guid GetPluginId(ControlEntry entry) { return Dic.Keys.First(pluginId => Dic[pluginId].Contains(entry)); }
public ControlDeviceDataEntry(ControlEntry control, Guid deviceId) { Control = control; DeviceId = deviceId; }