public bool TryGetMonthReports(FileData data, out TransactionReport report) { report = new TransactionReport() { Transactions = new List <Transaction>() }; string header = data.Lines.FirstOrDefault(); bool canParse = CheckIfValidFile(header); if (!canParse) { return(false); } for (int i = 1; i < data.Lines.Count; i++) { string line = data.Lines[i]; TransactionItem item = GetFromLine(line); if (item.IsNullObj()) { continue; } Transaction transaction = CreateFromTransactionItem(item); if (transaction.IsNullObj()) { continue; } report.Transactions.Add(transaction); } return(true); }