public string Process(IList <string> rawInput, string path, Resume resumeObj) { if (resumeObj == null) { var sectionExtractor = new SectionExtractor(); var sections = sectionExtractor.ExtractFrom(rawInput); IResourceLoader resourceLoader = new CachedResourceLoader(new ResourceLoader()); var resumeBuilder = new ResumeBuilder(resourceLoader); var resume = resumeBuilder.Build(sections); resume.Skills = resume.Skills.Distinct().ToList(); resumeParserData.InsertCandidate(resume, path); var formatted = _outputFormatter.Format(resume); return(formatted); } else { return(_outputFormatter.Format(resumeObj)); } }
public string Process(string location) { try { var rawInput = _inputReaders.ReadIntoList(location); var sectionExtractor = new SectionExtractor(); var sections = sectionExtractor.ExtractFrom(rawInput); IResourceLoader resourceLoader = new CachedResourceLoader(new ResourceLoader()); var resumeBuilder = new ResumeBuilder(resourceLoader); var resume = resumeBuilder.Build(sections); var formatted = _outputFormatter.Format(resume); return(formatted); } catch (IOException ex) { throw new ResumeParserException("There's a problem accessing the file, it might still being opened by other application", ex); } }