Esempio n. 1
0
 public HtmlTextReader(TextReader textReader)
 {
     if (textReader is null)
     {
         throw new ArgumentNullException(nameof(textReader));
     }
     TextTokenizer.TextReader = textReader;
     TextTokenizer.Characters.Add(HtmlKeyword.LeftAngleBracket, HtmlTokenType.LeftAngleBracket);
     TextTokenizer.Characters.Add(HtmlKeyword.RightAngleBracket, HtmlTokenType.RightAngleBracket);
     TextTokenizer.Characters.Add(HtmlKeyword.EqualSign, HtmlTokenType.EqualSign);
     TextTokenizer.AddSymbol(HtmlKeyword.DefineTag, HtmlTokenType.DefineTag);
     TextTokenizer.AddSymbol(HtmlKeyword.SingleTag, HtmlTokenType.SingleTag);
     TextTokenizer.AddSymbol(HtmlKeyword.EndTag, HtmlTokenType.EndTag);
     TextTokenizer.AddBlock(HtmlTokenType.BlockComment, HtmlKeyword.BlockCommentHead, HtmlKeyword.BlockCommentTail);
     TextTokenizer.AllowCharactersBreakKeyword = false;
     TextTokenizer.BreakKeywordCharacters.Add(HtmlKeyword.EqualSign);
     TextTokenizer.BreakKeywordCharacters.Add(HtmlKeyword.Slash);
     TextTokenizer.BreakKeywordCharacters.Add(HtmlKeyword.RightAngleBracket);
 }