internal static void StaticRead(BitcoinStream bs, ref byte[] bytes) { ulong length = BitcoinInt.StaticRead(bs); bytes = new byte[length]; bs.ReadWrite(ref bytes); }
public void ReadWrite(BitcoinStream stream) { if (stream.Serializing) { BitcoinInt.StaticWrite(stream, this._wartosc); } else { this._wartosc = BitcoinInt.StaticRead(stream); } }
internal static void StaticWrite(BitcoinStream bs, byte[] bytes) { ulong length = bytes == null ? 0UL : (ulong)bytes.Length; BitcoinInt.StaticWrite(bs, length); if (bytes == null) { return; } bs.ReadWrite(ref bytes); }
public void ReadWrite(BitcoinStream stream) { BitcoinInt data = new BitcoinInt((ulong)this._bytes.Length); stream.ReadWrite <BitcoinInt>(ref data); if (!stream.Serializing) { this._bytes = new byte[data.ToLong()]; } stream.ReadWrite(ref this._bytes); }