microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
kavin/agents-sdk-interop

Branches

Tags

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

Clone

HTTPS

Download ZIP

core/samples/CustomHosting/Program.cs

16lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4using CustomHosting;
5using Microsoft.Teams.Apps;
6using Microsoft.Teams.Core.Hosting;
7
8WebApplicationBuilder webAppBuilder = WebApplication.CreateSlimBuilder(args);
9// TODO: Show how to setup multiple Teams Bot applications (like how it was done in PABot)
10webAppBuilder.Services.AddTeamsBotApplication<MyTeamsBotApp>();
11WebApplication webApp = webAppBuilder.Build();
12
13webApp.MapGet("/", () => $"Teams Bot App is running {TeamsBotApplication.Version}.");
14webApp.UseBotApplication<MyTeamsBotApp>();
15
16webApp.Run();
17