Add net5.0 target framework

This commit is contained in:
Patrik Svensson
2020-11-11 10:55:47 +01:00
committed by Patrik Svensson
parent b1da5e7ba8
commit 380c6aca45
36 changed files with 241 additions and 194 deletions

View File

@@ -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;