MailBee.NET Objects 4.0

Rule Class

Represents a condition (an HTML tag name and a set of its attributes) and an action to perform when the condition is met.

For a list of all members of this type, see Rule Members.

System.Object
   MailBee.Html.Rule

public class Rule

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A rule specifies for which tag to apply a certain action. The rule can additionally specify that only tags with certain attributes should be processed (for instance, <A> tags with HREF attributes).

The actions can be pre-defined or user-defined (see TagRuleTypes). To implement user-defined action, create a method of ProcessElementDelegate type and pass a reference to it when calling Process or ProcessToString method.

To define rules, use RuleSet object methods.

To define a set of rules which tells Process method to remove any ponentially unsafe contents from the HTML document, use GetSafeHtmlRules method.

Note   A rule, once created and added to the RuleSet, cannot be changed. You can, however, remove an existing rule from the RuleSet and add anonther one.

Requirements

Namespace: MailBee.Html

Assembly: MailBee.NET (in MailBee.NET.dll)

See Also

Rule Members | MailBee.Html Namespace | RuleSet