Add azdata.d.ts for new extensibility APIs (#4247)

* Add azdata.d.ts for new extensibility APIs

* Update azdata typing files for connection API proposal

* Add implementation for azdata module

* Fix build break in agent
This commit is contained in:
Karl Burtram
2019-03-01 11:58:32 -08:00
committed by GitHub
parent dad807d62d
commit 8ebf5dbcb4
7 changed files with 5689 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
'use strict';
import * as sqlops from 'sqlops';
import * as azdata from 'azdata';
export class AgentUtils {
@@ -10,8 +11,8 @@ export class AgentUtils {
public static async getAgentService(): Promise<sqlops.AgentServicesProvider> {
if (!AgentUtils._agentService) {
let currentConnection = await sqlops.connection.getCurrentConnection();
this._agentService = sqlops.dataprotocol.getProvider<sqlops.AgentServicesProvider>(currentConnection.providerName, sqlops.DataProviderType.AgentServicesProvider);
let currentConnection = await azdata.connection.getCurrentConnection();
this._agentService = sqlops.dataprotocol.getProvider<sqlops.AgentServicesProvider>(currentConnection.providerId, sqlops.DataProviderType.AgentServicesProvider);
}
return AgentUtils._agentService;
}

View File

@@ -4,6 +4,8 @@
*--------------------------------------------------------------------------------------------*/
/// <reference path='../../../../src/vs/vscode.d.ts'/>
/// <reference path='../../../../src/sql/azdata.d.ts'/>
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
/// <reference path='../../../../src/sql/sqlops.d.ts'/>
/// <reference path='../../../../src/sql/sqlops.proposed.d.ts'/>
/// <reference types='@types/node'/>