Skip to content

Commit

Permalink
Move IPersistentStateFactory registration to registerForIOC
Browse files Browse the repository at this point in the history
  • Loading branch information
kimadeline committed Sep 29, 2020
1 parent 85adf80 commit edc6ce5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/client/common/serviceRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ import { FileDownloader } from './net/fileDownloader';
import { HttpClient } from './net/httpClient';
import { NugetService } from './nuget/nugetService';
import { INugetService } from './nuget/types';
import { PersistentStateFactory } from './persistentState';
import { IS_WINDOWS } from './platform/constants';
import { PathUtils } from './platform/pathUtils';
import { CurrentProcess } from './process/currentProcess';
Expand Down Expand Up @@ -105,7 +104,6 @@ import {
IFeatureDeprecationManager,
IInstaller,
IPathUtils,
IPersistentStateFactory,
IRandom,
IsWindows
} from './types';
Expand All @@ -120,7 +118,6 @@ export function registerTypes(serviceManager: IServiceManager) {
serviceManager.addSingleton<IInterpreterPathService>(IInterpreterPathService, InterpreterPathService);
serviceManager.addSingleton<IExtensions>(IExtensions, Extensions);
serviceManager.addSingleton<IRandom>(IRandom, Random);
serviceManager.addSingleton<IPersistentStateFactory>(IPersistentStateFactory, PersistentStateFactory);
serviceManager.addSingleton<ITerminalServiceFactory>(ITerminalServiceFactory, TerminalServiceFactory);
serviceManager.addSingleton<IPathUtils>(IPathUtils, PathUtils);
serviceManager.addSingleton<IApplicationShell>(IApplicationShell, ApplicationShell);
Expand Down
5 changes: 5 additions & 0 deletions src/client/pythonEnvironments/legacyIOC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

import { injectable } from 'inversify';
import * as vscode from 'vscode';
import { PersistentStateFactory } from '../common/persistentState';
import { IPersistentStateFactory } from '../common/types';
import { getVersionString, parseVersion } from '../common/utils/version';
import {
CONDA_ENV_FILE_SERVICE,
Expand Down Expand Up @@ -367,5 +369,8 @@ export function registerForIOC(
serviceManager.addSingleton<IInterpreterWatcherBuilder>(IInterpreterWatcherBuilder, InterpreterWatcherBuilder);

serviceManager.addSingletonInstance<IEnvironmentInfoService>(IEnvironmentInfoService, new EnvironmentInfoService());

serviceManager.addSingleton<IPersistentStateFactory>(IPersistentStateFactory, PersistentStateFactory);

initializeExternalDependencies(serviceContainer);
}

0 comments on commit edc6ce5

Please sign in to comment.