component configuration.
-
ok the application config xml file is great for applications but what if I create a namespace / class that will be compiled as a dll and used in other application, where would or rather should I stick it configuration "defaults" in the host application config xml file or should it have it's own file? Thanks Rob ;P
-
ok the application config xml file is great for applications but what if I create a namespace / class that will be compiled as a dll and used in other application, where would or rather should I stick it configuration "defaults" in the host application config xml file or should it have it's own file? Thanks Rob ;P
Definitely use the 'configuration "defaults" in the host application config xml'. In general, if you are building a separate dll for binary re-use, you probably don't want the library (dll) itself to ever be concerned about application level settings and serializing them. Even if they are settings specific to the dll, they are settings that will be collected from the user in whatever application you are using and then passed into whatever objects you use from the dll upon instatiation. You can also use the registry to store the values from your main app. Then, when you want to use an object from your dll, pass in the values after obtaining them back from the registry (or XML) to the object constructor. Hope that makes sense. -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall