UtilConstants.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Ant.DbExpressions;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Linq.Expressions;
  6. using System.Text;
  7. namespace Ant.Utility
  8. {
  9. static class UtilConstants
  10. {
  11. public const string DefaultTableAlias = "T";
  12. public const string DefaultColumnAlias = "C";
  13. public static readonly Type TypeOfVoid = typeof(void);
  14. public static readonly Type TypeOfInt16 = typeof(Int16);
  15. public static readonly Type TypeOfInt32 = typeof(Int32);
  16. public static readonly Type TypeOfInt64 = typeof(Int64);
  17. public static readonly Type TypeOfDecimal = typeof(Decimal);
  18. public static readonly Type TypeOfDouble = typeof(Double);
  19. public static readonly Type TypeOfSingle = typeof(Single);
  20. public static readonly Type TypeOfBoolean = typeof(Boolean);
  21. public static readonly Type TypeOfBoolean_Nullable = typeof(Boolean?);
  22. public static readonly Type TypeOfDateTime = typeof(DateTime);
  23. public static readonly Type TypeOfGuid = typeof(Guid);
  24. public static readonly Type TypeOfByte = typeof(Byte);
  25. public static readonly Type TypeOfChar = typeof(Char);
  26. public static readonly Type TypeOfString = typeof(String);
  27. public static readonly Type TypeOfObject = typeof(Object);
  28. public static readonly Type TypeOfByteArray = typeof(Byte[]);
  29. public static readonly ConstantExpression Constant_Null_Boolean = Expression.Constant(null, typeof(Boolean?));
  30. public static readonly ConstantExpression Constant_True = Expression.Constant(true);
  31. public static readonly ConstantExpression Constant_False = Expression.Constant(false);
  32. public static readonly UnaryExpression Convert_TrueToNullable = Expression.Convert(Expression.Constant(true), typeof(Boolean?));
  33. public static readonly UnaryExpression Convert_FalseToNullable = Expression.Convert(Expression.Constant(false), typeof(Boolean?));
  34. }
  35. }