Esempio n. 1
0
        /// <summary>
        /// Constructs new parser object
        /// </summary>
        /// <param name="text">Text to be parsed</param>
        /// <param name="handler">Handler object that gets informed about parsed content</param>
        /// <param name="maxLine">Maximal line number, after which the parser should stop</param>
        /// <param name="maxIndex">Maximal column number, after which the parser should stop</param>
        public Parser(string text, IAspxHandler handler, int maxLine, int maxIndex)
        {
            if (text == null)
            {
                throw new ArgumentNullException("text");
            }
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }

            this.text     = text;
            this.handler  = handler;
            this.maxIndex = maxIndex;
            this.maxLine  = maxLine;
        }
Esempio n. 2
0
 /// <summary>
 /// Constructs new parser object with no limitations
 /// </summary>
 /// <param name="text">Text to be parsed</param>
 /// <param name="handler">Handler object that gets informed about parsed content</param>
 public Parser(string text, IAspxHandler handler) : this(text, handler, int.MaxValue, int.MaxValue)
 {
 }