Merge pull request #1256 from PepperDash/lighting-interface-fix

fix: ILightingScenesDynamic inherits from ILightingScenes
This commit is contained in:
Andrew Welker
2025-04-18 12:44:12 -05:00
committed by GitHub
2 changed files with 12 additions and 7 deletions

View File

@@ -4,19 +4,24 @@ using System.Collections.Generic;
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
{
/// <summary>
/// Describes a collection of items that can be selected
/// </summary>
/// <typeparam name="TKey">type for the keys in the collection. Probably a string or enum</typeparam>
public interface ISelectableItems<TKey>
public interface ISelectableItems<TKey, TValue> where TValue : ISelectableItem
{
event EventHandler ItemsUpdated;
event EventHandler CurrentItemChanged;
[JsonProperty("items")]
Dictionary<TKey, ISelectableItem> Items { get; set; }
Dictionary<TKey, TValue> Items { get; set; }
[JsonProperty("currentItem")]
TKey CurrentItem { get; set; }
}
/// <summary>
/// Describes a collection of items that can be selected
/// </summary>
/// <typeparam name="TKey">type for the keys in the collection. Probably a string or enum</typeparam>
public interface ISelectableItems<TKey> : ISelectableItems<TKey, ISelectableItem>
{
}
}

View File

@@ -18,7 +18,7 @@ namespace PepperDash.Essentials.Core.Lighting
}
public interface ILightingScenesDynamic
public interface ILightingScenesDynamic : ILightingScenes
{
event EventHandler LightingScenesUpdated;
}