appDomain如何提供隔离 [英] How do appDomain provide Isolation

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

问题描述

在我的窗体表单应用程序中,我创建一个Appdomain说sandBox。在这个沙箱中,我从TestAppdomain类中删除了一些代码Say TestMethod。这个类是在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时会发生一些异常,然后我想要沙箱域因为AppDOmain提供了Isolotion,我的默认Appdomain不会受到影响。

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.

但是,当我通过互联网阅读我想这是不可能的。但是有些人可以给我一些关于如何掌握它的指针。

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.

感谢提前

Vikram

推荐答案

一个快速的Google搜索变成了一个很好的资源:

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

http://geekswithblogs.net/elinden/archive/2008/09/12/application-processing-isolation-welcome-the-appdomain -object.aspx

上面的链接被破坏,这个提供了一个 AppDomain 共享的概述。

Above link is broken, this one provides an overview of AppDomain sharing.

http ://geekswithblogs.net/akraus1/archive/2012/07/25/150301.aspx

您可能还需要查看Managed Add-框架(MAF):

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

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

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