/// <summary> /// Adds a rule signature extension to the rule signature. /// </summary> /// <param name="extension">The rule signature extension to be added</param> public void AddExtension(IRuleSignatureExtension extension) { if (_extensions.Contains(extension)) { return; } _extensions.Add(extension); }
/// <summary> /// Adds the rule signature extension to a particular rule point's signature. /// </summary> /// <param name="path">The rule point path for which the rule signature extension should be applied.</param> /// <param name="signatureExtension">The rule signature extension to register.</param> public void AddRuleSignatureExtension(string path, IRuleSignatureExtension signatureExtension) { RulePoint rulePoint = this.GetRulePoint(path); if (null != rulePoint) { AddRuleSignatureExtension(rulePoint, signatureExtension); } }
private void AddRuleSignatureExtension(RulePoint rulePoint, IRuleSignatureExtension signatureExtension) { RuleSignature signature = rulePoint.Signature; if (null != signature) { signature.AddExtension(signatureExtension); } foreach (RuleBase rule in rulePoint.Children) { if (rule is RulePoint) { AddRuleSignatureExtension((rule as RulePoint), signatureExtension); } } }