예제 #1
0
 private ExecutionPath GetDefaultExecutionPath()
 {
     lock (_graph)
     {
         return(_defaultExecutionPath ?? (_defaultExecutionPath = new ExecutionPath(_graph.TopologicalSort().ToArray())));
     }
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
 private void ResetCache()
 {
     _defaultExecutionPath = null;
     _executionPaths.Clear();
 }
예제 #4
0
 internal ProcessingContext(ExecutionPath executionPath)
 {
     ExecutionPath = executionPath;
 }
예제 #5
0
 internal ProcessingContext(ExecutionPath executionPath)
 {
     ExecutionPath = executionPath;
 }