internal static InterpreterFactoryCreationOptions GetCreationOptions(IServiceProvider site, InterpreterConfiguration config, out bool noDatabase) { if (ExperimentalOptions.NoDatabaseFactory) { noDatabase = true; return(new InterpreterFactoryCreationOptions { DatabasePath = DatabasePathSelector.CalculateVSLocalDatabasePath(site, config, 1), }); } else { noDatabase = false; return(new InterpreterFactoryCreationOptions { DatabasePath = DatabasePathSelector.CalculateGlobalDatabasePath(config, PythonTools.Interpreter.LegacyDB.PythonTypeDatabase.CurrentVersion) }); } }
internal static InterpreterFactoryCreationOptions GetCreationOptions(IServiceProvider site, InterpreterConfiguration config) { if (ExperimentalOptions.NoDatabaseFactory) { return(new InterpreterFactoryCreationOptions { PackageManager = BuiltInPackageManagers.PipXFrames, NoDatabase = true, DatabasePath = DatabasePathSelector.CalculateVSLocalDatabasePath(site, config, 1), }); } else { return(new InterpreterFactoryCreationOptions { PackageManager = BuiltInPackageManagers.PipXFrames, DatabasePath = Path.Combine( PythonTypeDatabase.CompletionDatabasePath, InterpreterFactoryCreator.GetRelativePathForConfigurationId(config.Id) ) }); } }