dotnetcore / SmartCode

SmartCode = IDataSource -> IBuildTask -> IOutput => Build Everything!!!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

建议依赖注入的容器不要太凌乱了

htrlq opened this issue · comments

commented

SmartCodeApp.Services和SmartCodeOptions.Services,还有SmartCode.TemplateEngine.Impl.OfficialRazorTemplateEngine,一个地方一个依赖注入容器,增加了代码阅读难度了,太凌乱了,建议大大整合一下。
抱拳了

SmartCodeApp.Services和SmartCodeOptions.Services 是同一个。https://github.com/dotnetcore/SmartCode/blob/master/src/SmartCode.App/SmartCodeApp.cs#L18

OfficialRazorTemplateEngine 的 DI 自身注入的依赖与 SmartCode 无关,所以保持其内部必备容器使其独立。