C# - Plugin Design

R

Richard

I'd like to build a C# application that has some sort of plugin or
additional modules depending on what functionality the client user has
requested.

The idea is that I have an SQL database table that can be updated from a
number of different sources [3rd party databases/applications] for example:

ID Source SomeData
== ====== =========
1 SomeSQLDatabase.dll abc
2 SomeFlatFileDatabase.dll xyz

Each plugin/module would support the same functions such as:

Find(string userToFind);
Update(ref CustomObject rowInDatabase);

etc. and thus a plugin/module could be used for updating a particular
record in the database depending on the source i.e psudo code:

foreach (file dllfile in directory)
{
if (file.Name == "SomeFlatFileDatabase.dll")
{
foreach (record in database with source = "SomeFlatFileDatabase.dll")
{
[SomeFlatFileDatabase.dll.]Update();
}
}
}

Both the main application and the plugins/modules would reference
another dll containing some custom collections etc.

Also is it possible to add the plugins/modules to a directory within my
applications installed directory without having to add the dll reference
i.e. duplicting the copy that would already be in the installation
directory as part of the main application.

I know this is possible, but I'm just not sure on the best way to start
designing this componant of my application. Could someone perhaps point
me in the right direction or give any hints and tips?

Many thanks in advance. If you need me to clarify anything then let me know.

Regards,

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top