using AddInPlugin.Util;
|
using OpenTap;
|
using System;
|
|
namespace AddInPlugin
|
{
|
[Display("If", Group:"流程控制", Order: 0)]
|
[AllowAnyChild]
|
public class IfConditionStep : ConditionBase
|
{
|
public IfConditionStep() : base()
|
{
|
|
}
|
|
public override void PrePlanRun()
|
{
|
|
}
|
|
public override void Run()
|
{
|
try
|
{
|
ConditionResult = (bool)this.PlanRun.Resolve(this, Condition);
|
if (ConditionResult == true)
|
{
|
RunChildSteps();
|
UpgradeVerdict(Verdict.Pass);
|
}
|
else
|
{
|
UpgradeVerdict(Verdict.NotSet);
|
}
|
}
|
catch (Exception ex)
|
{
|
Log.Error("If Run Error. {0}", ex);
|
ConditionResult = null;
|
UpgradeVerdict(Verdict.Error);
|
}
|
}
|
|
public override void PostPlanRun()
|
{
|
}
|
}
|
}
|