mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 02:48:30 -05:00
20 lines
958 B
TypeScript
20 lines
958 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { AppContext } from '../appContext';
|
|
import * as vscode from 'vscode';
|
|
import * as constants from './constants';
|
|
import { ConnectionService } from './connectionService';
|
|
|
|
export function registerConnectionCommands(appContext: AppContext) {
|
|
appContext.extensionContext.subscriptions.push(vscode.commands.registerCommand('mssql.clearPooledConnections', async () => {
|
|
await getConnectionService(appContext).clearPooledConnections();
|
|
}));
|
|
}
|
|
|
|
function getConnectionService(appContext: AppContext): ConnectionService {
|
|
return appContext.getService<ConnectionService>(constants.ConnectionService);
|
|
}
|