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:
Vincent Feng
2018-09-07 08:23:28 +08:00
committed by GitHub
parent 197e1c651f
commit 005c28dd3a
6 changed files with 177 additions and 47 deletions

View File

@@ -27,10 +27,11 @@ import {
export abstract class ExtHostAccountManagementShape {
$autoOAuthCancelled(handle: number): Thenable<void> { throw ni(); }
$clear(handle: number, accountKey: sqlops.AccountKey): Thenable<void> { throw ni(); }
$getSecurityToken(handle: number, account: sqlops.Account): Thenable<{}> { throw ni(); }
$getSecurityToken(account: sqlops.Account): Thenable<{}> { throw ni(); }
$initialize(handle: number, restoredAccounts: sqlops.Account[]): Thenable<sqlops.Account[]> { throw ni(); }
$prompt(handle: number): Thenable<sqlops.Account> { throw ni(); }
$refresh(handle: number, account: sqlops.Account): Thenable<sqlops.Account> { throw ni(); }
$accountsChanged(handle: number, accounts: sqlops.Account[]): Thenable<void> { throw ni(); }
}
export abstract class ExtHostConnectionManagementShape {