Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,10 @@ private CacheKey GetKey(string userAgent)

public HttpUserAgentParserMemoryCachedProviderOptions Options { get; set; } = null!;

public bool Equals(CacheKey? other)
{
if (ReferenceEquals(this, other)) return true;
if (other is null) return false;

return this.UserAgent == other.UserAgent && this.Options == other.Options;
}

public override bool Equals(object? obj)
{
return this.Equals(obj as CacheKey);
}
public bool Equals(CacheKey? other) => this.UserAgent == other?.UserAgent;
public override bool Equals(object? obj) => this.Equals(obj as CacheKey);

public override int GetHashCode() => HashCode.Combine(this.UserAgent, this.Options);
public override int GetHashCode() => this.UserAgent.GetHashCode();
}
}
}