public async Task GetCellValue(IDialogContext context, LuisResult result) { // Telemetry TelemetryHelper.TrackDialog(context, result, "Cells", "GetCellValue"); var cellAddress = result.Entities[0].Entity.ToUpper(); context.UserData.SetValue <string>("CellAddress", cellAddress); context.UserData.SetValue <ObjectType>("Type", ObjectType.Cell); context.UserData.SetValue <string>("Name", cellAddress); string workbookId = String.Empty; context.UserData.TryGetValue <string>("WorkbookId", out workbookId); if (!(String.IsNullOrEmpty(workbookId))) { await CellWorker.DoGetCellValue(context); context.Wait(MessageReceived); } else { context.Call <bool>(new ConfirmOpenWorkbookDialog(), AfterConfirm_GetCellValue); } }
public async Task AfterConfirm_GetCellValue(IDialogContext context, IAwaitable <bool> result) { if (await result) { await CellWorker.DoGetCellValue(context); } context.Wait(MessageReceived); }