private SDConditionalBlock CreateConditionalBlock(string expression) { var token = new SDConditionalBlock { Expression = expression, Role = SDNodeRole.Conditional }; return(token); }
private void ParseConditionalMethodBlock(SequenceDiagramComposite composite, SDConditionalBlock conditionalBlock) { var sequenceDiagramBlock = composite.AddBlock(string.Format("if ({0})", conditionalBlock.Expression)); foreach (var statement in conditionalBlock.TrueStatements) { ParseCall(statement, sequenceDiagramBlock); } if (NodeNotEmpty(conditionalBlock, conditionalBlock.FalseStatements)) { sequenceDiagramBlock = composite.AddBlock("else"); foreach (var statement in conditionalBlock.FalseStatements) { ParseCall(statement, sequenceDiagramBlock); } } }