Get Areas associated with an MVC project

前端 未结 3 1138
旧巷少年郎
旧巷少年郎 2021-01-12 17:13

Is there a way I can get the names of the areas in an MVC project?

Here\'s a few ways I can think of:

a) If I had the source, I could browse through the proj

3条回答
  •  一生所求
    2021-01-12 17:43

    You could do what MVC is doing, iterate all the referenced assemblies and look for classes that inherit from AreaRegistration. Then you can simply get the AreaRegistration.AreaName.

    I'm planning on doing this to build my top-level navbar using Twitter Bootstrap.

提交回复
热议问题