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

Commit 1fdab17

Browse files
author
Anton Vorontsov
committed
2 parents e0ecbff + 8ca5545 commit 1fdab17

24 files changed

+31
-43
lines changed

examples/Examples.AdvancedConfiguration/Controllers/ExampleController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Threading.Tasks;
22
using Microsoft.AspNetCore.Mvc;
33
using Microsoft.Extensions.Logging;
4-
using RabbitMQ.Client.Core.DependencyInjection;
54
using RabbitMQ.Client.Core.DependencyInjection.Services;
65

76
namespace Examples.AdvancedConfiguration.Controllers

examples/Examples.AdvancedConfiguration/MessageHandlers/CustomAsyncMessageHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Threading.Tasks;
2-
using RabbitMQ.Client.Core.DependencyInjection;
32
using RabbitMQ.Client.Core.DependencyInjection.MessageHandlers;
43

54
namespace Examples.AdvancedConfiguration.MessageHandlers

examples/Examples.AdvancedConfiguration/MessageHandlers/CustomAsyncNonCyclicMessageHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Threading.Tasks;
2-
using RabbitMQ.Client.Core.DependencyInjection;
32
using RabbitMQ.Client.Core.DependencyInjection.MessageHandlers;
43
using RabbitMQ.Client.Core.DependencyInjection.Services;
54

examples/Examples.AdvancedConfiguration/MessageHandlers/CustomMessageHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using RabbitMQ.Client.Core.DependencyInjection;
21
using RabbitMQ.Client.Core.DependencyInjection.MessageHandlers;
32

43
namespace Examples.AdvancedConfiguration.MessageHandlers

examples/Examples.AdvancedConfiguration/MessageHandlers/CustomNonCyclicMessageHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using RabbitMQ.Client.Core.DependencyInjection;
21
using RabbitMQ.Client.Core.DependencyInjection.MessageHandlers;
32
using RabbitMQ.Client.Core.DependencyInjection.Services;
43

examples/Examples.AdvancedConfiguration/Services/ConsumingHostedService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.Threading;
22
using System.Threading.Tasks;
33
using Microsoft.Extensions.Hosting;
4-
using RabbitMQ.Client.Core.DependencyInjection;
54
using RabbitMQ.Client.Core.DependencyInjection.Services;
65

76
namespace Examples.AdvancedConfiguration.Services

examples/Examples.AdvancedConfiguration/Startup.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Examples.AdvancedConfiguration.MessageHandlers;
22
using Examples.AdvancedConfiguration.Services;
33
using Microsoft.AspNetCore.Builder;
4-
using Microsoft.AspNetCore.Hosting;
54
using Microsoft.Extensions.Configuration;
65
using Microsoft.Extensions.DependencyInjection;
76
using RabbitMQ.Client.Core.DependencyInjection;

examples/Examples.BatchMessageHandler/AnotherCustomBatchMessageHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Examples.BatchMessageHandler
99
public class AnotherCustomBatchMessageHandler : RabbitMQ.Client.Core.DependencyInjection.BatchMessageHandlers.BatchMessageHandler
1010
{
1111
readonly ILogger<AnotherCustomBatchMessageHandler> _logger;
12-
12+
1313
public AnotherCustomBatchMessageHandler(
1414
IEnumerable<BatchConsumerConnectionOptions> batchConsumerConnectionOptions,
1515
ILogger<AnotherCustomBatchMessageHandler> logger)
@@ -19,9 +19,9 @@ public AnotherCustomBatchMessageHandler(
1919
}
2020

2121
protected override ushort PrefetchCount { get; set; } = 5;
22-
22+
2323
protected override string QueueName { get; set; } = "another.queue.name";
24-
24+
2525
protected override Task HandleMessage(IEnumerable<string> messages, CancellationToken cancellationToken)
2626
{
2727
_logger.LogInformation("Handling a batch of messages.");

examples/Examples.BatchMessageHandler/CustomBatchMessageHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ namespace Examples.BatchMessageHandler
1212
public class CustomBatchMessageHandler : BaseBatchMessageHandler
1313
{
1414
readonly ILogger<CustomBatchMessageHandler> _logger;
15-
15+
1616
public CustomBatchMessageHandler(
1717
IEnumerable<BatchConsumerConnectionOptions> batchConsumerConnectionOptions,
1818
ILogger<CustomBatchMessageHandler> logger)
1919
: base(batchConsumerConnectionOptions, logger)
2020
{
2121
_logger = logger;
2222
}
23-
23+
2424
protected override ushort PrefetchCount { get; set; } = 3;
2525

2626
protected override string QueueName { get; set; } = "queue.name";
27-
27+
2828
protected override Task HandleMessages(IEnumerable<ReadOnlyMemory<byte>> messages, CancellationToken cancellationToken)
2929
{
3030
_logger.LogInformation("Handling a batch of messages.");

examples/Examples.BatchMessageHandler/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static async Task Main()
2121
// Let's configure two different BatchMessageHandlers with different methods.
2222
// First - configuring an appsettings.json section.
2323
services.AddBatchMessageHandler<CustomBatchMessageHandler>(hostContext.Configuration.GetSection("RabbitMq"));
24-
24+
2525
// Second one - passing configuration instance.
2626
var rabbitMqConfiguration = new RabbitMqClientOptions
2727
{
@@ -32,7 +32,7 @@ public static async Task Main()
3232
};
3333
services.AddBatchMessageHandler<AnotherCustomBatchMessageHandler>(rabbitMqConfiguration);
3434
})
35-
.ConfigureLogging((hostingContext, logging) =>
35+
.ConfigureLogging((hostingContext, logging) =>
3636
{
3737
logging.AddConsole();
3838
});

0 commit comments

Comments
 (0)