private void OnEvaluateStarted(string input, string sourceFile) { var e = new EvaluateStartedEventArgs() { Input = input, SourceFile = sourceFile }; EventHandler <EvaluateStartedEventArgs> handler = EvaluateStarted; if (handler != null) { handler(this, e); } }
private void ScriptingEngineOnEvaluateStarted(object sender, EvaluateStartedEventArgs evaluateStartedEventArgs) { if (!executingInternalCommand) { Execute.OnUIThread(() => { if (!IsEvaluating) { ClearLine(); WriteLine(); } evaluationsRunning++; var source = evaluateStartedEventArgs.SourceFile != null ? System.IO.Path.GetFileName(evaluateStartedEventArgs.SourceFile): "unknown source"; WriteLine("[Evaluating external code (" + source + ")]", TextType.Repl); }); } }