在ASP.NET MVC 6中是否继续支持Ninject? [英] Continued Ninject support in ASP.NET MVC 6?

查看:63
本文介绍了在ASP.NET MVC 6中是否继续支持Ninject?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很高兴一直使用Ninject很长时间了,我真的很喜欢它,但是自ASP.NET 5MVC 6发布以来,我面临着一个艰难的选择.

I have been very happily using Ninject for a long time now, and I really like it, but I am faced with a difficult choice since the release of ASP.NET 5 and MVC 6.

基本上,微软已经公开了他们自己的依赖注入系统.据我所知,这一点引起了很多批评.但是我更大的问题在于它如何影响其他库.

Basically, out of the gate, Microsoft has revealed their own dependency injection system; Which is one that to my knowledge has gotten a lot of criticism. But my bigger problem lies with how it affects other libraries.

来自我问的另一个问题其他在线资源,看来Ninject无法解决带有MVC 6的包装盒.尽管有一个解决方案"以详细库Microsoft.Framework.DependencyInjection.Ninject and Ninject的形式给出.这甚至更加棘手,因为该库需要将https://www.myget.org/F/aspnetmaster/添加到您的 NuGet 供稿列表中.

From another question I asked and other resources online, it seems that Ninject does not work out of the box with MVC 6. Though there is a "solution" given in the form of a verbose library Microsoft.Framework.DependencyInjection.Ninject and Ninject. This is even trickier because that library requires adding https://www.myget.org/F/aspnetmaster/ to your list of NuGet feeds.

我做了一些挖掘,发现该库的托管位置;看起来不错,根据我的判断看来还可以,但是有些问题困扰着我.

I have done some digging and found where this library is hosted; It looks fine, it seems to work okay from what I can tell, but there are a few things that trouble me.

  • 该库似乎并不是由Ninject创作者领导的
  • 该图书馆被深埋在一个晦涩的仓库中
  • 在线上实际的Ninject资源永远不会提及

因此,基本上,我非常担心这是一些创可贴,并且对Ninject(甚至其他容器库)的支持正在消失.是否有一些我没有发现的隐藏信息?

So basically, I am very concerned that this is some kind of band-aide, and that support for Ninject (and even other container libraries) is dying out. Is there some hidden information that I'm just not discovering?

推荐答案

  • 该库似乎并不是由Ninject领导的 创作者
  • The library does not really appear to be headed by the Ninject creators

那个库,看起来这些也,看起来像Microsoft创建了在beta7中删除的依赖注入提供程序示例.请注意,指向MVC 6中的 DI的链接由您的原始问题引用,内容如下:

That library, and it would seem these also, look to be Microsoft created samples of Dependency Injection providers that were removed in beta7. Note that the link to DI in MVC 6 referenced by your original question says the following;

这些DI容器适配器是临时的,仅供参考; 我们希望它们最终将被删除并替换为 各自的容器所有者.

These DI container adaptors are temporary and are there for reference; we expect that they will eventually be removed and replaced by the respective container owners.

应有的状态. Microsoft不应该负责维护第三方提供商.

As they should be. Microsoft should not be responsible for maintaining 3rd party providers.

  • 该图书馆被深埋在一个晦涩的仓库中
  • The library is buried pretty deep in an obscure repository

如果您不知道,ASP.NET 5仍在开发中. nuget上提供Beta 7的预发行版本,但也有其他来源,包括;

If you are not aware, ASP.NET 5 is still in development. Beta 7 is available on nuget as a pre-release, but there are other sources as well including;

  • https://github.com/aspnet/ (source code)
  • https://www.myget.org/gallery/aspnetvnext (nuget dev branch builds of the above)
  • https://www.myget.org/gallery/aspnetmaster (nuget master branch builds of the above [same as your question])

这些来源由Microsoft维护.

These sources are maintained by Microsoft.

  • 在线上实际的Ninject资源永远不会提及
  • The actual Ninject resources online never mention it

与任何新开发一样,第三方库提供者必须自己确定何时(如果有的话)提供支持新代码库的产品实现.对于某些人来说,等待新框架正式发布是最有效的方法,因为在那之前极有可能发生API重大更改.当然,是否会实施支持完全取决于提供商的资源,和/或对于开源社区而言.

As with any new development, 3rd party library providers must themselves determine when (if at all) they will provide implementations of their products that support the new codebase. For some, it will be seen as most efficient to wait until the new framework is officially released, as API breaking changes are still highly likely to occur until that point. Whether support will be implemented at all is of course up to the providers resources, and/or in the case of open source the community.

这篇关于在ASP.NET MVC 6中是否继续支持Ninject?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆