public int Start() { int exitCode = 0; try { MachineInstance.Current.EventProcessor = new DefaultEventProcessor(); _engine.UpdateContexts(); _engine.NewObject(_module); exitCode = 0; } catch (ScriptInterruptionException e) { exitCode = e.ExitCode; } catch (Exception e) { _host.ShowExceptionInfo(e); exitCode = 1; } finally { _engine.DebugController?.NotifyProcessExit(exitCode); _engine.Dispose(); _engine = null; } return(exitCode); }
public int Start() { try { _engine.NewObject(_module); return(0); } catch (ScriptInterruptionException e) { return(e.ExitCode); } catch (Exception e) { _host.ShowExceptionInfo(e); return(1); } finally { _engine.Dispose(); _engine = null; } }
public void Dispose() { _engine?.Dispose(); _codeStat?.EndCodeStat(); }