Change hardcoded MSSQL provider name to use constant instead (#5953)

This commit is contained in:
Charles Gagnon
2019-06-10 18:10:39 +00:00
committed by GitHub
parent 97a37e6834
commit 673ecc3870
27 changed files with 118 additions and 102 deletions

View File

@@ -21,6 +21,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { Memento } from 'vs/workbench/common/memento';
import { ProfilerFilterDialog } from 'sql/workbench/parts/profiler/browser/profilerFilterDialog';
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
class TwoWayMap<T, K> {
private forwardMap: Map<T, K>;
@@ -157,13 +158,7 @@ export class ProfilerService implements IProfilerService {
}
private _runAction<T>(id: ProfilerSessionID, action: (handler: azdata.ProfilerProvider) => Thenable<T>): Thenable<T> {
// let providerId = this._connectionService.getProviderIdFromUri(this._idMap.get(id));
let providerId = 'MSSQL';
if (!providerId) {
return Promise.reject(new Error('Connection is required in order to interact with queries'));
}
let handler = this._providers.get(providerId);
let handler = this._providers.get(mssqlProviderName);
if (handler) {
return action(handler);
} else {