Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@

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>
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface ILightingScenes

}

public interface ILightingScenesDynamic
public interface ILightingScenesDynamic : ILightingScenes
{
event EventHandler LightingScenesUpdated;
}
Expand Down