internal BidirectionalList(AddedDelegate <T> onAdded = null, RemovedDelegate <T> onRemoved = null)
     : this(new List <T>(), onAdded, onRemoved)
 {
 }
 internal BidirectionalList(IList <T> items, AddedDelegate <T> onAdded = null, RemovedDelegate <T> onRemoved = null)
 {
     _items    = items;
     OnAdded   = onAdded ?? delegate { };
     OnRemoved = onRemoved ?? delegate { };
 }
 /// <summary>
 /// Returns the <paramref name="items"/> wrapped in the <see cref="BidirectionalList{T}"/>.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="items"></param>
 /// <param name="onAdded"></param>
 /// <param name="onRemoved"></param>
 /// <returns></returns>
 public static IBidirectionalList <T> ToBidirectionalList <T>(this IList <T> items,
                                                              AddedDelegate <T> onAdded = null, RemovedDelegate <T> onRemoved = null)
 {
     return(new BidirectionalList <T>(items, onAdded, onRemoved));
 }