private TransactionSetDto CreateTransactionSet(string fileName, List<string> allLines, List<TransactionDto> transactions)
{
var header = allLines[0];
if (string.IsNullOrWhiteSpace(header))
{
throw new DataFormatException("The Budget Analyser file does not have a valid header row.");
}
string[] headerSplit = header.Split(',');
var transactionSet = new TransactionSetDto
{
Checksum = this.importUtilities.FetchLong(headerSplit, 3),
StorageKey = fileName,
LastImport = this.importUtilities.FetchDate(headerSplit, 4),
Transactions = transactions,
VersionHash = this.importUtilities.FetchString(headerSplit, 1)
};
return transactionSet;
}