Exemplo n.º 1
0
 /// <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));
     }
 }
Exemplo n.º 2
0
 /// <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);
 }