Beispiel #1
0
            /// <summary>
            /// Initializes a new instance of the <see cref="LargeEnumerator"/> struct.
            /// Creates an instance that enumerates objects over a collection of segments.
            /// </summary>
            /// <param name="partition">The collection of segments enumerated by the new enumerator.</param>
            /// <param name="index">The index of the first item to enumerate.</param>
            /// <param name="count">The number of items to enumerate.</param>
            internal LargeEnumerator(IPartition <T> partition, long index, long count)
            {
                Partition = partition;

                int SegmentIndex;
                int ElementIndex;
                int CacheIndex;

                Partition.GetPosition(index, out SegmentIndex, out ElementIndex, out CacheIndex);

                Enumerator = Partition.GetEnumerator(SegmentIndex, ElementIndex);
                Count      = count;
            }