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); }
private static _Boolean IsValid(_ByteEnum <SalesOrderStatus> status) { var byteExpr = (_Byte)status; return(byteExpr >= _Byte.Const(1) & byteExpr <= _Byte.Const(6)); }
internal static SqlType ByteEnum <T>(_ByteEnum <T> column) where T : struct, IConvertible { return(new ByteEnumType <T>(column)); }
public ByteEnumType(_ByteEnum <T> column) { Column = column; }