Skip to content

Commit e887f73

Browse files
committed
Fix compile warnings about obsolete APIs
1 parent 7ae9632 commit e887f73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Performance/NetMQ.SimpleTests/ThroughputBenchmark.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected override void Produce(PushSocket socket, int messageSize)
134134
for (int i = 0; i < MsgCount; i++)
135135
{
136136
msg.InitGC(new byte[messageSize], messageSize);
137-
msg.Data[messageSize / 2] = 0x42;
137+
msg.Slice()[messageSize / 2] = 0x42;
138138

139139
socket.Send(ref msg, more: false);
140140

@@ -150,8 +150,8 @@ protected override void Consume(PullSocket socket, int messageSize)
150150
for (int i = 0; i < MsgCount; i++)
151151
{
152152
socket.Receive(ref msg);
153-
Debug.Assert(msg.Data.Length == messageSize, "Message length was different from expected size.");
154-
Debug.Assert(msg.Data[msg.Size/2] == 0x42, "Message did not contain verification data.");
153+
Debug.Assert(msg.Slice().Length == messageSize, "Message length was different from expected size.");
154+
Debug.Assert(msg.Slice()[msg.Size/2] == 0x42, "Message did not contain verification data.");
155155
}
156156
}
157157
}

0 commit comments

Comments
 (0)