/// <summary> /// Create an instance of the correct parser type for a given log file. /// </summary> /// <param name="fileName">The logfile to be parsed.</param> /// <returns>Parser that can parse the log.</returns> public IParser GetParser(string fileName) { var parserBuilder = GetParserBuilder(fileName); var fileContext = new LogFileContext(fileName, rootLogLocation); return(parserBuilder.GetParser(fileContext)); }
/// <summary> /// Create an instance of the correct parser type for a given log file. /// </summary> /// <param name="fileContext">Context object for the logfile to be parsed.</param> /// <returns>Parser that can parse the log.</returns> public IParser GetParser(LogFileContext fileContext) { var parserBuilder = GetParserBuilder(fileContext.FilePath); return(parserBuilder.GetParser(fileContext)); }