Method IsSubdomainOf
- Namespace
- MailFathom.Domain.Emails.Authentication
- Assembly
- MailFathom.Domain.dll
IsSubdomainOf(SenderDomain)
Answers whether this domain lies beneath another one in the naming tree.
public bool IsSubdomainOf(SenderDomain ancestor)
Parameters
ancestorSenderDomainThe domain this one may sit under.
Returns
Remarks
The comparison is on whole labels rather than on a suffix of characters, which is what separates
mail.example.test from notexample.test: both end in example.test as text and only the first
is beneath it. A domain is not beneath itself, so a caller that means "this name or anything under it" says both.