コード例 #1
0
ファイル: BakeryEngine.cs プロジェクト: Variel/PEBakery
        private void InternalConstructor(Plugin[] plugins, int pluginIndex, Logger logger)
        {
            this.plugins   = plugins;
            this.logger    = logger;
            this.variables = new BakeryVariables();

            LoadDefaultGlobalVariables();
            curPluginIdx         = pluginIndex;
            currentCommand       = null;
            returnAddress        = new Stack <CommandAddress>();
            currentSectionParams = new string[0];
        }
コード例 #2
0
ファイル: Logger.cs プロジェクト: Variel/PEBakery
        public void WriteVariables(BakeryVariables vars)
        {
            string str = "\n\n[Local Variables]\n";

            foreach (var local in vars.LocalVars)
            {
                str = string.Concat(str, local.Key, " (Raw)   = ", local.Value, "\n");
                str = string.Concat(str, local.Key, " (Value) = ", vars.LocalGetValue(local.Key), "\n");
            }
            str += "\n[Global Variables]\n";
            foreach (var global in vars.GlobalVars)
            {
                str = string.Concat(str, global.Key, " (Raw)   = ", global.Value, "\n");
                str = string.Concat(str, global.Key, " (Value) = ", vars.GlobalGetValue(global.Key), "\n");
            }
            sw.Write(str);
            sw.Flush();
        }