This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 145
Support .NET Standard 2.1 and .NET 5.0 #498
Closed
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e448040
add netstandard2.1 and net5.0 target frameworks
devhawk af1c004
remove target-typed object creation for C# 8.0 compat
devhawk 31302f5
remove not and or patterns for C# 8.0 compat
devhawk 383ef0d
assorted C# 8 compat changes
devhawk 988f302
implement BitOperations.RotateLeft for netstd 2.1
devhawk 8deebbc
implement ReferenceEqualityComparer for netstd 2.1
devhawk a5a2f36
use new byte[] instead of GC.AllocateUninitializedArray on netstd 2.1
devhawk 83dc298
BigInteger.GetBitLength for net std 2.1
devhawk 1a9deaa
supress warning of value parameter nullability mismatch
devhawk 7c116c7
use non generic Enum.IsDefined for netstd 2.1 compat
devhawk 901165d
eliminate relational switch pattern for C# 8 compat
devhawk 8ef3eea
Rewrite ExecutionEngineLimits as class instead of record for C# 8 compat
devhawk 1524717
use compiler generated code in ScriptBuilder EmitPush
devhawk ce8f1a6
dotnet format
devhawk a02c72b
Merge branch 'master' into devhawk/nucleus
devhawk de74b26
change is not cases
devhawk 2793026
dotnet format
devhawk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (C) 2015-2022 The Neo Project. | ||
// | ||
// The neo is free software distributed under the MIT software license, | ||
// see the accompanying file LICENSE in the main directory of the | ||
// project or http://www.opensource.org/licenses/mit-license.php | ||
// for more details. | ||
// | ||
// Redistribution and use in source and binary forms with or without | ||
// modifications are permitted. | ||
|
||
using System.Numerics; | ||
using System.Runtime.CompilerServices; | ||
|
||
namespace Neo.VM.Cryptography | ||
{ | ||
#if !NET5_0_OR_GREATER | ||
static class BitOperations | ||
{ | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public static uint RotateLeft(uint value, int offset) | ||
=> (value << offset) | (value >> (32 - offset)); | ||
|
||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public static ulong RotateLeft(ulong value, int offset) | ||
=> (value << offset) | (value >> (64 - offset)); | ||
} | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe create a constructor for all of these "else"? otherwise it can be changed after the creation