NLog.Targets.ColoredConsoleTarget.GetMatchingRowHighlightingRule C# (CSharp) Method

GetMatchingRowHighlightingRule() private method

private GetMatchingRowHighlightingRule ( LogEventInfo logEvent ) : NLog.Targets.ConsoleRowHighlightingRule
logEvent LogEventInfo
return NLog.Targets.ConsoleRowHighlightingRule
        private ConsoleRowHighlightingRule GetMatchingRowHighlightingRule(LogEventInfo logEvent)
        {
            foreach (ConsoleRowHighlightingRule rule in this.RowHighlightingRules)
            {
                if (rule.CheckCondition(logEvent))
                    return rule;
            }

            if (this.UseDefaultRowHighlightingRules)
            {
                foreach (ConsoleRowHighlightingRule rule in DefaultConsoleRowHighlightingRules)
                {
                    if (rule.CheckCondition(logEvent))
                        return rule;
                }
            }

            return ConsoleRowHighlightingRule.Default;
        }