User-725520357 posted
<audio class="audio-for-speech"></audio>
Hi Gurus,
I have a Async Task method - IntroStepAsync , which i need to call this from c# timercontrol every 5 seconds. Please help me how to call the task method from timer control with parameters.
Below is the c# code which needs to be called from timer control.
private async Task<DialogTurnResult> IntroStepAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
{
if (!_luisRecognizer.IsConfigured)
{
return await stepContext.NextAsync(null, cancellationToken);
}
var messageText = "Welcome";
var promptMessage = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput);
return await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { Prompt = promptMessage }, cancellationToken);
}
Thanks