plugin architecture with c#/.net dlls

  • Thread starter Thread starter Allen Anderson
  • Start date Start date
A

Allen Anderson

I'm trying to write an application that takes plugins. I'd like to be
able to drop a dll into my apps directory and have the app see it on
loading (easy to do) then load the dll and interogate it to see if it
has a particular class or interface is implemented. If so I'll call
it etc.

My question is: Given that I have an interface defined
(MyPluginInterface) how do I go about taking a strange dll and
interogating it to see if it supports it then instance that
class/interface.

any help would be greatly appreciated.

thanks
 
You are in luck, my first article on plug-ins examines all of the methods for
interrogating
a library for plug-ins to load. You can view it on my blog at the below link.
To answer
the obvious questions, I'll definitely be keeping this code up to date, and I
have a couple
more articles on the platter just about ready to go out that discuss concepts
further into
the plug-in architecture. My main block at this time, is an extremely stringent
set of design
goals that I'm writing about in a kind of pre-amble document describing my end
goals. I
should be done with the goal document this weekend, and maybe Part 2 where I'll
show
all of the various methods for actually loading and working with plug-in types.

http://weblogs.asp.net/justin_rogers/articles/61042.aspx
 
Hi Allen,

I am glad you got what you want.

If you have further concern, please feel free to post, we will help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top