From b4ab69899d113944b823bd070103cbeb1189a0b3 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Thu, 17 Oct 2024 08:57:12 +0300 Subject: [PATCH 01/14] Seal ModularTenantEvents & DeploymentSourceBase implementations --- .../Deployment/AdminMenuDeploymentSource.cs | 2 +- .../Deployment/ContentDefinitionDeploymentSource.cs | 2 +- .../Deployment/DeleteContentDefinitionDeploymentSource.cs | 2 +- .../Deployment/ReplaceContentDefinitionDeploymentSource.cs | 2 +- .../AddToDeploymentPlan/ContentItemDeploymentSource.cs | 2 +- .../Deployment/AllContentDeploymentSource.cs | 2 +- .../OrchardCore.Contents/Deployment/ContentDeploymentSource.cs | 2 +- .../ExportContentToDeploymentTargetDeploymentSource.cs | 2 +- .../Deployment/CustomSettingsDeploymentSource.cs | 2 +- .../Deployment/DeploymentPlanDeploymentSource.cs | 2 +- .../OrchardCore.Deployment/Steps/CustomFileDeploymentSource.cs | 2 +- .../OrchardCore.Deployment/Steps/JsonRecipeDeploymentSource.cs | 2 +- .../Deployment/FacebookLoginDeploymentSource.cs | 2 +- .../Deployment/AllFeaturesDeploymentSource.cs | 2 +- .../OrchardCore.Layers/Deployment/AllLayersDeploymentSource.cs | 2 +- .../Services/MediaS3BucketTenantEvents.cs | 2 +- .../Services/MediaBlobContainerTenantEvents.cs | 2 +- .../Deployment/AllMediaProfilesDeploymentSource.cs | 2 +- .../OrchardCore.Media/Deployment/MediaDeploymentSource.cs | 2 +- .../OrchardCore.Media/Services/TempDirCleanerService.cs | 2 +- .../Deployment/AzureADDeploymentSource.cs | 2 +- .../Deployment/OpenIdServerDeploymentSource.cs | 2 +- .../Deployment/OpenIdValidationDeploymentSource.cs | 2 +- .../Deployment/PlacementsDeploymentSource.cs | 2 +- .../Deployment/AllQueriesDeploymentSource.cs | 2 +- .../Deployment/QueryBasedContentDeploymentSource.cs | 2 +- .../OrchardCore.Redis/Services/RedisService.cs | 2 +- .../OrchardCore.Roles/Deployment/AllRolesDeploymentSource.cs | 2 +- .../Deployment/LuceneIndexDeploymentSource.cs | 2 +- .../Deployment/LuceneIndexRebuildDeploymentSource.cs | 2 +- .../Deployment/LuceneIndexResetDeploymentSource.cs | 2 +- .../Deployment/LuceneSettingsDeploymentSource.cs | 2 +- .../Services/LuceneIndexInitializerService.cs | 2 +- .../Deployment/SearchSettingsDeploymentSource.cs | 2 +- .../Deployment/SiteSettingsDeploymentSource.cs | 2 +- .../Deployment/AllShortcodeTemplatesDeploymentSource.cs | 2 +- .../Deployment/AllAdminTemplatesDeploymentSource.cs | 2 +- .../Deployment/AllTemplatesDeploymentSource.cs | 2 +- .../Deployment/AllFeatureProfilesDeploymentSource.cs | 2 +- .../OrchardCore.Themes/Deployment/ThemesDeploymentSource.cs | 2 +- .../OrchardCore.Users/Deployment/AllUsersDeploymentSource.cs | 2 +- .../Deployment/CustomUserSettingsDeploymentSource.cs | 2 +- .../Deployment/AllWorkflowTypeDeploymentSource.cs | 2 +- .../OrchardCore.Data/Migration/AutomaticDataMigrations.cs | 2 +- .../Deployment/AzureAISearchIndexDeploymentSource.cs | 2 +- .../Deployment/AzureAISearchIndexRebuildDeploymentSource.cs | 2 +- .../Deployment/AzureAISearchIndexResetDeploymentSource.cs | 2 +- .../Deployment/AzureAISearchSettingsDeploymentSource.cs | 2 +- .../Deployment/ElasticIndexDeploymentSource.cs | 2 +- .../Deployment/ElasticIndexRebuildDeploymentSource.cs | 2 +- .../Deployment/ElasticIndexResetDeploymentSource.cs | 2 +- .../Deployment/ElasticSettingsDeploymentSource.cs | 2 +- .../Services/ElasticIndexInitializerService.cs | 2 +- .../Deployment/SiteSettingsPropertyDeploymentSource.cs | 2 +- 54 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminMenuDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminMenuDeploymentSource.cs index 0502063da9b..034c0b17cc1 100644 --- a/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminMenuDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.AdminMenu/Deployment/AdminMenuDeploymentSource.cs @@ -7,7 +7,7 @@ namespace OrchardCore.AdminMenu.Deployment; -public class AdminMenuDeploymentSource +public sealed class AdminMenuDeploymentSource : DeploymentSourceBase { private readonly IAdminMenuService _adminMenuService; diff --git a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/ContentDefinitionDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/ContentDefinitionDeploymentSource.cs index f499be5309c..4a641f2c2ba 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/ContentDefinitionDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/ContentDefinitionDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.ContentTypes.Deployment; -public class ContentDefinitionDeploymentSource +public sealed class ContentDefinitionDeploymentSource : DeploymentSourceBase { private readonly IContentDefinitionStore _contentDefinitionStore; diff --git a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/DeleteContentDefinitionDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/DeleteContentDefinitionDeploymentSource.cs index 22e024d0107..1f9fca776cd 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/DeleteContentDefinitionDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/DeleteContentDefinitionDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.ContentTypes.Deployment; -public class DeleteContentDefinitionDeploymentSource +public sealed class DeleteContentDefinitionDeploymentSource : DeploymentSourceBase { protected override Task ProcessAsync(DeleteContentDefinitionDeploymentStep step, DeploymentPlanResult result) diff --git a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/ReplaceContentDefinitionDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/ReplaceContentDefinitionDeploymentSource.cs index 3d660902753..5ca0a9bdcd5 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/ReplaceContentDefinitionDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentTypes/Deployment/ReplaceContentDefinitionDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.ContentTypes.Deployment; -public class ReplaceContentDefinitionDeploymentSource +public sealed class ReplaceContentDefinitionDeploymentSource : DeploymentSourceBase { private readonly IContentDefinitionStore _contentDefinitionStore; diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/AddToDeploymentPlan/ContentItemDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/AddToDeploymentPlan/ContentItemDeploymentSource.cs index 03b49f2c683..7c3bdb16d99 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/AddToDeploymentPlan/ContentItemDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/AddToDeploymentPlan/ContentItemDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Contents.Deployment.AddToDeploymentPlan; -public class ContentItemDeploymentSource +public sealed class ContentItemDeploymentSource : DeploymentSourceBase { private readonly IContentManager _contentManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/AllContentDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/AllContentDeploymentSource.cs index bf2019faca2..f7a0410f471 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/AllContentDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/AllContentDeploymentSource.cs @@ -6,7 +6,7 @@ namespace OrchardCore.Contents.Deployment; -public class AllContentDeploymentSource +public sealed class AllContentDeploymentSource : DeploymentSourceBase { private readonly ISession _session; diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ContentDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ContentDeploymentSource.cs index 767605aae61..9251af62b00 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ContentDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ContentDeploymentSource.cs @@ -7,7 +7,7 @@ namespace OrchardCore.Contents.Deployment; -public class ContentDeploymentSource +public sealed class ContentDeploymentSource : DeploymentSourceBase { private readonly ISession _session; diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetDeploymentSource.cs index fd9d265606c..f15d07f484f 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Deployment/ExportContentToDeploymentTarget/ExportContentToDeploymentTargetDeploymentSource.cs @@ -8,7 +8,7 @@ namespace OrchardCore.Contents.Deployment.ExportContentToDeploymentTarget; -public class ExportContentToDeploymentTargetDeploymentSource +public sealed class ExportContentToDeploymentTargetDeploymentSource : DeploymentSourceBase { private readonly IContentManager _contentManager; diff --git a/src/OrchardCore.Modules/OrchardCore.CustomSettings/Deployment/CustomSettingsDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.CustomSettings/Deployment/CustomSettingsDeploymentSource.cs index 7e61377cc34..3d297dc9b6e 100644 --- a/src/OrchardCore.Modules/OrchardCore.CustomSettings/Deployment/CustomSettingsDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.CustomSettings/Deployment/CustomSettingsDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.CustomSettings.Deployment; -public class CustomSettingsDeploymentSource +public sealed class CustomSettingsDeploymentSource : DeploymentSourceBase { private readonly CustomSettingsService _customSettingsService; diff --git a/src/OrchardCore.Modules/OrchardCore.Deployment/Deployment/DeploymentPlanDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Deployment/Deployment/DeploymentPlanDeploymentSource.cs index f0aacb6b9b1..369c831376f 100644 --- a/src/OrchardCore.Modules/OrchardCore.Deployment/Deployment/DeploymentPlanDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Deployment/Deployment/DeploymentPlanDeploymentSource.cs @@ -5,7 +5,7 @@ namespace OrchardCore.Deployment.Deployment; -public class DeploymentPlanDeploymentSource +public sealed class DeploymentPlanDeploymentSource : DeploymentSourceBase { private readonly IDeploymentPlanService _deploymentPlanService; diff --git a/src/OrchardCore.Modules/OrchardCore.Deployment/Steps/CustomFileDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Deployment/Steps/CustomFileDeploymentSource.cs index 1b5925b8040..fddc1629e65 100644 --- a/src/OrchardCore.Modules/OrchardCore.Deployment/Steps/CustomFileDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Deployment/Steps/CustomFileDeploymentSource.cs @@ -2,7 +2,7 @@ namespace OrchardCore.Deployment.Steps; -public class CustomFileDeploymentSource +public sealed class CustomFileDeploymentSource : DeploymentSourceBase { protected override Task ProcessAsync(CustomFileDeploymentStep step, DeploymentPlanResult result) diff --git a/src/OrchardCore.Modules/OrchardCore.Deployment/Steps/JsonRecipeDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Deployment/Steps/JsonRecipeDeploymentSource.cs index 110be9c6018..cfe8b2d2658 100644 --- a/src/OrchardCore.Modules/OrchardCore.Deployment/Steps/JsonRecipeDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Deployment/Steps/JsonRecipeDeploymentSource.cs @@ -2,7 +2,7 @@ namespace OrchardCore.Deployment.Steps; -public class JsonRecipeDeploymentSource +public sealed class JsonRecipeDeploymentSource : DeploymentSourceBase { protected override Task ProcessAsync(JsonRecipeDeploymentStep step, DeploymentPlanResult result) diff --git a/src/OrchardCore.Modules/OrchardCore.Facebook/Deployment/FacebookLoginDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Facebook/Deployment/FacebookLoginDeploymentSource.cs index 62ad15bbb73..becc34b7365 100644 --- a/src/OrchardCore.Modules/OrchardCore.Facebook/Deployment/FacebookLoginDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Facebook/Deployment/FacebookLoginDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Facebook.Deployment; -public class FacebookLoginDeploymentSource +public sealed class FacebookLoginDeploymentSource : DeploymentSourceBase { private readonly IFacebookService _facebookService; diff --git a/src/OrchardCore.Modules/OrchardCore.Features/Deployment/AllFeaturesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Features/Deployment/AllFeaturesDeploymentSource.cs index 3712eeb51a5..2335b614d1f 100644 --- a/src/OrchardCore.Modules/OrchardCore.Features/Deployment/AllFeaturesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Features/Deployment/AllFeaturesDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Features.Deployment; -public class AllFeaturesDeploymentSource +public sealed class AllFeaturesDeploymentSource : DeploymentSourceBase { private readonly IModuleService _moduleService; diff --git a/src/OrchardCore.Modules/OrchardCore.Layers/Deployment/AllLayersDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Layers/Deployment/AllLayersDeploymentSource.cs index c2dc930aaeb..d00c4fbfec6 100644 --- a/src/OrchardCore.Modules/OrchardCore.Layers/Deployment/AllLayersDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Layers/Deployment/AllLayersDeploymentSource.cs @@ -9,7 +9,7 @@ namespace OrchardCore.Layers.Deployment; -public class AllLayersDeploymentSource +public sealed class AllLayersDeploymentSource : DeploymentSourceBase { private readonly ILayerService _layerService; diff --git a/src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/Services/MediaS3BucketTenantEvents.cs b/src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/Services/MediaS3BucketTenantEvents.cs index e604617f736..3a1e325fdc9 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/Services/MediaS3BucketTenantEvents.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media.AmazonS3/Services/MediaS3BucketTenantEvents.cs @@ -7,7 +7,7 @@ namespace OrchardCore.Media.AmazonS3.Services; -public class MediaS3BucketTenantEvents : AwsTenantEventsBase +public sealed class MediaS3BucketTenantEvents : AwsTenantEventsBase { public MediaS3BucketTenantEvents( ShellSettings shellSettings, diff --git a/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs b/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs index 3c6ed356d39..66812c5c15b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs @@ -10,7 +10,7 @@ namespace OrchardCore.Media.Azure.Services; -public class MediaBlobContainerTenantEvents : ModularTenantEvents +public sealed class MediaBlobContainerTenantEvents : ModularTenantEvents { private readonly MediaBlobStorageOptions _options; private readonly ShellSettings _shellSettings; diff --git a/src/OrchardCore.Modules/OrchardCore.Media/Deployment/AllMediaProfilesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Media/Deployment/AllMediaProfilesDeploymentSource.cs index c0da48b7f36..6a615040876 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/Deployment/AllMediaProfilesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/Deployment/AllMediaProfilesDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Media.Deployment; -public class AllMediaProfilesDeploymentSource +public sealed class AllMediaProfilesDeploymentSource : DeploymentSourceBase { private readonly MediaProfilesManager _mediaProfilesManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Media/Deployment/MediaDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Media/Deployment/MediaDeploymentSource.cs index 1c108231867..a3da730c89c 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/Deployment/MediaDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/Deployment/MediaDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Media.Deployment; -public class MediaDeploymentSource +public sealed class MediaDeploymentSource : DeploymentSourceBase { private readonly IMediaFileStore _mediaFileStore; diff --git a/src/OrchardCore.Modules/OrchardCore.Media/Services/TempDirCleanerService.cs b/src/OrchardCore.Modules/OrchardCore.Media/Services/TempDirCleanerService.cs index bb27b112167..61c86829ba3 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/Services/TempDirCleanerService.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/Services/TempDirCleanerService.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Media.Services; -public class TempDirCleanerService : ModularTenantEvents +public sealed class TempDirCleanerService : ModularTenantEvents { private readonly IMediaFileStore _fileStore; private readonly AttachedMediaFieldFileService _attachedMediaFieldFileService; diff --git a/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/Deployment/AzureADDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/Deployment/AzureADDeploymentSource.cs index d7ebe2202a9..e3b41cb6560 100644 --- a/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/Deployment/AzureADDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication/Deployment/AzureADDeploymentSource.cs @@ -5,7 +5,7 @@ namespace OrchardCore.Microsoft.Authentication.Deployment; -public class AzureADDeploymentSource +public sealed class AzureADDeploymentSource : DeploymentSourceBase { private readonly IAzureADService _azureADService; diff --git a/src/OrchardCore.Modules/OrchardCore.OpenId/Deployment/OpenIdServerDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.OpenId/Deployment/OpenIdServerDeploymentSource.cs index db7f2374f0b..751e1b68dc3 100644 --- a/src/OrchardCore.Modules/OrchardCore.OpenId/Deployment/OpenIdServerDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.OpenId/Deployment/OpenIdServerDeploymentSource.cs @@ -6,7 +6,7 @@ namespace OrchardCore.OpenId.Deployment; -public class OpenIdServerDeploymentSource +public sealed class OpenIdServerDeploymentSource : DeploymentSourceBase { private readonly IOpenIdServerService _openIdServerService; diff --git a/src/OrchardCore.Modules/OrchardCore.OpenId/Deployment/OpenIdValidationDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.OpenId/Deployment/OpenIdValidationDeploymentSource.cs index f0a782f5a10..0676ab5dcf2 100644 --- a/src/OrchardCore.Modules/OrchardCore.OpenId/Deployment/OpenIdValidationDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.OpenId/Deployment/OpenIdValidationDeploymentSource.cs @@ -5,7 +5,7 @@ namespace OrchardCore.OpenId.Deployment; -public class OpenIdValidationDeploymentSource +public sealed class OpenIdValidationDeploymentSource : DeploymentSourceBase { private readonly IOpenIdValidationService _openIdValidationService; diff --git a/src/OrchardCore.Modules/OrchardCore.Placements/Deployment/PlacementsDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Placements/Deployment/PlacementsDeploymentSource.cs index 8a5e8fc02b7..964e7003b83 100644 --- a/src/OrchardCore.Modules/OrchardCore.Placements/Deployment/PlacementsDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Placements/Deployment/PlacementsDeploymentSource.cs @@ -7,7 +7,7 @@ namespace OrchardCore.Placements.Deployment; -public class PlacementsDeploymentSource +public sealed class PlacementsDeploymentSource : DeploymentSourceBase { private readonly PlacementsManager _placementsManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/AllQueriesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/AllQueriesDeploymentSource.cs index b59a3ce7d91..9303d9301c1 100644 --- a/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/AllQueriesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/AllQueriesDeploymentSource.cs @@ -6,7 +6,7 @@ namespace OrchardCore.Queries.Deployment; -public class AllQueriesDeploymentSource +public sealed class AllQueriesDeploymentSource : DeploymentSourceBase { private readonly IQueryManager _queryManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/QueryBasedContentDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/QueryBasedContentDeploymentSource.cs index 615cf61bfb8..c89bba25531 100644 --- a/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/QueryBasedContentDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Queries/Deployment/QueryBasedContentDeploymentSource.cs @@ -5,7 +5,7 @@ namespace OrchardCore.Queries.Deployment; -public class QueryBasedContentDeploymentSource +public sealed class QueryBasedContentDeploymentSource : DeploymentSourceBase { private readonly IQueryManager _queryManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Redis/Services/RedisService.cs b/src/OrchardCore.Modules/OrchardCore.Redis/Services/RedisService.cs index 93d6447d5fe..8eecb06193a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Redis/Services/RedisService.cs +++ b/src/OrchardCore.Modules/OrchardCore.Redis/Services/RedisService.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Redis.Services; -public class RedisService : ModularTenantEvents, IRedisService +public sealed class RedisService : ModularTenantEvents, IRedisService { private readonly IRedisDatabaseFactory _factory; private readonly RedisOptions _options; diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/Deployment/AllRolesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Roles/Deployment/AllRolesDeploymentSource.cs index ce660fdb271..726108549cd 100644 --- a/src/OrchardCore.Modules/OrchardCore.Roles/Deployment/AllRolesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Roles/Deployment/AllRolesDeploymentSource.cs @@ -8,7 +8,7 @@ namespace OrchardCore.Roles.Deployment; -public class AllRolesDeploymentSource +public sealed class AllRolesDeploymentSource : DeploymentSourceBase { private readonly RoleManager _roleManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexDeploymentSource.cs index 07d1dc0e47a..9d989745c3a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Search.Lucene.Deployment; -public class LuceneIndexDeploymentSource +public sealed class LuceneIndexDeploymentSource : DeploymentSourceBase { private readonly LuceneIndexSettingsService _luceneIndexSettingsService; diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexRebuildDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexRebuildDeploymentSource.cs index 7bccad79c29..dccafefd982 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexRebuildDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexRebuildDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Search.Lucene.Deployment; -public class LuceneIndexRebuildDeploymentSource +public sealed class LuceneIndexRebuildDeploymentSource : DeploymentSourceBase { protected override Task ProcessAsync(LuceneIndexRebuildDeploymentStep step, DeploymentPlanResult result) diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexResetDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexResetDeploymentSource.cs index 44a2efa95f0..ec41c9b01d2 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexResetDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneIndexResetDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Search.Lucene.Deployment; -public class LuceneIndexResetDeploymentSource +public sealed class LuceneIndexResetDeploymentSource : DeploymentSourceBase { protected override Task ProcessAsync(LuceneIndexResetDeploymentStep step, DeploymentPlanResult result) diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneSettingsDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneSettingsDeploymentSource.cs index 4924a8170cd..e5a1e2a9380 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneSettingsDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Deployment/LuceneSettingsDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Search.Lucene.Deployment; -public class LuceneSettingsDeploymentSource +public sealed class LuceneSettingsDeploymentSource : DeploymentSourceBase { private readonly LuceneIndexingService _luceneIndexingService; diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneIndexInitializerService.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneIndexInitializerService.cs index 54896d72e54..efff524e411 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneIndexInitializerService.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneIndexInitializerService.cs @@ -5,7 +5,7 @@ namespace OrchardCore.Search.Lucene; -public class LuceneIndexInitializerService : ModularTenantEvents +public sealed class LuceneIndexInitializerService : ModularTenantEvents { private readonly ShellSettings _shellSettings; diff --git a/src/OrchardCore.Modules/OrchardCore.Search/Deployment/SearchSettingsDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Search/Deployment/SearchSettingsDeploymentSource.cs index 64f53f6f431..5133e679acb 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search/Deployment/SearchSettingsDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search/Deployment/SearchSettingsDeploymentSource.cs @@ -5,7 +5,7 @@ namespace OrchardCore.Search.Deployment; -public class SearchSettingsDeploymentSource +public sealed class SearchSettingsDeploymentSource : DeploymentSourceBase { private readonly ISiteService _siteService; diff --git a/src/OrchardCore.Modules/OrchardCore.Settings/Deployment/SiteSettingsDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Settings/Deployment/SiteSettingsDeploymentSource.cs index 2640e4099d3..fa22a1132f2 100644 --- a/src/OrchardCore.Modules/OrchardCore.Settings/Deployment/SiteSettingsDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Settings/Deployment/SiteSettingsDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Settings.Deployment; -public class SiteSettingsDeploymentSource +public sealed class SiteSettingsDeploymentSource : DeploymentSourceBase { private readonly ISiteService _siteService; diff --git a/src/OrchardCore.Modules/OrchardCore.Shortcodes/Deployment/AllShortcodeTemplatesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Shortcodes/Deployment/AllShortcodeTemplatesDeploymentSource.cs index 7c048f9fa59..64e90e05ac2 100644 --- a/src/OrchardCore.Modules/OrchardCore.Shortcodes/Deployment/AllShortcodeTemplatesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Shortcodes/Deployment/AllShortcodeTemplatesDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Shortcodes.Deployment; -public class AllShortcodeTemplatesDeploymentSource +public sealed class AllShortcodeTemplatesDeploymentSource : DeploymentSourceBase { private readonly ShortcodeTemplatesManager _templatesManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Templates/Deployment/AllAdminTemplatesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Templates/Deployment/AllAdminTemplatesDeploymentSource.cs index fcd65d71a94..c980d863d1c 100644 --- a/src/OrchardCore.Modules/OrchardCore.Templates/Deployment/AllAdminTemplatesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Templates/Deployment/AllAdminTemplatesDeploymentSource.cs @@ -6,7 +6,7 @@ namespace OrchardCore.Templates.Deployment; -public class AllAdminTemplatesDeploymentSource +public sealed class AllAdminTemplatesDeploymentSource : DeploymentSourceBase { private readonly AdminTemplatesManager _templatesManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Templates/Deployment/AllTemplatesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Templates/Deployment/AllTemplatesDeploymentSource.cs index 97b6ecb2826..1772912b289 100644 --- a/src/OrchardCore.Modules/OrchardCore.Templates/Deployment/AllTemplatesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Templates/Deployment/AllTemplatesDeploymentSource.cs @@ -6,7 +6,7 @@ namespace OrchardCore.Templates.Deployment; -public class AllTemplatesDeploymentSource +public sealed class AllTemplatesDeploymentSource : DeploymentSourceBase { private readonly TemplatesManager _templatesManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Tenants/Deployment/AllFeatureProfilesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Tenants/Deployment/AllFeatureProfilesDeploymentSource.cs index a21b17d3d79..24bf89c5563 100644 --- a/src/OrchardCore.Modules/OrchardCore.Tenants/Deployment/AllFeatureProfilesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Tenants/Deployment/AllFeatureProfilesDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Tenants.Deployment; -public class AllFeatureProfilesDeploymentSource +public sealed class AllFeatureProfilesDeploymentSource : DeploymentSourceBase { private readonly FeatureProfilesManager _featureProfilesManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Themes/Deployment/ThemesDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Themes/Deployment/ThemesDeploymentSource.cs index e50bcb58df4..8e1562fd5d1 100644 --- a/src/OrchardCore.Modules/OrchardCore.Themes/Deployment/ThemesDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Themes/Deployment/ThemesDeploymentSource.cs @@ -6,7 +6,7 @@ namespace OrchardCore.Themes.Deployment; -public class ThemesDeploymentSource +public sealed class ThemesDeploymentSource : DeploymentSourceBase { private readonly ISiteThemeService _siteThemeService; diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Deployment/AllUsersDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Users/Deployment/AllUsersDeploymentSource.cs index 991c4f0e0a5..8b92ba375c8 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Deployment/AllUsersDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Deployment/AllUsersDeploymentSource.cs @@ -5,7 +5,7 @@ namespace OrchardCore.Users.Deployment; -public class AllUsersDeploymentSource +public sealed class AllUsersDeploymentSource : DeploymentSourceBase { private readonly ISession _session; diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Deployment/CustomUserSettingsDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Users/Deployment/CustomUserSettingsDeploymentSource.cs index d54f80451bb..f374723f229 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Deployment/CustomUserSettingsDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Deployment/CustomUserSettingsDeploymentSource.cs @@ -6,7 +6,7 @@ namespace OrchardCore.Users.Deployment; -public class CustomUserSettingsDeploymentSource +public sealed class CustomUserSettingsDeploymentSource : DeploymentSourceBase { private readonly CustomUserSettingsService _customUserSettingsService; diff --git a/src/OrchardCore.Modules/OrchardCore.Workflows/Deployment/AllWorkflowTypeDeploymentSource.cs b/src/OrchardCore.Modules/OrchardCore.Workflows/Deployment/AllWorkflowTypeDeploymentSource.cs index 62696c1bdb4..772c1aa3bf5 100644 --- a/src/OrchardCore.Modules/OrchardCore.Workflows/Deployment/AllWorkflowTypeDeploymentSource.cs +++ b/src/OrchardCore.Modules/OrchardCore.Workflows/Deployment/AllWorkflowTypeDeploymentSource.cs @@ -8,7 +8,7 @@ namespace OrchardCore.Workflows.Deployment; -public class AllWorkflowTypeDeploymentSource +public sealed class AllWorkflowTypeDeploymentSource : DeploymentSourceBase { private readonly IWorkflowTypeStore _workflowTypeStore; diff --git a/src/OrchardCore/OrchardCore.Data/Migration/AutomaticDataMigrations.cs b/src/OrchardCore/OrchardCore.Data/Migration/AutomaticDataMigrations.cs index 07253518fea..8c40808965b 100644 --- a/src/OrchardCore/OrchardCore.Data/Migration/AutomaticDataMigrations.cs +++ b/src/OrchardCore/OrchardCore.Data/Migration/AutomaticDataMigrations.cs @@ -8,7 +8,7 @@ namespace OrchardCore.Data.Migration; /// /// Represents a tenant event that will be registered to OrchardShell.Activated in order to run migrations automatically. /// -public class AutomaticDataMigrations : ModularTenantEvents +public sealed class AutomaticDataMigrations : ModularTenantEvents { private readonly ShellSettings _shellSettings; private readonly ILogger _logger; diff --git a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexDeploymentSource.cs b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexDeploymentSource.cs index 9ad107b4cb0..59e3b45c5c1 100644 --- a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexDeploymentSource.cs +++ b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexDeploymentSource.cs @@ -6,7 +6,7 @@ namespace OrchardCore.Search.AzureAI.Deployment; -public class AzureAISearchIndexDeploymentSource +public sealed class AzureAISearchIndexDeploymentSource : DeploymentSourceBase { private readonly AzureAISearchIndexSettingsService _indexSettingsService; diff --git a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexRebuildDeploymentSource.cs b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexRebuildDeploymentSource.cs index c427ad27f4d..9b6e43f09be 100644 --- a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexRebuildDeploymentSource.cs +++ b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexRebuildDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Search.AzureAI.Deployment; -public class AzureAISearchIndexRebuildDeploymentSource +public sealed class AzureAISearchIndexRebuildDeploymentSource : DeploymentSourceBase { public const string Name = "azureai-index-rebuild"; diff --git a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexResetDeploymentSource.cs b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexResetDeploymentSource.cs index cba205f147c..4a542669c0f 100644 --- a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexResetDeploymentSource.cs +++ b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchIndexResetDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Search.AzureAI.Deployment; -public class AzureAISearchIndexResetDeploymentSource +public sealed class AzureAISearchIndexResetDeploymentSource : DeploymentSourceBase { public const string Name = "azureai-index-reset"; diff --git a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchSettingsDeploymentSource.cs b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchSettingsDeploymentSource.cs index 4bcbc995123..f0ffc069bad 100644 --- a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchSettingsDeploymentSource.cs +++ b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Deployment/AzureAISearchSettingsDeploymentSource.cs @@ -5,7 +5,7 @@ namespace OrchardCore.Search.AzureAI.Deployment; -public class AzureAISearchSettingsDeploymentSource(ISiteService siteService) +public sealed class AzureAISearchSettingsDeploymentSource(ISiteService siteService) : DeploymentSourceBase { private readonly ISiteService _siteService = siteService; diff --git a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexDeploymentSource.cs b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexDeploymentSource.cs index 841d9203cb3..da5facecaf8 100644 --- a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexDeploymentSource.cs +++ b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexDeploymentSource.cs @@ -5,7 +5,7 @@ namespace OrchardCore.Search.Elasticsearch.Core.Deployment; -public class ElasticIndexDeploymentSource +public sealed class ElasticIndexDeploymentSource : DeploymentSourceBase { private readonly ElasticIndexSettingsService _elasticIndexSettingsService; diff --git a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexRebuildDeploymentSource.cs b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexRebuildDeploymentSource.cs index aa8346aba31..bd5b9d7ea2f 100644 --- a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexRebuildDeploymentSource.cs +++ b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexRebuildDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Search.Elasticsearch.Core.Deployment; -public class ElasticIndexRebuildDeploymentSource +public sealed class ElasticIndexRebuildDeploymentSource : DeploymentSourceBase { protected override Task ProcessAsync(ElasticIndexRebuildDeploymentStep step, DeploymentPlanResult result) diff --git a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexResetDeploymentSource.cs b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexResetDeploymentSource.cs index ac0b8849d21..4a8f2dea3e4 100644 --- a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexResetDeploymentSource.cs +++ b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticIndexResetDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Search.Elasticsearch.Core.Deployment; -public class ElasticIndexResetDeploymentSource +public sealed class ElasticIndexResetDeploymentSource : DeploymentSourceBase { protected override Task ProcessAsync(ElasticIndexResetDeploymentStep step, DeploymentPlanResult result) diff --git a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticSettingsDeploymentSource.cs b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticSettingsDeploymentSource.cs index 754b6c64b36..69ffd23d722 100644 --- a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticSettingsDeploymentSource.cs +++ b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Deployment/ElasticSettingsDeploymentSource.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Search.Elasticsearch.Core.Deployment; -public class ElasticSettingsDeploymentSource +public sealed class ElasticSettingsDeploymentSource : DeploymentSourceBase { private readonly ElasticIndexingService _elasticIndexingService; diff --git a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs index 732d4ee7725..36a79d341a5 100644 --- a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs +++ b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs @@ -13,7 +13,7 @@ namespace OrchardCore.Search.Elasticsearch; /// Provides a way to initialize Elasticsearch index on startup of the application /// if the index is not found on the Elasticsearch server. /// -public class ElasticIndexInitializerService : ModularTenantEvents +public sealed class ElasticIndexInitializerService : ModularTenantEvents { private readonly ShellSettings _shellSettings; private readonly ElasticIndexManager _elasticIndexManager; diff --git a/src/OrchardCore/OrchardCore.Settings.Core/Deployment/SiteSettingsPropertyDeploymentSource.cs b/src/OrchardCore/OrchardCore.Settings.Core/Deployment/SiteSettingsPropertyDeploymentSource.cs index 43faa89391e..2103f168776 100644 --- a/src/OrchardCore/OrchardCore.Settings.Core/Deployment/SiteSettingsPropertyDeploymentSource.cs +++ b/src/OrchardCore/OrchardCore.Settings.Core/Deployment/SiteSettingsPropertyDeploymentSource.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Settings.Deployment; -public class SiteSettingsPropertyDeploymentSource +public sealed class SiteSettingsPropertyDeploymentSource : DeploymentSourceBase> where TModel : class, new() { private readonly ISiteService _siteService; From 71c0528d7eac4f2d2def5b94a9e7121998adc59f Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Thu, 17 Oct 2024 09:08:53 +0300 Subject: [PATCH 02/14] Remove protected from S --- .../Services/MediaBlobContainerTenantEvents.cs | 3 +-- .../Services/ElasticIndexInitializerService.cs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs b/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs index 66812c5c15b..944f3886ba8 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs @@ -15,8 +15,7 @@ public sealed class MediaBlobContainerTenantEvents : ModularTenantEvents private readonly MediaBlobStorageOptions _options; private readonly ShellSettings _shellSettings; private readonly ILogger _logger; - - protected readonly IStringLocalizer S; + private readonly IStringLocalizer S; public MediaBlobContainerTenantEvents( IOptions options, diff --git a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs index 36a79d341a5..f3475033429 100644 --- a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs +++ b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs @@ -18,7 +18,7 @@ public sealed class ElasticIndexInitializerService : ModularTenantEvents private readonly ShellSettings _shellSettings; private readonly ElasticIndexManager _elasticIndexManager; private readonly ElasticIndexSettingsService _elasticIndexSettingsService; - protected readonly IStringLocalizer S; + private readonly IStringLocalizer S; private readonly ILogger _logger; public ElasticIndexInitializerService( From a479f23b10e885448bbc24553389f798473ddee2 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Fri, 18 Oct 2024 02:14:57 +0300 Subject: [PATCH 03/14] Apply suggestions from code review Co-authored-by: Mike Alhayek --- .../Services/MediaBlobContainerTenantEvents.cs | 3 ++- .../Services/ElasticIndexInitializerService.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs b/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs index 944f3886ba8..4a3dceb89a4 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media.Azure/Services/MediaBlobContainerTenantEvents.cs @@ -15,7 +15,8 @@ public sealed class MediaBlobContainerTenantEvents : ModularTenantEvents private readonly MediaBlobStorageOptions _options; private readonly ShellSettings _shellSettings; private readonly ILogger _logger; - private readonly IStringLocalizer S; + + internal readonly IStringLocalizer S; public MediaBlobContainerTenantEvents( IOptions options, diff --git a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs index f3475033429..0bf0a2e16cc 100644 --- a/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs +++ b/src/OrchardCore/OrchardCore.Search.Elasticsearch.Core/Services/ElasticIndexInitializerService.cs @@ -18,7 +18,8 @@ public sealed class ElasticIndexInitializerService : ModularTenantEvents private readonly ShellSettings _shellSettings; private readonly ElasticIndexManager _elasticIndexManager; private readonly ElasticIndexSettingsService _elasticIndexSettingsService; - private readonly IStringLocalizer S; + + internal readonly IStringLocalizer S; private readonly ILogger _logger; public ElasticIndexInitializerService( From 22d9e14393a05c972f84715250ba9077baaf8f5d Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Sun, 24 Nov 2024 01:31:51 +0300 Subject: [PATCH 04/14] Seal IGlobalMethodProvider implementation --- .../OrchardCore.Contents/Scripting/ContentMethodsProvider.cs | 2 +- .../OrchardCore.Contents/Scripting/UrlMethodsProvider.cs | 2 +- .../OrchardCore.Layers/Services/DefaultLayersMethodProvider.cs | 2 +- .../OrchardCore.Queries/QueryGlobalMethodProvider.cs | 2 +- .../OrchardCore.Scripting/Providers/LogProvider.cs | 2 +- .../OrchardCore.Recipes.Core/ConfigurationMethodProvider.cs | 2 +- .../OrchardCore.Recipes.Core/ParametersMethodProvider.cs | 2 +- .../OrchardCore.Recipes.Core/VariablesMethodProvider.cs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Scripting/ContentMethodsProvider.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Scripting/ContentMethodsProvider.cs index d4007b1785a..c7265bbac54 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Scripting/ContentMethodsProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Scripting/ContentMethodsProvider.cs @@ -7,7 +7,7 @@ namespace OrchardCore.Contents.Scripting; -public class ContentMethodsProvider : IGlobalMethodProvider +public sealed class ContentMethodsProvider : IGlobalMethodProvider { private readonly GlobalMethod _newContentItemMethod; private readonly GlobalMethod _createContentItemMethod; diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Scripting/UrlMethodsProvider.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Scripting/UrlMethodsProvider.cs index 2480e823b43..8ea8b5318dc 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Scripting/UrlMethodsProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Scripting/UrlMethodsProvider.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Contents.Scripting; -public class UrlMethodsProvider : IGlobalMethodProvider +public sealed class UrlMethodsProvider : IGlobalMethodProvider { private readonly GlobalMethod _getUrlPrefix; diff --git a/src/OrchardCore.Modules/OrchardCore.Layers/Services/DefaultLayersMethodProvider.cs b/src/OrchardCore.Modules/OrchardCore.Layers/Services/DefaultLayersMethodProvider.cs index b4f19ccf52f..ca0113e2a95 100644 --- a/src/OrchardCore.Modules/OrchardCore.Layers/Services/DefaultLayersMethodProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Layers/Services/DefaultLayersMethodProvider.cs @@ -7,7 +7,7 @@ namespace OrchardCore.Layers.Services; -public class DefaultLayersMethodProvider : IGlobalMethodProvider +public sealed class DefaultLayersMethodProvider : IGlobalMethodProvider { private readonly GlobalMethod _isHomepage; private readonly GlobalMethod _isAnonymous; diff --git a/src/OrchardCore.Modules/OrchardCore.Queries/QueryGlobalMethodProvider.cs b/src/OrchardCore.Modules/OrchardCore.Queries/QueryGlobalMethodProvider.cs index a7471434ec9..d097df7a4a7 100644 --- a/src/OrchardCore.Modules/OrchardCore.Queries/QueryGlobalMethodProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Queries/QueryGlobalMethodProvider.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Queries; -public class QueryGlobalMethodProvider : IGlobalMethodProvider +public sealed class QueryGlobalMethodProvider : IGlobalMethodProvider { private readonly GlobalMethod _executeQuery; diff --git a/src/OrchardCore.Modules/OrchardCore.Scripting/Providers/LogProvider.cs b/src/OrchardCore.Modules/OrchardCore.Scripting/Providers/LogProvider.cs index e806158b600..46953e2ac0b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Scripting/Providers/LogProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Scripting/Providers/LogProvider.cs @@ -2,7 +2,7 @@ namespace OrchardCore.Scripting.Providers; -public class LogProvider : IGlobalMethodProvider +public sealed class LogProvider : IGlobalMethodProvider { private readonly GlobalMethod _log; diff --git a/src/OrchardCore/OrchardCore.Recipes.Core/ConfigurationMethodProvider.cs b/src/OrchardCore/OrchardCore.Recipes.Core/ConfigurationMethodProvider.cs index 3290d80b6c8..e6fd3bddf47 100644 --- a/src/OrchardCore/OrchardCore.Recipes.Core/ConfigurationMethodProvider.cs +++ b/src/OrchardCore/OrchardCore.Recipes.Core/ConfigurationMethodProvider.cs @@ -4,7 +4,7 @@ namespace OrchardCore.Recipes; -public class ConfigurationMethodProvider : IGlobalMethodProvider +public sealed class ConfigurationMethodProvider : IGlobalMethodProvider { private readonly GlobalMethod _globalMethod; diff --git a/src/OrchardCore/OrchardCore.Recipes.Core/ParametersMethodProvider.cs b/src/OrchardCore/OrchardCore.Recipes.Core/ParametersMethodProvider.cs index 3f4d4cb1313..4e99f7b6992 100644 --- a/src/OrchardCore/OrchardCore.Recipes.Core/ParametersMethodProvider.cs +++ b/src/OrchardCore/OrchardCore.Recipes.Core/ParametersMethodProvider.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Recipes; -public class ParametersMethodProvider : IGlobalMethodProvider +public sealed class ParametersMethodProvider : IGlobalMethodProvider { private readonly GlobalMethod _globalMethod; diff --git a/src/OrchardCore/OrchardCore.Recipes.Core/VariablesMethodProvider.cs b/src/OrchardCore/OrchardCore.Recipes.Core/VariablesMethodProvider.cs index 8f8627eb1b2..ce6dbad7c69 100644 --- a/src/OrchardCore/OrchardCore.Recipes.Core/VariablesMethodProvider.cs +++ b/src/OrchardCore/OrchardCore.Recipes.Core/VariablesMethodProvider.cs @@ -7,7 +7,7 @@ namespace OrchardCore.Recipes; -public class VariablesMethodProvider : IGlobalMethodProvider +public sealed class VariablesMethodProvider : IGlobalMethodProvider { private readonly GlobalMethod _globalMethod; private const string GlobalMethodName = "variables"; From 0cd9ef52a1fce7998cd657e2c728c4190f4e20db Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Sun, 24 Nov 2024 01:32:07 +0300 Subject: [PATCH 05/14] Seal IDocumentSerializer impelemntation --- .../Documents/DefaultDocumentSerializer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OrchardCore/OrchardCore.Infrastructure/Documents/DefaultDocumentSerializer.cs b/src/OrchardCore/OrchardCore.Infrastructure/Documents/DefaultDocumentSerializer.cs index f7c6dec9cec..36477fcbecb 100644 --- a/src/OrchardCore/OrchardCore.Infrastructure/Documents/DefaultDocumentSerializer.cs +++ b/src/OrchardCore/OrchardCore.Infrastructure/Documents/DefaultDocumentSerializer.cs @@ -8,7 +8,7 @@ namespace OrchardCore.Documents; /// /// Serializes and deserializes an into and from a sequence of bytes. /// -public class DefaultDocumentSerializer : IDocumentSerializer +public sealed class DefaultDocumentSerializer : IDocumentSerializer { private const string StreamTag = nameof(DefaultDocumentSerializer); From 8695e2199aa2f6122cb163eb255254706b4dce67 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Sun, 24 Nov 2024 01:33:29 +0300 Subject: [PATCH 06/14] Seal AuthorizationHandler implementation --- .../Security/LocalizeContentAuthorizationHandler.cs | 2 +- .../Security/ContentTypeAuthorizationHandler.cs | 2 +- .../Services/CustomSettingsAuthorizationHandler.cs | 2 +- .../Services/ManageMediaFolderAuthorizationHandler.cs | 2 +- .../Services/ViewMediaFolderAuthorizationHandler.cs | 2 +- .../Handlers/ElasticsearchAuthorizationHandler.cs | 2 +- .../Handler/LuceneAuthorizationHandler.cs | 2 +- .../OrchardCore.Users/Services/RoleAuthorizationHandler.cs | 2 +- .../Handlers/AzureAISearchAuthorizationHandler.cs | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Security/LocalizeContentAuthorizationHandler.cs b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Security/LocalizeContentAuthorizationHandler.cs index 408e17cd563..f92f13171ee 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Security/LocalizeContentAuthorizationHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Security/LocalizeContentAuthorizationHandler.cs @@ -7,7 +7,7 @@ namespace OrchardCore.ContentLocalization.Security; -public class LocalizeContentAuthorizationHandler : AuthorizationHandler +public sealed class LocalizeContentAuthorizationHandler : AuthorizationHandler { private readonly IServiceProvider _serviceProvider; private IAuthorizationService _authorizationService; diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Security/ContentTypeAuthorizationHandler.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Security/ContentTypeAuthorizationHandler.cs index 896f4a77aa2..af855138227 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Security/ContentTypeAuthorizationHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Security/ContentTypeAuthorizationHandler.cs @@ -7,7 +7,7 @@ namespace OrchardCore.Contents.Security; -public class ContentTypeAuthorizationHandler : AuthorizationHandler +public sealed class ContentTypeAuthorizationHandler : AuthorizationHandler { private readonly IServiceProvider _serviceProvider; private IAuthorizationService _authorizationService; diff --git a/src/OrchardCore.Modules/OrchardCore.CustomSettings/Services/CustomSettingsAuthorizationHandler.cs b/src/OrchardCore.Modules/OrchardCore.CustomSettings/Services/CustomSettingsAuthorizationHandler.cs index d00797633e6..e325e765532 100644 --- a/src/OrchardCore.Modules/OrchardCore.CustomSettings/Services/CustomSettingsAuthorizationHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.CustomSettings/Services/CustomSettingsAuthorizationHandler.cs @@ -5,7 +5,7 @@ namespace OrchardCore.CustomSettings.Services; -public class CustomSettingsAuthorizationHandler : AuthorizationHandler +public sealed class CustomSettingsAuthorizationHandler : AuthorizationHandler { private readonly IServiceProvider _serviceProvider; diff --git a/src/OrchardCore.Modules/OrchardCore.Media/Services/ManageMediaFolderAuthorizationHandler.cs b/src/OrchardCore.Modules/OrchardCore.Media/Services/ManageMediaFolderAuthorizationHandler.cs index 9172c79530a..7fcd00e8de6 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/Services/ManageMediaFolderAuthorizationHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/Services/ManageMediaFolderAuthorizationHandler.cs @@ -9,7 +9,7 @@ namespace OrchardCore.Media.Services; /// /// Checks if the user has related permission to manage the path resource which is passed from AuthorizationHandler. /// -public class ManageMediaFolderAuthorizationHandler : AuthorizationHandler +public sealed class ManageMediaFolderAuthorizationHandler : AuthorizationHandler { private readonly IServiceProvider _serviceProvider; private readonly AttachedMediaFieldFileService _attachedMediaFieldFileService; diff --git a/src/OrchardCore.Modules/OrchardCore.Media/Services/ViewMediaFolderAuthorizationHandler.cs b/src/OrchardCore.Modules/OrchardCore.Media/Services/ViewMediaFolderAuthorizationHandler.cs index 6c54d2ce5a1..9b5bbe51f2a 100644 --- a/src/OrchardCore.Modules/OrchardCore.Media/Services/ViewMediaFolderAuthorizationHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.Media/Services/ViewMediaFolderAuthorizationHandler.cs @@ -13,7 +13,7 @@ namespace OrchardCore.Media.Services; /// /// Checks if the user has related permission to view media in the path resource which is passed from AuthorizationHandler. /// -public class ViewMediaFolderAuthorizationHandler : AuthorizationHandler +public sealed class ViewMediaFolderAuthorizationHandler : AuthorizationHandler { private const char PathSeparator = '/'; diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Elasticsearch/Handlers/ElasticsearchAuthorizationHandler.cs b/src/OrchardCore.Modules/OrchardCore.Search.Elasticsearch/Handlers/ElasticsearchAuthorizationHandler.cs index 8e3f0e57dc3..1050ca0298e 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Elasticsearch/Handlers/ElasticsearchAuthorizationHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Elasticsearch/Handlers/ElasticsearchAuthorizationHandler.cs @@ -9,7 +9,7 @@ namespace OrchardCore.Search.Lucene.Handler; -public class ElasticsearchAuthorizationHandler(IServiceProvider serviceProvider) : AuthorizationHandler +public sealed class ElasticsearchAuthorizationHandler(IServiceProvider serviceProvider) : AuthorizationHandler { private readonly IServiceProvider _serviceProvider = serviceProvider; diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Handler/LuceneAuthorizationHandler.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Handler/LuceneAuthorizationHandler.cs index 3c0192efbe7..d610ce621bf 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Handler/LuceneAuthorizationHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Handler/LuceneAuthorizationHandler.cs @@ -8,7 +8,7 @@ namespace OrchardCore.Search.Lucene.Handler; -public class LuceneAuthorizationHandler(IServiceProvider serviceProvider) : AuthorizationHandler +public sealed class LuceneAuthorizationHandler(IServiceProvider serviceProvider) : AuthorizationHandler { private readonly IServiceProvider _serviceProvider = serviceProvider; diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Services/RoleAuthorizationHandler.cs b/src/OrchardCore.Modules/OrchardCore.Users/Services/RoleAuthorizationHandler.cs index f5c1cc3d974..39c72d0c643 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Services/RoleAuthorizationHandler.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Services/RoleAuthorizationHandler.cs @@ -8,7 +8,7 @@ namespace OrchardCore.Users.Services; -public class RoleAuthorizationHandler : AuthorizationHandler +public sealed class RoleAuthorizationHandler : AuthorizationHandler { private readonly IServiceProvider _serviceProvider; diff --git a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Handlers/AzureAISearchAuthorizationHandler.cs b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Handlers/AzureAISearchAuthorizationHandler.cs index 46ae0fbbf5e..df9078a0309 100644 --- a/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Handlers/AzureAISearchAuthorizationHandler.cs +++ b/src/OrchardCore/OrchardCore.Search.AzureAI.Core/Handlers/AzureAISearchAuthorizationHandler.cs @@ -8,7 +8,7 @@ namespace OrchardCore.Search.AzureAI.Handlers; -public class AzureAISearchAuthorizationHandler : AuthorizationHandler +public sealed class AzureAISearchAuthorizationHandler : AuthorizationHandler { private readonly IServiceProvider _serviceProvider; From 6a5df1516aacfa47651329edd6e95c57d95ee846 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Sun, 24 Nov 2024 01:35:29 +0300 Subject: [PATCH 07/14] Seal I*AdminListQueryService implementation --- .../Services/DefaultAuditTrailAdminListQueryService.cs | 2 +- .../Services/DefaultContentsAdminListQueryService.cs | 2 +- .../Services/DefaultUsersAdminListQueryService.cs | 2 +- .../DefaultNotificationsAdminListQueryService.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs index 45069577e40..51e20d4e350 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs @@ -10,7 +10,7 @@ namespace OrchardCore.AuditTrail.Services; -public class DefaultAuditTrailAdminListQueryService : IAuditTrailAdminListQueryService +public sealed class DefaultAuditTrailAdminListQueryService : IAuditTrailAdminListQueryService { private const string DateFormat = "yyyy-MM-dd"; private readonly IAuditTrailManager _auditTrailManager; diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListQueryService.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListQueryService.cs index fa73bd927be..a87029879de 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListQueryService.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListQueryService.cs @@ -9,7 +9,7 @@ namespace OrchardCore.Contents.Services; -public class DefaultContentsAdminListQueryService : IContentsAdminListQueryService +public sealed class DefaultContentsAdminListQueryService : IContentsAdminListQueryService { private static readonly string[] _operators = ["OR", "AND", "||", "&&"]; diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListQueryService.cs b/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListQueryService.cs index 3092dcb9734..914b9addd0f 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListQueryService.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListQueryService.cs @@ -9,7 +9,7 @@ namespace OrchardCore.Users.Services; -public class DefaultUsersAdminListQueryService : IUsersAdminListQueryService +public sealed class DefaultUsersAdminListQueryService : IUsersAdminListQueryService { private static readonly string[] _operators = ["OR", "AND", "||", "&&"]; diff --git a/src/OrchardCore/OrchardCore.Notifications.Core/DefaultNotificationsAdminListQueryService.cs b/src/OrchardCore/OrchardCore.Notifications.Core/DefaultNotificationsAdminListQueryService.cs index b542243774e..bf7fc03f28e 100644 --- a/src/OrchardCore/OrchardCore.Notifications.Core/DefaultNotificationsAdminListQueryService.cs +++ b/src/OrchardCore/OrchardCore.Notifications.Core/DefaultNotificationsAdminListQueryService.cs @@ -5,7 +5,7 @@ namespace OrchardCore.Navigation.Core; -public class DefaultNotificationsAdminListQueryService : INotificationsAdminListQueryService +public sealed class DefaultNotificationsAdminListQueryService : INotificationsAdminListQueryService { private readonly ISession _session; private readonly IServiceProvider _serviceProvider; From e0674ee52d0439db7767edfb49bc565bf00a32d9 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Sun, 24 Nov 2024 01:37:11 +0300 Subject: [PATCH 08/14] Seal I*AdminListFilterParser implementation --- .../Services/DefaultAuditTrailAdminListFilterParser.cs | 2 +- .../Services/DefaultContentsAdminListFilterParser.cs | 2 +- .../Services/DefaultUsersAdminListFilterParser.cs | 2 +- .../Services/DefaultNotificationAdminListFilterParser.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListFilterParser.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListFilterParser.cs index 261ecc25312..91655d3a1d9 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListFilterParser.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListFilterParser.cs @@ -3,7 +3,7 @@ namespace OrchardCore.AuditTrail.Services; -public class DefaultAuditTrailAdminListFilterParser : IAuditTrailAdminListFilterParser +public sealed class DefaultAuditTrailAdminListFilterParser : IAuditTrailAdminListFilterParser { private readonly IQueryParser _parser; diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListFilterParser.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListFilterParser.cs index 304cebe1524..cabb1d6cc09 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListFilterParser.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListFilterParser.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Contents.Services; -public class DefaultContentsAdminListFilterParser : IContentsAdminListFilterParser +public sealed class DefaultContentsAdminListFilterParser : IContentsAdminListFilterParser { private readonly IQueryParser _parser; diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListFilterParser.cs b/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListFilterParser.cs index 3b17cca0ce7..7283e96dc13 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListFilterParser.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListFilterParser.cs @@ -3,7 +3,7 @@ namespace OrchardCore.Users.Services; -public class DefaultUsersAdminListFilterParser : IUsersAdminListFilterParser +public sealed class DefaultUsersAdminListFilterParser : IUsersAdminListFilterParser { private readonly IQueryParser _parser; diff --git a/src/OrchardCore/OrchardCore.Notifications.Core/Services/DefaultNotificationAdminListFilterParser.cs b/src/OrchardCore/OrchardCore.Notifications.Core/Services/DefaultNotificationAdminListFilterParser.cs index b117b100790..e853e02a111 100644 --- a/src/OrchardCore/OrchardCore.Notifications.Core/Services/DefaultNotificationAdminListFilterParser.cs +++ b/src/OrchardCore/OrchardCore.Notifications.Core/Services/DefaultNotificationAdminListFilterParser.cs @@ -2,7 +2,7 @@ namespace OrchardCore.Notifications.Services; -public class DefaultNotificationAdminListFilterParser : INotificationAdminListFilterParser +public sealed class DefaultNotificationAdminListFilterParser : INotificationAdminListFilterParser { private readonly IQueryParser _parser; From e5d2bae3a9434d673d27d166a4f1d99216176a63 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Sun, 24 Nov 2024 01:38:50 +0300 Subject: [PATCH 09/14] Seal I*AdminListFilterProvider implementation --- .../Services/DefaultAuditTrailAdminListFilterProvider.cs | 2 +- .../Services/LocalizationPartContentsAdminListFilterProvider.cs | 2 +- .../Services/DefaultContentsAdminListFilterProvider.cs | 2 +- .../Services/DefaultUsersAdminListFilterProvider.cs | 2 +- .../OrchardCore.Users/Services/RolesAdminListFilterProvider.cs | 2 +- .../DefaultNotificationsAdminListFilterProvider.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListFilterProvider.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListFilterProvider.cs index 9cee1010c33..c9997a4a0f7 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListFilterProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListFilterProvider.cs @@ -14,7 +14,7 @@ namespace OrchardCore.AuditTrail.Services; -public class DefaultAuditTrailAdminListFilterProvider : IAuditTrailAdminListFilterProvider +public sealed class DefaultAuditTrailAdminListFilterProvider : IAuditTrailAdminListFilterProvider { private readonly IOptions _options; diff --git a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Services/LocalizationPartContentsAdminListFilterProvider.cs b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Services/LocalizationPartContentsAdminListFilterProvider.cs index dab20e98358..9620fcd6a69 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Services/LocalizationPartContentsAdminListFilterProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentLocalization/Services/LocalizationPartContentsAdminListFilterProvider.cs @@ -6,7 +6,7 @@ namespace OrchardCore.ContentLocalization.Services; -public class LocalizationPartContentsAdminListFilterProvider : IContentsAdminListFilterProvider +public sealed class LocalizationPartContentsAdminListFilterProvider : IContentsAdminListFilterProvider { public void Build(QueryEngineBuilder builder) { diff --git a/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListFilterProvider.cs b/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListFilterProvider.cs index 6df9cfe1956..370d7c6017e 100644 --- a/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListFilterProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Contents/Services/DefaultContentsAdminListFilterProvider.cs @@ -13,7 +13,7 @@ namespace OrchardCore.Contents.Services; -public class DefaultContentsAdminListFilterProvider : IContentsAdminListFilterProvider +public sealed class DefaultContentsAdminListFilterProvider : IContentsAdminListFilterProvider { public void Build(QueryEngineBuilder builder) { diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListFilterProvider.cs b/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListFilterProvider.cs index d194a2389ae..1a5a8af2f70 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListFilterProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Services/DefaultUsersAdminListFilterProvider.cs @@ -8,7 +8,7 @@ namespace OrchardCore.Users.Services; -public class DefaultUsersAdminListFilterProvider : IUsersAdminListFilterProvider +public sealed class DefaultUsersAdminListFilterProvider : IUsersAdminListFilterProvider { public void Build(QueryEngineBuilder builder) { diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Services/RolesAdminListFilterProvider.cs b/src/OrchardCore.Modules/OrchardCore.Users/Services/RolesAdminListFilterProvider.cs index 57a6939112e..989adf026ee 100644 --- a/src/OrchardCore.Modules/OrchardCore.Users/Services/RolesAdminListFilterProvider.cs +++ b/src/OrchardCore.Modules/OrchardCore.Users/Services/RolesAdminListFilterProvider.cs @@ -9,7 +9,7 @@ namespace OrchardCore.Users.Services; -public class RolesAdminListFilterProvider : IUsersAdminListFilterProvider +public sealed class RolesAdminListFilterProvider : IUsersAdminListFilterProvider { public void Build(QueryEngineBuilder builder) { diff --git a/src/OrchardCore/OrchardCore.Notifications.Core/DefaultNotificationsAdminListFilterProvider.cs b/src/OrchardCore/OrchardCore.Notifications.Core/DefaultNotificationsAdminListFilterProvider.cs index 034fa43571d..1148ad1d026 100644 --- a/src/OrchardCore/OrchardCore.Notifications.Core/DefaultNotificationsAdminListFilterProvider.cs +++ b/src/OrchardCore/OrchardCore.Notifications.Core/DefaultNotificationsAdminListFilterProvider.cs @@ -10,7 +10,7 @@ namespace OrchardCore.Notifications; -public class DefaultNotificationsAdminListFilterProvider : INotificationAdminListFilterProvider +public sealed class DefaultNotificationsAdminListFilterProvider : INotificationAdminListFilterProvider { public void Build(QueryEngineBuilder builder) { From 1702d72a5a495cd2b1d30731e1170b2e4156af40 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Sun, 24 Nov 2024 01:41:23 +0300 Subject: [PATCH 10/14] Add to release notes --- src/docs/releases/3.0.0.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/docs/releases/3.0.0.md b/src/docs/releases/3.0.0.md index 14ed4171d90..b02c9c2028a 100644 --- a/src/docs/releases/3.0.0.md +++ b/src/docs/releases/3.0.0.md @@ -48,3 +48,9 @@ The following obsolete settings were removed from `LoginSettings` class #### Login View Update The `ExternalLogin` action has been removed from the `Account` controller. If you are using a custom `Login.cshtml` view or `Login` template, please update the external login form action. As of this update, the `ExternalLogin` action has been relocated to the `ExternalAuthentications` controller. + +### Sealing Types + +Many type commonly used by modules can be `sealed`, which improves runtime performance. While it's not mandatory, we recommend that you consider applying this improvement to your own extensions as well. We've implemented this enhancement in the following pull-request: + +- [16897](https://github.com/OrchardCMS/OrchardCore/pull/16897) From 7f9e0ca310af3f0e4c6fd44ca190fbe5a26d6665 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Sun, 24 Nov 2024 01:50:47 +0300 Subject: [PATCH 11/14] Fix the build --- .../Services/DefaultAuditTrailAdminListQueryService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs index 51e20d4e350..40e7bdfa2c4 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs @@ -18,7 +18,7 @@ public sealed class DefaultAuditTrailAdminListQueryService : IAuditTrailAdminLis private readonly AuditTrailAdminListOptions _adminListOptions; private readonly ISession _session; private readonly IServiceProvider _serviceProvider; - protected readonly IStringLocalizer S; + private readonly IStringLocalizer S; public DefaultAuditTrailAdminListQueryService( IAuditTrailManager auditTrailManager, From d30bf2a6f0d04c22c682d33ebbf1b754f11fdae3 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Tue, 26 Nov 2024 00:37:31 +0300 Subject: [PATCH 12/14] Update src/docs/releases/3.0.0.md --- src/docs/releases/3.0.0.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/docs/releases/3.0.0.md b/src/docs/releases/3.0.0.md index 6141f4c3d08..787ab615af9 100644 --- a/src/docs/releases/3.0.0.md +++ b/src/docs/releases/3.0.0.md @@ -55,6 +55,4 @@ The `AssignRoleToUsers` permission is no longer implicitly granted by `EditUsers ### Sealing Types -Many type commonly used by modules can be `sealed`, which improves runtime performance. While it's not mandatory, we recommend that you consider applying this improvement to your own extensions as well. We've implemented this enhancement in the following pull-request: - -- [16897](https://github.com/OrchardCMS/OrchardCore/pull/16897) +Many type commonly used by modules can be `sealed`, which improves runtime performance. While it's not mandatory, we recommend that you consider applying this improvement to your own extensions as well. We've implemented this enhancement in the following pull request [16897](https://github.com/OrchardCMS/OrchardCore/pull/16897) From bd7d478060dc83fbee674ef995134c339f6ce75d Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Tue, 26 Nov 2024 15:49:15 -0800 Subject: [PATCH 13/14] internal --- .../Services/DefaultAuditTrailAdminListQueryService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs index 40e7bdfa2c4..4577edf69f5 100644 --- a/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs +++ b/src/OrchardCore.Modules/OrchardCore.AuditTrail/Services/DefaultAuditTrailAdminListQueryService.cs @@ -18,7 +18,8 @@ public sealed class DefaultAuditTrailAdminListQueryService : IAuditTrailAdminLis private readonly AuditTrailAdminListOptions _adminListOptions; private readonly ISession _session; private readonly IServiceProvider _serviceProvider; - private readonly IStringLocalizer S; + + internal readonly IStringLocalizer S; public DefaultAuditTrailAdminListQueryService( IAuditTrailManager auditTrailManager, From e75f3e4043a160c4b31f35159d2bad91d601d216 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Tue, 26 Nov 2024 15:50:25 -0800 Subject: [PATCH 14/14] docs --- src/docs/releases/3.0.0.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/docs/releases/3.0.0.md b/src/docs/releases/3.0.0.md index 402e87bea72..d5bc86c016e 100644 --- a/src/docs/releases/3.0.0.md +++ b/src/docs/releases/3.0.0.md @@ -88,9 +88,8 @@ The `ExternalLogin` action has been removed from the `Account` controller. If yo The `AssignRoleToUsers` permission is no longer implicitly granted by `EditUsers`. To maintain the same behavior, make sure to explicitly assign the `AssignRoleToUsers` permission to any role that already has the `EditUsers` permission. - ### Sealing Types -Many type commonly used by modules can be `sealed`, which improves runtime performance. While it's not mandatory, we recommend that you consider applying this improvement to your own extensions as well. We've implemented this enhancement in the following pull request [16897](https://github.com/OrchardCMS/OrchardCore/pull/16897) +Many type commonly used by classes can be `sealed`, which improves runtime performance. While it's not mandatory, we recommend that you consider applying this improvement to your own extensions as well. We've implemented this enhancement in pull request [#16897](https://github.com/OrchardCMS/OrchardCore/pull/16897). ## Change Log