public async Task AfterConfirm_GetActiveWorksheet(IDialogContext context, IAwaitable <bool> result) { if (await result) { await WorksheetWorker.DoGetActiveWorksheetAsync(context); } context.Wait(MessageReceived); }
public async Task GetActiveWorksheet(IDialogContext context, LuisResult result) { // Telemetry TelemetryHelper.TrackDialog(context, result, "Worksheets", "GetActiveWorksheet"); string workbookId = String.Empty; context.UserData.TryGetValue <string>("WorkbookId", out workbookId); if ((workbookId != null) && (workbookId != String.Empty)) { await WorksheetWorker.DoGetActiveWorksheetAsync(context); context.Wait(MessageReceived); } else { context.Call <bool>(new ConfirmOpenWorkbookDialog(), AfterConfirm_GetActiveWorksheet); } }