コード例 #1
0
        public EnterFlowNode AddEnterNode(IEnumerable <FlowVariable> parameters = null, FlowNodeFlags flags = FlowNodeFlags.None)
        {
            Contract.Requires <InvalidOperationException>(this.Graph != null);

            var nodeId = this.nodeIdProvider.GenerateNewId();
            var node   = new EnterFlowNode(this.Graph, nodeId, flags, parameters ?? Enumerable.Empty <FlowVariable>());

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

            return(node);
        }
コード例 #2
0
 public static OuterFlowEdge CreateMethodCall(OuterFlowEdgeId id, CallFlowNode callNode, EnterFlowNode enterNode)
 {
     return(new OuterFlowEdge(id, OuterFlowEdgeKind.MethodCall, callNode, enterNode));
 }