From 3ee8cb7ea3f18d82da4f793e8ae55577beee5dbd Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Fri, 3 May 2024 13:34:22 -0600 Subject: [PATCH] feat: updates IHasInput to remove requirement for SetInputs method (unnecessary) --- .../DeviceTypeInterfaces/IHasInputs.cs | 6 ++---- .../DeviceTypeInterfaces/ISelectableItems.cs | 2 +- .../PartitionSensor/EssentialsPartitionController.cs | 2 +- .../Displays/MockDisplayInputs.cs | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasInputs.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasInputs.cs index ef806d9a..3a9ac617 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasInputs.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasInputs.cs @@ -15,10 +15,8 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces /// /// See MockDisplay for example implemntation /// - public interface IHasInputs: IKeyName + public interface IHasInputs: IKeyName { - ISelectableItems Inputs { get; } - - void SetInput(TSelector selector); + ISelectableItems Inputs { get; } } } diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItems.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItems.cs index c1451afb..0d3968df 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItems.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItems.cs @@ -17,6 +17,6 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces Dictionary Items { get; set; } [JsonProperty("currentItem")] - string CurrentItem { get; set; } + TKey CurrentItem { get; set; } } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs b/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs index 52d93162..213cb835 100644 --- a/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs +++ b/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs @@ -64,7 +64,7 @@ namespace PepperDash.Essentials.Core SetManualMode(); } } - else + else { SetManualMode(); } diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplayInputs.cs b/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplayInputs.cs index f6fb7bc0..5013913c 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplayInputs.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplayInputs.cs @@ -54,8 +54,7 @@ namespace PepperDash.Essentials.Devices.Common.Displays public class MockDisplayInput : ISelectableItem { - private IHasInputs _parent; - + private MockDisplay _parent; private bool _isSelected;