public override bool MoveNext(ref JSNodeTraversalArrayRecordState state) { if (Delegate((JSNode)state.UserData, state.Index, out state.CurrentNode, out state.CurrentName)) { state.Index += 1; return(true); } return(false); }
public override bool MoveNext(ref JSNodeTraversalArrayRecordState state) { var array = (T[])state.UserData; if (array == null) { return(false); } if (state.Index >= array.Length) { return(false); } state.CurrentNode = array[state.Index]; state.CurrentName = Name; state.Index += 1; return(true); }
public override bool MoveNext(ref JSNodeTraversalArrayRecordState state) { var list = (List <T>)state.UserData; if (list == null) { return(false); } if (state.Index >= list.Count) { return(false); } state.CurrentNode = list[state.Index]; state.CurrentName = Name; state.Index += 1; return(true); }
public override bool MoveNext(ref JSNodeTraversalArrayRecordState state) { var enumerator = (IEnumerator <T>)state.UserData; if (enumerator == null) { return(false); } if (enumerator.MoveNext()) { state.CurrentNode = enumerator.Current; state.CurrentName = Name; return(true); } else { enumerator.Dispose(); state.UserData = null; return(false); } }
public abstract bool MoveNext(ref JSNodeTraversalArrayRecordState state);