mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-06 08:16:11 +00:00
Removes essentials-framework as a submodule and brings the files back into the main repo
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user