Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plugin architecture in .net: unloading

Tags:

c#

.net

plugins

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

  • custom user defined actions
  • data type handling code for a custom data grid / conversion / ...

from non-static linked assembly files.

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?

like image 552
Phil Rykoff Avatar asked Mar 12 '10 01:03

Phil Rykoff


1 Answers

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

Michael

like image 169
Michael Ulmann Avatar answered Oct 15 '22 10:10

Michael Ulmann