Skip to content

DomainSuffix Class ​

Definition ​

Temporary alias for PublicSuffix.

  • Namespace: JASE.Network
  • Assembly: JASE.Network.dll

Fields ​

NameDescription
DefaultListSourceUrlDefault public suffix list source URL.

Properties ​

NameDescription
DataCommitGets the source commit identifier declared by the loaded list file.
DataVersionGets the source version identifier declared by the loaded list file.
RuleCountGets the number of rules currently loaded from the public suffix list.

Methods ​

NameDescription
string GetRegistrableDomain(Uri uri)Returns the registrable domain for a URI host, or when one cannot be determined.
string GetRegistrableDomain(string host)Returns the registrable domain for a hostname, or when one cannot be determined.
string GetSuffix(Uri uri)Returns the public suffix for a URI host, or when one cannot be determined.
string GetSuffix(string host)Returns the public suffix for a hostname, or when one cannot be determined.
DomainSuffixRefreshResult Refresh(string datContent)Reloads the public suffix list from public_suffix_list.dat content.
Task<DomainSuffixRefreshResult> RefreshFromSourceAsync(CancellationToken cancellationToken = null)Downloads and reloads the public suffix list from DefaultListSourceUrl.
Task<DomainSuffixRefreshResult> RefreshFromSourceAsync(string sourceUrl, CancellationToken cancellationToken = null)Downloads and reloads the public suffix list from the specified source URL.
bool TryGetRegistrableDomain(Uri uri, out string domain)Attempts to resolve the registrable domain for a URI host.
bool TryGetRegistrableDomain(string host, out string domain)Attempts to resolve the registrable domain for a hostname.
bool TryGetSuffix(Uri uri, out string suffix)Attempts to resolve the public suffix for a URI host.
bool TryGetSuffix(string host, out string suffix)Attempts to resolve the public suffix for a hostname.