當前位置: 首頁>>代碼示例>>C#>>正文


C# BinaryWriter.WriteUInt256方法代碼示例

本文整理匯總了C#中System.IO.BinaryWriter.WriteUInt256方法的典型用法代碼示例。如果您正苦於以下問題:C# BinaryWriter.WriteUInt256方法的具體用法?C# BinaryWriter.WriteUInt256怎麽用?C# BinaryWriter.WriteUInt256使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.IO.BinaryWriter的用法示例。


在下文中一共展示了BinaryWriter.WriteUInt256方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: EncodeBlockHeader

 public static void EncodeBlockHeader(BinaryWriter writer, BlockHeader blockHeader)
 {
     writer.WriteUInt32(blockHeader.Version);
     writer.WriteUInt256(blockHeader.PreviousBlock);
     writer.WriteUInt256(blockHeader.MerkleRoot);
     writer.WriteUInt32((uint)blockHeader.Time.ToUnixTimeSeconds());
     writer.WriteUInt32(blockHeader.Bits);
     writer.WriteUInt32(blockHeader.Nonce);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:9,代碼來源:DataEncoder.cs

示例2: EncodeGetBlocksPayload

 public static void EncodeGetBlocksPayload(BinaryWriter writer, GetBlocksPayload getBlocksPayload)
 {
     writer.WriteUInt32(getBlocksPayload.Version);
     writer.WriteList(getBlocksPayload.BlockLocatorHashes, locatorHash => writer.WriteUInt256(locatorHash));
     writer.WriteUInt256(getBlocksPayload.HashStop);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:6,代碼來源:NodeEncoder.cs

示例3: EncodeInventoryVector

 public static void EncodeInventoryVector(BinaryWriter writer, InventoryVector invVector)
 {
     writer.WriteUInt32(invVector.Type);
     writer.WriteUInt256(invVector.Hash);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:5,代碼來源:NodeEncoder.cs

示例4: EncodeTxOutputKey

 public static void EncodeTxOutputKey(BinaryWriter writer, TxOutputKey txOutputKey)
 {
     writer.WriteUInt256(txOutputKey.TxHash);
     writer.WriteUInt32(txOutputKey.TxOutputIndex);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:5,代碼來源:DataEncoder.cs

示例5: EncodeBlockTxNode

 public static void EncodeBlockTxNode(BinaryWriter writer, BlockTxNode blockTx)
 {
     writer.WriteInt32(blockTx.Index);
     writer.WriteInt32(blockTx.Depth);
     writer.WriteUInt256(blockTx.Hash);
     writer.WriteBool(blockTx.Pruned);
     if (!blockTx.Pruned)
         writer.WriteBytes(blockTx.TxBytes.ToArray());
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:9,代碼來源:DataEncoder.cs

示例6: EncodeTxLookupKey

 public static void EncodeTxLookupKey(BinaryWriter writer, TxLookupKey txLookupKey)
 {
     writer.WriteUInt256(txLookupKey.BlockHash);
     writer.WriteInt32(txLookupKey.TxIndex);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:5,代碼來源:DataEncoder.cs

示例7: EncodeUnmintedTx

 public static void EncodeUnmintedTx(BinaryWriter writer, UnmintedTx unmintedTx)
 {
     writer.WriteUInt256(unmintedTx.TxHash);
     EncodePrevTxOutputList(writer, unmintedTx.PrevTxOutputs);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:5,代碼來源:DataEncoder.cs

示例8: EncodeUnspentTx

 public static void EncodeUnspentTx(BinaryWriter writer, UnspentTx unspentTx)
 {
     writer.WriteUInt256(unspentTx.TxHash);
     writer.WriteInt32(unspentTx.BlockIndex);
     writer.WriteInt32(unspentTx.TxIndex);
     writer.WriteUInt32(unspentTx.TxVersion);
     writer.WriteBool(unspentTx.IsCoinbase);
     writer.WriteVarBytes(unspentTx.OutputStates.ToByteArray());
     writer.WriteInt32(unspentTx.OutputStates.Length);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:10,代碼來源:DataEncoder.cs

示例9: EncodeSpentTx

 public static void EncodeSpentTx(BinaryWriter writer, SpentTx spentTx)
 {
     writer.WriteUInt256(spentTx.TxHash);
     writer.WriteInt32(spentTx.ConfirmedBlockIndex);
     writer.WriteInt32(spentTx.TxIndex);
     writer.WriteInt32(spentTx.OutputCount);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:7,代碼來源:DataEncoder.cs

示例10: EncodeUInt256

 public static void EncodeUInt256(BinaryWriter writer, UInt256 value)
 {
     writer.WriteUInt256(value);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:4,代碼來源:DataEncoder.cs

示例11: EncodeTxInput

 public static void EncodeTxInput(BinaryWriter writer, TxInput txInput)
 {
     writer.WriteUInt256(txInput.PrevTxOutputKey.TxHash);
     writer.WriteUInt32(txInput.PrevTxOutputKey.TxOutputIndex);
     writer.WriteVarBytes(txInput.ScriptSignature.ToArray());
     writer.WriteUInt32(txInput.Sequence);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:7,代碼來源:DataEncoder.cs

示例12: EncodeChainedHeader

 public static void EncodeChainedHeader(BinaryWriter writer, ChainedHeader chainedHeader)
 {
     writer.WriteUInt256(chainedHeader.Hash);
     EncodeBlockHeader(writer, chainedHeader.BlockHeader);
     writer.WriteInt32(chainedHeader.Height);
     writer.WriteVarBytes(chainedHeader.TotalWork.ToByteArray());
     writer.WriteInt64(chainedHeader.DateSeen.UtcTicks);
 }
開發者ID:cole2295,項目名稱:BitSharp,代碼行數:8,代碼來源:DataEncoder.cs

示例13: EncodeUnmintedTx

 public static void EncodeUnmintedTx(BinaryWriter writer, UnmintedTx unmintedTx)
 {
     writer.WriteUInt256(unmintedTx.TxHash);
     writer.WriteList(unmintedTx.PrevOutputTxKeys, x => EncodeTxLookupKey(writer, x));
 }
開發者ID:ArsenShnurkov,項目名稱:BitSharp,代碼行數:5,代碼來源:DataEncoder.cs

示例14: EncodeBlockTx

        public static void EncodeBlockTx(BinaryWriter writer, BlockTx blockTx)
        {
            var txBytes = blockTx.Transaction != null ? EncodeTransaction(blockTx.Transaction) : new byte[0];

            writer.WriteInt32(blockTx.Index);
            writer.WriteInt32(blockTx.Depth);
            writer.WriteUInt256(blockTx.Hash);
            writer.WriteBool(blockTx.Pruned);
            if (!blockTx.Pruned)
                EncodeTransaction(writer, blockTx.Transaction);
        }
開發者ID:ArsenShnurkov,項目名稱:BitSharp,代碼行數:11,代碼來源:DataEncoder.cs


注:本文中的System.IO.BinaryWriter.WriteUInt256方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。