mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
78 lines
1.6 KiB
C#
78 lines
1.6 KiB
C#
//
|
|
// System.CodeDom CodeConditionStatement Class implementation
|
|
//
|
|
// Author:
|
|
// Daniel Stodden ([email protected])
|
|
//
|
|
// (C) 2002 Ximian, Inc.
|
|
//
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.CodeDom
|
|
{
|
|
[Serializable]
|
|
[ClassInterface(ClassInterfaceType.AutoDispatch)]
|
|
[ComVisible(true)]
|
|
public class CodeConditionStatement
|
|
: CodeStatement
|
|
{
|
|
private CodeExpression condition;
|
|
private CodeStatementCollection trueStatements;
|
|
private CodeStatementCollection falseStatements;
|
|
|
|
//
|
|
// Constructors
|
|
//
|
|
public CodeConditionStatement()
|
|
{
|
|
}
|
|
|
|
public CodeConditionStatement( CodeExpression condition,
|
|
params CodeStatement[] trueStatements )
|
|
{
|
|
this.condition = condition;
|
|
this.TrueStatements.AddRange( trueStatements );
|
|
}
|
|
|
|
public CodeConditionStatement( CodeExpression condition,
|
|
CodeStatement[] trueStatements,
|
|
CodeStatement[] falseStatements )
|
|
{
|
|
this.condition = condition;
|
|
this.TrueStatements.AddRange( trueStatements );
|
|
this.FalseStatements.AddRange( falseStatements );
|
|
}
|
|
|
|
//
|
|
// Properties
|
|
//
|
|
public CodeExpression Condition {
|
|
get {
|
|
return condition;
|
|
}
|
|
set {
|
|
condition = value;
|
|
}
|
|
}
|
|
|
|
public CodeStatementCollection FalseStatements {
|
|
get {
|
|
if ( falseStatements == null )
|
|
falseStatements =
|
|
new CodeStatementCollection();
|
|
return falseStatements;
|
|
}
|
|
}
|
|
|
|
public CodeStatementCollection TrueStatements {
|
|
get {
|
|
if ( trueStatements == null )
|
|
trueStatements =
|
|
new CodeStatementCollection();
|
|
return trueStatements;
|
|
}
|
|
}
|
|
}
|
|
}
|