public override void LoadSettingsFromStorage() { var interpreterService = ComponentModel.GetService <IInterpreterOptionsService>(); var seenIds = new HashSet <Guid>(); var placeholders = PyService.InteractiveOptions.Where(kv => kv.Key is InterpreterPlaceholder).ToArray(); PyService.ClearInteractiveOptions(); foreach (var interpreter in interpreterService.Interpreters) { seenIds.Add(interpreter.Id); PyService.GetInteractiveOptions(interpreter); } foreach (var kv in placeholders) { if (!seenIds.Contains(kv.Key.Id)) { PyService.AddInteractiveOptions(kv.Key, kv.Value); } } if (_window != null) { _window.UpdateInterpreters(); } }
public override void LoadSettingsFromStorage() { var interpreterService = ComponentModel.GetService <IInterpreterRegistryService>(); var seenIds = new HashSet <string>(); var placeholders = PyService.InteractiveOptions.Where(kv => kv.Key.StartsWith(InterpreterPlaceholder.PlaceholderId + ";")).ToArray(); PyService.ClearInteractiveOptions(); foreach (var interpreter in interpreterService.Interpreters) { seenIds.Add(interpreter.Configuration.Id); PyService.GetInteractiveOptions(interpreter.Configuration); } foreach (var kv in placeholders) { if (!seenIds.Contains(kv.Key)) { PyService.AddInteractiveOptions(kv.Key, kv.Value); } } if (_window != null) { _window.UpdateInterpreters(); } }
public PythonInteractiveOptions GetOptions(IPythonInterpreterFactory interpreterFactory) { return(PyService.GetInteractiveOptions(interpreterFactory)); }
private PythonInteractiveOptions ReadOptions(IPythonInterpreterFactory interpreter) { return(PyService.GetInteractiveOptions(interpreter)); }