private async Task PromptChoices(IDialogContext context) { var configuredServices = ServicesConfiguration.GetConfiguredServices(); PromptDialog.Choice( context, ProcessChoice, configuredServices.Services.Select(svc => svc.Name), Resources.ServiceQuestion, Resources.SorryChoose, 3); }
private bool SimpleServiceIntent(string message, out string entity) { entity = null; if (string.IsNullOrEmpty(message)) { return(false); } var services = ServicesConfiguration.GetConfiguredServices(); var service = services.Services.FirstOrDefault(x => x.Name.ToLowerInvariant().Contains(message.ToLowerInvariant())); if (service != null) { entity = service.Name; return(true); } return(false); }