Beispiel #1
0
        public static bool ContainsAll(this System.Enum e, params System.Enum[] values)
        {
            if (values.IsNull())
            {
                throw new System.NullReferenceException();
            }
            var contains = true;

            foreach (var value in values)
            {
                contains &= e.Contains(value);
            }
            return(contains);
        }
Beispiel #2
0
 public static bool ContainsAny(this System.Enum e, params System.Enum[] values)
 {
     if (values.IsNull())
     {
         throw new System.NullReferenceException();
     }
     foreach (var value in values)
     {
         if (e.Contains(value))
         {
             return(true);
         }
     }
     return(false);
 }