.net中的插件体系结构:卸载 [英] Plugin architecture in .net: unloading

查看:110
本文介绍了.net中的插件体系结构:卸载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在c#/.net中实现插件架构才能加载

I need to implement a plugin architecture within c#/.net in order to load

  • 自定义用户定义的操作
  • 自定义数据网格/转换/...的数据类型处理代码

来自非静态链接的程序集文件.

from non-static linked assembly files.

由于应用程序必须处理许多个自定义用户定义的操作,因此Iam需要在执行后卸载它们,以减少内存使用.

Because the application has to handle many custom user defined actions, Iam in need for unloading them once executed in order to reduce memory usage.

我找到了几篇有关插件架构的好文章,例如:

I found several good articles about plugin architectures, eg:

  • ExtensionManager
  • PluginArchitecture
  • ...

但是他们都没有给我足够的香肠以适当地卸下组件.

but none of them gave me enough sausage for properly unloading an assembly.

由于要分发程序,并且用户定义的操作(如名称所示)由用户定义:如何防止程序集执行恶意代码(例如,关闭我的程序,删除文件)?

As the program is to be distributed and the user defined actions are (as the name states) user defined: how to i prevent the assembly from executing malicious code (eg. closing my progra, deleting files)?

你们中有人遇到过其他陷阱吗?

Are there any other pitfalls one of you has encountered?

推荐答案

您是否考虑过使用MS的加载项和可扩展性框架? http://msdn.microsoft.com/en-us/magazine/cc163476. aspx

Have you thought about using the Add-Ins and Extensiblity framework from MS? http://msdn.microsoft.com/en-us/magazine/cc163476.aspx

迈克尔

这篇关于.net中的插件体系结构:卸载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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