/// <summary> /// Moves to the next event. /// </summary> /// <returns>Returns true if there are more events available, otherwise returns false.</returns> public bool MoveNext() { // No events after the end of the stream or error. if (state == ParserState.StreamEnd) { current = null; return(false); } else if (pendingEvents.Count == 0) { // Generate the next event. pendingEvents.Enqueue(StateMachine()); } current = pendingEvents.Dequeue(); return(true); }
/// <summary> /// Moves to the next event. /// </summary> /// <returns>Returns true if there are more events available, otherwise returns false.</returns> public bool MoveNext() { // No events after the end of the stream or error. if (state == ParserState.StreamEnd) { current = null; return false; } else if (pendingEvents.Count == 0) { // Generate the next event. pendingEvents.Enqueue(StateMachine()); } current = pendingEvents.Dequeue(); return true; }