summaryrefslogtreecommitdiff
path: root/qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs
diff options
context:
space:
mode:
authorRobert Greig <rgreig@apache.org>2007-02-26 17:46:07 +0000
committerRobert Greig <rgreig@apache.org>2007-02-26 17:46:07 +0000
commita019367dc582d61fa3739f385592c0baf9b972b8 (patch)
tree5ce170123120f788d07d472e2febf6b32f17dc29 /qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs
parent2e9743ac06fc05609155769bf04f4fa442d848c2 (diff)
downloadqpid-python-a019367dc582d61fa3739f385592c0baf9b972b8.tar.gz
(Patch submitted by Tomas Restrepo) QPID-ByteBuffer.diff.
Completely refactors the byte buffer implementation, doing away with a complex inheritance hierarchy. Fixes reading and writing of field table to permit interop with Java client. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@511923 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs')
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs b/qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs
index 709db419c4..75d67fdfb8 100644
--- a/qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs
+++ b/qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs
@@ -41,7 +41,7 @@ namespace Qpid.Framing
public string CorrelationId;
- public uint Expiration;
+ public long Expiration;
public string ReplyTo;
@@ -102,13 +102,13 @@ namespace Qpid.Framing
EncodingUtils.WriteShortStringBytes(buffer, ContentType);
EncodingUtils.WriteShortStringBytes(buffer, Encoding);
EncodingUtils.WriteFieldTableBytes(buffer, Headers);
- buffer.put(DeliveryMode);
- buffer.put(Priority);
+ buffer.Put(DeliveryMode);
+ buffer.Put(Priority);
EncodingUtils.WriteShortStringBytes(buffer, CorrelationId);
EncodingUtils.WriteShortStringBytes(buffer, ReplyTo);
EncodingUtils.WriteShortStringBytes(buffer, String.Format("{0:D}", Expiration));
EncodingUtils.WriteShortStringBytes(buffer, MessageId);
- buffer.put(Timestamp);
+ buffer.Put(Timestamp);
EncodingUtils.WriteShortStringBytes(buffer, Type);
EncodingUtils.WriteShortStringBytes(buffer, UserId);
EncodingUtils.WriteShortStringBytes(buffer, AppId);
@@ -125,19 +125,19 @@ namespace Qpid.Framing
if ((propertyFlags & (1 << 13)) > 0)
Headers = EncodingUtils.ReadFieldTable(buffer);
if ((propertyFlags & (1 << 12)) > 0)
- DeliveryMode = buffer.get();
+ DeliveryMode = buffer.GetByte();
if ((propertyFlags & (1 << 11)) > 0)
- Priority = buffer.get();
+ Priority = buffer.GetByte();
if ((propertyFlags & (1 << 10)) > 0)
CorrelationId = EncodingUtils.ReadShortString(buffer);
if ((propertyFlags & (1 << 9)) > 0)
ReplyTo = EncodingUtils.ReadShortString(buffer);
if ((propertyFlags & (1 << 8)) > 0)
- Expiration = UInt32.Parse(EncodingUtils.ReadShortString(buffer));
+ Expiration = EncodingUtils.ReadLongAsShortString(buffer);
if ((propertyFlags & (1 << 7)) > 0)
MessageId = EncodingUtils.ReadShortString(buffer);
- if ((propertyFlags & (1 << 6)) > 0)
- Timestamp = buffer.GetUnsignedLong();
+ if ((propertyFlags & (1 << 6)) > 0)
+ Timestamp = buffer.GetUInt64();
if ((propertyFlags & (1 << 5)) > 0)
Type = EncodingUtils.ReadShortString(buffer);
if ((propertyFlags & (1 << 4)) > 0)