本文整理汇总了C#中Apache.Qpid.Buffer.ByteBuffer类的典型用法代码示例。如果您正苦于以下问题:C# ByteBuffer类的具体用法?C# ByteBuffer怎么用?C# ByteBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ByteBuffer类属于Apache.Qpid.Buffer命名空间,在下文中一共展示了ByteBuffer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetHexDump
public static string GetHexDump(ByteBuffer input)
{
int size = input.Remaining;
if (size == 0)
{
return "empty";
}
StringBuilder output = new StringBuilder(size * 3 - 1);
byte[] data = input.Array;
int byteValue = data[0] & 0xFF;
output.Append((char) highDigits[byteValue]);
output.Append((char) lowDigits[byteValue]);
for (int i = 1 ; i < size; i++)
{
output.Append(' ');
byteValue = data[i] & 0xFF;
output.Append((char) highDigits[byteValue]);
output.Append((char) lowDigits[byteValue]);
}
return output.ToString();
}
示例2: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteShortStringBytes(buffer, Queue);
buffer.Put(MessageCount);
buffer.Put(ConsumerCount);
}
示例3: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteShortStringBytes(buffer, String1);
EncodingUtils.WriteLongstr(buffer, String2);
buffer.Put(Operation);
}
示例4: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
String1 = EncodingUtils.ReadShortString(buffer);
String2 = EncodingUtils.ReadLongstr(buffer);
Operation = buffer.GetByte();
}
示例5: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteShortStringBytes(buffer, Exchange);
EncodingUtils.WriteShortStringBytes(buffer, RoutingKey);
EncodingUtils.WriteShortStringBytes(buffer, Queue);
}
示例6: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
Exchange = EncodingUtils.ReadShortString(buffer);
RoutingKey = EncodingUtils.ReadShortString(buffer);
Queue = EncodingUtils.ReadShortString(buffer);
}
示例7: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
Table = EncodingUtils.ReadFieldTable(buffer);
IntegerOp = buffer.GetByte();
StringOp = buffer.GetByte();
}
示例8: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
buffer.Put(Ticket);
EncodingUtils.WriteShortStringBytes(buffer, Queue);
EncodingUtils.WriteBooleans(buffer, new bool[]{NoAck});
}
示例9: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteFieldTableBytes(buffer, Table);
buffer.Put(IntegerOp);
buffer.Put(StringOp);
}
示例10: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
PrefetchSize = buffer.GetUInt32();
PrefetchCount = buffer.GetUInt16();
bool[] bools = EncodingUtils.ReadBooleans(buffer);Global = bools[0];
}
示例11: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
buffer.Put(PrefetchSize);
buffer.Put(PrefetchCount);
EncodingUtils.WriteBooleans(buffer, new bool[]{Global});
}
示例12: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
Queue = EncodingUtils.ReadShortString(buffer);
MessageCount = buffer.GetUInt32();
ConsumerCount = buffer.GetUInt32();
}
示例13: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
ReplyCode = buffer.GetUInt16();
ReplyText = EncodingUtils.ReadShortString(buffer);
Details = EncodingUtils.ReadFieldTable(buffer);
}
示例14: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteShortStringBytes(buffer, VirtualHost);
EncodingUtils.WriteShortStringBytes(buffer, Capabilities);
EncodingUtils.WriteBooleans(buffer, new bool[]{Insist});
}
示例15: WritePayload
public void WritePayload(ByteBuffer buffer)
{
foreach (IDataBlock block in _blocks)
{
block.WritePayload(buffer);
}
}