当前位置: 首页>>代码示例>>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;未经允许,请勿转载。