internal Enumerator(CircularBuffer <T> circularBuffer, long targetCount) { this.Current = null; this.items = null; this.circularBuffer = circularBuffer; this.targetCount = targetCount; this.itemIndex = 0; this.moveNextFunc = MoveNextCircularBuffer; }
internal Enumerator(T[] items, long targetCount) { this.Current = null; this.circularBuffer = null; this.items = items; this.targetCount = targetCount; this.itemIndex = 0; this.moveNextFunc = MoveNextArray; }
internal Enumerator(T item) { this.Current = item; this.circularBuffer = null; this.items = null; this.targetCount = -1; this.itemIndex = 0; this.moveNextFunc = MoveNextSingleItem; }