Skip to content

Commit

Permalink
Fix Auto ordering of variables-section when dependent variables (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot authored Apr 30, 2024
1 parent 3c3312b commit f4fd0ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ private IEnumerable<IConfigurationSection> GetVariablesChildren(IConfigurationSe
continue;

var independentVariable = true;
for (int j = i - 1; j >= 0; j--)
for (int j = sortVariables.Count - 1; j >= 0; j--)
{
var otherConfigKey = sortVariables[j].Key;
var referenceVariable = $"${{{otherConfigKey}}}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public void LoadVariablesDependentConfig()
memoryConfig["NLog:Targets:file:fileName"] = "${var_file}";
memoryConfig["NLog:Variables:var_folder"] = "hello";
memoryConfig["NLog:Variables:var_file"] = "${var_folder}/world.txt";
memoryConfig["NLog:Variables:var_logpath"] = "${var_file}";

var logConfig = CreateNLogLoggingConfigurationWithNLogSection(memoryConfig);

Expand Down

0 comments on commit f4fd0ef

Please sign in to comment.