private string GenerateKey(string key = null) { key = (key != null && key.StartsWith("_key.")) ? null : key; string output = key ?? string.Format("_key.{000}", Details.Count()); if (Details.ContainsKey(output)) { output = string.Format("_key.{000}", Details.Count()); } return(output); }
public override string ToString() { return($"Rule {RuleId} score {Score} ({(HasDetails ? $"{Details.Count()} details" : $"'{Narrative}'")})");