コード例 #1
0
        /// <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);
        }
コード例 #2
0
ファイル: Parser.cs プロジェクト: ChelseaLing/AssetGraph
		/// <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;
		}