18 using System.Text.RegularExpressions;
19 using Newtonsoft.Json;
28 private readonly Regex _targetTemplate =
new Regex(
"['(.+)']");
29 private string _target;
39 _target = value !=
null ?
string.Join(
".", value.Split(
'.').Select(s => _targetTemplate.Match(s).Success ? s : $
"['{s}']")) : value;
61 protected Objective(
string target, decimal? targetValue)
63 if (
string.IsNullOrEmpty(target))
68 var objective = target;
69 if (!objective.Contains(
'.', StringComparison.InvariantCulture))
72 objective = $
"Statistics.{objective}";
79 #region Backwards Compatibility
85 [JsonProperty(
"target-value")]