本文整理汇总了C#中IByteWriter类的典型用法代码示例。如果您正苦于以下问题:C# IByteWriter类的具体用法?C# IByteWriter怎么用?C# IByteWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IByteWriter类属于命名空间,在下文中一共展示了IByteWriter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: EncodeUInt32
/// <summary>
/// Encodes the UInt32.
/// http://tools.ietf.org/html/rfc4506#section-4.2
/// </summary>
public static void EncodeUInt32(uint v, IByteWriter w)
{
w.Write((byte)((v >> 0x18) & 0xff));
w.Write((byte)((v >> 0x10) & 0xff));
w.Write((byte)((v >> 8) & 0xff));
w.Write((byte)(v & 0xff));
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:11,代码来源:XdrEncoding.cs
示例2: BatchWriter
public BatchWriter(IByteWriter target, int maxBufferSizeInBytes)
{
_target = target;
_pendingBuffer = new ByteBuffer(maxBufferSizeInBytes);
_flushBuffer = new ByteBuffer(maxBufferSizeInBytes);
_minFlushSize = maxBufferSizeInBytes/2;
}
开发者ID:ArturD,项目名称:Daemons,代码行数:7,代码来源:BatchWriter.cs
示例3: Encode
public static void Encode(IByteWriter stream, ManageOfferOp encodedManageOfferOp) {
Asset.Encode(stream, encodedManageOfferOp.Selling);
Asset.Encode(stream, encodedManageOfferOp.Buying);
Int64.Encode(stream, encodedManageOfferOp.Amount);
Price.Encode(stream, encodedManageOfferOp.Price);
Uint64.Encode(stream, encodedManageOfferOp.OfferID);
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:ManageOfferOp.cs
示例4: Encode
public static void Encode(IByteWriter stream, StellarValueExt encodedStellarValueExt) {
XdrEncoding.EncodeInt32(encodedStellarValueExt.Discriminant, stream);
switch (encodedStellarValueExt.Discriminant) {
case 0:
break;
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:StellarValue.cs
示例5: Encode
public static void Encode(IByteWriter stream, OfferEntryExt encodedOfferEntryExt) {
XdrEncoding.EncodeInt32(encodedOfferEntryExt.Discriminant, stream);
switch (encodedOfferEntryExt.Discriminant) {
case 0:
break;
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:OfferEntry.cs
示例6: Encode
public static void Encode(IByteWriter stream, LedgerEntryChanges encodedLedgerEntryChanges) {
int LedgerEntryChangesSize = encodedLedgerEntryChanges.InnerValue.Length;
XdrEncoding.EncodeInt32(LedgerEntryChangesSize, stream);
for (int i = 0; i < LedgerEntryChangesSize; i++) {
LedgerEntryChange.Encode(stream, encodedLedgerEntryChanges.InnerValue[i]);
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:LedgerEntryChanges.cs
示例7: Encode
public static void Encode(IByteWriter stream, TransactionResultSet encodedTransactionResultSet) {
int resultssize = encodedTransactionResultSet.Results.Length;
XdrEncoding.EncodeInt32(resultssize, stream);
for (int i = 0; i < resultssize; i++) {
TransactionResultPair.Encode(stream, encodedTransactionResultSet.Results[i]);
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:TransactionResultSet.cs
示例8: Encode
public static void Encode(IByteWriter stream, TransactionHistoryResultEntryExt encodedTransactionHistoryResultEntryExt) {
XdrEncoding.EncodeInt32(encodedTransactionHistoryResultEntryExt.Discriminant, stream);
switch (encodedTransactionHistoryResultEntryExt.Discriminant) {
case 0:
break;
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:TransactionHistoryResultEntry.cs
示例9: Encode
public static void Encode(IByteWriter stream, LedgerHeaderHistoryEntryExt encodedLedgerHeaderHistoryEntryExt) {
XdrEncoding.EncodeInt32(encodedLedgerHeaderHistoryEntryExt.Discriminant, stream);
switch (encodedLedgerHeaderHistoryEntryExt.Discriminant) {
case 0:
break;
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:7,代码来源:LedgerHeaderHistoryEntry.cs
示例10: Encode
public static void Encode(IByteWriter stream, AuthenticatedMessage encodedAuthenticatedMessage) {
XdrEncoding.EncodeInt32((int)encodedAuthenticatedMessage.Discriminant.InnerValue, stream);
switch (encodedAuthenticatedMessage.Discriminant.InnerValue) {
case 0:
AuthenticatedMessageV0.Encode(stream, encodedAuthenticatedMessage.V0);
break;
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:AuthenticatedMessage.cs
示例11: Encode
public static void Encode(IByteWriter stream, PublicKey encodedPublicKey) {
XdrEncoding.EncodeInt32((int)encodedPublicKey.Discriminant.InnerValue, stream);
switch (encodedPublicKey.Discriminant.InnerValue) {
case CryptoKeyType.CryptoKeyTypeEnum.KEY_TYPE_ED25519:
Uint256.Encode(stream, encodedPublicKey.Ed25519);
break;
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:PublicKey.cs
示例12: Encode
public static void Encode(IByteWriter stream, TransactionSet encodedTransactionSet) {
Hash.Encode(stream, encodedTransactionSet.PreviousLedgerHash);
int txssize = encodedTransactionSet.Txs.Length;
XdrEncoding.EncodeInt32(txssize, stream);
for (int i = 0; i < txssize; i++) {
TransactionEnvelope.Encode(stream, encodedTransactionSet.Txs[i]);
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:TransactionSet.cs
示例13: Encode
public static void Encode(IByteWriter stream, TransactionEnvelope encodedTransactionEnvelope) {
Transaction.Encode(stream, encodedTransactionEnvelope.Tx);
int signaturessize = encodedTransactionEnvelope.Signatures.Length;
XdrEncoding.EncodeInt32(signaturessize, stream);
for (int i = 0; i < signaturessize; i++) {
DecoratedSignature.Encode(stream, encodedTransactionEnvelope.Signatures[i]);
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:TransactionEnvelope.cs
示例14: Encode
public static void Encode(IByteWriter stream, TrustLineEntry encodedTrustLineEntry) {
AccountID.Encode(stream, encodedTrustLineEntry.AccountID);
Asset.Encode(stream, encodedTrustLineEntry.Asset);
Int64.Encode(stream, encodedTrustLineEntry.Balance);
Int64.Encode(stream, encodedTrustLineEntry.Limit);
Uint32.Encode(stream, encodedTrustLineEntry.Flags);
TrustLineEntryExt.Encode(stream, encodedTrustLineEntry.Ext);
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:TrustLineEntry.cs
示例15: Encode
public static void Encode(IByteWriter stream, LedgerSCPMessages encodedLedgerSCPMessages) {
Uint32.Encode(stream, encodedLedgerSCPMessages.LedgerSeq);
int messagessize = encodedLedgerSCPMessages.Messages.Length;
XdrEncoding.EncodeInt32(messagessize, stream);
for (int i = 0; i < messagessize; i++) {
SCPEnvelope.Encode(stream, encodedLedgerSCPMessages.Messages[i]);
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:LedgerSCPMessages.cs
示例16: Encode
public static void Encode(IByteWriter stream, PathPaymentResultSuccess encodedPathPaymentResultSuccess) {
int offerssize = encodedPathPaymentResultSuccess.Offers.Length;
XdrEncoding.EncodeInt32(offerssize, stream);
for (int i = 0; i < offerssize; i++) {
ClaimOfferAtom.Encode(stream, encodedPathPaymentResultSuccess.Offers[i]);
}
SimplePaymentResult.Encode(stream, encodedPathPaymentResultSuccess.Last);
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:PathPaymentResult.cs
示例17: Encode
public static void Encode(IByteWriter stream, ClaimOfferAtom encodedClaimOfferAtom) {
AccountID.Encode(stream, encodedClaimOfferAtom.SellerID);
Uint64.Encode(stream, encodedClaimOfferAtom.OfferID);
Asset.Encode(stream, encodedClaimOfferAtom.AssetSold);
Int64.Encode(stream, encodedClaimOfferAtom.AmountSold);
Asset.Encode(stream, encodedClaimOfferAtom.AssetBought);
Int64.Encode(stream, encodedClaimOfferAtom.AmountBought);
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:ClaimOfferAtom.cs
示例18: Encode
public static void Encode(IByteWriter stream, ManageOfferSuccessResult encodedManageOfferSuccessResult) {
int offersClaimedsize = encodedManageOfferSuccessResult.OffersClaimed.Length;
XdrEncoding.EncodeInt32(offersClaimedsize, stream);
for (int i = 0; i < offersClaimedsize; i++) {
ClaimOfferAtom.Encode(stream, encodedManageOfferSuccessResult.OffersClaimed[i]);
}
ManageOfferSuccessResultOffer.Encode(stream, encodedManageOfferSuccessResult.Offer);
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:ManageOfferSuccessResult.cs
示例19: Encode
public static void Encode(IByteWriter stream, SCPHistoryEntryV0 encodedSCPHistoryEntryV0) {
int quorumSetssize = encodedSCPHistoryEntryV0.QuorumSets.Length;
XdrEncoding.EncodeInt32(quorumSetssize, stream);
for (int i = 0; i < quorumSetssize; i++) {
SCPQuorumSet.Encode(stream, encodedSCPHistoryEntryV0.QuorumSets[i]);
}
LedgerSCPMessages.Encode(stream, encodedSCPHistoryEntryV0.LedgerMessages);
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:SCPHistoryEntryV0.cs
示例20: Encode
public static void Encode(IByteWriter stream, SCPHistoryEntry encodedSCPHistoryEntry) {
XdrEncoding.EncodeInt32(encodedSCPHistoryEntry.Discriminant, stream);
switch (encodedSCPHistoryEntry.Discriminant) {
case 0:
SCPHistoryEntryV0.Encode(stream, encodedSCPHistoryEntry.V0);
break;
}
}
开发者ID:QuantozTechnology,项目名称:csharp-stellar-base,代码行数:8,代码来源:SCPHistoryEntry.cs
注:本文中的IByteWriter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论