microsoft/teams.net
Publicmirrored from https://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.Plugins/Microsoft.Teams.Plugins.AspNetCore.DevTools/Extensions/HostApplicationBuilder.cs
22lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using System.Reflection; |
| 5 | |
| 6 | using Microsoft.Extensions.DependencyInjection; |
| 7 | using Microsoft.Extensions.Hosting; |
| 8 | using Microsoft.Teams.Apps.Extensions; |
| 9 | |
| 10 | namespace Microsoft.Teams.Plugins.AspNetCore.DevTools.Extensions; |
| 11 | |
| 12 | public static class HostApplicationBuilderExtensions |
| 13 | { |
| 14 | [Obsolete("DevTools is deprecated and will be removed in a later version. Use Microsoft 365 Agents Playground instead.")] |
| 15 | public static IHostApplicationBuilder AddTeamsDevTools(this IHostApplicationBuilder builder) |
| 16 | { |
| 17 | builder.Services.AddSingleton(builder.Configuration.GetTeamsDevTools()); |
| 18 | builder.Services.AddTeamsPlugin<DevToolsPlugin>(); |
| 19 | builder.Services.AddControllers().AddApplicationPart(Assembly.GetExecutingAssembly()); |
| 20 | return builder; |
| 21 | } |
| 22 | } |