简体   繁体   English

Microsoft.Practices.EnterpriseLibrary.* 的替代品

[英]Alternatives to Microsoft.Practices.EnterpriseLibrary.*

I have a project that is handed over to me by old developer and is in need of upgrade.我有一个项目由老开发者交给我,需要升级。 Looking over all the reference Library (in.Net C#).查看所有参考库(in.Net C#)。 I see a collection of Microsoft.Practices.EnterpriseLibrary.* in use.我看到 Microsoft.Practices.EnterpriseLibrary.* 的集合正在使用中。

From their Microsoft.Practices.EnterpriseLibrary website, I see it is not maintained or updated and seems to be phased out/ will be removed in near future.从他们的 Microsoft.Practices.EnterpriseLibrary 网站上,我看到它没有得到维护或更新,似乎已被逐步淘汰/将在不久的将来被删除。

I am seeking an alternatives for the following Libraries.我正在寻找以下图书馆的替代品。 Please advise what are the available best libraries.请告知哪些是可用的最佳库。

  • Microsoft.Practices.EnterpriseLibrary.Caching ---->? Microsoft.Practices.EnterpriseLibrary.Caching ---->?
  • Microsoft.Practices.EnterpriseLibrary.Common ---->? Microsoft.Practices.EnterpriseLibrary.Common ---->?
  • Microsoft.Practices.EnterpriseLibrary.Common.Configuration ------>? Microsoft.Practices.EnterpriseLibrary.Common.Configuration ------>?
  • Microsoft.Practices.EnterpriseLibrary.Data ------>? Microsoft.Practices.EnterpriseLibrary.Data ------>?
  • Microsoft.Practices.EnterpriseLibrary.ExceptionHandling ---->? Microsoft.Practices.EnterpriseLibrary.ExceptionHandling ---->?
  • Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging ---->? Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging ---->?
  • Microsoft.Practices.EnterpriseLibrary.Logging ---->? Microsoft.Practices.EnterpriseLibrary.Logging ---->?
  • Microsoft.Practices.EnterpriseLibrary.Logging.Database ---->? Microsoft.Practices.EnterpriseLibrary.Logging.Database ---->?

From Wiki:来自维基:

The Microsoft Enterprise Library is a set of tools and programming libraries for the Microsoft .NET Framework. Microsoft Enterprise Library 是一组用于 Microsoft .NET 框架的工具和编程库。 It provides APIs to facilitate proven practices in core areas of programming including data access, logging, exception handling and others.它提供 API 以促进编程核心领域的成熟实践,包括数据访问、日志记录、异常处理等。 Enterprise Library is provided as pluggable binaries and source code, which can be freely used and customized by developers for their own purposes.企业库以可插拔二进制文件和源代码的形式提供,开发人员可以根据自己的目的自由使用和定制。 It also ships with test cases and quickstarts.它还附带测试用例和快速入门。

So times have changed and there is no one-to-one solution for each of the above dlls.所以时代变了,没有针对上述每个 dll 的一对一解决方案。 There are plenty of ways to tackle each individual area and that is the main reason that the Enterprise library is not maintained.有很多方法可以解决每个单独的领域,这就是企业库没有得到维护的主要原因。 It was a great one-fit solution back in the day, but it can't keep up with the versatile needs of the modern world.这在当时是一个很好的一体式解决方案,但它无法满足现代世界的多样化需求。

Caching is the easiest in terms of .net items.就 .net 项而言,缓存是最简单的。 Though I would suggest that you look for distributed caching solutions that will span web-servers and applications (not a one way solution).尽管我建议您寻找跨越 Web 服务器和应用程序的分布式缓存解决方案(不是单向解决方案)。 Microsoft.Practices.EnterpriseLibrary.Caching -> System runtime caching Microsoft.Practices.EnterpriseLibrary.Caching -> 系统运行时缓存

Microsoft.Practices.EnterpriseLibrary.Logging -> Depends on the framework. Microsoft.Practices.EnterpriseLibrary.Logging -> 取决于框架。

For example in.Net Core Net Core logging .例如在 .Net Core 中的Net Core 日志记录 In standard.Net we recently moved to NLog for dot net and we are using it for both EventViewer entries and application insights.在 standard.Net 中,我们最近将 NLog 用于 dot net,并将它用于 EventViewer 条目和应用程序洞察。 There are plenty of versatile tools out there to choose from.有很多多功能工具可供选择。

Microsoft.Practices.EnterpriseLibrary.ExceptionHandling -> Depends on the implementation Microsoft.Practices.EnterpriseLibrary.ExceptionHandling -> 取决于实现

In a WebApi Implementation, you can use Filters , Handlers or Middlewares to globally handle exceptions and apply policies.在 WebApi 实现中,您可以使用FiltersHandlersMiddlewares来全局处理异常并应用策略。

In the WCF world though the EnterpriseLibrary was the main way to handle Exceptions.在 WCF 世界中,尽管 EnterpriseLibrary 是处理异常的主要方式。 Things like ExceptionShielding have no real alternative other than writing your own custom code.除了编写自己的自定义代码之外,像ExceptionShielding这样的东西别无选择。

Microsoft.Practices.EnterpriseLibrary.Data - Required serious refactoring with one of the plenty database access apis and frameworks our there. Microsoft.Practices.EnterpriseLibrary.Data - 需要使用我们那里的大量数据库访问 API 和框架之一进行认真的重构。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 什么是 Microsoft.Practices.EnterpriseLibrary.Data - what is Microsoft.Practices.EnterpriseLibrary.Data “ Microsoft.Practices.EnterpriseLibrary.Caching.Cache”在未引用的程序集中定义 - 'Microsoft.Practices.EnterpriseLibrary.Caching.Cache' is defined in an assembly that is not referenced 无法加载文件或程序集'Microsoft.Practices.EnterpriseLibrary.Logging - Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Logging Microsoft.Practices.EnterpriseLibrary.SQL Sever 2016的数据兼容性 - Microsoft.Practices.EnterpriseLibrary.Data compatibility with SQL Sever 2016 AppDomain AssemblyResolve事件请求Microsoft.Practices.EnterpriseLibrary.Common.resources - AppDomain AssemblyResolve Event asks for Microsoft.Practices.EnterpriseLibrary.Common.resources 无法加载文件或程序集'Microsoft.Practices.EnterpriseLibrary.Caching - Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Caching Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy“返回”对象 - Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy “return” object 无法加载文件或程序集Microsoft.Practices.EnterpriseLibrary.Configuration - Could not load file or assembly Microsoft.Practices.EnterpriseLibrary.Configuration C#Microsoft.Practices.EnterpriseLibrary.Logging错误 - C# Microsoft.Practices.EnterpriseLibrary.Logging error 企业库6 Microsoft.Practices.EnterpriseLibrary.Caching丢失了吗? - Enterprise library 6 Microsoft.Practices.EnterpriseLibrary.Caching missing?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM