Ejemplo n.º 1
0
        private void SynchronizeInternal(GraphToDSCompiler.SynchronizeData syncData, out string code)
        {
            Validity.Assert(null != runner);
            Validity.Assert(null != graphCompiler);

            if (syncData.AddedNodes.Count == 0 &&
                syncData.ModifiedNodes.Count == 0 &&
                syncData.RemovedNodes.Count == 0)
            {
                code = "";
                ResetVMForDeltaExecution();
                return;
            }
            else
            {
                System.Diagnostics.Debug.WriteLine("Begin SyncInternal: {0}", syncData);
                GraphToDSCompiler.GraphBuilder g = new GraphBuilder(syncData, graphCompiler);
                code = g.BuildGraphDAG();

                System.Diagnostics.Debug.WriteLine("SyncInternal => " + code);

                //List<string> deletedVars = new List<string>();
                ResetVMForDeltaExecution();

                //Synchronize the core configuration before compilation and execution.
                if (syncCoreConfigurations)
                {
                    SyncCoreConfigurations(runnerCore, executionOptions);
                    syncCoreConfigurations = false;
                }

                bool succeeded = CompileAndExecute(code);
                if (succeeded)
                {
                    graphCompiler.ResetPropertiesForNextExecution();
                }
            }
        }