mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-04 19:08:42 +00:00
Allow environment variable expansion in config files (#689)
* Allow environment variable expansion in config files * Remove extra newline
This commit is contained in:
parent
d18bad9f05
commit
e3dcbe75e1
1 changed files with 3 additions and 0 deletions
|
@ -165,6 +165,9 @@ public abstract class ConfigurationBase<T> where T : class, new()
|
|||
continue;
|
||||
}
|
||||
|
||||
// Expand environment variables in strings. Format is windows-like (%ENV_NAME%)
|
||||
if (propertyInfo.PropertyType == typeof(string)) value = Environment.ExpandEnvironmentVariables((string)value);
|
||||
|
||||
local.SetValue(this, value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue