public override iCalObject Deserialize(TextReader tr, Type iCalendarType)
        {
            // Create a lexer for our text stream
            iCalLexer lexer = new iCalLexer(tr);
            iCalParser parser = new iCalParser(lexer);

            // Determine the calendar type we'll be using when constructing
            // iCalendar objects...
            parser.iCalendarType = iCalendarType;

            // Parse the iCalendar!
            DDay.iCal.iCalendar iCal = parser.icalobject();

            // Close our text stream
            tr.Close();

            // Return the parsed iCalendar
            return iCal;
        }
        public override iCalObject Deserialize(TextReader tr, Type iCalendarType)
        {
            // Normalize line endings, so "\r" is treated the same as "\r\n"
            // NOTE: fixed bug #1773194 - Some applications emit mixed line endings
            TextReader textReader = NormalizeLineEndings(tr, !OptimizeForSpeed);

            // Create a lexer for our text stream
            iCalLexer lexer = new iCalLexer(textReader);
            iCalParser parser = new iCalParser(lexer);

            // Determine the calendar type we'll be using when constructing
            // iCalendar objects...
            parser.iCalendarType = iCalendarType;

            // Parse the iCalendar!
            DDay.iCal.iCalendar iCal = parser.icalobject();

            // Close our text stream
            textReader.Close();

            // Return the parsed iCalendar
            return iCal;
        }