public async Task AfterConfirm_ListNamedItems(IDialogContext context, IAwaitable <bool> result)
 {
     if (await result)
     {
         await NamedItemsWorker.DoListNamedItems(context);
     }
     context.Wait(MessageReceived);
 }
        public async Task ListNamedItems(IDialogContext context, LuisResult result)
        {
            // Telemetry
            TelemetryHelper.TrackDialog(context, result, "NamedItems", "ListNamedItems");

            string workbookId = String.Empty;

            context.UserData.TryGetValue <string>("WorkbookId", out workbookId);

            if (!(String.IsNullOrEmpty(workbookId)))
            {
                await NamedItemsWorker.DoListNamedItems(context);

                context.Wait(MessageReceived);
            }
            else
            {
                context.Call <bool>(new ConfirmOpenWorkbookDialog(), AfterConfirm_ListNamedItems);
            }
        }