Skip to content

TryGetSuffix Method ​

Definition ​

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

Overloads ​

NameDescription
bool TryGetSuffix(string host, out string suffix)Attempts to resolve the public suffix 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) ​

csharp
bool TryGetSuffix(string host, out string suffix)

Attempts to resolve the public suffix for a hostname.

Parameters ​

NameDescription
hostThe hostname, domain name, or absolute URI to evaluate.
suffixWhen this method returns , contains the public suffix.

Returns ​

when a suffix can be determined; otherwise, .

bool TryGetSuffix(Uri uri, out string suffix) ​

csharp
bool TryGetSuffix(Uri uri, out string suffix)

Attempts to resolve the public suffix for a URI host.

Parameters ​

NameDescription
suffixWhen this method returns , contains the public suffix.
uriThe absolute URI whose host is evaluated.

Returns ​

when a suffix can be determined; otherwise, .