Exemple #1
0
 /// <summary>
 /// Restarts intrinsic enumerator - moves it to the first item.
 /// </summary>
 /// <remarks>
 /// If the intrinsic enumerator has never been used on this instance nothing happens.
 /// </remarks>
 public void RestartIntrinsicEnumerator()
 {
     if (_intrinsicEnumerator != null)
     {
         _intrinsicEnumerator.MoveFirst();
     }
 }
Exemple #2
0
        /// <summary>
        /// Instantiate new PHP array's enumerator and advances its position to the first element.
        /// </summary>
        /// <returns><c>True</c> whether there is an first element.</returns>
        void InitArrayIteratorHelper()
        {
            Debug.Assert(_array != null);

            _arrayEnumerator = new OrderedDictionary.Enumerator(_array);
            _isValid         = _arrayEnumerator.MoveFirst();
        }
Exemple #3
0
 public virtual void rewind()
 {
     if (isArrayIterator)
     {
         _isValid = _arrayEnumerator.MoveFirst();
     }
     else if (isObjectIterator)
     {
         // isValid set by InitObjectIteratorHelper()
         InitObjectIteratorHelper(); // DObject enumerator does not support MoveFirst()
     }
 }
Exemple #4
0
 /// <summary>
 /// Restarts intrinsic enumerator - moves it to the first item.
 /// </summary>
 /// <remarks>
 /// If the intrinsic enumerator has never been used on this instance nothing happens.
 /// </remarks>
 public void RestartIntrinsicEnumerator()
 {
     _intrinsicEnumerator?.MoveFirst();
 }