protected override void ExecuteTask() { if ((this.ConditionsTrue)) { this.Then.Execute(); } else { bool Executed = false; TaskContainerCollection ElseIfList = new TaskContainerCollection(); ElseIfList.AddRange(this.ElseIfs); ElseIfList.AddRange(this.OldElseIf); foreach (TaskContainer Possible in ElseIfList) { if (Possible.IfDefined) { Possible.Execute(); Executed = true; break; } } if (!Executed & this.Else != null) { this.Else.Execute(); } } }
protected override void ExecuteTask() { if ((this.ConditionsTrue)) { this.Then.Execute(); } else { bool Executed = false; foreach (TaskContainer Possible in this.ElseIf) { if (Possible.IfDefined) { Possible.Execute(); Executed = true; } } if (!Executed & this.Else != null) { this.Else.Execute(); } } }
protected override void ExecuteTask() { if ((this.ConditionsTrue)) { this.Then.Execute(); } else { bool Executed = false; foreach (TaskContainer Possible in this.OldElseIf) { if (Possible.IfDefined) { Possible.Execute(); Executed = true; break; } } foreach (IfTask ifTask in this.ElseIfs) { if (bool.Parse(ifTask.Test)) { ifTask.Execute(); Executed = true; break; } } if (!Executed & this.Else != null) { this.Else.Execute(); } } }