Files
azuredatastudio/extensions/sql-migration/src/main.ts
Amir Omidi 207a9a6a25 Sets up the first page with some filler information (#11762)
* Sets up the first page with some filler information

* Add some valid information

* move to its own method
2020-08-11 17:12:05 -07:00

46 lines
1.4 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as azdata from 'azdata';
import { WizardController } from './wizard/wizardController';
class SQLMigration {
constructor(private readonly context: vscode.ExtensionContext) {
}
async start(): Promise<void> {
await this.registerCommands();
}
async registerCommands(): Promise<void> {
const commandDisposables: vscode.Disposable[] = [ // Array of disposables returned by registerCommand
vscode.commands.registerCommand('sqlmigration.start', async () => {
const connection = await azdata.connection.openConnectionDialog();
const wizardController = new WizardController(this.context);
wizardController.openWizard(connection);
}),
];
this.context.subscriptions.push(...commandDisposables);
}
stop(): void {
}
}
let sqlMigration: SQLMigration;
export async function activate(context: vscode.ExtensionContext) {
sqlMigration = new SQLMigration(context);
await sqlMigration.registerCommands();
}
export function deactivate(): void {
sqlMigration.stop();
}