File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed
Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -102,12 +102,6 @@ public bool IsValidDomain(string fullyQualifiedDomainName)
102102 return false ;
103103 }
104104
105- var domainDataStructure = this . _ruleProvider . GetDomainDataStructure ( ) ;
106- if ( domainDataStructure == null || domainDataStructure . TldRule == null )
107- {
108- return false ;
109- }
110-
111105 if ( string . IsNullOrEmpty ( domainInfo . Domain ) )
112106 {
113107 return false ;
@@ -136,7 +130,7 @@ public bool IsValidDomain(string fullyQualifiedDomainName)
136130 }
137131
138132 var domainDataStructure = this . _ruleProvider . GetDomainDataStructure ( ) ;
139- if ( domainDataStructure == null )
133+ if ( domainDataStructure == null || domainDataStructure . TldRule == null )
140134 {
141135 throw new NullReferenceException ( "DomainDataStructure is not available" ) ;
142136 }
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace Nager.PublicSuffix.RuleParsers
99 /// </summary>
1010 public class TldRuleParser
1111 {
12- private readonly char [ ] _lineBreak = new char [ ] { '\n ' , '\r ' } ;
12+ private readonly char [ ] _lineBreak = [ '\n ' , '\r ' ] ;
1313
1414 /// <summary>
1515 /// ParseRules
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public class StaticRuleProvider : BaseRuleProvider
1616 /// <param name="domainDataStructure"></param>
1717 public StaticRuleProvider ( DomainDataStructure domainDataStructure )
1818 {
19- this . _domainDataStructure = domainDataStructure ;
19+ base . _domainDataStructure = domainDataStructure ;
2020 }
2121
2222 /// <summary>
You can’t perform that action at this time.
0 commit comments