Exemple #1
0
        public override void Modified()
        {
            base.Modified();

            var def =
                dynSettings.Controller.CustomNodeManager
                .GetLoadedDefinitions()
                .FirstOrDefault(x => x.Workspace == this);

            if (def == null)
            {
                return;
            }

            def.RequiresRecalc = true;

            try
            {
                var expression = CustomNodeManager.CompileFunction(def);

                dynSettings.Controller.FSchemeEnvironment.DefineSymbol(
                    def.FunctionId.ToString(), expression);
            }
            catch { }
        }
        public override void Modified()
        {
            base.Modified();

            //add a check if any loaded defs match this workspace
            // unnecessary given the next lines --SJE
            //if (dynSettings.Controller.CustomNodeManager.GetLoadedDefinitions().All(x => x.Workspace != this))
            //    return;

            var def =
                dynSettings.Controller.CustomNodeManager
                .GetLoadedDefinitions()
                .FirstOrDefault(x => x.Workspace == this);

            if (def == null)
            {
                return;
            }

            def.RequiresRecalc = true;

            try
            {
                var expression = CustomNodeManager.CompileFunction(def);

                dynSettings.Controller.FSchemeEnvironment.DefineSymbol(
                    def.FunctionId.ToString(), expression);
            }
            catch { }
        }