TagRuleTypes Enumeration |
Namespace: MailBee.Html
Member name | Value | Description | |
---|---|---|---|
ProcessingCondition | 0 | Just execute the delegate. | |
ProcessingRule | 1 | Execute the delegate (if defined). If the delegate returned true or was not defined, process the HTML element. | |
RemovalRule | 2 | Execute the delegate (if defined). If the delegate returned true or was not defined, remove the HTML element with its inner contents. | |
ReplacementRule | 3 | Execute the delegate (if defined). If the delegate returned true or was not defined, replace the HTML element with another tag definition or entire HTML element. The degree of the replacement (replace just the tag defintion or the entire tag including its inner contents) depends on the rule settings. |
These modes define actions to be performed when Process(RuleSet, ProcessElementDelegate) method encounters HTML tag matching certain Rule in the RuleSet (denoted by rules parameter).
Rules of all types cause execution of the delegate when their conditions are met. Rules of all types except ProcessingCondition honor returned value of the delegate and do not apply the rule if the delegate returned false. ProcessingCondition does not do anything itself anyway and thus returned value is not important.
The delegate will only be executed if it was defined (del parameter of Process(RuleSet, ProcessElementDelegate) method is not a null reference).
The above also applies to ProcessToString(RuleSet, ProcessElementDelegate) method in the same way as to Process(RuleSet, ProcessElementDelegate) method.