From 456da1d87854cede87962e68d893b9a8282ca8fa Mon Sep 17 00:00:00 2001 From: Tino Hager Date: Thu, 28 Nov 2024 09:24:28 +0100 Subject: [PATCH] optimize readme --- src/Nager.PublicSuffix/readme.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Nager.PublicSuffix/readme.txt b/src/Nager.PublicSuffix/readme.txt index 9f50457..b2dc6bf 100644 --- a/src/Nager.PublicSuffix/readme.txt +++ b/src/Nager.PublicSuffix/readme.txt @@ -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 ══════════════════════════════════════════════════════════════════════════════════════════════════════ @@ -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"); \ No newline at end of file