Files
mono/mcs/class/System/System.CodeDom/CodeIfStatement.cs
T
Sean MacIsaac 7fc6d7d59d Fixed all sorts of compiler errors.
svn path=/trunk/mcs/; revision=124
2001-07-13 22:20:51 +00:00

74 lines
1.5 KiB
C#
Executable File

//
// System.CodeDom CodeIfStatement Class implementation
//
// Author:
// Miguel de Icaza ([email protected])
//
// (C) 2001 Ximian, Inc.
//
namespace System.CodeDom {
public class CodeIfStatement : CodeStatement {
CodeExpression condition;
CodeStatementCollection trueStatements;
CodeStatementCollection falseStatements;
//
// Constructors
//
public CodeIfStatement ()
{
trueStatements = new CodeStatementCollection ();
falseStatements = new CodeStatementCollection ();
}
public CodeIfStatement (CodeExpression condition, CodeStatement [] trueStatements)
{
this.condition = condition;
this.trueStatements = new CodeStatementCollection ();
this.trueStatements.AddRange (trueStatements);
this.falseStatements = new CodeStatementCollection ();
}
public CodeIfStatement (CodeExpression condition,
CodeStatement [] trueStatements,
CodeStatement [] falseStatements)
{
this.condition = condition;
this.trueStatements = new CodeStatementCollection ();
this.trueStatements.AddRange (trueStatements);
this.falseStatements = new CodeStatementCollection ();
this.falseStatements.AddRange (falseStatements);
}
//
// Properties
//
public CodeExpression Condition {
get {
return condition;
}
set {
condition = value;
}
}
public CodeStatementCollection FalseStatements {
get {
return falseStatements;
}
}
public CodeStatementCollection TrueStatements {
get {
return trueStatements;
}
}
}
}