当前位置: 首页>>代码示例>>C#>>正文


C# BinaryReader.ReadUInt256方法代码示例

本文整理汇总了C#中System.IO.BinaryReader.ReadUInt256方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryReader.ReadUInt256方法的具体用法?C# BinaryReader.ReadUInt256怎么用?C# BinaryReader.ReadUInt256使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.IO.BinaryReader的用法示例。


在下文中一共展示了BinaryReader.ReadUInt256方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DecodeGetBlocksPayload

 public static GetBlocksPayload DecodeGetBlocksPayload(BinaryReader reader)
 {
     return new GetBlocksPayload
     (
         Version: reader.ReadUInt32(),
         BlockLocatorHashes: reader.ReadList(() => reader.ReadUInt256()),
         HashStop: reader.ReadUInt256()
     );
 }
开发者ID:cole2295,项目名称:BitSharp,代码行数:9,代码来源:NodeEncoder.cs

示例2: DecodeBlockHeader

 public static BlockHeader DecodeBlockHeader(BinaryReader reader, UInt256 blockHash = null)
 {
     return new BlockHeader
     (
         version: reader.ReadUInt32(),
         previousBlock: reader.ReadUInt256(),
         merkleRoot: reader.ReadUInt256(),
         time: reader.ReadUInt32(),
         bits: reader.ReadUInt32(),
         nonce: reader.ReadUInt32(),
         hash: blockHash
     );
 }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:13,代码来源:DataEncoder.cs

示例3: DecodeBlockTx

        public static BlockTx DecodeBlockTx(BinaryReader reader, bool skipTx = false)
        {
            var index = reader.ReadInt32();
            var depth = reader.ReadInt32();
            var hash = reader.ReadUInt256();
            var pruned = reader.ReadBool();

            if (!pruned && !skipTx)
            {
                var tx = DecodeTransaction(reader, hash);
                return new BlockTx(index, depth, hash, pruned, tx);
            }
            else
                return new BlockTx(index, depth, hash, pruned, null);
        }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:15,代码来源:DataEncoder.cs

示例4: DecodeInventoryVector

 public static InventoryVector DecodeInventoryVector(BinaryReader reader)
 {
     return new InventoryVector
     (
         Type: reader.ReadUInt32(),
         Hash: reader.ReadUInt256()
     );
 }
开发者ID:cole2295,项目名称:BitSharp,代码行数:8,代码来源:NodeEncoder.cs

示例5: DecodeChainedHeader

 public static ChainedHeader DecodeChainedHeader(BinaryReader reader)
 {
     var blockHash = reader.ReadUInt256();
     return new ChainedHeader
     (
         blockHeader: DecodeBlockHeader(reader, blockHash),
         height: reader.ReadInt32(),
         totalWork: new BigInteger(reader.ReadVarBytes())
     );
 }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:10,代码来源:DataEncoder.cs

示例6: DecodeUnmintedTx

 public static UnmintedTx DecodeUnmintedTx(BinaryReader reader)
 {
     return new UnmintedTx(
         txHash: reader.ReadUInt256(),
         prevOutputTxKeys: reader.ReadList(() => DecodeTxLookupKey(reader))
     );
 }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:7,代码来源:DataEncoder.cs

示例7: DecodeUnspentTx

 public static UnspentTx DecodeUnspentTx(BinaryReader reader)
 {
     return new UnspentTx(
         txHash: reader.ReadUInt256(),
         blockIndex: reader.ReadInt32(),
         txIndex: reader.ReadInt32(),
         outputStates: new OutputStates(
             bytes: reader.ReadVarBytes(),
             length: reader.ReadInt32())
     );
 }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:11,代码来源:DataEncoder.cs

示例8: DecodeUInt256

 public static UInt256 DecodeUInt256(BinaryReader reader)
 {
     return reader.ReadUInt256();
 }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:4,代码来源:DataEncoder.cs

示例9: DecodeTxOutputKey

 public static TxOutputKey DecodeTxOutputKey(BinaryReader reader)
 {
     return new TxOutputKey
     (
         txHash: reader.ReadUInt256(),
         txOutputIndex: reader.ReadUInt32()
     );
 }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:8,代码来源:DataEncoder.cs

示例10: DecodeTxLookupKey

 public static TxLookupKey DecodeTxLookupKey(BinaryReader reader)
 {
     return new TxLookupKey(
         blockHash: reader.ReadUInt256(),
         txIndex: reader.ReadInt32()
     );
 }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:7,代码来源:DataEncoder.cs

示例11: DecodeTxInput

 public static TxInput DecodeTxInput(BinaryReader reader)
 {
     return new TxInput
     (
         previousTxOutputKey: new TxOutputKey
         (
             txHash: reader.ReadUInt256(),
             txOutputIndex: reader.ReadUInt32()
         ),
         scriptSignature: reader.ReadVarBytes().ToImmutableArray(),
         sequence: reader.ReadUInt32()
     );
 }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:13,代码来源:DataEncoder.cs

示例12: DecodeSpentTx

 public static SpentTx DecodeSpentTx(BinaryReader reader)
 {
     return new SpentTx(
         txHash: reader.ReadUInt256(),
         confirmedBlockIndex: reader.ReadInt32(),
         txIndex: reader.ReadInt32()
     );
 }
开发者ID:ArsenShnurkov,项目名称:BitSharp,代码行数:8,代码来源:DataEncoder.cs


注:本文中的System.IO.BinaryReader.ReadUInt256方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。