CodeForLoopStatement.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // System.CodeDom CodeForLoopStatement 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 CodeForLoopStatement : CodeExpression {
  11. CodeStatement initStatement, incrementStatement;
  12. CodeExpression testExpression;
  13. CodeStatementCollection statements;
  14. //
  15. // Constructors
  16. //
  17. public CodeForLoopStatement ()
  18. {
  19. statements = new CodeStatementCollection ();
  20. }
  21. public CodeForLoopStatement (CodeStatement initStatement,
  22. CodeExpression testExpression,
  23. CodeStatement incrementStatement,
  24. CodeStatement [] statements)
  25. {
  26. this.initStatement = initStatement;
  27. this.testExpression = testExpression;
  28. this.incrementStatement = incrementStatement;
  29. this.statements = new CodeStatementCollection ();
  30. this.statements.AddRange (statements);
  31. }
  32. //
  33. // Properties
  34. //
  35. public CodeStatement InitStatement {
  36. get {
  37. return initStatement;
  38. }
  39. set {
  40. initStatement = value;
  41. }
  42. }
  43. public CodeStatement IncrementStatement {
  44. get {
  45. return incrementStatement;
  46. }
  47. set {
  48. incrementStatement = value;
  49. }
  50. }
  51. public CodeStatementCollection Statements {
  52. get {
  53. return statements;
  54. }
  55. }
  56. public CodeExpression TestExpression {
  57. get {
  58. return testExpression;
  59. }
  60. set {
  61. testExpression = value;
  62. }
  63. }
  64. }
  65. }