Files
azuredatastudio/extensions/profiler/src/data/createSessionData.ts
Alex Ma 1040d5bc4c Additions to sqlLocalizedExtensions (#15490)
* additions to sqlLocalizedExtensions

* remove azdata from sqlLocalizedExtensions

* fix extension files to work with nls.metadata.json function (required)
2021-05-18 12:21:27 -07:00

26 lines
953 B
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 azdata from 'azdata';
export class CreateSessionData {
public ownerUri: string;
public sessionName: string;
public templates: Array<azdata.ProfilerSessionTemplate> = new Array<azdata.ProfilerSessionTemplate>();
constructor(ownerUri: string, templates: Array<azdata.ProfilerSessionTemplate>) {
this.ownerUri = ownerUri;
this.templates = templates;
}
public getTemplateNames(): string[] {
return this.templates.map(e => e.name);
}
public selectTemplate(name: string): azdata.ProfilerSessionTemplate {
return this.templates.find((t) => { return t.name === name; });
}
}