Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the FlowSortedList
 /// that contains elements copied from the specified collection and has sufficient
 /// capacity to accommodate the number of elements copied.
 /// </summary>
 /// <param name="listToCopy">The collection whose elements are copied to the new list.</param>
 public FlowSortedList(FlowSortedList <T> listToCopy, IComparer <T> comp)
     : this(listToCopy)
 {
     if (comp == null)
     {
         comp = Comparer <T> .Default;
     }
     Sort(comp);
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the FlowSortedList with the default comparer System.Collections.Generic.Comparer&#60;T&#62;.Default.
        /// </summary>
        public FlowSortedList()
        {
            comparer  = Comparer <T> .Default;
            ItemAdded = new FlowSortedList <T> .SingleChangedDelegate(FlowSortedList_ItemAdded);

            ItemRemoved = new FlowSortedList <T> .SingleChangedDelegate(FlowSortedList_ItemRemoved);

            ItemsRemoved = new FlowSortedList <T> .ClearedDelegate(FlowSortedList_ItemsRemoved);

            ItemsSorted = new FlowSortedList <T> .SortedDelegate(FlowSortedList_ItemsSorted);
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the FlowSortedList
 /// that contains elements copied from the specified collection and has sufficient
 /// capacity to accommodate the number of elements copied.
 /// </summary>
 /// <param name="listToCopy">The collection whose elements are copied to the new list.</param>
 /// <param name="comp">
 /// The System.Collections.Generic.IComparer<T> implementation to use when comparing
 /// elements, or null to use the default comparer System.Collections.Generic.Comparer<T>.Default.
 /// </param>
 public FlowSortedList(FlowSortedList <T> listToCopy)
     : this()
 {
     list1 = new List <T>(listToCopy.list1);
 }