MethodCallExpression.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System.Collections.ObjectModel;
  2. using System.Reflection;
  3. using System.Text;
  4. namespace System.Linq.Expressions
  5. {
  6. public sealed class MethodCallExpression : Expression
  7. {
  8. #region .ctor
  9. internal MethodCallExpression(ExpressionType type, MethodInfo method, Expression obj, ReadOnlyCollection<Expression> arguments)
  10. : base(type, method.ReturnType)
  11. {
  12. this.obj = obj;
  13. this.method = method;
  14. this.arguments = arguments;
  15. }
  16. #endregion
  17. #region Fields
  18. private ReadOnlyCollection<Expression> arguments;
  19. private MethodInfo method;
  20. private Expression obj;
  21. #endregion
  22. #region Properties
  23. public ReadOnlyCollection<Expression> Arguments
  24. {
  25. get { return arguments; }
  26. }
  27. public MethodInfo Method
  28. {
  29. get { return method; }
  30. }
  31. public Expression Object
  32. {
  33. get { return obj; }
  34. }
  35. #endregion
  36. #region Internal Methods
  37. internal override void BuildString(StringBuilder builder)
  38. {
  39. //TODO:
  40. }
  41. #endregion
  42. }
  43. }