File tree 1 file changed +3
-13
lines changed
src/MyCSharp.HttpUserAgentParser.MemoryCache
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)
50
50
51
51
public HttpUserAgentParserMemoryCachedProviderOptions Options { get ; set ; } = null ! ;
52
52
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 ) ;
65
55
66
- public override int GetHashCode ( ) => HashCode . Combine ( this . UserAgent , this . Options ) ;
56
+ public override int GetHashCode ( ) => this . UserAgent . GetHashCode ( ) ;
67
57
}
68
58
}
69
59
}
You can’t perform that action at this time.
0 commit comments