/// <summary> /// Method to standardize credit card statement /// </summary> /// <param name="inputFile">input file path</param> /// <param name="outputFile">output file path</param> public void StandardizeStatement(string inputFile, string outputFile) { IReadWriteCsv readWriteCsv = ReadWriteCsv.GetInstance(inputFile); SortedDictionary <DateTime, List <StandardCCBillOutput> > outputStatement = readWriteCsv.ReadCSVFile(); Task.Factory.StartNew(() => readWriteCsv.WriteCSVFile(outputFile, outputStatement)).Wait(); }
public static ReadWriteCsv GetInstance(string inputFilePath) { lock (_lock) { if (_readWriteCsvInstance == null) { _readWriteCsvInstance = new ReadWriteCsv(inputFilePath); } return(_readWriteCsvInstance); } }