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