| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //
- // System.CodeDom CodeCatchClaus Class implementation
- //
- // Author:
- // Miguel de Icaza ([email protected])
- // Daniel Stodden ([email protected])
- //
- // (C) 2001 Ximian, Inc.
- //
- using System.Runtime.InteropServices;
- namespace System.CodeDom
- {
- [Serializable]
- [ClassInterface(ClassInterfaceType.AutoDispatch)]
- [ComVisible(true)]
- public class CodeCatchClause
- {
- private CodeTypeReference catchExceptionType;
- private string localName;
- private CodeStatementCollection statements;
- //
- // Constructors
- //
- public CodeCatchClause ()
- {
- }
- public CodeCatchClause ( string localName )
- {
- this.localName = localName;
- }
- public CodeCatchClause ( string localName,
- CodeTypeReference catchExceptionType )
- {
- this.localName = localName;
- this.catchExceptionType = catchExceptionType;
- }
- public CodeCatchClause ( string localName,
- CodeTypeReference catchExceptionType,
- CodeStatement[] statements )
- {
- this.localName = localName;
- this.catchExceptionType = catchExceptionType;
- this.Statements.AddRange( statements );
- }
- //
- // Properties
- //
- public CodeTypeReference CatchExceptionType {
- get {
- return catchExceptionType;
- }
- set {
- catchExceptionType = value;
- }
- }
- public string LocalName {
- get {
- return localName;
- }
- set {
- localName = value;
- }
- }
- public CodeStatementCollection Statements {
- get {
- if ( statements == null )
- statements = new CodeStatementCollection();
- return statements;
- }
- }
- }
- }
|