I am developing an application which will be built from sources by an automated build/deployment pipeline so that each registered customer gets a custom-tailored binary with certain information hard-coded into it.
Build process will take a known .cs file and replace default values (placeholders basically) with data available to it from the build environment settings.
I am thinking of a repository-like class which instantiates a data object and fills its properties with values which would be easy for a regex (or even a simpler string replacement) to locate. Something like
public static KeyInfoDbo GetEmbeddedData() {
KeyInfoDbo = new KeyInfoDbo {
CompanyName = "[KeyInfo.CompanyName]";
}
}
Are there better ideas for how to organize this data more efficiently or elegantly?