mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
feat: Adds TSelector generic type to IHasSurroundSoundModes
This commit is contained in:
@@ -11,8 +11,10 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
|||||||
/// Describes a device that has selectable surround sound modes
|
/// Describes a device that has selectable surround sound modes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TKey">the type to use as the key for each input item. Most likely an enum or string</typeparam>
|
/// <typeparam name="TKey">the type to use as the key for each input item. Most likely an enum or string</typeparam>
|
||||||
public interface IHasSurroundSoundModes<TKey>: IKeyName
|
public interface IHasSurroundSoundModes<TKey, TSelector>: IKeyName
|
||||||
{
|
{
|
||||||
ISelectableItems<TKey> SurroundSoundModes { get; }
|
ISelectableItems<TKey> SurroundSoundModes { get; }
|
||||||
|
|
||||||
|
void SetSurroundSoundMode(TSelector selector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,20 +10,20 @@ namespace PepperDash.Essentials.Devices.Common.Displays
|
|||||||
{
|
{
|
||||||
public class MockDisplayInputs : ISelectableItems<string>
|
public class MockDisplayInputs : ISelectableItems<string>
|
||||||
{
|
{
|
||||||
private Dictionary<string, ISelectableItem> _inputs;
|
private Dictionary<string, ISelectableItem> _items;
|
||||||
|
|
||||||
public Dictionary<string, ISelectableItem> Items
|
public Dictionary<string, ISelectableItem> Items
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return _inputs;
|
return _items;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_inputs == value)
|
if (_items == value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_inputs = value;
|
_items = value;
|
||||||
|
|
||||||
ItemsUpdated?.Invoke(this, null);
|
ItemsUpdated?.Invoke(this, null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user