UtilConstants.cs 2.1 KB

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