BotSharp/src/Infrastructure/BotSharp.Core/BotSharpServiceCollectionExtensions.cs

29 lines
691 B
C#
Raw Normal View History

2023-05-27 01:58:31 +00:00
using BotSharp.Core.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace BotSharp.Core;
public static class BotSharpServiceCollectionExtensions
{
public static IServiceCollection AddBotSharp(this IServiceCollection services)
{
services.AddScoped<IPlatformMidware, PlatformMidware>();
return services;
}
public static void ConfigureBotSharp(this IServiceCollection services)
{
}
public static IApplicationBuilder UseBotSharp(this IApplicationBuilder app)
{
if (app == null)
{
throw new ArgumentNullException(nameof(app));
}
return app;
}
}