Simply Jarvis

Members
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

101 Neutral

About Simply Jarvis

  • Rank
    Newbie
  1. I already have what I was looking for...  But anyway that is very intresting code non the less, though I don't currently have use for it.
  2. Well thats actually how I am doing things, as  for the types that get loaded into the program they get parsed by a static class in my Main file.  It grabs all the types from the plugins that implement classes or interfaces within API.dll So the types that implement ANY class in API.dll get added to a list for usage later in my program.   My main reason for posting this thread was to get input on how I should go about this and it would seem given your response that the way I've been planing to do it would indeed by recommended by you.
  3. Thanks for the reply "PhillipHamlyn" but I can already load the classes and such within the plugins into my program so there is no need for external libraries, I simply want some input regarding how I should have the structure.   Example: API.dll references Program.exe Default.dll references API.dll Program.exe loads all 'Plugins/*.dll' and pulls the classes from the plugins storing there types. Program.exe then when in need of using the plugin types does "IMyPluginBaseType TheCreatedClass = (IMyPluginBaseType) Assembly.CreateInstance( Type.FullName );" I store the data as such, Dictionary<String,Type>;  The string being a unique id generated when the type is parsed from the dll.   Currently I have Program.exe and Default.dll referencing API.dll as it's the easier meens of doing things.
  4. So earlier today I saw the needs for a dll plugin system and coded one.  There is a API.dll and a Default.dll along with my Program.exe   Plugins/Default.dll API.dll Program.exe   My question is whats the best way to go about this ?  I want Program.exe to have the same types in API.dll but if I put those types in Program.exe and reference it from API.dll I would be able to explicity add the classes from 'Default.dll' via Assembly into Program.exe via static calls.  But then I would need to re-define the type in API.dll which wouldnt be to hard as I can just reference the ones already in Program.exe So whats your thoughts and opinions on this one ?