コード例 #1
0
 private IPythonInterpreterFactory CreateFactory(PythonInterpreterInformation info)
 {
     return(InterpreterFactoryCreator.CreateInterpreterFactory(
                info.Configuration,
                new InterpreterFactoryCreationOptions {
         PackageManager = BuiltInPackageManagers.Conda,
         WatchFileSystem = true,
         NoDatabase = ExperimentalOptions.NoDatabaseFactory,
         DatabasePath = ExperimentalOptions.NoDatabaseFactory ?
                        DatabasePathSelector.CalculateVSLocalDatabasePath(_site, info.Configuration, 1) :
                        DatabasePathSelector.CalculateGlobalDatabasePath(info.Configuration, PythonTypeDatabase.FormatVersion)
     }
                ));
 }
コード例 #2
0
        private IPythonInterpreterFactory CreateFactory(PythonInterpreterInformation info)
        {
            if (!ExperimentalOptions.NoDatabaseFactory)
            {
                return(new LegacyDB.CPythonInterpreterFactory(
                           info.Configuration,
                           new InterpreterFactoryCreationOptions {
                    WatchFileSystem = true,
                    DatabasePath = DatabasePathSelector.CalculateGlobalDatabasePath(info.Configuration, LegacyDB.PythonTypeDatabase.FormatVersion)
                }
                           ));
            }

            return(new Ast.AstPythonInterpreterFactory(
                       info.Configuration,
                       new InterpreterFactoryCreationOptions {
                WatchFileSystem = true,
                DatabasePath = DatabasePathSelector.CalculateVSLocalDatabasePath(_site, info.Configuration, 1)
            }
                       ));
        }
コード例 #3
0
        private IPythonInterpreterFactory CreateFactory(PythonInterpreterInformation info)
        {
            if (!ExperimentalOptions.NoDatabaseFactory)
            {
                // Use the database-backed factory
                var fact = new LegacyDB.CPythonInterpreterFactory(
                    info.Configuration,
                    new InterpreterFactoryCreationOptions {
                    WatchFileSystem = true,
                    DatabasePath    = DatabasePathSelector.CalculateGlobalDatabasePath(info.Configuration, LegacyDB.PythonTypeDatabase.FormatVersion)
                }
                    );
                fact.BeginRefreshIsCurrent();
                return(fact);
            }

            return(InterpreterFactoryCreator.CreateInterpreterFactory(
                       info.Configuration,
                       new InterpreterFactoryCreationOptions {
                WatchFileSystem = true,
                DatabasePath = DatabasePathSelector.CalculateVSLocalDatabasePath(_site, info.Configuration, 1)
            }
                       ));
        }