private int GetMaximumOrderPrority(Type type, string propertyName)
{
if (Configuration.ExecuteOrderRules == null)
{
return 0;
}
var matchingRules = from x in Configuration.ExecuteOrderRules
where x.IsMatch(type, propertyName)
orderby x.Priority descending
select x;
var matchingRule = matchingRules.FirstOrDefault();
if (matchingRule == null)
{
return 0;
}
return matchingRule.Priority;
}