什么是IoC容器中,在.NET的现状如何? [英] What is the current state of IoC containers in .NET?

查看:391
本文介绍了什么是IoC容器中,在.NET的现状如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道类似的问题已经被问过

我希望得到在.NET领域的IoC容器框架的当前状态。

I'm looking to get the current state of IoC container framework in the .NET sphere.

有关此主题的其他问题是过时的pretty的。我是prepping为一疗程关于这个问题,所以我想以present最相关的信息。

Other questions on this topic are pretty dated. I'm prepping for a course on the subject, so I would like to present the most relevant information.

什么是目前最好的IoC容器中,.NET,为什么?
什么是最流行?

What currently is the best in IoC containers in .NET and why?
What is the most popular?

推荐答案

没有人知道它的DI容器是最流行的,但这里有一个技巧:

No-one knows which DI Container is the most popular one, but here's a tip:

比较上的NuGet 的下载统计。所有主要的.NET容器都可以通过的NuGet,这样做会给你有关的相对受欢迎容器之间排名的想法。

Compare download statistics on NuGet. All the major .NET containers are available through NuGet, so doing that will give you an idea about the relative popularity ranking between the containers.

请注意,这种方法是对一些原因统计的角度来看问题:

Be aware that this method is problematic from a statistical viewpoint for a number of reasons:

  • 还有其他的方法来下载容器。举个例子,团结还附带企业库,可以从microsoft.com下载。
  • 在下载不等于使用。
  • 的NuGet是(AFAIR)仅在Visual Studio 2010中可用的,所以有可能会选择偏误。 Visual Studio中的previous版本的用户可以preFER不同的容器。

尽管建议的比较法的不准确,它仍然是我所知道的最好的。就拿它究竟是什么。

Despite the inaccuracy of the suggested comparison method, it's still the best that I'm aware of. Take it for what it is.

这篇关于什么是IoC容器中,在.NET的现状如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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