Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit 771cb3d

Browse files
Updated lib version. Made some spelling fixes.
1 parent 38c8390 commit 771cb3d

File tree

11 files changed

+61
-60
lines changed

11 files changed

+61
-60
lines changed

examples/Examples.AdvancedConfiguration/Services/ConsumingHostedService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Examples.AdvancedConfiguration.Services
88
public class ConsumingHostedService : IHostedService
99
{
1010
readonly IConsumingService _consumingService;
11-
11+
1212
public ConsumingHostedService(IConsumingService consumingService)
1313
{
1414
_consumingService = consumingService;

examples/Examples.AdvancedConfiguration/Startup.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Examples.AdvancedConfiguration
1111
public class Startup
1212
{
1313
private IConfiguration Configuration { get; }
14-
14+
1515
public Startup(IConfiguration configuration)
1616
{
1717
Configuration = configuration;
@@ -20,16 +20,16 @@ public Startup(IConfiguration configuration)
2020
public void ConfigureServices(IServiceCollection services)
2121
{
2222
services.AddControllers();
23-
23+
2424
// Configurations are the same (same user) and same password, but the only difference - names of connections.
2525
var rabbitMqConsumerSection = Configuration.GetSection("RabbitMqConsumer");
2626
var rabbitMqProducerSection = Configuration.GetSection("RabbitMqProducer");
27-
27+
2828
var producingExchangeSection = Configuration.GetSection("ProducingExchange");
2929
var consumingExchangeSection = Configuration.GetSection("ConsumingExchange");
3030

3131
// There is an example of configuring different message handlers with different parameters.
32-
// You can set connection of routing keys or specify the exact exchange that will be listened by giver routing keys (or route patterns) by message handlers.
32+
// You can set collection of routing keys or specify the exact exchange that will be listened by giver routing keys (or route patterns) by message handlers.
3333
// You can also register singleton or transient RabbitMQ clients (IConsumer and IProducer) and message handlers.
3434
// There are a lot of different extension methods that is better take a closer look to.
3535
services.AddRabbitMqConsumingClientSingleton(rabbitMqConsumerSection)
@@ -44,7 +44,7 @@ public void ConfigureServices(IServiceCollection services)
4444
services.AddHostedService<ConsumingHostedService>();
4545
}
4646

47-
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
47+
public void Configure(IApplicationBuilder app)
4848
{
4949
app.UseRouting();
5050
app.UseEndpoints(endpoints => endpoints.MapControllers());

src/RabbitMQ.Client.Core.DependencyInjection/Configuration/RabbitMqConnectionOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class RabbitMqConnectionOptions
1010
/// Producer connection.
1111
/// </summary>
1212
public RabbitMqClientOptions ProducerOptions { get; set; }
13-
13+
1414
/// <summary>
1515
/// Consumer connection.
1616
/// </summary>

src/RabbitMQ.Client.Core.DependencyInjection/Exceptions/QueueingServiceAlreadyConfiguredException.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
namespace RabbitMQ.Client.Core.DependencyInjection.Exceptions
44
{
55
/// <summary>
6-
/// An exception that is thrown when queueing service of the same type configured twice.
6+
/// An exception that is thrown when queuing service of the same type configured twice.
77
/// </summary>
88
public class QueueingServiceAlreadyConfiguredException : Exception
99
{
1010
/// <summary>
11-
/// Type of a queueing service.
11+
/// Type of a queuing service.
1212
/// </summary>
1313
public Type QueueingServiceType { get; }
14-
14+
1515
public QueueingServiceAlreadyConfiguredException(Type type, string message) : base(message)
1616
{
1717
QueueingServiceType = type;

src/RabbitMQ.Client.Core.DependencyInjection/Extensions/RabbitMqFactoryExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal static IConnection CreateRabbitMqConnection(RabbitMqClientOptions optio
2020
{
2121
return null;
2222
}
23-
23+
2424
var factory = new ConnectionFactory
2525
{
2626
Port = options.Port,

src/RabbitMQ.Client.Core.DependencyInjection/Models/RabbitMqConnectionOptionsContainer.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
namespace RabbitMQ.Client.Core.DependencyInjection.Models
55
{
66
/// <summary>
7-
/// A model that contains a link between an instance of message queueing service and its configuration.
8-
/// A queueing service can be of type <see cref="IQueueService"/>, <see cref="IConsumingService"/> or <see cref="IProducingService"/>.
7+
/// A model that contains a link between an instance of message queuing service and its configuration.
8+
/// A queuing service can be of type <see cref="IQueueService"/>, <see cref="IConsumingService"/> or <see cref="IProducingService"/>.
99
/// </summary>
1010
public class RabbitMqConnectionOptionsContainer
1111
{
1212
/// <summary>
13-
/// Queueing service identifier.
13+
/// Queuing service identifier.
1414
/// </summary>
1515
public Guid Guid { get; set; }
16-
16+
1717
/// <summary>
18-
/// Queueing service options container.
18+
/// Queuing service options container.
1919
/// </summary>
2020
public RabbitMqConnectionOptions Options { get; set; }
2121
}

src/RabbitMQ.Client.Core.DependencyInjection/QueueService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public QueueService(
4848
var optionsContainer = connectionOptionsContainers.FirstOrDefault(x => x.Guid == guid);
4949
if (optionsContainer is null)
5050
{
51-
throw new ArgumentException($"Connection options container for {nameof(QueueService)} with the Guid {guid} is not found.", nameof(connectionOptionsContainers));
51+
throw new ArgumentException($"Connection options container for {nameof(QueueService)} with the guid {guid} is not found.", nameof(connectionOptionsContainers));
5252
}
5353

5454
_messageHandlingService = messageHandlingService;
@@ -357,7 +357,7 @@ static void StartDeadLetterExchange(IModel channel, string exchangeName)
357357
autoDelete: false,
358358
arguments: null);
359359
}
360-
360+
361361
static void StartExchange(IModel channel, RabbitMqExchange exchange)
362362
{
363363
channel.ExchangeDeclare(

src/RabbitMQ.Client.Core.DependencyInjection/RabbitMQ.Client.Core.DependencyInjection.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<LangVersion>latest</LangVersion>
6-
<Version>3.1.2</Version>
6+
<Version>3.2.0</Version>
77
<PackageTags>RabbitMQ</PackageTags>
88
<RepositoryUrl>https://github.com/AntonyVorontsov/RabbitMQ.Client.Core.DependencyInjection</RepositoryUrl>
99
<Company />

src/RabbitMQ.Client.Core.DependencyInjection/RabbitMqClientDependencyInjectionExtensions.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static IServiceCollection AddRabbitMqClientTransient(this IServiceCollect
9292
services.ResolveTransientQueueService(guid);
9393
return services;
9494
}
95-
95+
9696
/// <summary>
9797
/// Add a singleton producing RabbitMQ client and required service infrastructure.
9898
/// </summary>
@@ -109,7 +109,7 @@ public static IServiceCollection AddRabbitMqProducingClientSingleton(this IServi
109109
services.ResolveSingletonProducingService(guid);
110110
return services;
111111
}
112-
112+
113113
/// <summary>
114114
/// Add a singleton producing RabbitMQ client and required service infrastructure.
115115
/// </summary>
@@ -125,7 +125,7 @@ public static IServiceCollection AddRabbitMqProducingClientSingleton(this IServi
125125
services.ResolveSingletonProducingService(guid);
126126
return services;
127127
}
128-
128+
129129
/// <summary>
130130
/// Add a transient producing RabbitMQ client and required service infrastructure.
131131
/// </summary>
@@ -142,7 +142,7 @@ public static IServiceCollection AddRabbitMqProducingClientTransient(this IServi
142142
services.ResolveTransientProducingService(guid);
143143
return services;
144144
}
145-
145+
146146
/// <summary>
147147
/// Add a singleton producing RabbitMQ client and required service infrastructure.
148148
/// </summary>
@@ -158,7 +158,7 @@ public static IServiceCollection AddRabbitMqProducingClientTransient(this IServi
158158
services.ResolveTransientProducingService(guid);
159159
return services;
160160
}
161-
161+
162162
/// <summary>
163163
/// Add a singleton consuming RabbitMQ client and required service infrastructure.
164164
/// </summary>
@@ -175,7 +175,7 @@ public static IServiceCollection AddRabbitMqConsumingClientSingleton(this IServi
175175
services.ResolveSingletonConsumingService(guid);
176176
return services;
177177
}
178-
178+
179179
/// <summary>
180180
/// Add a singleton consuming RabbitMQ client and required service infrastructure.
181181
/// </summary>
@@ -191,7 +191,7 @@ public static IServiceCollection AddRabbitMqConsumingClientSingleton(this IServi
191191
services.ResolveSingletonConsumingService(guid);
192192
return services;
193193
}
194-
194+
195195
/// <summary>
196196
/// Add a transient consuming RabbitMQ client and required service infrastructure.
197197
/// </summary>
@@ -208,7 +208,7 @@ public static IServiceCollection AddRabbitMqConsumingClientTransient(this IServi
208208
services.ResolveTransientConsumingService(guid);
209209
return services;
210210
}
211-
211+
212212
/// <summary>
213213
/// Add a transient consuming RabbitMQ client and required service infrastructure.
214214
/// </summary>
@@ -250,7 +250,7 @@ static IServiceCollection ConfigureRabbitMqProducingClientOptions(this IServiceC
250250
};
251251
return services.AddRabbitMqConnectionOptionsContainer(container);
252252
}
253-
253+
254254
static IServiceCollection ConfigureRabbitMqConsumingClientOptions(this IServiceCollection services, Guid guid, RabbitMqClientOptions options)
255255
{
256256
var container = new RabbitMqConnectionOptionsContainer
@@ -292,7 +292,7 @@ static IServiceCollection ResolveSingletonQueueService(this IServiceCollection s
292292
provider.GetService<ILogger<QueueService> >()));
293293
return services;
294294
}
295-
295+
296296
static IServiceCollection ResolveTransientQueueService(this IServiceCollection services, Guid guid)
297297
{
298298
services.TryAddTransient<IQueueService>(provider => new QueueService(
@@ -303,7 +303,7 @@ static IServiceCollection ResolveTransientQueueService(this IServiceCollection s
303303
provider.GetService<ILogger<QueueService> >()));
304304
return services;
305305
}
306-
306+
307307
static IServiceCollection ResolveSingletonProducingService(this IServiceCollection services, Guid guid)
308308
{
309309
services.TryAddSingleton<IProducingService>(provider => new QueueService(
@@ -314,7 +314,7 @@ static IServiceCollection ResolveSingletonProducingService(this IServiceCollecti
314314
provider.GetService<ILogger<QueueService> >()));
315315
return services;
316316
}
317-
317+
318318
static IServiceCollection ResolveTransientProducingService(this IServiceCollection services, Guid guid)
319319
{
320320
services.TryAddTransient<IProducingService>(provider => new QueueService(
@@ -325,7 +325,7 @@ static IServiceCollection ResolveTransientProducingService(this IServiceCollecti
325325
provider.GetService<ILogger<QueueService> >()));
326326
return services;
327327
}
328-
328+
329329
static IServiceCollection ResolveSingletonConsumingService(this IServiceCollection services, Guid guid)
330330
{
331331
services.TryAddSingleton<IConsumingService>(provider => new QueueService(
@@ -336,7 +336,7 @@ static IServiceCollection ResolveSingletonConsumingService(this IServiceCollecti
336336
provider.GetService<ILogger<QueueService> >()));
337337
return services;
338338
}
339-
339+
340340
static IServiceCollection ResolveTransientConsumingService(this IServiceCollection services, Guid guid)
341341
{
342342
services.TryAddTransient<IConsumingService>(provider => new QueueService(
@@ -353,7 +353,7 @@ static IServiceCollection CheckIfQueueingServiceAlreadyConfigured<T>(this IServi
353353
var descriptor = services.FirstOrDefault(x => x.ServiceType == typeof(T));
354354
if (descriptor != null)
355355
{
356-
throw new QueueingServiceAlreadyConfiguredException(typeof(T), $"A queueing service of type {typeof(T)} has been already configured.");
356+
throw new QueueingServiceAlreadyConfiguredException(typeof(T), $"A queuing service of type {typeof(T)} has been already configured.");
357357
}
358358

359359
return services;

tests/RabbitMQ.Client.Core.DependencyInjection.Tests/RabbitMQ.Client.Core.DependencyInjection.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
1414
<PackageReference Include="Moq" Version="4.13.1" />
1515
<PackageReference Include="xunit" Version="2.4.1" />
1616
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />

0 commit comments

Comments
 (0)