/// <summary> /// Adds the translated token value into the provided <paramref name="ruleData"/> object if the rule was a match. /// </summary> protected virtual void UpdateData(ref RuleData ruleData, Token <T> token, bool isMatch) { if (isMatch) { ruleData.Add(GetValue(token)); } }
/// <summary> /// Adds the translated token value into the provided <paramref name="ruleData"/> object if the rule was a match, else the default value of this rule will be added. /// </summary> protected override void UpdateData(ref RuleData ruleData, Token <T> token, bool isMatch) { ruleData.Add(isMatch ? GetValue(token) : DefaultValue); }