ConditionalExpression.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System.Text;
  2. namespace System.Linq.Expressions
  3. {
  4. public sealed class ConditionalExpression : Expression
  5. {
  6. #region .ctor
  7. internal ConditionalExpression(Expression test, Expression ifTrue, Expression ifFalse, Type type)
  8. : base(ExpressionType.Conditional, type)
  9. {
  10. this.test = test;
  11. this.ifTrue = ifTrue;
  12. this.ifFalse = ifFalse;
  13. }
  14. #endregion
  15. #region Fields
  16. private Expression ifFalse;
  17. private Expression ifTrue;
  18. private Expression test;
  19. #endregion
  20. #region Properties
  21. public Expression IfFalse
  22. {
  23. get { return ifFalse; }
  24. }
  25. public Expression IfTrue
  26. {
  27. get { return ifTrue; }
  28. }
  29. public Expression Test
  30. {
  31. get { return test; }
  32. }
  33. #endregion
  34. #region Internal Methods
  35. internal override void BuildString(StringBuilder builder)
  36. {
  37. //TODO:
  38. }
  39. #endregion
  40. }
  41. }