BudgetAnalyser.Engine.Statement.AnzAccountStatementImporterV1.FetchTransactionType C# (CSharp) Method

FetchTransactionType() private method

private FetchTransactionType ( string array, decimal amount ) : TransactionType
array string
amount decimal
return TransactionType
        private TransactionType FetchTransactionType(string[] array, decimal amount)
        {
            var stringType = this.importUtilities.FetchString(array, TransactionTypeIndex);
            if (stringType.IsNothing())
            {
                return null;
            }

            if (TransactionTypes.ContainsKey(stringType))
            {
                return TransactionTypes[stringType];
            }

            var transactionType = new NamedTransaction(stringType, amount < 0);
            TransactionTypes.Add(stringType, transactionType);
            return transactionType;
        }