2021-11-20 13:52:28 +01:00
|
|
|
namespace zero.Configuration;
|
2021-11-19 14:59:24 +01:00
|
|
|
|
|
|
|
|
public abstract class OptionsEnumerable<T>
|
|
|
|
|
{
|
|
|
|
|
protected List<T> Items { get; set; } = new List<T>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public IReadOnlyCollection<T> GetAllItems()
|
|
|
|
|
{
|
|
|
|
|
return Items.AsReadOnly();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void RemoveAt(int index)
|
|
|
|
|
{
|
|
|
|
|
Items.RemoveAt(index);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool Remove(T item)
|
|
|
|
|
{
|
|
|
|
|
return Items.Remove(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public interface IOptionsEnumerable { }
|