public ScriptDisposeBackgroundWorker(ScriptCacheItem cachedScript) : base() { RequestingThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId; this.CachedScript = cachedScript; this.DoWork += new DoWorkEventHandler(ScriptDisposeBackgroundWorker_DoWork); }
public static object ReRunScript(object[] args, ScriptCacheItem script) { var result = (script.CompiledScript as LINQPad.ObjectModel.QueryCompilation).Run(LINQPad.QueryResultFormat.Text, args); if (result.Exception != null) { SimpleLogging.LogMessage(script.ScriptFile + " run returned with exception."); SimpleExceptionHandling.HandleException(result.Exception); return(result.Exception); } else { return(result.ReturnValue); } }