示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
            }
        }
示例#5
0
 public abstract bool MoveNext(ref JSNodeTraversalArrayRecordState state);