private void StackCheck(Token token) { DropStackToTag(); switch (token.Type) { case HtmlNodeType.ClosedTag: case HtmlNodeType.Comment: case HtmlNodeType.Text: case HtmlNodeType.Whitespace: { if (HtmlNodeType.Tag == _nestedTokens.Top.Type) { _nestedTokens.Push(token); } else { _nestedTokens.Swap(token); } break; } case HtmlNodeType.Tag: { if (!Tag.IsAtomic(token.Name)) { _nestedTokens.Push(token); } else { _nestedTokens.Swap(token); } break; } case HtmlNodeType.EndTag: { _nestedTokens.Push(token); break; } default: throw new HtmlException(RD.GetString("tagUnknown")); } }
public override void RemoveAt(int pos) { throw new NotSupportedException(RD.GetString("readOnlyCollection")); }
public override void Remove(HtmlNode x) { throw new NotSupportedException(RD.GetString("readOnlyCollection")); }
public override void Insert(int pos, HtmlNode x) { throw new NotSupportedException(RD.GetString("readOnlyCollection")); }
public override void Clear() { throw new NotSupportedException(RD.GetString("readOnlyCollection")); }
public override int AddRange(HtmlNode[] x) { throw new NotSupportedException(RD.GetString("readOnlyCollection")); }
public override int Add(HtmlAttribute x) { throw new NotSupportedException(RD.GetString("readOnlyCollection")); }