Skip to content

Commit

Permalink
optimize readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Nov 28, 2024
1 parent 82eb8a1 commit 456da1d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Nager.PublicSuffix/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var domainInfo = domainParser.Parse("sub.test.co.uk");
//domainInfo.Subdomain = "sub";
//domainInfo.TopLevelDomain = "co.uk";


Check is sub.test.co.uk a valid domain
══════════════════════════════════════════════════════════════════════════════════════════════════════

Expand All @@ -44,3 +45,14 @@ await ruleProvider.BuildAsync();
var domainParser = new DomainParser(ruleProvider);

var isValid = domainParser.IsValidDomain("sub.test.co.uk");


Use SimpleHttpRuleProvider (automatic download)
══════════════════════════════════════════════════════════════════════════════════════════════════════

var ruleProvider = new SimpleHttpRuleProvider();
await ruleProvider.BuildAsync();

var domainParser = new DomainParser(ruleProvider);

var domainInfo = domainParser.Parse("sub.test.co.uk");

0 comments on commit 456da1d

Please sign in to comment.