當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。