views:

192

answers:

4

I'm looking for an example of multithread C# application who use plug'in architecture, can any one help me please ? many thanks

A: 

Look at sharp develop

Preet Sangha
many thanks, MEF seems good, I'll see sharp develop also when I have time
bidak
+1  A: 

hey, it seems you need a c# project and not an IDE, don't you?

I can give you some tips about multithreading and plugins, don't have an example at hand, though.

About multithreading: you can use System.ComponentModel.BackgroundWorker class for asynchronous threading, or you can use create your own BackgroundWorker class (with Thread.Start(ThreadStart or ParameterizedThreadStart)).

For plugins, i recommend you implement a common structure for a plugin folder/configuration, then realization would be a joke.

e.g. /plugins folder: /plugins/pluginname/conf.xml /plugins/pluginname/bin/ /plugins/pluginname/bin/pluginname.dll

Luka Ramishvili
-1... nice advice, but you should not ignore System.ComponentModel.Composition which hsa the coplete infrastructure already ;)
TomTom
System.ComponentModel.BackgroundWorker is a shorthand when you just want to call a method with callback.your choice, but, for your information, i've written production code with that model and achieved great performance. so, that model works :)
Luka Ramishvili
A: 

Thank you Luka for your help, yes I'm looking for c# project sample, I'm new with multithread and plugins. what you suggest seems interesting, I have to manage some dll (presents some tests : webservice state , ftp,...) : get results and display it on host. all tests results will also be traced (log file), so I have to create another class to manage this (two or more threads modify the same file) :)

can you send please me a small example (with two dll and the backgroundworket class), just to help me starting quickly.

I will send you my modification after ;)

bidak
I'm sorry to be a lil bit late, if it's not late I'll upload them and post soon.
Luka Ramishvili
A: 

thaks Preet, I will see this also, small example will be very welcome

bidak