mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-12-27 03:15:48 +08:00
Add net5.0 target framework
This commit is contained in:
committed by
Patrik Svensson
parent
b1da5e7ba8
commit
380c6aca45
@@ -180,6 +180,15 @@ namespace Spectre.Console
|
||||
/// <inheritdoc/>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int? GetLinkHashCode()
|
||||
{
|
||||
#if NET5_0
|
||||
return Link?.GetHashCode(StringComparison.Ordinal);
|
||||
#else
|
||||
return Link?.GetHashCode();
|
||||
#endif
|
||||
}
|
||||
|
||||
unchecked
|
||||
{
|
||||
var hash = (int)2166136261;
|
||||
@@ -189,7 +198,7 @@ namespace Spectre.Console
|
||||
|
||||
if (Link != null)
|
||||
{
|
||||
hash = (hash * 16777619) ^ Link?.GetHashCode() ?? 0;
|
||||
hash = (hash * 16777619) ^ GetLinkHashCode() ?? 0;
|
||||
}
|
||||
|
||||
return hash;
|
||||
|
||||
Reference in New Issue
Block a user