Yaml.ParseStream.Next C# (CSharp) Method

Next() public method

Move to the next character in the parse stream.
public Next ( ) : void
return void
		public new void Next ()
		{
			Next (false);
		}

Same methods

ParseStream::Next ( bool dropLastNewLine ) : void

Usage Example

Exemplo n.º 1
0
        /// <summary>
        ///   Parse the time (hours, minutes, seconds)
        /// </summary>
        private void ParseTime(ParseStream stream,
                               out int hour, out int minutes, out int seconds)
        {
            if (stream.Char == 't' || stream.Char == 'T')
            {
                stream.Next(true);
            }
            else
            {
                SkipWhitespace(stream);
            }

            // Parse hour
            // Note: A hour can be represented by one or two digits.
            string hulp = "";

            while (stream.Char >= '0' && stream.Char <= '9' &&
                   !stream.EOF && hulp.Length <= 2)
            {
                hulp += stream.Char;
                stream.Next(true);
            }
            hour = Int32.Parse(hulp);

            SkipChar(stream, ':');

            // Parse minutes
            minutes = ParseNumber(stream, 2);
            SkipChar(stream, ':');

            // Parse seconds
            seconds = ParseNumber(stream, 2);
        }
All Usage Examples Of Yaml.ParseStream::Next