Esempio n. 1
0
        public Aplus(Scope dlrglobals, LexerMode parsemode)
        {
            this.sysvars         = new SystemVariables();
            this.dependencies    = new DependencyManager();
            this.callbackManager = new CallbackManager();

            this.dlrglobals = dlrglobals;
            this.globals    = new DYN.ExpandoObject();

            this.sysvars["mode"] = ASymbol.Create(parsemode.ToString().ToLower());

            this.mmfmanager = new MemoryMappedFileManager();

            this.systemFunctions = Function.SystemFunction.DiscoverSystemFunctions();

            if (String.IsNullOrEmpty(Environment.GetEnvironmentVariable("APATH", EnvironmentVariableTarget.User)))
            {
                string paths = String.Join(";", ".", "./Runtime/Context/");
                Environment.SetEnvironmentVariable("APATH", paths, EnvironmentVariableTarget.User);
            }

            // TODO: Move this to app.config?
            this.autoloadContexts = new string[] { "sys" };
            this.contextLoader    = new ContextLoader(this);
        }
Esempio n. 2
0
        public void AplusCoreRuntimeTest2()
        {
            //Helpers
            //AType[] at = new AType[10];
            //Helpers.BuildArray(at);

            //SystemVariables
            SystemVariables sv = new SystemVariables();
            sv.Contains("string");

            //DependencyManager
            DependencyManager dm = new DependencyManager();
            //dm.TryGetDependency("string", new DependencyItem("string", new HashSet<string>(), new AReference(new AValue())));
            dm.ValidateDependency("string");

            //AplusLanguageContext
            //ScaledMatrix sm = new ScaledMatrix(new Matrix(), 2.0);
        }