Skip to content

Commit 2af2429

Browse files
committed
Finish the big "model" -> "channel" rename
1 parent 9bb7058 commit 2af2429

File tree

64 files changed

+338
-355
lines changed

Some content is hidden

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

64 files changed

+338
-355
lines changed

projects/Benchmarks/ConsumerDispatching/AsyncBasicConsumerFake.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ void IBasicConsumer.HandleBasicDeliver(string consumerTag, ulong deliveryTag, bo
4444

4545
public Task HandleBasicConsumeOk(string consumerTag) => Task.CompletedTask;
4646

47-
public Task HandleModelShutdown(object channel, ShutdownEventArgs reason) => Task.CompletedTask;
47+
public Task HandleChannelShutdown(object channel, ShutdownEventArgs reason) => Task.CompletedTask;
4848

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

5151
event EventHandler<ConsumerEventArgs> IBasicConsumer.ConsumerCancelled
5252
{
@@ -68,7 +68,7 @@ void IBasicConsumer.HandleBasicConsumeOk(string consumerTag)
6868
{
6969
}
7070

71-
void IBasicConsumer.HandleModelShutdown(object channel, ShutdownEventArgs reason)
71+
void IBasicConsumer.HandleChannelShutdown(object channel, ShutdownEventArgs reason)
7272
{
7373
}
7474

projects/Benchmarks/Networking/Networking_BasicDeliver_Commons.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class Networking_BasicDeliver_Commons
1212
public static async Task Publish_Hello_World(IConnection connection, uint messageCount, byte[] body)
1313
{
1414
var tcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
15-
using (var channel = connection.CreateModel())
15+
using (var channel = connection.CreateChannel())
1616
{
1717
var queue = channel.QueueDeclare();
1818
var consumed = 0;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ public AsyncDefaultBasicConsumer()
1919
}
2020

2121
/// <summary>
22-
/// Constructor which sets the Model property to the given value.
22+
/// Constructor which sets the Channel property to the given value.
2323
/// </summary>
2424
/// <param name="channel">Common AMQP channel.</param>
2525
public AsyncDefaultBasicConsumer(IChannel channel)
2626
{
27-
Model = channel;
27+
Channel = channel;
2828
}
2929

3030
/// <summary>
@@ -64,7 +64,7 @@ public event AsyncEventHandler<ConsumerEventArgs> ConsumerCancelled
6464
/// Retrieve the <see cref="IChannel"/> this consumer is associated with,
6565
/// for use in acknowledging received messages, for instance.
6666
/// </summary>
67-
public IChannel Model { get; set; }
67+
public IChannel Channel { get; set; }
6868

6969
/// <summary>
7070
/// Called when the consumer is cancelled for reasons other than by a basicCancel:
@@ -124,7 +124,7 @@ public virtual Task HandleBasicDeliver(string consumerTag,
124124
/// </summary>
125125
/// <param name="channel">A channel this consumer was registered on.</param>
126126
/// <param name="reason">Shutdown context.</param>
127-
public virtual Task HandleModelShutdown(object channel, ShutdownEventArgs reason)
127+
public virtual Task HandleChannelShutdown(object channel, ShutdownEventArgs reason)
128128
{
129129
ShutdownReason = reason;
130130
return OnCancel(_consumerTags.ToArray());
@@ -170,7 +170,7 @@ void IBasicConsumer.HandleBasicDeliver(string consumerTag, ulong deliveryTag, bo
170170
throw new InvalidOperationException("Should never be called. Enable 'DispatchConsumersAsync'.");
171171
}
172172

173-
void IBasicConsumer.HandleModelShutdown(object channel, ShutdownEventArgs reason)
173+
void IBasicConsumer.HandleChannelShutdown(object channel, ShutdownEventArgs reason)
174174
{
175175
throw new InvalidOperationException("Should never be called. Enable 'DispatchConsumersAsync'.");
176176
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace RabbitMQ.Client
55
{
66
/// <summary>
7-
/// Caches a string's byte representation to be used for certain methods like IModel.BasicPublish/>.
7+
/// Caches a string's byte representation to be used for certain methods like IChannel.BasicPublish/>.
88
/// </summary>
99
public sealed class CachedString
1010
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ namespace RabbitMQ.Client
6161
/// //
6262
/// IConnection conn = factory.CreateConnection();
6363
/// //
64-
/// IModel ch = conn.CreateModel();
64+
/// IChannel ch = conn.CreateChannel();
6565
/// //
66-
/// // ... use ch's IModel methods ...
66+
/// // ... use ch's IChannel methods ...
6767
/// //
6868
/// ch.Close(Constants.ReplySuccess, "Closing the channel");
6969
/// conn.Close(Constants.ReplySuccess, "Closing the connection");

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ public DefaultBasicConsumer()
5858
}
5959

6060
/// <summary>
61-
/// Constructor which sets the Model property to the given value.
61+
/// Constructor which sets the Channel property to the given value.
6262
/// </summary>
6363
/// <param name="channel">Common AMQP channel.</param>
6464
public DefaultBasicConsumer(IChannel channel)
6565
{
66-
Model = channel;
66+
Channel = channel;
6767
}
6868

6969
/// <summary>
@@ -105,7 +105,7 @@ public event EventHandler<ConsumerEventArgs> ConsumerCancelled
105105
/// Retrieve the <see cref="IChannel"/> this consumer is associated with,
106106
/// for use in acknowledging received messages, for instance.
107107
/// </summary>
108-
public IChannel Model { get; set; }
108+
public IChannel Channel { get; set; }
109109

110110
/// <summary>
111111
/// Called when the consumer is cancelled for reasons other than by a basicCancel:
@@ -163,7 +163,7 @@ public virtual void HandleBasicDeliver(string consumerTag,
163163
/// </summary>
164164
/// <param name="channel">A channel this consumer was registered on.</param>
165165
/// <param name="reason">Shutdown context.</param>
166-
public virtual void HandleModelShutdown(object channel, ShutdownEventArgs reason)
166+
public virtual void HandleChannelShutdown(object channel, ShutdownEventArgs reason)
167167
{
168168
ShutdownReason = reason;
169169
OnCancel(_consumerTags.ToArray());

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace RabbitMQ.Client
3838
/// </summary>
3939
/// <remarks>
4040
/// Use the static members of this class as values for the
41-
/// "exchangeType" arguments for IModel methods such as
41+
/// "exchangeType" arguments for IChannel methods such as
4242
/// ExchangeDeclare. The broker may be extended with additional
4343
/// exchange types that do not appear in this class.
4444
/// </remarks>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public interface IAsyncBasicConsumer
1111
/// Retrieve the <see cref="IChannel"/> this consumer is associated with,
1212
/// for use in acknowledging received messages, for instance.
1313
/// </summary>
14-
IChannel Model { get; }
14+
IChannel Channel { get; }
1515

1616
/// <summary>
1717
/// Signalled when the consumer gets cancelled.
@@ -59,6 +59,6 @@ Task HandleBasicDeliver(string consumerTag,
5959
/// </summary>
6060
/// <param name="channel"> Common AMQP channel.</param>
6161
/// <param name="reason"> Information about the reason why a particular channel, session, or connection was destroyed.</param>
62-
Task HandleModelShutdown(object channel, ShutdownEventArgs reason);
62+
Task HandleChannelShutdown(object channel, ShutdownEventArgs reason);
6363
}
6464
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace RabbitMQ.Client
3939
///receive messages from a queue by subscription.</summary>
4040
/// <remarks>
4141
/// <para>
42-
/// See IModel.BasicConsume, IModel.BasicCancel.
42+
/// See IChannel.BasicConsume, IChannel.BasicCancel.
4343
/// </para>
4444
/// <para>
4545
/// Note that the "Handle*" methods run in the connection's
@@ -54,7 +54,7 @@ public interface IBasicConsumer
5454
/// Retrieve the <see cref="IChannel"/> this consumer is associated with,
5555
/// for use in acknowledging received messages, for instance.
5656
/// </summary>
57-
IChannel Model { get; }
57+
IChannel Channel { get; }
5858

5959
/// <summary>
6060
/// Signalled when the consumer gets cancelled.
@@ -102,6 +102,6 @@ void HandleBasicDeliver(string consumerTag,
102102
/// </summary>
103103
/// <param name="channel"> Common AMQP channel.</param>
104104
/// <param name="reason"> Information about the reason why a particular channel, session, or connection was destroyed.</param>
105-
void HandleModelShutdown(object channel, ShutdownEventArgs reason);
105+
void HandleChannelShutdown(object channel, ShutdownEventArgs reason);
106106
}
107107
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public interface IChannel : IDisposable
128128
///
129129
/// Examples of cases where this event will be signalled
130130
/// include exceptions thrown in <see cref="IBasicConsumer"/> methods, or
131-
/// exceptions thrown in <see cref="ModelShutdown"/> delegates etc.
131+
/// exceptions thrown in <see cref="ChannelShutdown"/> delegates etc.
132132
/// </summary>
133133
event EventHandler<CallbackExceptionEventArgs> CallbackException;
134134

@@ -141,7 +141,7 @@ public interface IChannel : IDisposable
141141
/// If the channel is already destroyed at the time an event
142142
/// handler is added to this event, the event handler will be fired immediately.
143143
/// </remarks>
144-
event EventHandler<ShutdownEventArgs> ModelShutdown;
144+
event EventHandler<ShutdownEventArgs> ChannelShutdown;
145145

146146
/// <summary>
147147
/// Acknowledge one or more delivered message(s).

0 commit comments

Comments
 (0)