BudgetAnalyser.Engine.Statement.InMemoryTransactionTypeRepository.GetOrCreateNew C# (CSharp) Method

GetOrCreateNew() public method

Gets or creates a TransactionType based on the name provided.
public GetOrCreateNew ( string name ) : TransactionType
name string
return TransactionType
        public TransactionType GetOrCreateNew(string name)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                return null;
            }

            return this.transactionTypes.GetOrAdd(name, n => new NamedTransaction(n));
        }
    }
InMemoryTransactionTypeRepository