Re: Runtime Class Registration in VB.Net
Ryan Heath <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <[email protected]> |
I've done something like that in the past. In our case we were looking for certain interfaces that were implemented in the add on assemblies.We placed the add on assemblies in a folder beneath the app folder and loaded the assemblies from there. HTH // Ryan On Thu, Oct 2, 2008 at 5:20 PM, Greg Rothlander <[email protected]>wrote: > I'm working on a compiler and I want to modify some of the > initialization/loading process a bit to make it more maintainable and > extendable, and I'm running into one problem. Here's the basic idea. > > > > Back in VB5/6 I worked on an application for law enforcement and the > military where a particular office wanted say 10 of say 20 features. Each > feature had a price tag and the client only purchased the ones they needed. > What we did for that was to create a DLL folder and when a client purchased > 10 of the 20, we placed the 10 they wanted in the folder and burned the > installation CD. When the user went to install, the installation would > place that folder in the executable directory. When the user executed the > application, a startup process would read through that folder and register > each DLL. Then menu's and other structures were dynamically generated at > startup based on what was registered, licensed, and what was found in that > DLL folder. If a client purchased an additional module to the application, > we would send them an installation CD with only that DLL and a license key. > They would then run the install and that DLL would then be copied to the > DLL > folder, and the license key would update the security as needed to make > sure > they had a license to run that DLL. In the end, what we were doing was > allowing runtime loading of the DLLs that the application was using, and > that's basically what I want to do know. But the techniques that we used > back 15 years ago do not seem to apply to .Net and I'm guessing there has > to > be a new and better way to do this. Maybe I'm not thinking here and there > is an easy and common way to support this... I think that is the case. I > think I'm just overlooking something simple here. > > > > You see this in application such as PhotoShop. When then start up, you > watch a number of DLLs load on the splash screen. That is basically what I > want to do. Dynamically load up 300 to 400 classes at start up. > > > > What I want to do is to create lots of small classes (300 to 400 of them), > then at startup I want to dynamically load them to be used by the compiler. > When I want to add a new class I can just create a standalone class and > compile it and drop it into the folder. The next time the application > starts up, it will pick up the new class and use it. > > > > What this allows is end-user extensions to the compiler, or to override > compiler processes without having to modify the base code. > > > > Any thoughts, suggestions, or ideas would be very much appreciated. > > > > Best regards, > > Jon Rothlander > > > > > =================================== > View archives and manage your subscription(s) at > http://peach.ease.lsoft.com/archives > =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives