Exemplo n.º 1
0
        /// <summary>
        /// Gets all execution contained nodes in a graph
        /// </summary>
        /// <param name="graph">Graph containing the execution nodes.</param>
        /// <returns>Execution nodes contained in the graph.</returns>
        public static IEnumerable <Node> GetExecNodesInExecGraph(ExecutionGraph graph)
        {
            HashSet <Node> nodes = new HashSet <Node>();

            AddExecNodes(graph.EntryNode, ref nodes);

            return(nodes);
        }
Exemplo n.º 2
0
        public void DeserialiseExecutionGraph()
        {
            var(graph, data) = MakeGraphAndData();
            ExecutionGraph executionGraphReloaded = null;

            using (var file = new MemoryStream())
            {
                Serializer.Serialize(file, bestNetwork.Graph);
                file.Position          = 0;
                executionGraphReloaded = Serializer.Deserialize <ExecutionGraph>(file);
            }
            Assert.IsNotNull(executionGraphReloaded);
            var engine = graph.CreateEngine(executionGraphReloaded);

            AssertEngineGetsGoodResults(engine, data);
        }
Exemplo n.º 3
0
 public ExecutionEntryNode(ExecutionGraph graph)
     : base(graph)
 {
 }