Ejemplo n.º 1
0
        private static bool IsValidInterests(_ByteEnum <Interests> column, DataRow dataRow)
        {
            var interests = column[dataRow];

            if (interests == null)
            {
                return(true);
            }

            var value = interests.Value;
            var count = 0;

            while (value != 0)
            {
                value = value & (value - 1);
                count++;
            }
            return(count >= 3);
        }
Ejemplo n.º 2
0
        private static _Boolean IsValid(_ByteEnum <SalesOrderStatus> status)
        {
            var byteExpr = (_Byte)status;

            return(byteExpr >= _Byte.Const(1) & byteExpr <= _Byte.Const(6));
        }
Ejemplo n.º 3
0
 internal static SqlType ByteEnum <T>(_ByteEnum <T> column)
     where T : struct, IConvertible
 {
     return(new ByteEnumType <T>(column));
 }
Ejemplo n.º 4
0
 public ByteEnumType(_ByteEnum <T> column)
 {
     Column = column;
 }