Skip to content

Commit de0a0b4

Browse files
committed
Rename all IModel to IChannel
1 parent 02bed8b commit de0a0b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+156
-156
lines changed

projects/Benchmarks/ConsumerDispatching/AsyncBasicConsumerFake.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void IBasicConsumer.HandleBasicDeliver(string consumerTag, ulong deliveryTag, bo
4646

4747
public Task HandleModelShutdown(object model, ShutdownEventArgs reason) => Task.CompletedTask;
4848

49-
public IModel Model { get; }
49+
public IChannel Model { get; }
5050

5151
event EventHandler<ConsumerEventArgs> IBasicConsumer.ConsumerCancelled
5252
{

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ public AsyncDefaultBasicConsumer()
2222
/// Constructor which sets the Model property to the given value.
2323
/// </summary>
2424
/// <param name="model">Common AMQP model.</param>
25-
public AsyncDefaultBasicConsumer(IModel model)
25+
public AsyncDefaultBasicConsumer(IChannel model)
2626
{
2727
Model = model;
2828
}
2929

3030
/// <summary>
3131
/// Retrieve the consumer tags this consumer is registered as; to be used when discussing this consumer
32-
/// with the server, for instance with <see cref="IModel.BasicCancel"/>.
32+
/// with the server, for instance with <see cref="IChannel.BasicCancel"/>.
3333
/// </summary>
3434
public string[] ConsumerTags
3535
{
@@ -45,7 +45,7 @@ public string[] ConsumerTags
4545
public bool IsRunning { get; protected set; }
4646

4747
/// <summary>
48-
/// If our <see cref="IModel"/> shuts down, this property will contain a description of the reason for the
48+
/// If our <see cref="IChannel"/> shuts down, this property will contain a description of the reason for the
4949
/// shutdown. Otherwise it will contain null. See <see cref="ShutdownEventArgs"/>.
5050
/// </summary>
5151
public ShutdownEventArgs ShutdownReason { get; protected set; }
@@ -61,10 +61,10 @@ public event AsyncEventHandler<ConsumerEventArgs> ConsumerCancelled
6161
private AsyncEventingWrapper<ConsumerEventArgs> _consumerCancelledWrapper;
6262

6363
/// <summary>
64-
/// Retrieve the <see cref="IModel"/> this consumer is associated with,
64+
/// Retrieve the <see cref="IChannel"/> this consumer is associated with,
6565
/// for use in acknowledging received messages, for instance.
6666
/// </summary>
67-
public IModel Model { get; set; }
67+
public IChannel Model { get; set; }
6868

6969
/// <summary>
7070
/// Called when the consumer is cancelled for reasons other than by a basicCancel:
@@ -101,7 +101,7 @@ public virtual Task HandleBasicConsumeOk(string consumerTag)
101101
/// Called each time a message is delivered for this consumer.
102102
/// </summary>
103103
/// <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.BasicAck"/>
105105
/// if consuming in automatic acknowledgement mode.
106106
/// Subclasses must copy or fully use delivery body before returning.
107107
/// Accessing the body at a later point is unsafe as its memory can

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public BasicGetResult(ulong deliveryTag, bool redelivered, string exchange, stri
9999
public ReadOnlyMemory<byte> Body { get; }
100100

101101
/// <summary>
102-
/// Retrieve the delivery tag for this message. See also <see cref="IModel.BasicAck"/>.
102+
/// Retrieve the delivery tag for this message. See also <see cref="IChannel.BasicAck"/>.
103103
/// </summary>
104104
public ulong DeliveryTag { get; }
105105

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ public DefaultBasicConsumer()
6161
/// Constructor which sets the Model property to the given value.
6262
/// </summary>
6363
/// <param name="model">Common AMQP model.</param>
64-
public DefaultBasicConsumer(IModel model)
64+
public DefaultBasicConsumer(IChannel model)
6565
{
6666
Model = model;
6767
}
6868

6969
/// <summary>
7070
/// Retrieve the consumer tags this consumer is registered as; to be used to identify
71-
/// this consumer, for example, when cancelling it with <see cref="IModel.BasicCancel"/>.
71+
/// this consumer, for example, when cancelling it with <see cref="IChannel.BasicCancel"/>.
7272
/// This value is an array because a single consumer instance can be reused to consume on
7373
/// multiple channels.
7474
/// </summary>
@@ -86,7 +86,7 @@ public string[] ConsumerTags
8686
public bool IsRunning { get; protected set; }
8787

8888
/// <summary>
89-
/// If our <see cref="IModel"/> shuts down, this property will contain a description of the reason for the
89+
/// If our <see cref="IChannel"/> shuts down, this property will contain a description of the reason for the
9090
/// shutdown. Otherwise it will contain null. See <see cref="ShutdownEventArgs"/>.
9191
/// </summary>
9292
public ShutdownEventArgs ShutdownReason { get; protected set; }
@@ -102,10 +102,10 @@ public event EventHandler<ConsumerEventArgs> ConsumerCancelled
102102
private EventingWrapper<ConsumerEventArgs> _consumerCancelledWrapper;
103103

104104
/// <summary>
105-
/// Retrieve the <see cref="IModel"/> this consumer is associated with,
105+
/// Retrieve the <see cref="IChannel"/> this consumer is associated with,
106106
/// for use in acknowledging received messages, for instance.
107107
/// </summary>
108-
public IModel Model { get; set; }
108+
public IChannel Model { get; set; }
109109

110110
/// <summary>
111111
/// Called when the consumer is cancelled for reasons other than by a basicCancel:
@@ -141,7 +141,7 @@ public virtual void HandleBasicConsumeOk(string consumerTag)
141141
/// Called each time a message is delivered for this consumer.
142142
/// </summary>
143143
/// <remarks>
144-
/// This is a no-op implementation. It will not acknowledge deliveries via <see cref="IModel.BasicAck"/>
144+
/// This is a no-op implementation. It will not acknowledge deliveries via <see cref="IChannel.BasicAck"/>
145145
/// if consuming in automatic acknowledgement mode.
146146
/// Subclasses must copy or fully use delivery body before returning.
147147
/// Accessing the body at a later point is unsafe as its memory can

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ namespace RabbitMQ.Client
88
public interface IAsyncBasicConsumer
99
{
1010
/// <summary>
11-
/// Retrieve the <see cref="IModel"/> this consumer is associated with,
11+
/// Retrieve the <see cref="IChannel"/> this consumer is associated with,
1212
/// for use in acknowledging received messages, for instance.
1313
/// </summary>
14-
IModel Model { get; }
14+
IChannel Model { get; }
1515

1616
/// <summary>
1717
/// Signalled when the consumer gets cancelled.
@@ -43,7 +43,7 @@ public interface IAsyncBasicConsumer
4343
/// </summary>
4444
/// <remarks>
4545
/// Does nothing with the passed in information.
46-
/// Note that in particular, some delivered messages may require acknowledgement via <see cref="IModel.BasicAck"/>.
46+
/// Note that in particular, some delivered messages may require acknowledgement via <see cref="IChannel.BasicAck"/>.
4747
/// The implementation of this method in this class does NOT acknowledge such messages.
4848
/// </remarks>
4949
Task HandleBasicDeliver(string consumerTag,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ namespace RabbitMQ.Client
5151
public interface IBasicConsumer
5252
{
5353
/// <summary>
54-
/// Retrieve the <see cref="IModel"/> this consumer is associated with,
54+
/// Retrieve the <see cref="IChannel"/> this consumer is associated with,
5555
/// for use in acknowledging received messages, for instance.
5656
/// </summary>
57-
IModel Model { get; }
57+
IChannel Model { get; }
5858

5959
/// <summary>
6060
/// Signalled when the consumer gets cancelled.
@@ -86,7 +86,7 @@ public interface IBasicConsumer
8686
/// </summary>
8787
/// <remarks>
8888
/// Does nothing with the passed in information.
89-
/// Note that in particular, some delivered messages may require acknowledgement via <see cref="IModel.BasicAck"/>.
89+
/// Note that in particular, some delivered messages may require acknowledgement via <see cref="IChannel.BasicAck"/>.
9090
/// The implementation of this method in this class does NOT acknowledge such messages.
9191
/// </remarks>
9292
void HandleBasicDeliver(string consumerTag,

projects/RabbitMQ.Client/client/api/IModel.cs renamed to projects/RabbitMQ.Client/client/api/IChannel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace RabbitMQ.Client
4545
/// Extends the <see cref="IDisposable"/> interface, so that the "using"
4646
/// statement can be used to scope the lifetime of a channel when appropriate.
4747
/// </remarks>
48-
public interface IModel : IDisposable
48+
public interface IChannel : IDisposable
4949
{
5050
/// <summary>
5151
/// Channel number, unique per connections.
@@ -172,7 +172,7 @@ string BasicConsume(
172172
/// <summary>
173173
/// Retrieve an individual message, if
174174
/// one is available; returns null if the server answers that
175-
/// no messages are currently available. See also <see cref="IModel.BasicAck"/>.
175+
/// no messages are currently available. See also <see cref="IChannel.BasicAck"/>.
176176
/// </summary>
177177
BasicGetResult BasicGet(string queue, bool autoAck);
178178

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,6 @@ public interface IConnection : INetworkConnection, IDisposable
228228
/// <summary>
229229
/// Create and return a fresh channel, session, and model.
230230
/// </summary>
231-
IModel CreateModel();
231+
IChannel CreateModel();
232232
}
233233
}

0 commit comments

Comments
 (0)