Exemplo n.º 1
0
        public static BitMask EnumMask <T>(bool defaultValue = false) where T : struct, IComparable, IConvertible, IFormattable
        {
            DebugUtils.AssertIsEnumType <T>();

            BitMask mask = new BitMask(EnumUtils.GetCount(typeof(T)));

            if (defaultValue)
            {
                mask.SetAllFlags(true);
            }

            return(mask);
        }