This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
10 additions
and
15 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
using Neo.Network.P2P.Payloads; | ||
using System.ComponentModel; | ||
using System.IO; | ||
using System.Text; | ||
|
||
namespace Neo.GUI.Wrappers | ||
{ | ||
internal class TransactionAttributeWrapper | ||
{ | ||
public TransactionAttributeUsage Usage { get; set; } | ||
public TransactionAttributeType Usage { get; set; } | ||
[TypeConverter(typeof(HexConverter))] | ||
public byte[] Data { get; set; } | ||
|
||
public TransactionAttribute Unwrap() | ||
{ | ||
return new TransactionAttribute | ||
{ | ||
Usage = Usage, | ||
Data = Data | ||
}; | ||
using var reader = new BinaryReader(new MemoryStream(Data), Encoding.UTF8, false); | ||
|
||
return TransactionAttribute.DeserializeFrom(reader); | ||
} | ||
} | ||
} |
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