什么是应用程序域?应用程序

2023-09-02 21:32:01 作者:少女杀手日记

什么是的AppDomain ?什么是应用程序域或者为什么的好处 微软带来的AppDomain的概念,什么是没有的AppDomain问题?

What is an AppDomain? What are the benefits of AppDomains or why Microsoft brought the concept of AppDomains, what was the problem without AppDomains?

请详细说明。

推荐答案

这是的AppDomain 提供了一个隔离层的过程中。一切你通常所认为的按计划(静态变量等)实际上是每个AppDomain中。本作是有用的:

An AppDomain provides a layer of isolation within a process. Everything you usually think of as "per program" (static variables etc) is actually per-AppDomain. This is useful for:

插件(你可以卸载一个的AppDomain ,而不是组装的在的的的AppDomain ) 安全性(可以运行一组与特定的信任度code) 隔离(可以运行不同版本的程序集等) plugins (you can unload an AppDomain, but not an assembly within an AppDomain) security (you can run a set of code with specific trust levels) isolation (you can run different versions of assemblies etc)

疼痛是你需要使用远程处理等。

The pain is you need to use remoting etc.

参见MSDN 获得其它更多信息。说实话,这是不是你要惹经常事。

See MSDN for lots more info. To be honest, it isn't something you need to mess with very often.

 
精彩推荐
图片推荐