mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-12 11:08:31 -05:00
clean up some disposable use (#6832)
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation';
|
||||
import * as azdata from 'azdata';
|
||||
import { Deferred } from 'sql/base/common/promise';
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface CredentialManagementEvents {
|
||||
export const ICredentialsService = createDecorator<ICredentialsService>(SERVICE_ID);
|
||||
|
||||
export interface ICredentialsService {
|
||||
_serviceBrand: any;
|
||||
_serviceBrand: ServiceIdentifier<ICredentialsService>;
|
||||
|
||||
saveCredential(credentialId: string, password: string): Promise<boolean>;
|
||||
|
||||
@@ -34,9 +34,7 @@ export interface ICredentialsService {
|
||||
|
||||
export class CredentialsService implements ICredentialsService {
|
||||
|
||||
_serviceBrand: any;
|
||||
|
||||
private disposables: IDisposable[] = [];
|
||||
_serviceBrand: ServiceIdentifier<ICredentialsService>;
|
||||
|
||||
private _serverEvents: { [handle: number]: CredentialManagementEvents; } = Object.create(null);
|
||||
|
||||
@@ -71,8 +69,4 @@ export class CredentialsService implements ICredentialsService {
|
||||
public deleteCredential(credentialId: string): Promise<boolean> {
|
||||
return this._onServerEventsReady.promise.then(() => this._serverEvents[this._lastHandle].onDeleteCredential(credentialId));
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this.disposables = dispose(this.disposables);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user