You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.5 KiB

2 years ago
  1. using System.Linq.Expressions;
  2. namespace SqlSugar
  3. {
  4. public class ExpressionParameter
  5. {
  6. public ExpressionContext Context { get; set; }
  7. public ExpressionParameter BaseParameter { get; set; }
  8. public Expression BaseExpression { get; set; }
  9. public Expression ChildExpression { get; set; }
  10. public Expression LeftExpression { get; set; }
  11. public Expression RightExpression { get; set; }
  12. public Expression CurrentExpression { get; set; }
  13. public string OperatorValue { get; set; }
  14. public bool? IsLeft { get; set; }
  15. public int Index { get; set; }
  16. public bool ValueIsNull { get; set; }
  17. public object CommonTempData { get; set; }
  18. public ExpressionResultAppendType AppendType { get; set; }
  19. public void IsAppendResult()
  20. {
  21. this.AppendType = ExpressionResultAppendType.AppendResult;
  22. }
  23. public void IsAppendTempDate()
  24. {
  25. this.AppendType = ExpressionResultAppendType.AppendTempDate;
  26. }
  27. public Expression OppsiteExpression
  28. {
  29. get
  30. {
  31. return this.IsLeft == true ? this.BaseParameter.RightExpression : this.BaseParameter.LeftExpression;
  32. }
  33. }
  34. public bool IsSetTempData
  35. {
  36. get
  37. {
  38. return BaseParameter.CommonTempData.HasValue() && BaseParameter.CommonTempData.Equals(CommonTempDataType.Result);
  39. }
  40. }
  41. }
  42. }