Files
mono/mcs/class/System/System.CodeDom/CodeCatchClause.cs
T
2002-05-11 15:44:41 +00:00

82 lines
1.5 KiB
C#
Executable File

//
// 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;
}
}
}
}