Beispiel #1
0
        /// <summary>
        /// Occurs after a line was read from the <see cref="TextReader"/> and returns a new <see cref="LogLine"/> object.
        /// </summary>
        /// <param name="line">The line read from the <see cref="TextReader"/>.</param>
        /// <param name="index">The index of the line read from the <see cref="TextReader"/>.</param>
        /// <returns>A new <see cref="LogLine"/> object from the string line and line index.</returns>
        protected override LogLine OnReadLine(string line, int index)
        {
            LogLineType lineType = LogLineTypeResolver.Resolve(line);
            LogLineTimeStampParserFunction timeStampParser = LogLineTimeStampParser.ParseTimeStamp;

            LogLineDataParserDictionary.TryGetValue(lineType, out LogLineDataParserFunction dataParser);
            return(new LazyLogLine(line, index, lineType, timeStampParser, dataParser));
        }