Exemplo n.º 1
0
        public static void AssertValue(string varname, object value, ILiveRunner liveRunner)
        {
            var        mirror = liveRunner.InspectNodeValue(varname);
            MirrorData data   = mirror.GetData();

            AssertValue(data, value);
        }
Exemplo n.º 2
0
        internal Synchronizer(GraphController controller)
        {
            Validity.Assert(controller != null);

            this.controller        = controller;
            this.controller.Saved += new GraphSavedHandler(OnGraphSaved);

            // If we're running in NUnit, then the LiveRunner will not be created
            // since we do not yet have a way to test asynchronous calls and
            // their return values (and currently calls into LiveRunner
            // asynchronously creates some random failures in NUnit test cases).
            //
            if (null != CoreComponent.Instance.HostApplication)
            {
                this.runner                  = LiveRunnerFactory.CreateLiveRunner(controller);
                runner.GraphUpdateReady     += new GraphUpdateReadyEventHandler(OnRunnerGraphUpdateReady);
                runner.NodeValueReady       += new NodeValueReadyEventHandler(OnRunnerNodeValueReady);
                runner.NodesToCodeCompleted += new NodesToCodeCompletedEventHandler(OnNodesToCodeCompleted);
            }
            else
            {
#if false
                // This part of the code will be enabled .
                this.runner                  = LiveRunnerFactory.CreateLiveRunner(controller);
                runner.GraphUpdateReady     += OnNUnitGraphUpdateReady;
                runner.NodeValueReady       += OnNUnitNodeValueReady;
                runner.NodesToCodeCompleted += OnNUnitNodesToCodeCompleted;
#endif
            }
        }
Exemplo n.º 3
0
            public void Setup()
            {
                testFx = new TestFrameWork();
                astLiveRunner = new ProtoScript.Runners.LiveRunner();
                FFITarget.IncrementerTracedClass.ResetForNextTest();

            }
Exemplo n.º 4
0
        public LiveRunnerServices(EngineController controller)
        {
            this.controller = controller;
            liveRunner = LiveRunnerFactory.CreateLiveRunner(controller);

            liveRunner.GraphUpdateReady += GraphUpdateReady;
            liveRunner.NodeValueReady += NodeValueReady;
        }
Exemplo n.º 5
0
        public LiveRunnerServices(EngineController controller)
        {
            this.controller = controller;
            liveRunner      = LiveRunnerFactory.CreateLiveRunner(controller);

            liveRunner.GraphUpdateReady += GraphUpdateReady;
            liveRunner.NodeValueReady   += NodeValueReady;
        }
Exemplo n.º 6
0
 public LiveRunnerServices(EngineController controller, string geometryFactoryFileName)
 {
     liveRunner = LiveRunnerFactory.CreateLiveRunner(controller, geometryFactoryFileName);
 }
Exemplo n.º 7
0
 public LiveRunnerServices(EngineController controller, string geometryFactoryFileName)
 {
     liveRunner = LiveRunnerFactory.CreateLiveRunner(controller, geometryFactoryFileName);
 }
Exemplo n.º 8
0
 public void Setup()
 {
     testFx        = new TestFrameWork();
     astLiveRunner = new ProtoScript.Runners.LiveRunner();
     FFITarget.IncrementerTracedClass.ResetForNextTest();
 }
Exemplo n.º 9
0
 public void Setup()
 {
     DisposeTracer.DisposeCount = 0;
     AbstractDerivedDisposeTracer2.DisposeCount = 0;
     astLiveRunner = new LiveRunner();
 }
Exemplo n.º 10
0
        public void TestFunctionObjectInApply()
        {
            GraphToDSCompiler.GraphUtilities.Reset();
            GraphToDSCompiler.GraphUtilities.PreloadAssembly(new List<string> { "FunctionObject.ds" });
            astLiveRunner = new ProtoScript.Runners.LiveRunner();
            astLiveRunner.ResetVMAndResyncGraph(new List<string> { "FunctionObject.ds" });
            string code = @"
 def foo(x,y ) { return = x + y; }
 f = _SingleFunctionObject(foo, 2, {1}, {null, 42}, true); r = Apply(f, 3);
 ";

            Guid guid = System.Guid.NewGuid();
            List<Subtree> added = new List<Subtree>();
            {
                added.Add(CreateSubTreeFromCode(guid, code));
                var syncData = new GraphSyncData(null, added, null);
                astLiveRunner.UpdateGraph(syncData);
                AssertValue("r", 45);
            }
        }
Exemplo n.º 11
0
 public void Setup()
 {
     GraphToDSCompiler.GraphUtilities.PreloadAssembly(new List<string> { "ProtoGeometry.dll"});
     astLiveRunner = new ProtoScript.Runners.LiveRunner();
     astLiveRunner.ResetVMAndResyncGraph(new List<string> { "ProtoGeometry.dll"});
 }
Exemplo n.º 12
0
 public LiveRunnerServices(DynamoModel dynamoModel, EngineController controller, string geometryFactoryFileName)
 {
     this.dynamoModel = dynamoModel;
     liveRunner = LiveRunnerFactory.CreateLiveRunner(controller, geometryFactoryFileName);
 }
Exemplo n.º 13
0
 public LiveRunnerServices(EngineController controller)
 {
     this.controller = controller;
     liveRunner = LiveRunnerFactory.CreateLiveRunner(controller);
 }
Exemplo n.º 14
0
 public LiveRunnerServices(DynamoModel dynamoModel, EngineController controller, string geometryFactoryFileName)
 {
     this.dynamoModel = dynamoModel;
     liveRunner       = LiveRunnerFactory.CreateLiveRunner(controller, geometryFactoryFileName);
 }
Exemplo n.º 15
0
 public void Setup()
 {
     astLiveRunner = new ProtoScript.Runners.LiveRunner();
     astLiveRunner.ResetVMAndResyncGraph(new List<string> { "ProtoGeometry.dll" });
 }