本文整理汇总了C#中Apache.Qpid.Buffer.ByteBuffer类的典型用法代码示例。如果您正苦于以下问题:C# ByteBuffer类的具体用法?C# ByteBuffer怎么用?C# ByteBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ByteBuffer类属于Apache.Qpid.Buffer命名空间,在下文中一共展示了ByteBuffer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:25,代码来源:ByteBufferHexDumper.cs
示例2: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteShortStringBytes(buffer, Queue);
buffer.Put(MessageCount);
buffer.Put(ConsumerCount);
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:QueueDeclareOkBody.cs
示例3: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteShortStringBytes(buffer, String1);
EncodingUtils.WriteLongstr(buffer, String2);
buffer.Put(Operation);
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:TestStringBody.cs
示例4: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
String1 = EncodingUtils.ReadShortString(buffer);
String2 = EncodingUtils.ReadLongstr(buffer);
Operation = buffer.GetByte();
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:TestStringBody.cs
示例5: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteShortStringBytes(buffer, Exchange);
EncodingUtils.WriteShortStringBytes(buffer, RoutingKey);
EncodingUtils.WriteShortStringBytes(buffer, Queue);
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ExchangeBoundBody.cs
示例6: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
Exchange = EncodingUtils.ReadShortString(buffer);
RoutingKey = EncodingUtils.ReadShortString(buffer);
Queue = EncodingUtils.ReadShortString(buffer);
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ExchangeBoundBody.cs
示例7: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
Table = EncodingUtils.ReadFieldTable(buffer);
IntegerOp = buffer.GetByte();
StringOp = buffer.GetByte();
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:TestTableBody.cs
示例8: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
buffer.Put(Ticket);
EncodingUtils.WriteShortStringBytes(buffer, Queue);
EncodingUtils.WriteBooleans(buffer, new bool[]{NoAck});
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:BasicGetBody.cs
示例9: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteFieldTableBytes(buffer, Table);
buffer.Put(IntegerOp);
buffer.Put(StringOp);
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:TestTableBody.cs
示例10: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
PrefetchSize = buffer.GetUInt32();
PrefetchCount = buffer.GetUInt16();
bool[] bools = EncodingUtils.ReadBooleans(buffer);Global = bools[0];
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:FileQosBody.cs
示例11: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
buffer.Put(PrefetchSize);
buffer.Put(PrefetchCount);
EncodingUtils.WriteBooleans(buffer, new bool[]{Global});
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:FileQosBody.cs
示例12: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
Queue = EncodingUtils.ReadShortString(buffer);
MessageCount = buffer.GetUInt32();
ConsumerCount = buffer.GetUInt32();
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:QueueDeclareOkBody.cs
示例13: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
ReplyCode = buffer.GetUInt16();
ReplyText = EncodingUtils.ReadShortString(buffer);
Details = EncodingUtils.ReadFieldTable(buffer);
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ChannelAlertBody.cs
示例14: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
EncodingUtils.WriteShortStringBytes(buffer, VirtualHost);
EncodingUtils.WriteShortStringBytes(buffer, Capabilities);
EncodingUtils.WriteBooleans(buffer, new bool[]{Insist});
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ConnectionOpenBody.cs
示例15: WritePayload
public void WritePayload(ByteBuffer buffer)
{
foreach (IDataBlock block in _blocks)
{
block.WritePayload(buffer);
}
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:CompositeAMQDataBlock.cs
示例16: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
buffer.Put(ReplyCode);
EncodingUtils.WriteShortStringBytes(buffer, ReplyText);
EncodingUtils.WriteFieldTableBytes(buffer, Details);
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ChannelAlertBody.cs
示例17: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
buffer.Put(ChannelMax);
buffer.Put(FrameMax);
buffer.Put(Heartbeat);
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ConnectionTuneBody.cs
示例18: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
ChannelMax = buffer.GetUInt16();
FrameMax = buffer.GetUInt32();
Heartbeat = buffer.GetUInt16();
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ConnectionTuneBody.cs
示例19: WriteMethodPayload
protected override void WriteMethodPayload(ByteBuffer buffer)
{
buffer.Put(Ticket);
EncodingUtils.WriteShortStringBytes(buffer, Exchange);
EncodingUtils.WriteBooleans(buffer, new bool[]{IfUnused, Nowait});
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:ExchangeDeleteBody.cs
示例20: PopulateMethodBodyFromBuffer
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
{
Ticket = buffer.GetUInt16();
Queue = EncodingUtils.ReadShortString(buffer);
bool[] bools = EncodingUtils.ReadBooleans(buffer);Nowait = bools[0];
}
开发者ID:drzo,项目名称:opensim4opencog,代码行数:7,代码来源:QueuePurgeBody.cs
注:本文中的Apache.Qpid.Buffer.ByteBuffer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论