using System;
using System.Collections.Generic;
using System.Linq;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
///
/// Basically a List , with an indexer to find ports by key name
///
public class RoutingPortCollection : List where T: RoutingPort
{
///
/// Case-insensitive port lookup linked to ports' keys
///
public T this[string key]
{
get
{
return this.FirstOrDefault(i => i.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
}
}
}
}