InternalSort() protected method

protected InternalSort ( IComparer sorter ) : void
sorter IComparer
return void
コード例 #1
0
        public virtual EventDescriptorCollection Sort(IComparer comparer)
        {
            EventDescriptorCollection col = CloneCollection();

            col.InternalSort(comparer);
            return(col);
        }
コード例 #2
0
        public virtual EventDescriptorCollection Sort(string[] order)
        {
            EventDescriptorCollection col = CloneCollection();

            col.InternalSort(order);
            return(col);
        }
コード例 #3
0
        /// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, given a specified sort order.</summary>
        /// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
        /// <param name="names">An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in the collection. </param>
        public virtual EventDescriptorCollection Sort(string[] order)
        {
            EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();

            eventDescriptorCollection.InternalSort(order);
            return(eventDescriptorCollection);
        }
コード例 #4
0
        /// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, using the specified <see cref="T:System.Collections.IComparer" />.</summary>
        /// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
        /// <param name="comparer">An <see cref="T:System.Collections.IComparer" /> to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
        public virtual EventDescriptorCollection Sort(IComparer comparer)
        {
            EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();

            eventDescriptorCollection.InternalSort(comparer);
            return(eventDescriptorCollection);
        }
コード例 #5
0
        /// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, using the default sort for this collection, which is usually alphabetical.</summary>
        /// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
        public virtual EventDescriptorCollection Sort()
        {
            EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();

            eventDescriptorCollection.InternalSort(null);
            return(eventDescriptorCollection);
        }
コード例 #6
0
        /// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, using the default sort for this collection, which is usually alphabetical.</summary>
        /// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
        public virtual EventDescriptorCollection Sort()
        {
            EventDescriptorCollection eventDescriptorCollection = CloneCollection();

            eventDescriptorCollection.InternalSort((IComparer)null);
            return(eventDescriptorCollection);
        }
コード例 #7
0
        public virtual EventDescriptorCollection Sort(string[] order, IComparer comparer)
        {
            EventDescriptorCollection col = CloneCollection();

            if (order != null)
            {
                ArrayList sorted = col.ExtractItems(order);
                col.InternalSort(comparer);
                sorted.AddRange(col.eventList);
                col.eventList = sorted;
            }
            else
            {
                col.InternalSort(comparer);
            }
            return(col);
        }
コード例 #8
0
        /// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, given a specified sort order and an <see cref="T:System.Collections.IComparer" />.</summary>
        /// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
        /// <param name="names">An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in the collection. </param>
        /// <param name="comparer">An <see cref="T:System.Collections.IComparer" /> to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
        public virtual EventDescriptorCollection Sort(string[] order, IComparer comparer)
        {
            EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();

            if (order != null)
            {
                ArrayList arrayList = eventDescriptorCollection.ExtractItems(order);
                eventDescriptorCollection.InternalSort(comparer);
                arrayList.AddRange(eventDescriptorCollection.eventList);
                eventDescriptorCollection.eventList = arrayList;
            }
            else
            {
                eventDescriptorCollection.InternalSort(comparer);
            }
            return(eventDescriptorCollection);
        }