CodeMethodInvokeStatement.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //
  2. // System.CodeDom CodeMethodInvokeStatement Class implementation
  3. //
  4. // Author:
  5. // Miguel de Icaza ([email protected])
  6. //
  7. // (C) 2001 Ximian, Inc.
  8. //
  9. namespace System.CodeDom {
  10. public class CodeMethodInvokeStatement : CodeStatement {
  11. string methodName;
  12. CodeExpression targetObject;
  13. CodeExpressionCollection parameters;
  14. CodeMethodInvokeExpression methodInvoke;
  15. //
  16. // Constructors
  17. //
  18. public CodeMethodInvokeStatement () {}
  19. public CodeMethodInvokeStatement (CodeMethodInvokeExpression methodInvoke)
  20. {
  21. this.methodInvoke = methodInvoke;
  22. }
  23. public CodeMethodInvokeStatement (CodeExpression targetObject, string methodName)
  24. {
  25. this.targetObject = targetObject;
  26. this.methodName = methodName;
  27. }
  28. public CodeMethodInvokeStatement (CodeExpression targetObject,
  29. string methodName,
  30. CodeExpression [] parameters)
  31. {
  32. this.targetObject = targetObject;
  33. this.methodName = methodName;
  34. this.parameters = new CodeExpressionCollection ();
  35. this.parameters.AddRange (parameters);
  36. }
  37. public string MethodName {
  38. get {
  39. return methodName;
  40. }
  41. set {
  42. methodName = value;
  43. }
  44. }
  45. public CodeExpressionCollection Parameters {
  46. get {
  47. return parameters;
  48. }
  49. set {
  50. parameters = value;
  51. }
  52. }
  53. public CodeExpression TargetObject {
  54. get {
  55. return targetObject;
  56. }
  57. set {
  58. targetObject = value;
  59. }
  60. }
  61. public CodeMethodInvokeExpression MethodInvoke {
  62. get {
  63. return methodInvoke;
  64. }
  65. set {
  66. methodInvoke = value;
  67. }
  68. }
  69. }
  70. }