惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Cloudflare Blog
U
Unit 42
D
Docker
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
Recent Announcements
Recent Announcements
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
V
Visual Studio Blog
I
InfoQ
Google DeepMind News
Google DeepMind News
小众软件
小众软件
L
LangChain Blog
C
Check Point Blog
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
J
Java Code Geeks
罗磊的独立博客

博客园 - 天蝎

两岸三地在线编程学习网站 WebinoImageThumb - ZendFramework 2中操作图片的API PHP依赖管理器- Composer Local Temporary Tables and Table Variables Logging with SQL Server SQL Server Database Partitioning Myths and Truths 转载:什么是SHELL 转载:Plan freezing and other plan guide enhancements in SQL Server 2008 - 天蝎 转载:Breaking ownership chaining within a schema in SQL Server 转载:如何正确理解自动化测试技术 存储过程 SOA的设计理念 转载: The DBA as Detective: Troubleshooting Locking and Blocking 转载:锁的概述 转载: Microsoft SQL Server roles Why BCP connects to SQL Server instance which start with account of Network Service fail? Execution plans, estimated vs actual Finding the causes of poor performance in SQL Server Enabling Dedicated Administrator Connection Feature in SQL Server 2008
.net中应用程序域的概念
天蝎 · 2009-07-17 · via 博客园 - 天蝎

    在.NET平台下,程序集并没有直接承载在进程中(而传统的win32程序是直接承载的)。实际上.NET可执行程序承载在进程的一个逻辑分区中,术语称为应用程序域(也称AppDomain)。可见,一个进程可以包含多个应用程序域,每一个应用程序域中承载一个.NET可执行程序,这样的好处如下:
    应用程序域是.NET平台操作系统独立性的关键特性。这种逻辑分区将不同操作系统加载可执行程序的差异抽象化了。
    和一个完整的进程相比,应用程序域的CPU和内存占用要小的多。因此CLR加载和卸载应用程序域比起完整的进程来说也快的多。
    应用程序域为承载的应用程序提供了深度隔离。如果进程中一个应用程序域失败了,其他的应用程序域也能保持正常。

    AppDomain的主要成员:
    CreateDomain():该静态方法在当前进程中创建一个新的应用程序域。由于CLR能够根据需要创建应用程序域,所以必须调用这个方法的机会很少。
    GetCurrentThreadId():该静态方法返回当前应用程序域上活动的线程ID。
    UnLoad():该静态方法在进程中卸载指定的应用程序域。
    BaseDirectory:获取基目录,该目录用于探测相关的程序集。
    CreateInstance():在指定程序集文件中创建指定类型的新实例。
    ExecuteAssembly():根据文件名在应用程序域中执行程序集。
    GetAssemblies():获取已加载到此应用程序域中的.NET程序集(基于COM和C的二进制文件除外)。
    Load():动态加载程序集到当前应用程序域。