handle unsupported connection provider (#20577)

* handle unknown connection provider

* fix error
This commit is contained in:
Alan Ren
2022-09-09 14:14:33 -07:00
committed by GitHub
parent b9cb3de85b
commit be8bf7fcdc
10 changed files with 85 additions and 68 deletions

View File

@@ -321,6 +321,13 @@ export interface IConnectionManagementService {
* @returns array of connections
*/
getConnections(activeConnectionsOnly?: boolean): ConnectionProfile[];
/**
* Handle the unsupported provider scenario.
* @param providerName The provider name.
* @returns Promise with a boolean value indicating whether the user has accepted the suggestion.
*/
handleUnsupportedProvider(providerName: string): Promise<boolean>;
}
export enum RunQueryOnConnectionMode {

View File

@@ -322,4 +322,8 @@ export class TestConnectionManagementService implements IConnectionManagementSer
refreshAzureAccountTokenIfNecessary(uri: string): Promise<boolean> {
return undefined;
}
async handleUnsupportedProvider(providerName: string): Promise<boolean> {
return true;
}
}