Skip to content

Commit 8acbf81

Browse files
committed
remove couple of warnings
1 parent 0b393d0 commit 8acbf81

8 files changed

+8
-54
lines changed

Rebus.RabbitMq/Config/RabbitMqConfigurationExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using Rebus.Transport;
1010
// ReSharper disable ExpressionIsAlwaysNull
1111
// ReSharper disable ArgumentsStyleNamedExpression
12+
// ReSharper disable UnusedMember.Global
1213

1314
namespace Rebus.Config;
1415

Rebus.RabbitMq/Config/RabbitMqDelayedMessageExchangeExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Rebus.RabbitMq;
1111
using Rebus.Timeouts;
1212
using Rebus.Transport;
13+
// ReSharper disable UnusedMember.Global
1314

1415
namespace Rebus.Config;
1516

Rebus.RabbitMq/Config/RabbitMqOptionsBuilder.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Drawing;
43
using System.Threading;
54
using System.Threading.Tasks;
65
using RabbitMQ.Client;
76
using Rebus.RabbitMq;
8-
using Rebus.Transport;
7+
// ReSharper disable UnusedMember.Global
98

109
namespace Rebus.Config;
1110

@@ -14,7 +13,7 @@ namespace Rebus.Config;
1413
/// </summary>
1514
public class RabbitMqOptionsBuilder
1615
{
17-
readonly Dictionary<string, string> _additionalClientProperties = new Dictionary<string, string>();
16+
readonly Dictionary<string, string> _additionalClientProperties = new();
1817

1918
/// <summary>
2019
/// Default name of the exchange of type DIRECT (used for point-to-point messaging)

Rebus.RabbitMq/Config/RabbitMqQueueOptionsBuilder.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ public RabbitMqQueueOptionsBuilder SetAutoDelete(bool autoDelete, long ttlInMs =
6464
SetAutoDelete(autoDelete);
6565

6666
if (ttlInMs > 0)
67+
{
6768
SetQueueTTL(ttlInMs);
69+
}
6870

6971
return this;
7072
}

Rebus.RabbitMq/Exceptions/MandatoryDeliveryException.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Runtime.Serialization;
32

43
namespace Rebus.Exceptions;
54

Rebus.RabbitMq/Internals/BasicDeliverEventArgsReplacement.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
using System;
2-
using System.Threading;
32
using RabbitMQ.Client;
43

54
namespace Rebus.Internals;
65

7-
public class BasicDeliverEventArgsReplacement(
8-
string consumerTag, ulong deliveryTag, bool redelivered,
9-
string exchange, string routingKey, IReadOnlyBasicProperties properties,
10-
ReadOnlyMemory<byte> body, CancellationToken cancellationToken)
6+
public class BasicDeliverEventArgsReplacement(ulong deliveryTag, IReadOnlyBasicProperties properties, ReadOnlyMemory<byte> body)
117
{
12-
public string ConsumerTag { get; } = consumerTag;
138
public ulong DeliveryTag { get; } = deliveryTag;
14-
public bool Redelivered { get; } = redelivered;
15-
public string Exchange { get; } = exchange;
16-
public string RoutingKey { get; } = routingKey;
179
public IReadOnlyBasicProperties Properties { get; } = properties;
18-
public CancellationToken CancellationToken { get; } = cancellationToken;
1910

2011
/// <summary>
2112
/// it's important to take a copy of the message body here, because the memory area pointed to by the body reference will be mutated later

Rebus.RabbitMq/Internals/CustomQueueingConsumer.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,7 @@ public override Task HandleBasicDeliverAsync(string consumerTag, ulong deliveryT
1515
string routingKey, IReadOnlyBasicProperties properties, ReadOnlyMemory<byte> body,
1616
CancellationToken cancellationToken = default)
1717
{
18-
var args = new BasicDeliverEventArgsReplacement(
19-
consumerTag: consumerTag,
20-
deliveryTag: deliveryTag,
21-
redelivered: redelivered,
22-
exchange: exchange,
23-
routingKey: routingKey,
24-
properties: properties,
25-
body: body,
26-
cancellationToken: cancellationToken
27-
);
18+
var args = new BasicDeliverEventArgsReplacement(deliveryTag: deliveryTag, properties: properties, body: body);
2819

2920
Queue.Writer.TryWrite(args);
3021

Rebus.RabbitMq/Internals/EnumerableExtensions.cs

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)