private string GetScriptPath(EnvironmentView view) { if (view == null) { return(null); } string path; lock (_cachedScriptPaths) { if (_cachedScriptPaths.TryGetValue(view, out path)) { return(path); } } try { path = _uiThread.Invoke(() => PythonInteractiveEvaluator.GetScriptsPath( _site, view.Description, view.Factory.Configuration, false )); } catch (Exception ex) when(!ex.IsCriticalException()) { view.Dispatcher.BeginInvoke((Action)(() => ex.ReportUnhandledException(_site, GetType())), DispatcherPriority.ApplicationIdle); path = null; } lock (_cachedScriptPaths) { _cachedScriptPaths[view] = path; } return(path); }
private string GetScriptPath(EnvironmentView view) { if (view == null) { return(null); } return(PythonInteractiveEvaluator.GetScriptsPath( _site, view.Description, view.Factory.Configuration, false )); }