本文整理汇总了C#中IByteReader类的典型用法代码示例。如果您正苦于以下问题:C# IByteReader类的具体用法?C# IByteReader怎么用?C# IByteReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IByteReader类属于命名空间,在下文中一共展示了IByteReader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: Decode
public static PeerAddress Decode(IByteReader stream) {
PeerAddress decodedPeerAddress = new PeerAddress();
decodedPeerAddress.Ip = PeerAddressIp.Decode(stream);
decodedPeerAddress.Port = Uint32.Decode(stream);
decodedPeerAddress.NumFailures = Uint32.Decode(stream);
return decodedPeerAddress;
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:PeerAddress.cs
示例17: Decode
public static Hash Decode(IByteReader stream)
{
Hash decodedHash = new Hash();
int Hashsize = 32;
decodedHash.InnerValue = XdrEncoding.ReadFixOpaque(stream, (uint)Hashsize);
return decodedHash;
}
开发者ID:FihlaTV,项目名称:csharp-stellar-base,代码行数:7,代码来源:Hash.cs
示例18: Decode
public static AssetAlphaNum4 Decode(IByteReader stream) {
AssetAlphaNum4 decodedAssetAlphaNum4 = new AssetAlphaNum4();
int assetCodesize = 4;
decodedAssetAlphaNum4.AssetCode = XdrEncoding.ReadFixOpaque(stream, (uint)assetCodesize);
decodedAssetAlphaNum4.Issuer = AccountID.Decode(stream);
return decodedAssetAlphaNum4;
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:Asset.cs
示例19: Decode
public static LedgerHeaderHistoryEntry Decode(IByteReader stream) {
LedgerHeaderHistoryEntry decodedLedgerHeaderHistoryEntry = new LedgerHeaderHistoryEntry();
decodedLedgerHeaderHistoryEntry.Hash = Hash.Decode(stream);
decodedLedgerHeaderHistoryEntry.Header = LedgerHeader.Decode(stream);
decodedLedgerHeaderHistoryEntry.Ext = LedgerHeaderHistoryEntryExt.Decode(stream);
return decodedLedgerHeaderHistoryEntry;
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:LedgerHeaderHistoryEntry.cs
示例20: Decode
public static TransactionHistoryResultEntry Decode(IByteReader stream) {
TransactionHistoryResultEntry decodedTransactionHistoryResultEntry = new TransactionHistoryResultEntry();
decodedTransactionHistoryResultEntry.LedgerSeq = Uint32.Decode(stream);
decodedTransactionHistoryResultEntry.TxResultSet = TransactionResultSet.Decode(stream);
decodedTransactionHistoryResultEntry.Ext = TransactionHistoryResultEntryExt.Decode(stream);
return decodedTransactionHistoryResultEntry;
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:TransactionHistoryResultEntry.cs
注:本文中的IByteReader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论