diff --git a/src/Nager.PublicSuffix.TestConsole/Nager.PublicSuffix.TestConsole.csproj b/src/Nager.PublicSuffix.TestConsole/Nager.PublicSuffix.TestConsole.csproj index af94e95..7b6a3fa 100644 --- a/src/Nager.PublicSuffix.TestConsole/Nager.PublicSuffix.TestConsole.csproj +++ b/src/Nager.PublicSuffix.TestConsole/Nager.PublicSuffix.TestConsole.csproj @@ -8,8 +8,9 @@ - - + + + diff --git a/src/Nager.PublicSuffix.UnitTest/Nager.PublicSuffix.UnitTest.csproj b/src/Nager.PublicSuffix.UnitTest/Nager.PublicSuffix.UnitTest.csproj index 4ba5da6..27f0bcc 100644 --- a/src/Nager.PublicSuffix.UnitTest/Nager.PublicSuffix.UnitTest.csproj +++ b/src/Nager.PublicSuffix.UnitTest/Nager.PublicSuffix.UnitTest.csproj @@ -7,11 +7,12 @@ - - - - - + + + + + + diff --git a/src/Nager.PublicSuffix/Nager.PublicSuffix.csproj b/src/Nager.PublicSuffix/Nager.PublicSuffix.csproj index 2f6eadb..31a8414 100644 --- a/src/Nager.PublicSuffix/Nager.PublicSuffix.csproj +++ b/src/Nager.PublicSuffix/Nager.PublicSuffix.csproj @@ -23,9 +23,9 @@ snupkg - netstandard2.0;netstandard2.1;net6.0;net8.0 + netstandard2.0;netstandard2.1;net8.0 - 3.3.0 + 3.4.0 @@ -39,8 +39,8 @@ - - + + diff --git a/src/Nager.PublicSuffix/RuleProviders/CachedHttpRuleProvider.cs b/src/Nager.PublicSuffix/RuleProviders/CachedHttpRuleProvider.cs index f1ba75f..fad10e4 100644 --- a/src/Nager.PublicSuffix/RuleProviders/CachedHttpRuleProvider.cs +++ b/src/Nager.PublicSuffix/RuleProviders/CachedHttpRuleProvider.cs @@ -53,7 +53,7 @@ public CachedHttpRuleProvider( url = "https://publicsuffix.org/list/public_suffix_list.dat"; } - this._dataFileUrl = url; + this._dataFileUrl = url ?? throw new InvalidOperationException("_dataFileUrl must contain a non-null value"); } /// @@ -82,7 +82,7 @@ public CachedHttpRuleProvider( var tempUrl = configuration["Nager:PublicSuffix:DataUrl"]; if (!string.IsNullOrEmpty(tempUrl)) { - url = tempUrl; + url = tempUrl!; } } @@ -123,7 +123,7 @@ public override async Task BuildAsync( } var ruleParser = new TldRuleParser(); - var rules = ruleParser.ParseRules(ruleData); + var rules = ruleParser.ParseRules(ruleData!); base.CreateDomainDataStructure(rules); diff --git a/src/Nager.PublicSuffix/RuleProviders/SimpleHttpRuleProvider.cs b/src/Nager.PublicSuffix/RuleProviders/SimpleHttpRuleProvider.cs index a7345d5..f70c402 100644 --- a/src/Nager.PublicSuffix/RuleProviders/SimpleHttpRuleProvider.cs +++ b/src/Nager.PublicSuffix/RuleProviders/SimpleHttpRuleProvider.cs @@ -45,7 +45,7 @@ public SimpleHttpRuleProvider( url = "https://publicsuffix.org/list/public_suffix_list.dat"; } - this._dataFileUrl = url; + this._dataFileUrl = url ?? throw new InvalidOperationException("_dataFileUrl must contain a non-null value"); } ///