Table of Contents

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

ancestor SenderDomain

The domain this one may sit under.

Returns

bool

true when this is a strictly lower name than ancestor.

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.