DomainInfo Struct

The decomposition of a domain name according to the Public Suffix List.

public readonly struct DomainInfo : IEquatable<DomainInfo>
Implements

Properties

NameDescription
DomainThe normalized domain name: lower-cased and stripped of its trailing dot. The IDN form of the input is preserved.
IsKnownPublicSuffixtrue when a rule of the list matched; false when the implicit * rule was used.
PublicSuffixThe public suffix, also known as the effective top-level domain (eTLD). For instance co.uk for www.example.co.uk.
RegistrableDomainThe public suffix plus one label (eTLD+1), or null when the domain is itself a public suffix. For instance example.co.uk for www.example.co.uk.
SourceThe section of the list the matching rule belongs to, or PublicSuffixRuleSources.None when no rule matched.
SubdomainThe labels before the registrable domain, or null when there is none. For instance www for www.example.co.uk.

The normalized domain name: lower-cased and stripped of its trailing dot. The IDN form of the input is preserved.

public string Domain { get; }

Property value

string

IsKnownPublicSuffix

DomainInfo.cs

true when a rule of the list matched; false when the implicit * rule was used.

public bool IsKnownPublicSuffix { get; }

Property value

bool

PublicSuffix

DomainInfo.cs

The public suffix, also known as the effective top-level domain (eTLD). For instance co.uk for www.example.co.uk.

public string PublicSuffix { get; }

Property value

string

RegistrableDomain

DomainInfo.cs

The public suffix plus one label (eTLD+1), or null when the domain is itself a public suffix. For instance example.co.uk for www.example.co.uk.

public string? RegistrableDomain { get; }

Property value

string?

The section of the list the matching rule belongs to, or PublicSuffixRuleSources.None when no rule matched.

public PublicSuffixRuleSources Source { get; }

Subdomain

DomainInfo.cs

The labels before the registrable domain, or null when there is none. For instance www for www.example.co.uk.

public string? Subdomain { get; }

Property value

string?

Methods

NameDescription
Equals(DomainInfo)
Equals(object)
GetHashCode()
ToString()

Equals overloads

Equals(DomainInfo)

public bool Equals(DomainInfo other)
Parameters
other DomainInfo
Returns

bool

No documentation is available.

Equals(object)

public override bool Equals(object obj)
Parameters
obj object
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

DomainInfo.cs
public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(DomainInfo, DomainInfo)
operator !=(DomainInfo, DomainInfo)

operator ==(DomainInfo, DomainInfo)

public static bool operator ==(DomainInfo left, DomainInfo right)

Parameters

left DomainInfo
right DomainInfo

Returns

bool

No documentation is available.

operator !=(DomainInfo, DomainInfo)

public static bool operator !=(DomainInfo left, DomainInfo right)

Parameters

left DomainInfo
right DomainInfo

Returns

bool

No documentation is available.