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); }
public static OuterFlowEdge CreateMethodCall(OuterFlowEdgeId id, CallFlowNode callNode, EnterFlowNode enterNode) { return(new OuterFlowEdge(id, OuterFlowEdgeKind.MethodCall, callNode, enterNode)); }