Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Move] Part-10 Classes into Different Library - Neo.Extensions #3449

Merged
merged 38 commits into from
Dec 12, 2024
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bf93412
Part-1 `Neo.IO` - move
cschuchardt88 Jul 2, 2024
4d08154
Part-2
cschuchardt88 Jul 2, 2024
597c9ca
Merge branch 'master' into rebuild/the-split-2
cschuchardt88 Jul 5, 2024
9881579
Added `BigInteger` to `Neo.Extensions`
cschuchardt88 Jul 5, 2024
8779151
Found more `BigInteger`
cschuchardt88 Jul 5, 2024
ed34707
Added `ByteArray` to `Neo.Extensions`
cschuchardt88 Jul 5, 2024
5b12304
Added `DateTime` Extensions to `Neo.Extensions`
cschuchardt88 Jul 7, 2024
0f6627a
Added `HashSetExtensions`, `HashSetExtensions2`, `IpAddressExtensions…
cschuchardt88 Jul 7, 2024
95f8a2d
Merge branch 'master' into rebuild/the-split-4
cschuchardt88 Jul 7, 2024
721ce58
Added `ICollection`, `Memory`, `String`, `Unsafe` extensions
cschuchardt88 Jul 7, 2024
129a32f
Adding `using`
cschuchardt88 Jul 7, 2024
397cc1f
dotnet format
cschuchardt88 Jul 7, 2024
a127386
Added more Extensions
cschuchardt88 Jul 7, 2024
9a84436
Move some methods
cschuchardt88 Jul 7, 2024
dbbf5b3
Merge branch 'master' into rebuild/the-split-2
shargon Jul 8, 2024
b64435b
Added Tests
cschuchardt88 Jul 9, 2024
583e610
Merge branch 'rebuild/the-split-2' of https://github.com/cschuchardt8…
cschuchardt88 Jul 9, 2024
6a50385
Merge branch 'rebuild/the-split-2' into rebuild/the-split-3
cschuchardt88 Jul 9, 2024
f381b89
Merge branch 'rebuild/the-split-3' into rebuild/the-split-4
cschuchardt88 Jul 9, 2024
6261f70
Merge branch 'rebuild/the-split-4' into rebuild/the-split-5
cschuchardt88 Jul 9, 2024
4a0fb7a
Merge branch 'rebuild/the-split-5' into rebuild/the-split-6
cschuchardt88 Jul 9, 2024
58f7fee
Added `tests` from `Part-2`
cschuchardt88 Jul 9, 2024
7f74300
Merge branch 'rebuild/the-split-3' into rebuild/the-split-4
cschuchardt88 Jul 9, 2024
c790166
Merge branch 'rebuild/the-split-4' into rebuild/the-split-5
cschuchardt88 Jul 9, 2024
26d0515
Merge branch 'rebuild/the-split-5' into rebuild/the-split-6
cschuchardt88 Jul 9, 2024
e644bd3
Added `tests` for `PART-4`
cschuchardt88 Jul 9, 2024
79a3578
Merge branch 'rebuild/the-split-4' into rebuild/the-split-5
cschuchardt88 Jul 9, 2024
00ce5ae
Merge branch 'rebuild/the-split-5' into rebuild/the-split-6
cschuchardt88 Jul 9, 2024
6fa0fda
Added `tests` for `PART-5`
cschuchardt88 Jul 9, 2024
708ce84
Merge branch 'rebuild/the-split-5' into rebuild/the-split-6
cschuchardt88 Jul 9, 2024
bb9992e
Merge Master
cschuchardt88 Aug 3, 2024
ff3c158
Added the `Part` 7
cschuchardt88 Aug 3, 2024
b9a6cb4
`PART-8`
cschuchardt88 Aug 4, 2024
338bb09
`PART-9`
cschuchardt88 Aug 4, 2024
6fb1c28
`PART-10`
cschuchardt88 Aug 4, 2024
443bd95
Merge `master` into `rebuild/the-split-10`
cschuchardt88 Dec 7, 2024
acc3e55
Revert some changes
cschuchardt88 Dec 7, 2024
326cc2c
Merge branch 'master' into rebuild/the-split-10
shargon Dec 12, 2024
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
@@ -1,6 +1,6 @@
// Copyright (C) 2015-2024 The Neo Project.
//
// Helper.cs file belongs to the neo project and is free
// ContractParameterExtensions.cs file belongs to the neo project and is free
// software distributed under the MIT software license, see the
// accompanying file LICENSE in the main directory of the
// repository or http://www.opensource.org/licenses/mit-license.php
Expand All @@ -10,8 +10,6 @@
// modifications are permitted.

using Neo.Cryptography.ECC;
using Neo.Extensions;
using Neo.Json;
using Neo.SmartContract;
using Neo.VM.Types;
using System;
Expand All @@ -20,12 +18,9 @@
using System.Numerics;
using Array = Neo.VM.Types.Array;

namespace Neo.VM
namespace Neo.Extensions
{
/// <summary>
/// A helper class related to NeoVM.
/// </summary>
public static class Helper
public static class ContractParameterExtensions
{
/// <summary>
/// Converts the <see cref="ContractParameter"/> to a <see cref="StackItem"/>.
Expand All @@ -46,7 +41,7 @@ private static StackItem ToStackItem(ContractParameter parameter, List<(StackIte
{
case ContractParameterType.Array:
if (context is null)
context = new List<(StackItem, ContractParameter)>();
context = [];
else
(stackItem, _) = context.FirstOrDefault(p => ReferenceEquals(p.Item2, parameter));
if (stackItem is null)
Expand All @@ -57,7 +52,7 @@ private static StackItem ToStackItem(ContractParameter parameter, List<(StackIte
break;
case ContractParameterType.Map:
if (context is null)
context = new List<(StackItem, ContractParameter)>();
context = [];
else
(stackItem, _) = context.FirstOrDefault(p => ReferenceEquals(p.Item2, parameter));
if (stackItem is null)
Expand Down
Loading