public async prompt()

in tools/vscode-azurewebpubsub/src/workflows/hubSetting/create/InputNewHubSettingStep.ts [14:35]


    public async prompt(context: ICreateOrUpdateHubSettingContext): Promise<void> {
        if (!(context.hubProperties?.eventHandlers)) throw new Error(`Invalid hub properties ${context.hubProperties} or hub name ${context.hubName}`);
        await new InputHubNameStep(context).prompt(context);
        context.hubProperties.anonymousConnectPolicy = await InputAnonymousPolicy(context.ui);
        
        if (!(await context.ui.showQuickPick(
            [{ label: "No", data: false }, { label: "Yes", data: true }],
            { placeHolder: localize('askIfNeedEventHandler', 'Do you want to add event handlers?') }
        )).data) {
            return;
        }

        while (true) {
            await new CreateOrUpdateEventHandlerStep(true).prompt(context);

            const askForMoreEventHandler: boolean = (await context.ui.showQuickPick(
                [ { label: "No", data: false }, { label: "Yes", data: true } ],
                { placeHolder: localize('askIfMoreEventHandler', 'Do you want to add more event handlers?') }
            )).data;
            if (!askForMoreEventHandler) break;
        }
    }