DnsFilterParseResult Class
The outcome of parsing a filter list: the rules that were understood, and a diagnostic for every line that was not.
public sealed class DnsFilterParseResultRemarks
Filter lists are third-party input. A list that silently produces far fewer rules than it has lines — because it was served as an HTML error page, or uses modifiers this library does not implement — is indistinguishable from a healthy one if only the rule count is inspected. Callers that load lists unattended should log or alarm on DnsFilterParseResult.Diagnostics.
Properties
| Name | Description |
|---|---|
| Diagnostics | Gets a diagnostic for each line that did not produce a rule. Empty when the whole list was understood. |
| Format | Gets the format the list was parsed as. Useful when DnsFilterListFormat.AutoDetect was requested. |
| Rules | Gets the rules parsed from the list. |
Diagnostics
DnsFilterParseResult.csGets a diagnostic for each line that did not produce a rule. Empty when the whole list was understood.
public IReadOnlyList<DnsFilterParseDiagnostic> Diagnostics { get; }Property value
Format
DnsFilterParseResult.csGets the format the list was parsed as. Useful when DnsFilterListFormat.AutoDetect was requested.
public DnsFilterListFormat Format { get; }Property value
Gets the rules parsed from the list.
public IReadOnlyList<DnsFilterRule> Rules { get; }