29 lines
691 B
C#
29 lines
691 B
C#
|
|
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;
|
||
|
|
}
|
||
|
|
}
|