How to inject an object into a Ninject Module

瘦欲@ 提交于 2019-12-02 02:02:55
Remo Gloor

You are misunderstanding the purpose of modules. They are there to configure Ninject. They themselves shouldn't have any dependencies at all. The RegisterManager belongs somewhere in a service or startup action of your application. Or probably you have to change the way the permission manager works so that it takes an enumerable of all configured managers instead of registering them. But it's nearly impossible to tell what is best from the question -- just that you are abusing modules for something they are not intended for.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!