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


C# IByteReader类代码示例

本文整理汇总了C#中IByteReader的典型用法代码示例。如果您正苦于以下问题:C# IByteReader类的具体用法?C# IByteReader怎么用?C# IByteReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Decode

 public static Price Decode(IByteReader stream)
 {
     Price decodedPrice = new Price();
     decodedPrice.N = Int32.Decode(stream);
     decodedPrice.D = Int32.Decode(stream);
     return decodedPrice;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:Price.cs

示例2: Decode

 public static TransactionResultPair Decode(IByteReader stream)
 {
     TransactionResultPair decodedTransactionResultPair = new TransactionResultPair();
     decodedTransactionResultPair.TransactionHash = Hash.Decode(stream);
     decodedTransactionResultPair.Result = TransactionResult.Decode(stream);
     return decodedTransactionResultPair;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:TransactionResultPair.cs

示例3: Decode

 public static Signature Decode(IByteReader stream)
 {
     Signature decodedSignature = new Signature();
       int Signaturesize = XdrEncoding.DecodeInt32(stream);
       decodedSignature.InnerValue = XdrEncoding.ReadFixOpaque(stream, (uint)Signaturesize);
     return decodedSignature;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:Signature.cs

示例4: Decode

 public static Thresholds Decode(IByteReader stream)
 {
     Thresholds decodedThresholds = new Thresholds();
       int Thresholdssize = 4;
       decodedThresholds.InnerValue = XdrEncoding.ReadFixOpaque(stream, (uint)Thresholdssize);
     return decodedThresholds;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:Thresholds.cs

示例5: Decode

 public static SCPStatement Decode(IByteReader stream) {
   SCPStatement decodedSCPStatement = new SCPStatement();
   decodedSCPStatement.NodeID = NodeID.Decode(stream);
   decodedSCPStatement.SlotIndex = Uint64.Decode(stream);
   decodedSCPStatement.Pledges = SCPStatementPledges.Decode(stream);
   return decodedSCPStatement;
 }
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:SCPStatement.cs

示例6: Decode

 public static Uint256 Decode(IByteReader stream)
 {
     Uint256 decodedUint256 = new Uint256();
       int uint256size = 32;
       decodedUint256.InnerValue = XdrEncoding.ReadFixOpaque(stream, (uint)uint256size);
     return decodedUint256;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:Uint256.cs

示例7: Decode

 public static AuthenticatedMessageV0 Decode(IByteReader stream) {
   AuthenticatedMessageV0 decodedAuthenticatedMessageV0 = new AuthenticatedMessageV0();
   decodedAuthenticatedMessageV0.Sequence = Uint64.Decode(stream);
   decodedAuthenticatedMessageV0.Message = StellarMessage.Decode(stream);
   decodedAuthenticatedMessageV0.Mac = HmacSha256Mac.Decode(stream);
   return decodedAuthenticatedMessageV0;
 }
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:AuthenticatedMessage.cs

示例8: Decode

 public static SignatureHint Decode(IByteReader stream)
 {
     SignatureHint decodedSignatureHint = new SignatureHint();
       int SignatureHintsize = 4;
       decodedSignatureHint.InnerValue = XdrEncoding.ReadFixOpaque(stream, (uint)SignatureHintsize);
     return decodedSignatureHint;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:SignatureHint.cs

示例9: isFileCompliant

		//public int getMaxOffset() { return MaxOffset; }



		/**
		 * checks whether the binary file specified by targetFile is compliant
		 * with this byte sequence
		 *
		 * @param targetFile   The binary file to be identified
		 */
		public bool isFileCompliant(IByteReader targetFile)
		{
			//System.out.println("Looking at new byte sequence with reference "+Reference);
			//initialise variables and start with the file marker at the beginning of the file
			bool isCompliant = true;
			bool reverseOrder = (string.Compare(getReference(), "EOFoffset", true) == 0) ? true : false; //(getReference().equalsIgnoreCase("EOFoffset")) ? true : false;
			int ssLoopStart = reverseOrder ? getNumSubSequences() - 1 : 0;
			int ssLoopEnd = reverseOrder ? -1 : getNumSubSequences();
			int searchDirection = reverseOrder ? -1 : 1;
			if (reverseOrder)
			{
				targetFile.SetFileMarker(targetFile.GetNumberOfBytes() - 1L);
			}
			else
			{
				targetFile.SetFileMarker(0L);
			}

			//check whether each subsequence in turn is compliant
			for (int iSS = ssLoopStart; (searchDirection * iSS < searchDirection * ssLoopEnd) & isCompliant; iSS += searchDirection)
			{
				bool isFixedStart = ((string.Compare(getReference(), "EOFoffset", true) == 0) || (string.Compare(getReference(), "BOFoffset", true) == 0)) ? true : false; //getReference().equalsIgnoreCase("EOFoffset") || getReference().equalsIgnoreCase("BOFoffset");
				if ((iSS == ssLoopStart) && (isFixedStart))
				{
					isCompliant = getSubSequence(iSS).isFoundAtStartOfFile(targetFile, reverseOrder, bigEndian); //, MaxOffset);
				}
				else
				{
					isCompliant = getSubSequence(iSS).isFoundAfterFileMarker(targetFile, reverseOrder, bigEndian);
				}
			}
			return isCompliant;
		}
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:43,代码来源:ByteSequence.cs

示例10: Decode

 public static Curve25519Secret Decode(IByteReader stream)
 {
     Curve25519Secret decodedCurve25519Secret = new Curve25519Secret();
     int keysize = 32;
     decodedCurve25519Secret.Key = XdrEncoding.ReadFixOpaque(stream, (uint)keysize);
     return decodedCurve25519Secret;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:Curve25519Secret.cs

示例11: Decode

 public static Value Decode(IByteReader stream)
 {
     Value decodedValue = new Value();
       int Valuesize = XdrEncoding.DecodeInt32(stream);
       decodedValue.InnerValue = XdrEncoding.ReadFixOpaque(stream, (uint)Valuesize);
     return decodedValue;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:Value.cs

示例12: Decode

 public static DecoratedSignature Decode(IByteReader stream)
 {
     DecoratedSignature decodedDecoratedSignature = new DecoratedSignature();
     decodedDecoratedSignature.Hint = SignatureHint.Decode(stream);
     decodedDecoratedSignature.Signature = Signature.Decode(stream);
     return decodedDecoratedSignature;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:DecoratedSignature.cs

示例13: Decode

 public static Error Decode(IByteReader stream)
 {
     Error decodedError = new Error();
     decodedError.Code = ErrorCode.Decode(stream);
     decodedError.Msg = XdrEncoding.ReadString(stream);
     return decodedError;
 }
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:Error.cs

示例14: Decode

 public static PaymentOp Decode(IByteReader stream) {
   PaymentOp decodedPaymentOp = new PaymentOp();
   decodedPaymentOp.Destination = AccountID.Decode(stream);
   decodedPaymentOp.Asset = Asset.Decode(stream);
   decodedPaymentOp.Amount = Int64.Decode(stream);
   return decodedPaymentOp;
 }
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:PaymentOp.cs

示例15: Decode

 public static LedgerEntry Decode(IByteReader stream) {
   LedgerEntry decodedLedgerEntry = new LedgerEntry();
   decodedLedgerEntry.LastModifiedLedgerSeq = Uint32.Decode(stream);
   decodedLedgerEntry.Data = LedgerEntryData.Decode(stream);
   decodedLedgerEntry.Ext = LedgerEntryExt.Decode(stream);
   return decodedLedgerEntry;
 }
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:LedgerEntry.cs


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