File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
src/MyCSharp.HttpUserAgentParser.MemoryCache Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -50,20 +50,10 @@ private CacheKey GetKey(string userAgent)
5050
5151 public HttpUserAgentParserMemoryCachedProviderOptions Options { get ; set ; } = null ! ;
5252
53- public bool Equals ( CacheKey ? other )
54- {
55- if ( ReferenceEquals ( this , other ) ) return true ;
56- if ( other is null ) return false ;
57-
58- return this . UserAgent == other . UserAgent && this . Options == other . Options ;
59- }
60-
61- public override bool Equals ( object ? obj )
62- {
63- return this . Equals ( obj as CacheKey ) ;
64- }
53+ public bool Equals ( CacheKey ? other ) => this . UserAgent == other ? . UserAgent ;
54+ public override bool Equals ( object ? obj ) => this . Equals ( obj as CacheKey ) ;
6555
66- public override int GetHashCode ( ) => HashCode . Combine ( this . UserAgent , this . Options ) ;
56+ public override int GetHashCode ( ) => this . UserAgent . GetHashCode ( ) ;
6757 }
6858 }
6959}
You can’t perform that action at this time.
0 commit comments