BudgetAnalyser.Engine.Services.TransactionRuleService.Match C# (CSharp) Method

Match() public method

public Match ( IEnumerable transactions ) : bool
transactions IEnumerable
return bool
        public bool Match(IEnumerable<Transaction> transactions)
        {
            var matchesMade = this.matchmaker.Match(transactions, MatchingRules);
            this.logger.LogInfo(l => "TransactionRuleService: Removing any SingleUseRules that have been used.");
            foreach (var rule in MatchingRules.OfType<SingleUseMatchingRule>().ToList())
            {
                if (rule.MatchCount > 0)
                {
                    RemoveRule(rule);
                }
            }
            return matchesMade;
        }