Skip to content

Commit 36cac8b

Browse files
committed
AsyncDefaultBasicConsumer now correctly implements IBasicConsumer
1 parent e33b9fa commit 36cac8b

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

projects/client/RabbitMQ.Client/src/client/api/AsyncDefaultBasicConsumer.cs

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace RabbitMQ.Client
77
{
8-
public class AsyncDefaultBasicConsumer : IAsyncBasicConsumer
8+
public class AsyncDefaultBasicConsumer : IBasicConsumer, IAsyncBasicConsumer
99
{
1010
public readonly object m_eventLock = new object();
1111
public AsyncEventHandler<ConsumerEventArgs> m_consumerCancelled;
@@ -161,5 +161,36 @@ public virtual async Task OnCancel()
161161
}
162162
}
163163
}
164+
165+
event EventHandler<ConsumerEventArgs> IBasicConsumer.ConsumerCancelled
166+
{
167+
add { throw new InvalidOperationException("Should never be called."); }
168+
remove { throw new InvalidOperationException("Should never be called."); }
169+
}
170+
171+
void IBasicConsumer.HandleBasicCancelOk(string consumerTag)
172+
{
173+
throw new InvalidOperationException("Should never be called.");
174+
}
175+
176+
void IBasicConsumer.HandleBasicConsumeOk(string consumerTag)
177+
{
178+
throw new InvalidOperationException("Should never be called.");
179+
}
180+
181+
void IBasicConsumer.HandleBasicDeliver(string consumerTag, ulong deliveryTag, bool redelivered, string exchange, string routingKey, IBasicProperties properties, byte[] body)
182+
{
183+
throw new InvalidOperationException("Should never be called.");
184+
}
185+
186+
void IBasicConsumer.HandleModelShutdown(object model, ShutdownEventArgs reason)
187+
{
188+
throw new InvalidOperationException("Should never be called.");
189+
}
190+
191+
void IBasicConsumer.HandleBasicCancel(string consumerTag)
192+
{
193+
throw new InvalidOperationException("Should never be called.");
194+
}
164195
}
165196
}

0 commit comments

Comments
 (0)