상속: System.EventArgs
예제 #1
0
        private void OnComment(object sender, HtmlParserCommentEventArgs e) {
            // Add comment to comment collection, not to the tree. Comments
            // require special handling in incremental change handling.
            // This way we can treat them similarly to server artifacts
            // and analyze separately from regular elements.

            // Generally change in comments requires full parse. However, parser does
            // can discover comments in the range it is currently parsing during
            // incremental tree updates. Collection will determine if comment
            // is already in the collection and ignore the add.

            _tree.CommentCollection.Add(e.CommentToken);
        }
예제 #2
0
        void OnComment(object sender, HtmlParserCommentEventArgs e) {
            var c = e.CommentToken;
            var text = _parser.Text;

            Log.AppendFormat("OnComment: @[{0} ... {1}] '{2}'\r\n", c.Start, c.End, text.GetText(c));
            foreach (var t in c) {
                AppendToken("\t", t);
            }
            Log.Append("\r\n");
        }