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
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
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
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
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
public LuaEngineTraceLineDebugger(LuaEngine engine) { this.engine = engine; } // ctor