public void Execute() { while ((bool)Condition.Value) { InnerBlock?.Execute(); } NextBlock?.Execute(); }
public void Execute() { var condition = (bool)Condition.Value; if (condition) { InnerBlock?.Execute(); var next = NextBlock ?? null; while (next is ElseBlock || next is ElseIfBlock) { next = next?.NextBlock; } next?.Execute(); } else { NextBlock?.Execute(); } }