Skip to content

Commit b1c16b4

Browse files
committed
Cosmetic fixes, remove commented out code
1 parent ff627be commit b1c16b4

File tree

4 files changed

+1
-54
lines changed

4 files changed

+1
-54
lines changed

projects/client/RabbitMQ.Client/src/client/impl/AutorecoveringConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ private enum RecoveryConnectionState
962962
private RecoveryConnectionState _recoveryLoopState = RecoveryConnectionState.Connected;
963963

964964
private readonly ConcurrentQueue<RecoveryCommand> _recoveryLoopCommandQueue = new ConcurrentQueue<RecoveryCommand>();
965-
readonly SemaphoreSlim _semaphore = new SemaphoreSlim(0);
965+
private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(0);
966966
private readonly CancellationTokenSource _recoveryCancellationToken = new CancellationTokenSource();
967967
private readonly TaskCompletionSource<int> _recoveryLoopComplete = new TaskCompletionSource<int>();
968968

projects/client/RabbitMQ.Client/src/client/impl/ModelBase.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ public bool IsOpen
180180
get { return CloseReason == null; }
181181
}
182182

183-
184-
185183
public ulong NextPublishSeqNo { get => _nextPublishSeqNo; }
186184

187185
public ISession Session { get; private set; }

projects/client/RabbitMQ.Client/src/client/impl/SocketFrameHandler.cs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -253,36 +253,6 @@ public void WriteFrameSet(IList<OutboundFrame> frames)
253253
{
254254
_writer.Flush();
255255
}
256-
/*
257-
int bufferSize = 0;
258-
for (int i = 0; i < frames.Count; i++)
259-
{
260-
bufferSize += frames[i].GetMinimumBufferSize();
261-
}
262-
263-
using (IMemoryOwner<byte> memory = MemoryPool<byte>.Shared.Rent(bufferSize))
264-
{
265-
int frameBytes = 0;
266-
Memory<byte> slice = memory.Memory.Slice(0, bufferSize);
267-
for (int i = 0; i < frames.Count; i++)
268-
{
269-
OutboundFrame frame = frames[i];
270-
int frameLength = frame.GetMinimumBufferSize();
271-
Memory<byte> frameSlice = slice.Slice(frameBytes, frameLength);
272-
frame.WriteTo(frameSlice);
273-
frameBytes += frame.ByteCount;
274-
}
275-
276-
_socket.Client.Poll(_writeableStateTimeoutMicroSeconds, SelectMode.SelectWrite);
277-
if (MemoryMarshal.TryGetArray(slice.Slice(0, frameBytes), out ArraySegment<byte> segment))
278-
{
279-
Write(segment);
280-
return;
281-
}
282-
283-
throw new InvalidOperationException("Unable to get array segment from memory.");
284-
}
285-
*/
286256
}
287257

288258
private void Write(ArraySegment<byte> bufferSegment, bool flush)

projects/client/Unit/src/unit/WireFormattingFixture.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,6 @@ namespace RabbitMQ.Client.Unit
4949
{
5050
class WireFormattingFixture
5151
{
52-
public static NetworkBinaryReader Reader(byte[] content)
53-
{
54-
return new NetworkBinaryReader(new MemoryStream(content));
55-
}
56-
57-
public static NetworkBinaryWriter Writer()
58-
{
59-
return new NetworkBinaryWriter(new MemoryStream());
60-
}
61-
62-
public static byte[] Contents(NetworkBinaryWriter w)
63-
{
64-
return ((MemoryStream)w.BaseStream).ToArray();
65-
}
66-
67-
public void Check(NetworkBinaryWriter w, byte[] expected)
68-
{
69-
byte[] actual = Contents(w);
70-
Check(actual, expected);
71-
}
72-
7352
public void Check(byte[] actual, byte[] expected)
7453
{
7554
try

0 commit comments

Comments
 (0)