Skip to content

Commit

Permalink
fix: correct ForkableActionEvaluator's configuration parsing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
moreal committed Jul 18, 2023
1 parent 0b0b55b commit cd1db06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public class ForkableActionEvaluatorConfiguration : IActionEvaluatorConfiguratio

public class ForkableActionEvaluatorRange
{
public long Start { get; }
public long End { get; }
public long Start { get; set; }
public long End { get; set; }
}
8 changes: 4 additions & 4 deletions NineChronicles.Headless.Executable/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ public async Task Run(
},
ActionEvaluatorType.ForkableActionEvaluator => new ForkableActionEvaluatorConfiguration
{
Pairs = (configuration.GetValue<List<IConfiguration>>("Pairs") ??
throw new KeyNotFoundException()).Select(pair =>
Pairs = (configuration.GetSection("Pairs") ??
throw new KeyNotFoundException()).GetChildren().Select(pair =>
{
var range = pair.GetValue<ForkableActionEvaluatorRange>("Range") ??
throw new KeyNotFoundException();
var range = new ForkableActionEvaluatorRange();
pair.Bind("Range", range);
var actionEvaluatorConfiguration =
GetActionEvaluatorConfiguration(configuration.GetSection("ActionEvaluator")) ??
throw new KeyNotFoundException();
Expand Down

0 comments on commit cd1db06

Please sign in to comment.