Example #1
0
        public TxPayload(Tx transaction)
        {
            Contract.Requires <ArgumentNullException>(transaction != null, "transaction");

            Transaction = transaction;

            ByteSize = Transaction.ByteSize;
        }
Example #2
0
        public TxPayload(Tx transaction)
        {
            Contract.Requires<ArgumentNullException>(transaction != null, "transaction");

            Transaction = transaction;

            ByteSize = Transaction.ByteSize;
        }
Example #3
0
        public TxPayload(byte[] buffer, int offset)
            : base(buffer, offset)
        {
            Contract.Requires <ArgumentNullException>(buffer != null, "buffer");
            Contract.Requires <ArgumentException>(buffer.Length >= TxPayload.MinimumByteSize, "buffer");
            Contract.Requires <ArgumentOutOfRangeException>(offset >= 0, "offset");
            Contract.Requires <ArgumentOutOfRangeException>(offset <= buffer.Length - TxPayload.MinimumByteSize, "offset");

            Transaction = new Tx(buffer, offset);

            ByteSize = Transaction.ByteSize;
        }
Example #4
0
        public TxPayload(byte[] buffer, int offset)
            : base(buffer, offset)
        {
            Contract.Requires<ArgumentNullException>(buffer != null, "buffer");
            Contract.Requires<ArgumentException>(buffer.Length >= TxPayload.MinimumByteSize, "buffer");
            Contract.Requires<ArgumentOutOfRangeException>(offset >= 0, "offset");
            Contract.Requires<ArgumentOutOfRangeException>(offset <= buffer.Length - TxPayload.MinimumByteSize, "offset");

            Transaction = new Tx(buffer, offset);

            ByteSize = Transaction.ByteSize;
        }