Example #1
0
        private async Task <DialogTurnResult> GetSessions(WaterfallStepContext stepContext, CancellationToken cancellationToken)
        {
            IEnumerable <Session> sessions = default;

            if (stepContext.Result is DateTime time)
            {
                sessions = await _sessionizeService.WhatToWatchAsync(time);
            }
            if (stepContext.Result is FoundChoice track)
            {
                sessions = await _sessionizeService.WhatToWatchAsync(track.Value);
            }
            return(await stepContext.NextAsync(sessions, cancellationToken : cancellationToken));
        }