public void Add(IBackable backable) { if (backable == null) { throw new ArgumentNullException("Backable can't be null"); } var position = _backables.FindIndex(item => item == backable); if (position >= 0) { if (position < (_backables.Count - 1)) { _backables.RemoveAt(position); _backables.Add(backable); } } else { _backables.Add(backable); } }
public void Remove(IBackable obj) { _backables.Remove(obj); }