Is there a way to use one app sett开发者_StackOverflowing variable definition in another app setting variable?
This is an example, right now I have:
<add key="P4RootDirectory" value="d:\p4\" />
<add key="P4LocalBranchSyncDirectory" value="d:\p4\sw\matt\" />
Ideally, I would like to have something like this
<add key="P4RootDirectory" value="d:\p4\" />
<add key="P4LocalBranchSyncDirectory" value="%P4RootDirectory%sw\matt\" />
Is this not possible? Would I have to do this in my code?
You will need to do this in code. If you use a DI injection framework that would be a great place to setup and automatically do the replace before injecting the final string into some constructor for example.
精彩评论