public static PrimitiveReturn convertStackItem(PrimitiveType item) { return(item.Type switch { StackItemType.Boolean => new PrimitiveReturn(item, item.GetBoolean()), StackItemType.Integer => new IntegerReturn(item, item.GetInteger().ToByteArray()), StackItemType.ByteString => new PrimitiveReturn(item, item.GetSpan().ToArray()), _ => throw new ArgumentException($"{item.Type} is not a valid StackItem argument") });
public IntegerReturn(PrimitiveType item, byte[] value) : base(item, value) { this.Sign = item.GetInteger().Sign; }