How to use the inversify.unmanaged function in inversify

To help you get started, we’ve selected a few inversify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DonJayamanne / pythonVSCode / src / client / datascience / jupyter / jupyterCommandFinder.ts View on Github external
constructor(
        @unmanaged() protected readonly interpreterService: IInterpreterService,
        @unmanaged() private readonly executionFactory: IPythonExecutionFactory,
        @unmanaged() private readonly configuration: IConfigurationService,
        @unmanaged() private readonly knownSearchPaths: IKnownSearchPathsForInterpreters,
        @unmanaged() disposableRegistry: IDisposableRegistry,
        @unmanaged() protected readonly fileSystem: IFileSystem,
        @unmanaged() private readonly logger: ILogger,
        @unmanaged() private readonly processServiceFactory: IProcessServiceFactory,
        @unmanaged() private readonly commandFactory: IJupyterCommandFactory,
        @unmanaged() protected readonly workspace: IWorkspaceService,
        @unmanaged() private readonly appShell: IApplicationShell
    ) {
        this.processServicePromise = this.processServiceFactory.create();
        disposableRegistry.push(this.interpreterService.onDidChangeInterpreter(async () => this.clearCache()));
        if (workspace) {
            const disposable = workspace.onDidChangeConfiguration(async e => {
                if (e.affectsConfiguration('python.dataScience.searchForJupyter', undefined)) {
                    // When config changes happen, recreate our commands.
                    await this.clearCache();
                }
            });
            disposableRegistry.push(disposable);
        }
    }
    /**
github DonJayamanne / pythonVSCode / src / client / interpreter / locators / services / baseVirtualEnvService.ts View on Github external
    public constructor(@unmanaged() private searchPathsProvider: IVirtualEnvironmentsSearchPathProvider,
        @unmanaged() serviceContainer: IServiceContainer,
        @unmanaged() name: string,
        @unmanaged() cachePerWorkspace: boolean = false) {
        super(name, serviceContainer, cachePerWorkspace);
        this.virtualEnvMgr = serviceContainer.get(IVirtualEnvironmentManager);
        this.helper = serviceContainer.get(IInterpreterHelper);
        this.fileSystem = serviceContainer.get(IFileSystem);
    }
    // tslint:disable-next-line:no-empty
github eclipse-theia / theia / packages / core / src / browser / widgets / widget.ts View on Github external
* https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 ********************************************************************************/

import { injectable, decorate, unmanaged } from 'inversify';
import { Widget, FocusTracker } from '@phosphor/widgets';
import { Message } from '@phosphor/messaging';
import { Signal } from '@phosphor/signaling';
import { Disposable, DisposableCollection, MaybePromise } from '../../common';
import { KeyCode, KeysOrKeyCodes } from '../keys';

import PerfectScrollbar from 'perfect-scrollbar';

decorate(injectable(), Widget);
decorate(unmanaged(), Widget, 0);

export * from '@phosphor/widgets';
export * from '@phosphor/messaging';

export const DISABLED_CLASS = 'theia-mod-disabled';
export const EXPANSION_TOGGLE_CLASS = 'theia-ExpansionToggle';
export const COLLAPSED_CLASS = 'theia-mod-collapsed';
export const SELECTED_CLASS = 'theia-mod-selected';
export const FOCUS_CLASS = 'theia-mod-focus';

@injectable()
export class BaseWidget extends Widget {

    protected readonly toDispose = new DisposableCollection();
    protected readonly toDisposeOnDetach = new DisposableCollection();
    protected scrollBar?: PerfectScrollbar;
github tokilabs / plow / src / eventSourcing / esRepository.ts View on Github external
public constructor(
    @unmanaged() protected storage: IEventStore,
    @unmanaged() protected aggtClass: ConcreteType,
    @unmanaged() protected eventBus?: IEventBus) {
  }
github tokilabs / plow / src / eventSourcing / eventStoreProviders / gesEventStore.ts View on Github external
constructor(
    @unmanaged() private host: string = 'localhost',
    @unmanaged() private port: number = 1113,
    @unmanaged() private settings: EventStore.ConnectionSettings = {}) {
  }
github node-ts / ddd / packages / ddd / src / infrastructure / write-repository.ts View on Github external
constructor (
    @unmanaged() private readonly aggregateRootConstructor: ClassConstructor,
    @unmanaged() private readonly writeModelConstructor: ClassConstructor,
    @unmanaged() private readonly databaseConnection: Connection,
    @unmanaged() private readonly bus: Bus,
    @unmanaged() protected readonly logger: Logger
  ) {
    this.repository = databaseConnection.getRepository(writeModelConstructor)
  }
github DonJayamanne / pythonVSCode / src / client / common / nuget / azureBlobStoreNugetRepository.ts View on Github external
constructor(
        @inject(IServiceContainer) private readonly serviceContainer: IServiceContainer,
        @unmanaged() protected readonly azureBlobStorageAccount: string,
        @unmanaged() protected readonly azureBlobStorageContainer: string,
        @unmanaged() protected readonly azureCDNBlobStorageAccount: string,
        private getBlobStore: (uri: string) => Promise = _getAZBlobStore
    ) { }
    public async getPackages(packageName: string, resource: Resource): Promise {
github eclipse-theia / theia / packages / core / src / browser / widgets / widget.ts View on Github external
* with the GNU Classpath Exception which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
 ********************************************************************************/

import { injectable, decorate, unmanaged } from "inversify";
import { Widget } from "@phosphor/widgets";
import { Message } from "@phosphor/messaging";
import { Disposable, DisposableCollection, MaybePromise } from '../../common';
import { KeyCode, KeysOrKeyCodes } from '../keys';

import PerfectScrollbar from 'perfect-scrollbar';

decorate(injectable(), Widget);
decorate(unmanaged(), Widget, 0);

export * from "@phosphor/widgets";
export * from "@phosphor/messaging";

export const DISABLED_CLASS = 'theia-mod-disabled';
export const COLLAPSED_CLASS = 'theia-mod-collapsed';
export const SELECTED_CLASS = 'theia-mod-selected';
export const FOCUS_CLASS = 'theia-mod-focus';

@injectable()
export class BaseWidget extends Widget {

    protected readonly toDispose = new DisposableCollection();
    protected readonly toDisposeOnDetach = new DisposableCollection();
    protected scrollBar?: PerfectScrollbar;
    protected scrollOptions?: PerfectScrollbar.Options;
github eclipse-theia / theia / packages / debug / src / node / vscode / vscode-debug-adapter-contribution.ts View on Github external
constructor(
        @unmanaged() readonly type: string,
        @unmanaged() readonly extensionPath: string
    ) {
        this.pckPath = path.join(this.extensionPath, 'package.json');
        this.pck = this.parse();
        this.debuggerContribution = this.resolveDebuggerContribution();
        this.label = this.debuggerContribution.then(({ label }) => label);
        this.languages = this.debuggerContribution.then(({ languages }) => languages);
        this.schemaAttributes = this.resolveSchemaAttributes();
    }