mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 09:59:47 -05:00
Accounts: Enable notification for accounts change (#2432)
* Enable notification for accounts change * Fixed bugs in extHostAccountManagement.test.ts * Fixed as commented: 1. Removed AccountWithProviderHandle 2. Use a private dictionary _accounts in ExtHostAccountManagement to cache all accounts and corresponding provider handles. 3. getSecurityToken gets provider handle from _accounts for specified account. 4. Added / changed unit tests for getAllAccounts & getSecurityToken
This commit is contained in:
@@ -92,11 +92,14 @@ export function createApiFactory(
|
||||
accountUpdated(updatedAccount: sqlops.Account): void {
|
||||
return extHostAccountManagement.$accountUpdated(updatedAccount);
|
||||
},
|
||||
getAllAccounts(): Thenable<sqlops.AccountWithProviderHandle[]> {
|
||||
getAllAccounts(): Thenable<sqlops.Account[]> {
|
||||
return extHostAccountManagement.$getAllAccounts();
|
||||
},
|
||||
getSecurityToken(account: sqlops.AccountWithProviderHandle): Thenable<{}> {
|
||||
return extHostAccountManagement.$getSecurityToken(account.providerHandle, account.account);
|
||||
getSecurityToken(account: sqlops.Account): Thenable<{}> {
|
||||
return extHostAccountManagement.$getSecurityToken(account);
|
||||
},
|
||||
onDidChangeAccounts(listener: (e: sqlops.DidChangeAccountsParams) => void, thisArgs?: any, disposables?: extHostTypes.Disposable[]) {
|
||||
return extHostAccountManagement.onDidChangeAccounts(listener, thisArgs, disposables);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user