mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
* move handling generated files to the serilization classes * remove unneeded methods * add more folders to strictire compile, add more strict compile options * update ci * wip * add more layering and fix issues * add more strictness * remove unnecessary assertion * add missing checks * fix indentation * wip * remove jsdoc * fix layering * fix compile * fix compile errors * wip * wip * finish layering * fix css * more layering * rip * reworking results serializer * move some files around * move capabilities to platform wip * implement capabilities register provider * fix capabilities service * fix usage of the regist4ry * add contribution * remove no longer good parts * fix issues with startup * another try * fix startup * fix imports * fix tests * fix tests * fix more tests * fix tests * fix more tests * fix broken test * fix tabbing * fix naming
22 lines
1.2 KiB
TypeScript
22 lines
1.2 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import * as ConnectionConstants from 'sql/platform/connection/common/constants';
|
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
|
|
|
/**
|
|
* Gets the 'sql' configuration section for use in looking up settings. Note that configs under
|
|
* 'mssql' or other sections are not available from this.
|
|
*/
|
|
export function getSqlConfigSection(workspaceConfigService: IConfigurationService, sectionName: string): any {
|
|
let config = workspaceConfigService.getValue<{ [key: string]: any }>(ConnectionConstants.sqlConfigSectionName);
|
|
return config ? config[sectionName] : {};
|
|
}
|
|
|
|
export function getSqlConfigValue<T>(workspaceConfigService: IConfigurationService, configName: string): T {
|
|
let config = workspaceConfigService.getValue<{ [key: string]: any }>(ConnectionConstants.sqlConfigSectionName);
|
|
return config[configName];
|
|
}
|