Let's say I have an executable which relies on a set of rules, defined in an XML file. My main function looks something like this:
Later, I find that in practice, this executable gets invoked hundreds of times per second. This cannot be helped.
So, in order to cut down on hard disk reads, I would like to somehow embed the XML file inside my executable, meaning that changes to the XML can only have an effect after each recompile, and the end user will no longer be able to change any settings by editing the file. RulesEngine's constructor will no longer read a file from the hard disk, but will read the XML which has been loaded into memory. Also, the executable will no longer need to be distributed with the XML file. How can this best be done?
VB.NET:
Sub main()
Dim rulesEngine As New RulesEngine("rules.xml")
DoStuff(rulesEngine)
End Sub
Later, I find that in practice, this executable gets invoked hundreds of times per second. This cannot be helped.
So, in order to cut down on hard disk reads, I would like to somehow embed the XML file inside my executable, meaning that changes to the XML can only have an effect after each recompile, and the end user will no longer be able to change any settings by editing the file. RulesEngine's constructor will no longer read a file from the hard disk, but will read the XML which has been loaded into memory. Also, the executable will no longer need to be distributed with the XML file. How can this best be done?