MigSharp.DbAltererOptions.IsWarningSuppressed C# (CSharp) Method

IsWarningSuppressed() private method

private IsWarningSuppressed ( DbPlatform dbPlatform, DbType type, int size, int scale ) : bool
dbPlatform DbPlatform
type DbType
size int
scale int
return bool
        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;
        }