Brian,
It sounds like your interface design is not too good if you are going to
do this. If you want to create a new interface and have it loaded into your
main assembly, then how will your main assembly know how to use the
interface? The only option you have at that point is to use reflection, and
that is going to kill you in the long run, I think.
What you really want to do is use ONE base interface which supports the
operations across all (or broken up in some way where you can have a clearly
defined interface which you can reference) and then have all of the
different providers implement it.
You don't have to compile all the classes into one assembly. If
anything, have one assembly that has the interface definitions. Your loader
assembly will have a reference to this, as will the implementation
assemblies. Then, you can split out the implementations to different
assemblies, however you want. As long as they implement the same interface,
you will be fine.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
<br***********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have a core web service that acts as a gateway for several third
party web services. Each one of the third party web services has it's
own "interface" class derived from a main interface. When the main web
service receives a request it will load the appropriate class with
Activator.CreateInstance. Currenty all classes are compiled into a
monolithic assembly.
I want to be able to move each "interface" to its own assembly. The
end result is that I would like to add a new interface without
recompiling and redploying the whole assembly. I want to be able to
add a new assembly for each new interface, and dynamically load the
assembly when a request of that type is received.
The question that I have is about performance. The main web service
will be very busy and will be processing thousands of request per hour.
Am I sacrificing a great amount of performance by doing this? Is
there a way to do this without sacrificing performance?
Thanks,
Brian Gabriel
br***********@gmail.com