/// <summary>Renders the clause in textual representation. </summary> /// <param name="writer">to output to</param> /// <param name="formatter">for NewLine-whitespace formatting</param> public void ToEPL( TextWriter writer, EPStatementFormatter formatter) { formatter.BeginMergeWhenMatched(writer); if (IsMatched) { writer.Write("when matched"); } else { writer.Write("when not matched"); } if (OptionalCondition != null) { writer.Write(" and "); OptionalCondition.ToEPL(writer, ExpressionPrecedenceEnum.MINIMUM); } foreach (OnMergeMatchedAction action in Actions) { formatter.BeginMergeAction(writer); action.ToEPL(writer); } }