-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathStorageConnectionCreateStep.ts
More file actions
19 lines (16 loc) · 1.21 KB
/
StorageConnectionCreateStep.ts
File metadata and controls
19 lines (16 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { type IStorageAccountWizardContext } from '@microsoft/vscode-azext-azureutils';
import { getStorageConnectionString } from '../../appSettings/connectionSettings/getLocalConnectionSetting';
import { type IFunctionWizardContext } from '../../createFunction/IFunctionWizardContext';
import { AzureConnectionCreateStepBase, type IConnection } from './AzureConnectionCreateStepBase';
export class StorageConnectionCreateStep extends AzureConnectionCreateStepBase<IStorageAccountWizardContext & IFunctionWizardContext> {
public async getConnection(context: IStorageAccountWizardContext & IFunctionWizardContext): Promise<IConnection> {
return await getStorageConnectionString(context);
}
public shouldExecute(context: IStorageAccountWizardContext & IFunctionWizardContext): boolean {
return !!context.storageAccount || !!context.useStorageEmulator;
}
}