Exemple #1
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.Append($"if {Condition.ToString()} {Consequence.ToString()}");

            if (Alternative != null)
            {
                sb.Append($" else {Alternative.ToString()}");
            }

            return(sb.ToString());
        }
Exemple #2
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.Append("if")
            .Append(Condition.ToString())
            .Append(" ")
            .Append(Consequence.ToString());

            if (Alternative != null)
            {
                sb.Append("else")
                .Append(Alternative.ToString());
            }

            return(sb.ToString());
        }
Exemple #3
0
        public override string ToString()
        {
            var output = new StringBuilder();

            output.Append("if");
            output.Append(" ");
            output.Append(Condition.ToString());
            output.Append("\n");
            output.Append(Consequence.ToString());

            if (Alternative != null)
            {
                output.Append("\n");
                output.Append("else\n");
                output.Append(Alternative.ToString());
            }

            output.Append("\nend");

            return(output.ToString());
        }
Exemple #4
0
 public string ToString()
 {
     return("Trigger: " + Trigger.ToString() +
            "\n" + "Consequence: " + Consequence.ToString() +
            "\n" + "Children: " + Children.Count.ToString());
 }