Example #1
0
        public override async Task ProcessAsync(BotRoutingContext context)
        {
            var results = context
                          .SearchByCommand()
                          .Select(x => InlineQueryResponseComposer.GetArticleResult(x, true))
                          .AddSearchTips(ResultType.SearchShort)
                          .Take(50);

            context.RecordGenerationSegmentTime();
            await context.AnswerInlineQueryAsync(results);
        }
Example #2
0
        public override async Task ProcessAsync(BotRoutingContext context)
        {
            var results = context
                          .SearchByCommand()
                          .OrderByDescending(x => x.DateClose - x.DateOpen)
                          .Select(x => InlineQueryResponseComposer.GetArticleResult(x))
                          .AddSearchTips(ResultType.Oldest)
                          .Take(50);

            context.RecordGenerationSegmentTime();
            await context.AnswerInlineQueryAsync(results);
        }