BudgetAnalyser.Engine.Statement.CsvOnDiskStatementModelRepositoryV1.CreateTransactionSet C# (CSharp) Method

CreateTransactionSet() private method

private CreateTransactionSet ( string fileName, List allLines, List transactions ) : TransactionSetDto
fileName string
allLines List
transactions List
return BudgetAnalyser.Engine.Statement.Data.TransactionSetDto
        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;
        }