BotSharp/BotSharp.Channel.Weixin/ModuleInjector.cs
2019-03-16 19:55:55 -05:00

29 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using BotSharp.Core.Modules;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Senparc.CO2NET.RegisterServices;
using Senparc.Weixin.RegisterServices;
namespace BotSharp.Channel.Weixin
{
public class ModuleInjector : IModule
{
public void ConfigureServices(IServiceCollection services, IConfiguration config)
{
// Senparc.CO2NET Senparc.Weixin
services.AddSenparcGlobalServices(config)
.AddSenparcWeixinServices(config);
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env/*, IOptions<SenparcSetting> senparcSetting, IOptions<SenparcWeixinSetting> senparcWeixinSetting*/)
{
//https://github.com/Senparc/Senparc.CO2NET/blob/master/Sample/Senparc.CO2NET.Sample.netcore/Startup.cs
/* IRegisterService register = RegisterService.Start(env, senparcSetting.Value)
.UseSenparcGlobal();*/
}
}
}