Skip to content

Commit e6d0a95

Browse files
committed
* Remove QueuePurge
1 parent 153d420 commit e6d0a95

File tree

5 files changed

+9
-20
lines changed

5 files changed

+9
-20
lines changed

projects/RabbitMQ.Client/PublicAPI.Unshipped.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,6 @@ RabbitMQ.Client.IChannel.FlowControl -> System.EventHandler<RabbitMQ.Client.Even
498498
RabbitMQ.Client.IChannel.IsClosed.get -> bool
499499
RabbitMQ.Client.IChannel.IsOpen.get -> bool
500500
RabbitMQ.Client.IChannel.NextPublishSeqNo.get -> ulong
501-
RabbitMQ.Client.IChannel.QueuePurge(string queue) -> uint
502501
RabbitMQ.Client.IChannel.QueueUnbind(string queue, string exchange, string routingKey, System.Collections.Generic.IDictionary<string, object> arguments) -> void
503502
RabbitMQ.Client.IChannel.TxCommit() -> void
504503
RabbitMQ.Client.IChannel.TxRollback() -> void

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,12 +612,12 @@ Task<QueueDeclareOk> QueueDeclareAsync(string queue, bool durable, bool exclusiv
612612
/// <param name="ifEmpty">Only delete the queue if it is empty.</param>
613613
/// <returns>Returns the number of messages purged during deletion.</returns>
614614
void QueueDeleteNoWait(string queue, bool ifUnused, bool ifEmpty);
615-
#endif
616615

617616
/// <summary>Asynchronously purge a queue of messages.</summary>
618617
/// <param name="queue">The queue.</param>
619618
/// <returns>Returns the number of messages purged.</returns>
620619
uint QueuePurge(string queue);
620+
#endif
621621

622622
/// <summary>Asynchronously purge a queue of messages.</summary>
623623
/// <param name="queue">The queue.</param>

projects/RabbitMQ.Client/client/framing/Channel.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ public override void _Private_ExchangeBind(string destination, string source, st
119119
ChannelRpc(method, ProtocolCommandId.ExchangeBindOk);
120120
}
121121
}
122-
#endif
123122

124123
public override void _Private_ExchangeDeclare(string exchange, string type, bool passive, bool durable, bool autoDelete, bool @internal, bool nowait, IDictionary<string, object> arguments)
125124
{
@@ -134,7 +133,6 @@ public override void _Private_ExchangeDeclare(string exchange, string type, bool
134133
}
135134
}
136135

137-
#if SYNC_API
138136
public override void _Private_ExchangeDelete(string exchange, bool ifUnused, bool nowait)
139137
{
140138
var method = new ExchangeDelete(exchange, ifUnused, nowait);
@@ -160,7 +158,6 @@ public override void _Private_ExchangeUnbind(string destination, string source,
160158
ChannelRpc(method, ProtocolCommandId.ExchangeUnbindOk);
161159
}
162160
}
163-
#endif
164161

165162
public override void _Private_QueueBind(string queue, string exchange, string routingKey, bool nowait, IDictionary<string, object> arguments)
166163
{
@@ -175,7 +172,6 @@ public override void _Private_QueueBind(string queue, string exchange, string ro
175172
}
176173
}
177174

178-
#if SYNC_API
179175
public override void _Private_QueueDeclare(string queue, bool passive, bool durable, bool exclusive, bool autoDelete, bool nowait, IDictionary<string, object> arguments)
180176
{
181177
/*
@@ -185,7 +181,6 @@ public override void _Private_QueueDeclare(string queue, bool passive, bool dura
185181
var method = new QueueDeclare(queue, passive, durable, exclusive, autoDelete, nowait, arguments);
186182
ChannelSend(method);
187183
}
188-
#endif
189184

190185
public override uint _Private_QueueDelete(string queue, bool ifUnused, bool ifEmpty, bool nowait)
191186
{
@@ -211,7 +206,6 @@ public override uint _Private_QueuePurge(string queue, bool nowait)
211206
return ChannelRpc(method, ProtocolCommandId.QueuePurgeOk, memory => new QueuePurgeOk(memory.Span)._messageCount);
212207
}
213208

214-
#if SYNC_API
215209
public override void BasicAck(ulong deliveryTag, bool multiple)
216210
{
217211
ChannelSend(new BasicAck(deliveryTag, multiple));

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,10 @@ public void QueueDeleteNoWait(string queue, bool ifUnused, bool ifEmpty)
615615
}
616616
#endif
617617

618+
#if SYNC_API
618619
public uint QueuePurge(string queue)
619620
=> InnerChannel.QueuePurge(queue);
621+
#endif
620622

621623
public Task<uint> QueuePurgeAsync(string queue)
622624
=> InnerChannel.QueuePurgeAsync(queue);

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,29 +1071,21 @@ protected bool HandleQueueDeclareOk(in IncomingCommand cmd)
10711071

10721072
#if SYNC_API
10731073
public abstract void _Private_ExchangeBind(string destination, string source, string routingKey, bool nowait, IDictionary<string, object> arguments);
1074-
#endif
10751074

10761075
public abstract void _Private_ExchangeDeclare(string exchange, string type, bool passive, bool durable, bool autoDelete, bool @internal, bool nowait, IDictionary<string, object> arguments);
10771076

1078-
#if SYNC_API
10791077
public abstract void _Private_ExchangeDelete(string exchange, bool ifUnused, bool nowait);
1080-
#endif
10811078

1082-
#if SYNC_API
10831079
public abstract void _Private_ExchangeUnbind(string destination, string source, string routingKey, bool nowait, IDictionary<string, object> arguments);
1084-
#endif
10851080

10861081
public abstract void _Private_QueueBind(string queue, string exchange, string routingKey, bool nowait, IDictionary<string, object> arguments);
10871082

1088-
#if SYNC_API
10891083
public abstract void _Private_QueueDeclare(string queue, bool passive, bool durable, bool exclusive, bool autoDelete, bool nowait, IDictionary<string, object> arguments);
1090-
#endif
10911084

10921085
public abstract uint _Private_QueueDelete(string queue, bool ifUnused, bool ifEmpty, bool nowait);
10931086

10941087
public abstract uint _Private_QueuePurge(string queue, bool nowait);
10951088

1096-
#if SYNC_API
10971089
public abstract void BasicAck(ulong deliveryTag, bool multiple);
10981090
#endif
10991091

@@ -1536,12 +1528,12 @@ public void ExchangeBindNoWait(string destination, string source, string routing
15361528
{
15371529
_Private_ExchangeBind(destination, source, routingKey, true, arguments);
15381530
}
1539-
#endif
15401531

15411532
public void ExchangeDeclare(string exchange, string type, bool durable, bool autoDelete, IDictionary<string, object> arguments)
15421533
{
15431534
_Private_ExchangeDeclare(exchange, type, false, durable, autoDelete, false, false, arguments);
15441535
}
1536+
#endif
15451537

15461538
public Task ExchangeDeclarePassiveAsync(string exchange)
15471539
{
@@ -1583,6 +1575,7 @@ await ModelSendAsync(method)
15831575
}
15841576
}
15851577

1578+
#if SYNC_API
15861579
public void ExchangeDeclareNoWait(string exchange, string type, bool durable, bool autoDelete, IDictionary<string, object> arguments)
15871580
{
15881581
_Private_ExchangeDeclare(exchange, type, false, durable, autoDelete, false, true, arguments);
@@ -1593,7 +1586,6 @@ public void ExchangeDeclarePassive(string exchange)
15931586
_Private_ExchangeDeclare(exchange, "", true, false, false, false, false, null);
15941587
}
15951588

1596-
#if SYNC_API
15971589
public void ExchangeDelete(string exchange, bool ifUnused)
15981590
{
15991591
_Private_ExchangeDelete(exchange, ifUnused, false);
@@ -1684,7 +1676,6 @@ public void ExchangeUnbindNoWait(string destination, string source, string routi
16841676
{
16851677
_Private_ExchangeUnbind(destination, source, routingKey, true, arguments);
16861678
}
1687-
#endif
16881679

16891680
public void QueueBind(string queue, string exchange, string routingKey, IDictionary<string, object> arguments)
16901681
{
@@ -1696,7 +1687,6 @@ public void QueueBindNoWait(string queue, string exchange, string routingKey, ID
16961687
_Private_QueueBind(queue, exchange, routingKey, true, arguments);
16971688
}
16981689

1699-
#if SYNC_API
17001690
public QueueDeclareOk QueueDeclare(string queue, bool durable, bool exclusive, bool autoDelete, IDictionary<string, object> arguments)
17011691
{
17021692
return DoQueueDeclare(queue, false, durable, exclusive, autoDelete, arguments);
@@ -1825,10 +1815,12 @@ public async Task<uint> ConsumerCountAsync(string queue)
18251815
return ok.ConsumerCount;
18261816
}
18271817

1818+
#if SYNC_API
18281819
public uint QueueDelete(string queue, bool ifUnused, bool ifEmpty)
18291820
{
18301821
return _Private_QueueDelete(queue, ifUnused, ifEmpty, false);
18311822
}
1823+
#endif
18321824

18331825
public async Task<uint> QueueDeleteAsync(string queue, bool ifUnused, bool ifEmpty, bool noWait)
18341826
{
@@ -1862,6 +1854,7 @@ await ModelSendAsync(method)
18621854
}
18631855
}
18641856

1857+
#if SYNC_API
18651858
public void QueueDeleteNoWait(string queue, bool ifUnused, bool ifEmpty)
18661859
{
18671860
_Private_QueueDelete(queue, ifUnused, ifEmpty, true);
@@ -1871,6 +1864,7 @@ public uint QueuePurge(string queue)
18711864
{
18721865
return _Private_QueuePurge(queue, false);
18731866
}
1867+
#endif
18741868

18751869
public async Task<uint> QueuePurgeAsync(string queue)
18761870
{

0 commit comments

Comments
 (0)