YamlDotNet.Core.Scanner.MoveNext C# (CSharp) 메소드

MoveNext() 공개 메소드

Moves to the next token.
public MoveNext ( ) : bool
리턴 bool
        public bool MoveNext()
        {
            if (Current != null)
            {
                ConsumeCurrent();
            }

            return MoveNextWithoutConsuming();
        }

Usage Example

예제 #1
0
        public void CommentsAreCorrectlyMarked()
        {
            var sut = new Scanner(Yaml.ReaderForText(@"
                - first # Comment on first item
            "), skipComments: false);

            while(sut.MoveNext())
            {
                var comment = sut.Current as Comment;
                if(comment != null)
                {
                    Assert.Equal(8, comment.Start.Index);
                    Assert.Equal(31, comment.End.Index);

                    return;
                }
            }

            Assert.True(false, "Did not find a comment");
        }
All Usage Examples Of YamlDotNet.Core.Scanner::MoveNext