CodeTryCatchFinallyStatement.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. public class CodeTryCatchFinallyStatement : CodeStatement {
  11. CodeStatementCollection tryStatements, finallyStatements;
  12. CodeCatchClauseCollection catchClauses;
  13. public CodeTryCatchFinallyStatement () {}
  14. public CodeTryCatchFinallyStatement (CodeStatement [] tryStatements,
  15. CodeCatchClause [] catchClauses)
  16. {
  17. this.tryStatements = new CodeStatementCollection ();
  18. this.catchClauses = new CodeCatchClauseCollection ();
  19. this.tryStatements.AddRange (tryStatements);
  20. this.catchClauses.AddRange (catchClauses);
  21. }
  22. public CodeTryCatchFinallyStatement (CodeStatement [] tryStatements,
  23. CodeCatchClause [] catchClauses,
  24. CodeStatement [] finallyStatements)
  25. {
  26. this.tryStatements = new CodeStatementCollection ();
  27. this.catchClauses = new CodeCatchClauseCollection ();
  28. this.finallyStatements = new CodeStatementCollection ();
  29. this.tryStatements.AddRange (tryStatements);
  30. this.catchClauses.AddRange (catchClauses);
  31. this.finallyStatements.AddRange (finallyStatements);
  32. }
  33. public CodeStatementCollection FinallyStatements{
  34. get {
  35. return finallyStatements;
  36. }
  37. set {
  38. finallyStatements = value;
  39. }
  40. }
  41. public CodeStatementCollection TryStatements {
  42. get {
  43. return tryStatements;
  44. }
  45. set {
  46. tryStatements = value;
  47. }
  48. }
  49. public CodeCatchClauseCollection CatchClauses {
  50. get {
  51. return catchClauses;
  52. }
  53. set {
  54. catchClauses = value;
  55. }
  56. }
  57. }
  58. }