Files
azuredatastudio/extensions/profiler/client/src/data/createSessionData.ts
Anthony Dresser bd7aac8ee0 Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 (#8911)
* Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2

* update distro

* fix layering

* update distro

* fix tests
2020-01-22 13:42:37 -08: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; });
}
}