microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
feature/oauthflow-fixes

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

core/samples/CompatBot/MyCompatMiddleware.cs

20lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4using Microsoft.Bot.Builder;
5
6namespace CompatBot
7{
8 public class MyCompatMiddleware : Microsoft.Bot.Builder.IMiddleware
9 {
10 public async Task OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken = default)
11 {
12 Console.WriteLine("MyCompatMiddleware: OnTurnAsync");
13 Console.WriteLine(turnContext.Activity.Text);
14
15 await turnContext.SendActivityAsync(MessageFactory.Text("Hello from MyCompatMiddleware!"), cancellationToken);
16
17 await next(cancellationToken).ConfigureAwait(false);
18 }
19 }
20}
21