private ExecutionPath GetDefaultExecutionPath() { lock (_graph) { return(_defaultExecutionPath ?? (_defaultExecutionPath = new ExecutionPath(_graph.TopologicalSort().ToArray()))); } }
private ExecutionPath GetExecutionPath(Node node) { lock (_graph) { ExecutionPath path; if (!_executionPaths.TryGetValue(node, out path)) { var sortedNodes = _graph.TopologicalSort(); var descendants = new HashSet <Node> { node }; PopulateDescendants(node, descendants); _executionPaths[node] = path = new ExecutionPath(sortedNodes.Intersect(descendants).ToArray()); } return(path); } }
private void ResetCache() { _defaultExecutionPath = null; _executionPaths.Clear(); }
internal ProcessingContext(ExecutionPath executionPath) { ExecutionPath = executionPath; }