CodeTryCatchFinallyStatement.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // System.CodeDom CodeTryCatchFinallyStatement Class implementation
  3. //
  4. // Author:
  5. // Miguel de Icaza ([email protected])
  6. //
  7. // (C) 2001 Ximian, Inc.
  8. //
  9. namespace System.CodeDom {
  10. [Serializable]
  11. public class CodeTryCatchFinallyStatement : CodeStatement {
  12. CodeStatementCollection tryStatements, finallyStatements;
  13. CodeCatchClauseCollection catchClauses;
  14. public CodeTryCatchFinallyStatement () {}
  15. public CodeTryCatchFinallyStatement (CodeStatement [] tryStatements,
  16. CodeCatchClause [] catchClauses)
  17. {
  18. this.tryStatements = new CodeStatementCollection ();
  19. this.catchClauses = new CodeCatchClauseCollection ();
  20. this.tryStatements.AddRange (tryStatements);
  21. this.catchClauses.AddRange (catchClauses);
  22. }
  23. public CodeTryCatchFinallyStatement (CodeStatement [] tryStatements,
  24. CodeCatchClause [] catchClauses,
  25. CodeStatement [] finallyStatements)
  26. {
  27. this.tryStatements = new CodeStatementCollection ();
  28. this.catchClauses = new CodeCatchClauseCollection ();
  29. this.finallyStatements = new CodeStatementCollection ();
  30. this.tryStatements.AddRange (tryStatements);
  31. this.catchClauses.AddRange (catchClauses);
  32. this.finallyStatements.AddRange (finallyStatements);
  33. }
  34. public CodeStatementCollection FinallyStatements{
  35. get {
  36. return finallyStatements;
  37. }
  38. set {
  39. finallyStatements = value;
  40. }
  41. }
  42. public CodeStatementCollection TryStatements {
  43. get {
  44. return tryStatements;
  45. }
  46. set {
  47. tryStatements = value;
  48. }
  49. }
  50. public CodeCatchClauseCollection CatchClauses {
  51. get {
  52. return catchClauses;
  53. }
  54. set {
  55. catchClauses = value;
  56. }
  57. }
  58. }
  59. }