HtmlLexicalAnalyzer.SkipProcessingDirective C# (CSharp) Метод

SkipProcessingDirective() приватный Метод

skips processing directives starting with the characters '' NOTE: 10/14/2004: IE also ends processing directives with a />, so this function is being modified to recognize that condition as well
private SkipProcessingDirective ( ) : void
Результат void
    private void SkipProcessingDirective()
    {
        // verify that we are at a processing directive
        Debug.Assert(_nextCharacter == '<' && _lookAheadCharacter == '?');

        // advance twice, once to get the lookahead character and then to reach the start of the drective
        this.GetNextCharacter();
        this.GetNextCharacter();

        while (!((_nextCharacter == '?' || _nextCharacter == '/') && _lookAheadCharacter == '>') && !this.IsAtEndOfStream)
        {
            // advance
            // we don't need to check for entities here because '?' is not an entity
            // and even though > is an entity there is no entity processing when reading lookahead character
            this.GetNextCharacter();
        }

        if (!this.IsAtEndOfStream)
        {
            // advance, first to the last >
            this.GetNextCharacter();

            // then advance past it to the next character after processing directive
            this.GetNextCharacter();
        }
    }