internal bool IsWarningSuppressed(DbPlatform dbPlatform, DbType type, int? size, int? scale)
{
foreach (Suppression suppression in _warningSuppressions
.Where(s => s.DbPlatform.Matches(dbPlatform) && s.Type == type))
{
switch (suppression.Condition)
{
case SuppressCondition.WhenSpecifiedWithoutSize:
if (!size.HasValue) return true;
break;
case SuppressCondition.WhenSpecifiedWithSize:
if (size.HasValue && !scale.HasValue) return true;
break;
case SuppressCondition.WhenSpecifiedWithSizeAndScale:
if (size.HasValue && scale.HasValue) return true;
break;
case SuppressCondition.Always:
return true;
default:
continue;
}
}
return false;
}