diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobOptions.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobOptions.cs similarity index 96% rename from framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobOptions.cs rename to framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobOptions.cs index 0b058756c0..a16bc418a7 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobOptions.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobOptions.cs @@ -4,7 +4,7 @@ using System.Collections.Immutable; namespace Volo.Abp.BackgroundJobs { - public class BackgroundJobOptions + public class AbpBackgroundJobOptions { private readonly Dictionary _jobConfigurationsByArgsType; private readonly Dictionary _jobConfigurationsByName; @@ -15,7 +15,7 @@ namespace Volo.Abp.BackgroundJobs /// public bool IsJobExecutionEnabled { get; set; } = true; - public BackgroundJobOptions() + public AbpBackgroundJobOptions() { _jobConfigurationsByArgsType = new Dictionary(); _jobConfigurationsByName = new Dictionary(); diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs index 224c9b1d2c..38a0afb2cd 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/AbpBackgroundJobsAbstractionsModule.cs @@ -29,7 +29,7 @@ namespace Volo.Abp.BackgroundJobs } }); - services.Configure(options => + services.Configure(options => { foreach (var jobType in jobTypes) { diff --git a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs index 59352bc892..df0ec36dd6 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.Abstractions/Volo/Abp/BackgroundJobs/BackgroundJobExecuter.cs @@ -10,9 +10,9 @@ namespace Volo.Abp.BackgroundJobs { public ILogger Logger { protected get; set; } - protected BackgroundJobOptions Options { get; } + protected AbpBackgroundJobOptions Options { get; } - public BackgroundJobExecuter(IOptions options) + public BackgroundJobExecuter(IOptions options) { Options = options.Value; diff --git a/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs b/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs index 96c3b1ee0b..4a61aa2845 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.HangFire/Volo/Abp/BackgroundJobs/Hangfire/HangfireJobExecutionAdapter.cs @@ -5,12 +5,12 @@ namespace Volo.Abp.BackgroundJobs.Hangfire { public class HangfireJobExecutionAdapter { - protected BackgroundJobOptions Options { get; } + protected AbpBackgroundJobOptions Options { get; } protected IServiceScopeFactory ServiceScopeFactory { get; } protected IBackgroundJobExecuter JobExecuter { get; } public HangfireJobExecutionAdapter( - IOptions options, + IOptions options, IBackgroundJobExecuter jobExecuter, IServiceScopeFactory serviceScopeFactory) { diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs index 8d7012bde1..6979d76999 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueue.cs @@ -24,7 +24,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ public ILogger> Logger { get; set; } - protected BackgroundJobOptions BackgroundJobOptions { get; } + protected AbpBackgroundJobOptions AbpBackgroundJobOptions { get; } protected RabbitMqBackgroundJobOptions RabbitMqBackgroundJobOptions { get; } protected IChannelPool ChannelPool { get; } protected IRabbitMqSerializer Serializer { get; } @@ -35,21 +35,21 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ protected bool IsDiposed { get; private set; } public JobQueue( - IOptions backgroundJobOptions, - IOptions rabbitMqBackgroundJobOptions, + IOptions backgroundJobOptions, + IOptions rabbitMqAbpBackgroundJobOptions, IChannelPool channelPool, IRabbitMqSerializer serializer, IBackgroundJobExecuter jobExecuter, IServiceScopeFactory serviceScopeFactory) { - BackgroundJobOptions = backgroundJobOptions.Value; - RabbitMqBackgroundJobOptions = rabbitMqBackgroundJobOptions.Value; + AbpBackgroundJobOptions = backgroundJobOptions.Value; + RabbitMqBackgroundJobOptions = rabbitMqAbpBackgroundJobOptions.Value; Serializer = serializer; JobExecuter = jobExecuter; ServiceScopeFactory = serviceScopeFactory; ChannelPool = channelPool; - JobConfiguration = BackgroundJobOptions.GetJob(typeof(TArgs)); + JobConfiguration = AbpBackgroundJobOptions.GetJob(typeof(TArgs)); QueueConfiguration = GetOrCreateJobQueueConfiguration(); Logger = NullLogger>.Instance; @@ -85,7 +85,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ { CheckDisposed(); - if (!BackgroundJobOptions.IsJobExecutionEnabled) + if (!AbpBackgroundJobOptions.IsJobExecutionEnabled) { return; } @@ -129,7 +129,7 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ var result = QueueConfiguration.Declare(ChannelAccessor.Channel); Logger.LogDebug($"RabbitMQ Queue '{QueueConfiguration.QueueName}' has {result.MessageCount} messages and {result.ConsumerCount} consumers."); - if (BackgroundJobOptions.IsJobExecutionEnabled) + if (AbpBackgroundJobOptions.IsJobExecutionEnabled) { Consumer = new EventingBasicConsumer(ChannelAccessor.Channel); Consumer.Received += MessageReceived; diff --git a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs index 7ffe9ec82a..73b7c21d2a 100644 --- a/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs +++ b/framework/src/Volo.Abp.BackgroundJobs.RabbitMQ/Volo/Abp/BackgroundJobs/RabbitMQ/JobQueueManager.cs @@ -15,10 +15,10 @@ namespace Volo.Abp.BackgroundJobs.RabbitMQ protected IServiceProvider ServiceProvider { get; } - protected BackgroundJobOptions Options { get; } + protected AbpBackgroundJobOptions Options { get; } public JobQueueManager( - IOptions options, + IOptions options, IServiceProvider serviceProvider) { ServiceProvider = serviceProvider; diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs index f0324a9932..cea8a1eee6 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs @@ -17,7 +17,7 @@ namespace Volo.Abp.BackgroundJobs { public override void OnApplicationInitialization(ApplicationInitializationContext context) { - var options = context.ServiceProvider.GetRequiredService>().Value; + var options = context.ServiceProvider.GetRequiredService>().Value; if (options.IsJobExecutionEnabled) { context.ServiceProvider diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs index 4c9efbe6d8..f0ae29351c 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs @@ -11,7 +11,7 @@ namespace Volo.Abp.BackgroundJobs { public class BackgroundJobWorker : PeriodicBackgroundWorkerBase, IBackgroundJobWorker { - protected BackgroundJobOptions JobOptions { get; } + protected AbpBackgroundJobOptions JobOptions { get; } protected BackgroundJobWorkerOptions WorkerOptions { get; } @@ -19,7 +19,7 @@ namespace Volo.Abp.BackgroundJobs public BackgroundJobWorker( AbpTimer timer, - IOptions jobOptions, + IOptions jobOptions, IOptions workerOptions, IServiceScopeFactory serviceScopeFactory) : base(timer) diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs index 2d739c9fae..ae8490c871 100644 --- a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/AbpEmailingModule.cs @@ -30,7 +30,7 @@ namespace Volo.Abp.Emailing options.FileSets.AddEmbedded(); }); - Configure(options => + Configure(options => { options.AddJob(); }); diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs index d38b3ceac5..5af07bd6dc 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestBaseModule.cs @@ -13,7 +13,7 @@ namespace Volo.Abp.BackgroundJobs { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.IsJobExecutionEnabled = false; }); diff --git a/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs index 732d8f0e6b..f1977a63ad 100644 --- a/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs +++ b/samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs @@ -14,7 +14,7 @@ namespace Acme.BookStore.DbMigrator { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => options.IsJobExecutionEnabled = false); + Configure(options => options.IsJobExecutionEnabled = false); } } } diff --git a/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs b/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs index 3674dd6503..01d9dd7d63 100644 --- a/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs +++ b/samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs @@ -19,7 +19,7 @@ namespace Acme.BookStore { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.IsJobExecutionEnabled = false; }); diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs index 93309506ea..6938a9ae92 100644 --- a/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs +++ b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs @@ -14,7 +14,7 @@ namespace Acme.BookStore.DbMigrator { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => options.IsJobExecutionEnabled = false); + Configure(options => options.IsJobExecutionEnabled = false); } } } diff --git a/samples/BookStore-Modular/application/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs b/samples/BookStore-Modular/application/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs index 3674dd6503..01d9dd7d63 100644 --- a/samples/BookStore-Modular/application/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs +++ b/samples/BookStore-Modular/application/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs @@ -19,7 +19,7 @@ namespace Acme.BookStore { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.IsJobExecutionEnabled = false; }); diff --git a/samples/BookStore/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs b/samples/BookStore/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs index 3674dd6503..01d9dd7d63 100644 --- a/samples/BookStore/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs +++ b/samples/BookStore/test/Acme.BookStore.TestBase/BookStoreTestBaseModule.cs @@ -19,7 +19,7 @@ namespace Acme.BookStore { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.IsJobExecutionEnabled = false; }); diff --git a/samples/DashboardDemo/test/DashboardDemo.TestBase/DashboardDemoTestBaseModule.cs b/samples/DashboardDemo/test/DashboardDemo.TestBase/DashboardDemoTestBaseModule.cs index ae71a07e97..2156c6da13 100644 --- a/samples/DashboardDemo/test/DashboardDemo.TestBase/DashboardDemoTestBaseModule.cs +++ b/samples/DashboardDemo/test/DashboardDemo.TestBase/DashboardDemoTestBaseModule.cs @@ -19,7 +19,7 @@ namespace DashboardDemo { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.IsJobExecutionEnabled = false; }); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs index 52b02ed18c..ed9e67651c 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs @@ -14,7 +14,7 @@ namespace MyCompanyName.MyProjectName.DbMigrator { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => options.IsJobExecutionEnabled = false); + Configure(options => options.IsJobExecutionEnabled = false); } } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs index d0e6e40092..c083974f12 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs @@ -89,7 +89,7 @@ namespace MyCompanyName.MyProjectName options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"]; }); - Configure(options => + Configure(options => { options.IsJobExecutionEnabled = false; }); diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyProjectNameTestBaseModule.cs b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyProjectNameTestBaseModule.cs index 6304627e31..974a91dcf6 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyProjectNameTestBaseModule.cs +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.TestBase/MyProjectNameTestBaseModule.cs @@ -19,7 +19,7 @@ namespace MyCompanyName.MyProjectName { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.IsJobExecutionEnabled = false; });