Skip to content

Commit 28c2362

Browse files
Merge pull request #895 from danielmarbach/basic-publish-readonlymem
7.x: remove deprecated message publishing method overloads
2 parents 5550022 + 68ee85b commit 28c2362

File tree

4 files changed

+2
-76
lines changed

4 files changed

+2
-76
lines changed

projects/RabbitMQ.Client/client/api/IBasicPublishBatch.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ namespace RabbitMQ.Client
4444
{
4545
public interface IBasicPublishBatch
4646
{
47-
[Obsolete("Use Add(string exchange, string routingKey, bool mandatory, IBasicProperties properties, ReadOnlyMemory<byte> body) instead. Will be replaced in version 7.0", false)]
48-
void Add(string exchange, string routingKey, bool mandatory, IBasicProperties properties, byte[] body);
47+
void Add(string exchange, string routingKey, bool mandatory, IBasicProperties properties, ReadOnlyMemory<byte> body);
4948
void Publish();
5049
}
5150
}

projects/RabbitMQ.Client/client/impl/BasicPublishBatch.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ internal BasicPublishBatch (ModelBase model, int sizeHint)
6262
_commands = new List<Command>(sizeHint);
6363
}
6464

65-
public void Add(string exchange, string routingKey, bool mandatory, IBasicProperties basicProperties, byte[] body)
66-
{
67-
ReadOnlyMemory<byte> bodyAsMemory = body;
68-
Add(exchange, routingKey, mandatory, basicProperties, bodyAsMemory);
69-
}
70-
7165
public void Add(string exchange, string routingKey, bool mandatory, IBasicProperties basicProperties, ReadOnlyMemory<byte> body)
7266
{
7367
var method = new BasicPublish

projects/RabbitMQ.Client/client/impl/BasicPublishBatchExtensions.cs

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

projects/Unit/APIApproval.Approve.verified.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ namespace RabbitMQ.Client
5656
public bool Redelivered { get; }
5757
public string RoutingKey { get; }
5858
}
59-
public static class BasicPublishBatchExtensions
60-
{
61-
public static void Add(this RabbitMQ.Client.IBasicPublishBatch batch, string exchange, string routingKey, bool mandatory, RabbitMQ.Client.IBasicProperties properties, System.ReadOnlyMemory<byte> body) { }
62-
}
6359
public class BinaryTableValue
6460
{
6561
public BinaryTableValue() { }
@@ -295,9 +291,7 @@ namespace RabbitMQ.Client
295291
}
296292
public interface IBasicPublishBatch
297293
{
298-
[System.Obsolete("Use Add(string exchange, string routingKey, bool mandatory, IBasicProperties prop" +
299-
"erties, ReadOnlyMemory<byte> body) instead. Will be replaced in version 7.0", false)]
300-
void Add(string exchange, string routingKey, bool mandatory, RabbitMQ.Client.IBasicProperties properties, byte[] body);
294+
void Add(string exchange, string routingKey, bool mandatory, RabbitMQ.Client.IBasicProperties properties, System.ReadOnlyMemory<byte> body);
301295
void Publish();
302296
}
303297
public interface IConnection : RabbitMQ.Client.INetworkConnection, System.IDisposable

0 commit comments

Comments
 (0)