怎样的AppDomain提供隔离 [英] How do appDomain provide Isolation

查看:186
本文介绍了怎样的AppDomain提供隔离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的窗口形式的应用程序,我创建了一个AppDomain中说,沙箱。在此沙箱我EXCUTE约$ C C说TestMethod的从TestAppdomain类$。这个类是Test.dll的是在当前的AppDomain(默认应用程序域)加载。

In my window forms application, I create a Appdomain say sandBox. In this sandbox i excute some code Say TestMethod from TestAppdomain Class. This class is in Test.dll which is not loaded in the current appdomain (Default appdomain).

现在在执行TestMethod的一些异常发生,那么我想在沙箱域进行卸载,因为应用程序域提供Isolotion我默认的AppDomain 768,16不会受到影响。

Now while executing TestMethod some exception occurs, then I want the sandbox domain to be unloaded and since AppDOmain provide Isolotion my Default Appdomain shoud not be affected.

但只要我阅读在互联网上我想这是不是possible.But能有人给我如何才达到它的一些指针。

But As i read over the internet i guess this is not possible.But could some one give me some pointer on how to achive it.

在此先感谢

维克拉姆

推荐答案

是的,这当然是可能的,而实际上它是应用程序域的全部目的。快速谷歌搜索变成了一个很好的资源:

Yes this is certainly possible, and in fact it is the entire purpose of AppDomains. A quick Google search turns up a good resource:

<一个href="http://geekswithblogs.net/elinden/archive/2008/09/12/application-processing-isolation-welcome-the-appdomain-object.aspx" rel="nofollow">http://geekswithblogs.net/elinden/archive/2008/09/12/application-processing-isolation-welcome-the-appdomain-object.aspx

您可能也想看看进入托管加载框架(MAF):

You may also want to look into the Managed Add-In Framework (MAF):

这篇关于怎样的AppDomain提供隔离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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