Skip to content

Commit

Permalink
Make BinarySerializer public (neo-project#2041)
Browse files Browse the repository at this point in the history
* Make BinarySerializer public

* public serialize/deserialize methods

Co-authored-by: Harry <[email protected]>
  • Loading branch information
2 people authored and Shawn committed Jan 8, 2021
1 parent 2cb7fbf commit 1e2f21f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/neo/SmartContract/BinarySerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Neo.SmartContract
{
internal static class BinarySerializer
public static class BinarySerializer
{
private class ContainerPlaceholder : StackItem
{
Expand Down Expand Up @@ -50,7 +50,7 @@ public static unsafe StackItem Deserialize(ReadOnlySpan<byte> data, uint maxArra
}
}

private static StackItem Deserialize(BinaryReader reader, uint maxArraySize, uint maxItemSize, ReferenceCounter referenceCounter)
public static StackItem Deserialize(BinaryReader reader, uint maxArraySize, uint maxItemSize, ReferenceCounter referenceCounter)
{
Stack<StackItem> deserialized = new Stack<StackItem>();
int undeserialized = 1;
Expand Down Expand Up @@ -141,7 +141,7 @@ public static byte[] Serialize(StackItem item, uint maxSize)
return ms.ToArray();
}

private static void Serialize(StackItem item, BinaryWriter writer, uint maxSize)
public static void Serialize(StackItem item, BinaryWriter writer, uint maxSize)
{
List<CompoundType> serialized = new List<CompoundType>();
Stack<StackItem> unserialized = new Stack<StackItem>();
Expand Down

0 comments on commit 1e2f21f

Please sign in to comment.