mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00
Future-proof conditional compilation
* Invert `#if NET5_0` conditions so that when adding net6.0 target framework, the _new_ APIs are used. * Use `NET5_0_OR_GREATER` instead of `NET5_0` to ensure consistent behaviour on future target frameworks.
This commit is contained in:

committed by
Patrik Svensson

parent
644fb76d61
commit
a5716a35e2
@ -32,10 +32,10 @@ namespace Spectre.Console
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static int GetLinkHashCode(string link)
|
||||
{
|
||||
#if NET5_0
|
||||
return link.GetHashCode(StringComparison.Ordinal);
|
||||
#else
|
||||
#if NETSTANDARD2_0
|
||||
return link.GetHashCode();
|
||||
#else
|
||||
return link.GetHashCode(StringComparison.Ordinal);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user