2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
4
using System . Threading . Tasks ;
5
-
5
+ using RabbitMQ . Client . client . impl . Channel ;
6
6
using RabbitMQ . Client . Events ;
7
7
8
8
namespace RabbitMQ . Client
@@ -12,29 +12,29 @@ public class AsyncDefaultBasicConsumer : IBasicConsumer, IAsyncBasicConsumer
12
12
private readonly HashSet < string > _consumerTags = new HashSet < string > ( ) ;
13
13
14
14
/// <summary>
15
- /// Creates a new instance of an <see cref="DefaultBasicConsumer "/>.
15
+ /// Creates a new instance of an <see cref="AsyncDefaultBasicConsumer "/>.
16
16
/// </summary>
17
17
public AsyncDefaultBasicConsumer ( )
18
18
{
19
19
ShutdownReason = null ;
20
- Model = null ;
20
+ Channel = null ;
21
21
IsRunning = false ;
22
22
}
23
23
24
24
/// <summary>
25
- /// Constructor which sets the Model property to the given value.
25
+ /// Constructor which sets the <see cref="Channel"/> property to the given value.
26
26
/// </summary>
27
- /// <param name="model">Common AMQP model .</param>
28
- public AsyncDefaultBasicConsumer ( IModel model )
27
+ /// <param name="channel">The channel .</param>
28
+ public AsyncDefaultBasicConsumer ( IChannel channel )
29
29
{
30
30
ShutdownReason = null ;
31
31
IsRunning = false ;
32
- Model = model ;
32
+ Channel = channel ;
33
33
}
34
34
35
35
/// <summary>
36
36
/// Retrieve the consumer tags this consumer is registered as; to be used when discussing this consumer
37
- /// with the server, for instance with <see cref="IModel.BasicCancel "/>.
37
+ /// with the server, for instance with <see cref="IChannel.CancelConsumerAsync "/>.
38
38
/// </summary>
39
39
public string [ ] ConsumerTags
40
40
{
@@ -50,7 +50,7 @@ public string[] ConsumerTags
50
50
public bool IsRunning { get ; protected set ; }
51
51
52
52
/// <summary>
53
- /// If our <see cref="IModel "/> shuts down, this property will contain a description of the reason for the
53
+ /// If our <see cref="IChannel "/> shuts down, this property will contain a description of the reason for the
54
54
/// shutdown. Otherwise it will contain null. See <see cref="ShutdownEventArgs"/>.
55
55
/// </summary>
56
56
public ShutdownEventArgs ShutdownReason { get ; protected set ; }
@@ -61,10 +61,10 @@ public string[] ConsumerTags
61
61
public event AsyncEventHandler < ConsumerEventArgs > ConsumerCancelled ;
62
62
63
63
/// <summary>
64
- /// Retrieve the <see cref="IModel "/> this consumer is associated with,
64
+ /// Retrieve the <see cref="IChannel "/> this consumer is associated with,
65
65
/// for use in acknowledging received messages, for instance.
66
66
/// </summary>
67
- public IModel Model { get ; set ; }
67
+ public IChannel Channel { get ; set ; }
68
68
69
69
/// <summary>
70
70
/// Called when the consumer is cancelled for reasons other than by a basicCancel:
@@ -101,7 +101,7 @@ public virtual Task HandleBasicConsumeOk(string consumerTag)
101
101
/// Called each time a message is delivered for this consumer.
102
102
/// </summary>
103
103
/// <remarks>
104
- /// This is a no-op implementation. It will not acknowledge deliveries via <see cref="IModel.BasicAck "/>
104
+ /// This is a no-op implementation. It will not acknowledge deliveries via <see cref="IChannel.AckMessageAsync "/>
105
105
/// if consuming in automatic acknowledgement mode.
106
106
/// Subclasses must copy or fully use delivery body before returning.
107
107
/// Accessing the body at a later point is unsafe as its memory can
@@ -120,7 +120,7 @@ public virtual Task HandleBasicDeliver(string consumerTag,
120
120
}
121
121
122
122
/// <summary>
123
- /// Called when the model ( channel) this consumer was registered on terminates.
123
+ /// Called when the channel this consumer was registered on terminates.
124
124
/// </summary>
125
125
/// <param name="model">A channel this consumer was registered on.</param>
126
126
/// <param name="reason">Shutdown context.</param>
0 commit comments