Example #1
0
        public ReturnFlowNode AddReturnNode(IEnumerable <Expression> returnValues = null, FlowNodeFlags flags = FlowNodeFlags.None)
        {
            Contract.Requires <InvalidOperationException>(this.Graph != null);

            var nodeId = this.nodeIdProvider.GenerateNewId();
            var node   = new ReturnFlowNode(this.Graph, nodeId, flags, returnValues ?? Enumerable.Empty <Expression>());

            this.Graph.MutableNodes.Add(node);
            Contract.Assert(nodeId.Value == this.Graph.MutableNodes.IndexOf(node));

            return(node);
        }
Example #2
0
 public static OuterFlowEdge CreateReturn(OuterFlowEdgeId id, ReturnFlowNode returnNode, CallFlowNode callNode)
 {
     return(new OuterFlowEdge(id, OuterFlowEdgeKind.Return, returnNode, callNode));
 }