Skip to content

Commit

Permalink
Rename RabbitSubscriberAsync and AddRabbitSubscriberAsync.
Browse files Browse the repository at this point in the history
  • Loading branch information
ifgris committed Jan 11, 2024
1 parent 6375464 commit 6e7559d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Example/Example.MultiConsumers/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

// register BackgroundService
builder.Services.AddRabbitSubscriber<FirstConsumeService>("FooFirstQueueConsumer", false);
builder.Services.AddRabbitSubscriberAsync<SecondConsumeService>("FooSecondQueueConsumer", false);
builder.Services.AddRabbitAsyncSubscriber<SecondConsumeService>("FooSecondQueueConsumer", false);

using IHost host = builder.Build();

Expand Down
6 changes: 3 additions & 3 deletions Example/Example.MultiConsumers/SecondConsumeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

namespace Example.MultiConsumers;

public class SecondConsumeService : RabbitSubscriberAsync
public class SecondConsumeService : RabbitAsyncSubscriber
{
private readonly ILogger<SecondConsumeService> _logger;

public SecondConsumeService(IRabbitConsumer consumer, ILogger<RabbitSubscriberAsync>? logger, string consumerName, ILogger<SecondConsumeService> logger1) : base(consumer, consumerName, logger)
public SecondConsumeService(IRabbitConsumer consumer, string consumerName, ILogger<RabbitAsyncSubscriber>? logger, ILogger<SecondConsumeService> logger2) : base(consumer, consumerName, logger)
{
_logger = logger1;
_logger = logger2;
}

protected override Task HandleMessage(string message)
Expand Down
4 changes: 2 additions & 2 deletions Example/Example.NLog/ConsumeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

namespace Example.NLog;

public class ConsumeService : RabbitSubscriberAsync
public class ConsumeService : RabbitAsyncSubscriber
{
private readonly ILogger<ConsumeService>? _logger;

public ConsumeService(IRabbitConsumer consumer, ILogger<RabbitSubscriberAsync>? logger, string consumerName, ILogger<ConsumeService>? logger2) : base(consumer, consumerName, logger)
public ConsumeService(IRabbitConsumer consumer, ILogger<RabbitAsyncSubscriber>? logger, string consumerName, ILogger<ConsumeService>? logger2) : base(consumer, consumerName, logger)
{
_logger = logger2;
}
Expand Down
2 changes: 1 addition & 1 deletion Example/Example.NLog/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args)
// register BackgroundService
services.AddHostedService<PublishService>();
services.AddRabbitSubscriberAsync<ConsumeService>("FooFirstQueueConsumer", false);
services.AddRabbitAsyncSubscriber<ConsumeService>("FooFirstQueueConsumer", false);
});

0 comments on commit 6e7559d

Please sign in to comment.