API improvement: make registerConnectionEventProvider return disposable (#11880)

* promote api to official

* add comments

* disposable

* move getConnection out

* comment for connection namespace

* remove extra line

* also fix registerQueryInfoHandler
This commit is contained in:
Alan Ren
2020-10-12 14:29:48 -07:00
committed by GitHub
parent 108891ba2e
commit bc3527d310
8 changed files with 81 additions and 28 deletions

View File

@@ -615,7 +615,8 @@ export interface MainThreadDataProtocolShape extends IDisposable {
}
export interface MainThreadConnectionManagementShape extends IDisposable {
$registerConnectionEventListener(handle: number, providerId: string): void;
$registerConnectionEventListener(handle: number): void;
$unregisterConnectionEventListener(handle: number): void;
$getConnections(activeConnectionsOnly?: boolean): Thenable<azdata.connection.ConnectionProfile[]>;
$getConnection(uri: string): Thenable<azdata.connection.ConnectionProfile>;
$getActiveConnections(): Thenable<azdata.connection.Connection[]>;
@@ -830,6 +831,7 @@ export interface MainThreadQueryEditorShape extends IDisposable {
$createQueryTab(fileUri: string, title: string, content: string): void;
$setQueryExecutionOptions(fileUri: string, options: azdata.QueryExecutionOptions): Thenable<void>;
$registerQueryInfoListener(handle: number): void;
$unregisterQueryInfoListener(handle: number): void;
}
export interface ExtHostNotebookShape {