mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 20:24:57 +00:00
Merge branch 'selectable-items-interfaces' into lighting-interface-fix
This commit is contained in:
@@ -4,19 +4,24 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||||
{
|
{
|
||||||
/// <summary>
|
public interface ISelectableItems<TKey, TValue> where TValue : ISelectableItem
|
||||||
/// 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>
|
|
||||||
{
|
{
|
||||||
event EventHandler ItemsUpdated;
|
event EventHandler ItemsUpdated;
|
||||||
event EventHandler CurrentItemChanged;
|
event EventHandler CurrentItemChanged;
|
||||||
|
|
||||||
[JsonProperty("items")]
|
[JsonProperty("items")]
|
||||||
Dictionary<TKey, ISelectableItem> Items { get; set; }
|
Dictionary<TKey, TValue> Items { get; set; }
|
||||||
|
|
||||||
[JsonProperty("currentItem")]
|
[JsonProperty("currentItem")]
|
||||||
TKey CurrentItem { get; set; }
|
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>
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user