public MappingsWireData(string description, MappingsSwitchData switchMapping, MappingsCoilData coilMapping) : this() { Description = description; Source = switchMapping.Source; SourceDevice = switchMapping.Device; SourceDeviceItem = switchMapping.DeviceItem; SourceInputAction = switchMapping.InputAction; SourceInputActionMap = switchMapping.InputActionMap; SourcePlayfieldItem = switchMapping.PlayfieldItem; Destination = coilMapping.Destination == CoilDestination.Device ? WireDestination.Device : WireDestination.Playfield; DestinationDevice = coilMapping.Device; DestinationDeviceItem = coilMapping.DeviceItem; DestinationPlayfieldItem = coilMapping.PlayfieldItem; }
public void RemoveSwitch(MappingsSwitchData data) { Switches = Switches.Except(new[] { data }).ToArray(); }
public void AddSwitch(MappingsSwitchData data) { Switches = Switches.Append(data).ToArray(); }