Yaml.ParseStream.DontStop C# (CSharp) Méthode

DontStop() public méthode

Unset the characters where we should stop.
public DontStop ( ) : void
Résultat void
		public void DontStop ()
		{
			if (stopstack.Count > 0)
				stopstack.Pop ();
			else
				throw new Exception ("Called DontStop without " +
						"calling StopAt before");
		}

Usage Example

Exemple #1
0
        /// <summary>
        ///   Parses a String surrounded with double quotes
        /// </summary>
        private string ParseDoubleQuoted(ParseStream stream)
        {
            System.Text.StringBuilder builder = new System.Text.StringBuilder();

            // Skip '"'
            stream.Next();

            // Stop at "
            stream.StopAt(new char [] { '\"' });

            while (!stream.EOF)
            {
                if (stream.Char == '\n')
                {
                    builder.Append(' ');
                    stream.Next();
                }
                else
                {
                    builder.Append(NextUnescapedChar(stream));
                }
            }

            // Don't stop at "
            stream.DontStop();

            // Skip '"'
            if (stream.Char != '\"')
            {
                throw new ParseException(stream,
                                         "Double quoted string not closed");
            }
            else
            {
                stream.Next(true);
            }

            return(builder.ToString());
        }
All Usage Examples Of Yaml.ParseStream::DontStop