Senparc.CO2NET icon indicating copy to clipboard operation
Senparc.CO2NET copied to clipboard

关于Senparc.CO2NET.RegisterServices.RegisterServices注册的问题

Open builderman opened this issue 4 years ago • 1 comments

是不是应该可以在Startup.ConfigureService中配置: services.AddSingleton<IRegisterService, RegisterService>();

然后在Configure中注入来的好看一些: public void Configure(IApplicationBuilder app, IHostingEnvironment env, IRegisterService registerService)

这样更符合.net core的风格一点

builderman avatar Aug 11 '19 03:08 builderman

是的,理论上还可以简化,现在这个写法一定程度上是为了兼容 .net framework,后面我会考虑一下。

JeffreySu avatar Aug 11 '19 04:08 JeffreySu