Skip to content

Commit

Permalink
ApiCompat: Data value
Browse files Browse the repository at this point in the history
  • Loading branch information
xinchen10 committed Mar 15, 2022
1 parent 8e8fdf4 commit 2e5147a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Framing/Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ internal override void EncodeValue(ByteBuffer buffer)

internal override void DecodeValue(ByteBuffer buffer)
{
this.Segment = AmqpCodec.DecodeBinary(buffer);
this.segment = AmqpCodec.DecodeBinary(buffer);
// Have to set this for back compat
this.Value = this.segment;
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions test/TestCases/AmqpMessageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ static void ValidateMessage(AmqpMessage original, AmqpMessage deserialized)
{
while (enumerator1.MoveNext() && enumerator2.MoveNext())
{
ArraySegment<byte> data1 = (ArraySegment<byte>)enumerator1.Current.Value;
ArraySegment<byte> data2 = (ArraySegment<byte>)enumerator1.Current.Value;
ArraySegment<byte> data1 = enumerator1.Current.Segment;
ArraySegment<byte> data2 = (ArraySegment<byte>)enumerator2.Current.Value;
Assert.Equal(data1.Count, data2.Count);
}
}
Expand Down

0 comments on commit 2e5147a

Please sign in to comment.