예제 #1
0
 private void ParseMethodBlock(SequenceDiagramComposite composite, SDBlock block)
 {
     var sequenceDiagramBlock = composite.AddBlock(block.Expression);
     foreach (var statement in block.Statements)
     {
         ParseCall(statement, sequenceDiagramBlock);
     }
 }
예제 #2
0
        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);
                }
            }
        }