refactor: rearrange and add solution for 4-series

This commit is contained in:
Andrew Welker
2023-02-07 15:45:01 -07:00
parent 7a9f76ee12
commit 0d515e5f0a
649 changed files with 45907 additions and 105752 deletions

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Basically a List , with an indexer to find feedbacks by key name
/// </summary>
public class FeedbackCollection<T> : List<T> where T : Feedback
{
/// <summary>
/// Case-insensitive port lookup linked to feedbacks' keys
/// </summary>
public T this[string key]
{
get
{
return this.FirstOrDefault(i => i.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
}
}
}
}