BitSharp.Core.Domain.BlockTx.Create C# (CSharp) Метод

Create() публичный статический Метод

public static Create ( int txIndex, DecodedTx tx ) : DecodedBlockTx
txIndex int
tx DecodedTx
Результат DecodedBlockTx
        public static DecodedBlockTx Create(int txIndex, DecodedTx tx)
        {
            if (tx == null)
                throw new ArgumentNullException(nameof(tx));

            return new DecodedBlockTx(txIndex, tx);
        }

Same methods

BlockTx::Create ( int txIndex, BitSharp.Core.Domain.Transaction tx ) : DecodedBlockTx

Usage Example

Пример #1
0
        public static Block Create(BlockHeader header, ImmutableArray <Transaction> transactions)
        {
            var blockTxes = ImmutableArray.CreateRange(transactions.Select((tx, txIndex) =>
                                                                           (BlockTx)BlockTx.Create(txIndex, tx)));

            return(new Block(header, blockTxes));
        }