Example #1
0
        public IEnumerator <TElement> GetEnumerator()
        {
            Buffer <TElement> buffer = new Buffer <TElement>(this.source);

            if (buffer.count > 0)
            {
                EnumerableSorter <TElement> enumerableSorter = this.GetEnumerableSorter(null);
                int[] array = enumerableSorter.Sort(buffer.items, buffer.count);
                enumerableSorter = null;
                for (int i = 0; i < buffer.count; i++)
                {
                    yield return(buffer.items[array[i]]);
                }
            }
            yield break;
        }
Example #2
0
 internal abstract EnumerableSorter <TElement> GetEnumerableSorter(EnumerableSorter <TElement> next);