简体   繁体   中英

XL Deploy nesting dictionaries

I am preparing a an application for deployment using XebiaLabs XL Deploy tool.

It is a .Net Windows Service, with environmental specific configuration (multiple instances across several qa/uat/prod servers) in the app.config.

These config values have been migrated to XL Deploy dictionaries, and the app.config uses placeholders to refer to each required value.

Is there a way to nest dictionaries in XL Deploy? Ie Dictionary 1 will have a key that has dictionary 2 as it's value?

There is no real information about this in the docs, and not much else to be found about this.

In case anyone else is looking for this, the solution I came up with was pretty simple - to use grouped keys as values in dictionaries. For Example:

XLD Dictionary 1:
Key    - Value
Key1D1 - Value1
Key2D1 - Value2
Key3D1 - {{Key1D2}} {{Key2D2}} {{Key3D2}} 

XLD Dictionary 2:
Key    - Value
Key1D2 - Value3
Key2D2 - Value4
Key3D2 - Value5

Therefore in my config file i can have:

Dbconnection = {{Key1D1}}
Dbpassword = {{Key1D2}}
ConfigRules = {{Key1D3}}

And use the same config for each version, with all the instance specific ConfigRules set only in XLDeploy dictionaries

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM