Ejemplo n.º 1
0
            private DateTime compiledStamp;             // Last time compiled

            public LuaFileScript(LuaEngine engine, string scriptId, FileInfo fileSource, Encoding encoding, bool compileWithDebugger)
                : base(engine, scriptId, compileWithDebugger)
            {
                this.fileSource    = fileSource;
                this.encoding      = encoding ?? Encoding.Default;
                this.compiledStamp = DateTime.MinValue;

                // compile an add
                Compile();
            }             // ctor
Ejemplo n.º 2
0
            private DEConfigItem currentItem = null;             // current node, that is used as parent

            public LuaDebugSession(LuaEngine engine, IDEWebSocketContext context)
            {
                this.engine  = engine;
                this.log     = LoggerProxy.Create(engine.Log, "Debug Session");
                this.context = context;

                cancelSessionTokenSource = new CancellationTokenSource();
                sessionTask = Task.Run(Execute, cancelSessionTokenSource.Token);

                UseNode("/");

                Info("Debug session established.");
            }             // ctor
Ejemplo n.º 3
0
            protected LuaScript(LuaEngine engine, string scriptId, bool compileWithDebugger)
            {
                this.engine   = engine;
                this.log      = LoggerProxy.Create(engine.Log, scriptId);
                this.scriptId = scriptId;

                this.chunk = null;
                this.compiledWithDebugger = compileWithDebugger;

                // attach the script to the engine
                engine.AddScript(this);

                log.Info("Hinzugefügt.");
            }             // ctor
Ejemplo n.º 4
0
            public LuaMemoryScript(LuaEngine engine, Func <TextReader> code, string name, KeyValuePair <string, Type>[] args)
                : base(engine, Guid.NewGuid().ToString("D"), false)
            {
                this.name = name;

                try
                {
                    Compile(code, args);
                }
                catch (Exception e)
                {
                    LogLuaException(e);
                }
            }             // ctor
Ejemplo n.º 5
0
            public LuaAttachedGlobal(LuaEngine engine, string scriptId, LuaTable table, bool autoRun)
            {
                this.engine    = engine;
                this.log       = LoggerProxy.Create(GetHostLog(table) ?? engine.Log, scriptId);
                this.scriptId  = scriptId;
                this.table     = table;
                this.autoRun   = autoRun;
                this.needToRun = autoRun;

                // Run the script
                if (needToRun && IsCompiled)
                {
                    Run(false);
                }
            }             // ctor
Ejemplo n.º 6
0
 public LuaEngineTraceLineDebugger(LuaEngine engine)
 {
     this.engine = engine;
 }             // ctor