I have a class in my application that translates path tokens into fully qualified paths. For example: it can take a string like "%MYAPPDATA%"
and return C:\Users\user.DOMAIN\AppData\Raoming\MyApp
.
Alternatively, the class has an overload to the function that can take an enum instead of a string. For example: it can take the enum AppPaths.MyAppData
and return C:\Users\user.DOMAIN\AppData\Raoming\MyApp
.
I need to store the "lookup table" somewhere, but I'm not sure what the best method or structure is. Should I use a dataset and write the table to disk? Or just keep in it memory?
A single path value can map to a string and an enum. I suppose I can just keep an array in memory whose index maps to the integer value of the enum and do a search through the array when I'm passed a string.
Thoughts?