//add log here public void Analyze(RawFileName rawfile, UIsettings fixedSettings, SettingsForAnalysis fixedSettingsForAnalysis, IProgress <DataRow> resultRow) { if (IsFileLocked(rawfile.FullName)) { Log.Error("[" + rawfile.FullName + "] CRITICAL problem: file locked by another process! Skipping file"); } else if (IsNotRawfile(rawfile.FullName)) { Log.Error("[" + rawfile.FullName + "] CRITICAL problem: raw file corrupt! Skipping file"); } else { Log.Information("[" + rawfile.FullName + "] Main analysis started"); rawfile.SetCategories(fixedSettings.UserList, fixedSettings.LcList, fixedSettings.MsList, fixedSettings.SamplesList); SetRawFileHistory(rawfile, fixedSettings);//This is a mess with the class lines if (rawfile.SomethingWrongWithFileName) { Log.Warning("[" + rawfile.FullName + "] Please check file naming convention: parse rules and filename do not align."); } using (ResultItems results = new ResultItems()) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); MainAnalysisThreadedTask(rawfile, fixedSettingsForAnalysis, fixedSettings, results); Log.Information("[" + rawfile.FullName + "] Main analysis finished in " + stopwatch.Elapsed.TotalMinutes.ToString("0.00") + " minutes"); DoEmailResults(rawfile, fixedSettings, results); DoSqlUpdateResults(rawfile, fixedSettings, results); DoSaveResultsToFile(fixedSettings, results); AddResultRowToDataTable(results.Names, results.Results, results.Types, fixedSettings, resultRow); } } }
public string TryParseRawFile(UIsettings uisettings) { RawFileName rawfile = new RawFileName(uisettings.RawFileTestName); rawfile.SetCategories(uisettings.UserList, uisettings.LcList, uisettings.MsList, uisettings.SamplesList); return(rawfile.ReadCategories()); }