HtmlComplianceOptionsMaxIssuesPerViolation Property

Get or set the maximum number of times that each compliance violation may be reported.

Definition

Namespace: MimeKit.Text
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public int MaxIssuesPerViolation { get; set; }

Property Value

Int32
The maximum number of times that each violation may be reported, or 0 for no limit.

Remarks

Gets or sets the maximum number of times that each compliance violation may be reported while tokenizing a single document. The default is 0, which means that no limit is applied.

The number of issues an HTML document can produce is bounded only by its size, and the densest forms cost only a few bytes per issue. Setting a limit is recommended when tokenizing untrusted documents.

The limit is per violation rather than a single total, so that a flood of cheap, harmless violations cannot crowd out the ones that follow it.

When some violation reaches the limit, a single TooManyComplianceIssues issue is reported so that the report is never silently incomplete.

Exceptions

ArgumentOutOfRangeException value is negative.

See Also