From 8d320efb8f1ddf57e1464710541966932b508877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Mon, 29 Jul 2024 23:33:26 +0200 Subject: [PATCH 01/12] Update OC version. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 516dba95f..af5697adf 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - 2.0.0-preview-18282 + 2.0.0-preview-18287 10.0.1-alpha.3.occ-245 10.0.2-alpha.1.occ-245 From c9c1444c849204dd4ec29b32a7b001a33eb864db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 30 Jul 2024 11:40:45 +0200 Subject: [PATCH 02/12] Update OC preview version again (sigh). --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index af5697adf..17898f8bd 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - 2.0.0-preview-18287 + 2.0.0-preview-18288 10.0.1-alpha.3.occ-245 10.0.2-alpha.1.occ-245 From b8147c28b31f17df843d2ca550adc2a95faadb8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 31 Jul 2024 14:47:39 +0200 Subject: [PATCH 03/12] Delete temporary extension. --- .../Endpoints/Extentions/HttpContextExtensions.cs | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/Modules/OrchardCore.Commerce/Endpoints/Extentions/HttpContextExtensions.cs diff --git a/src/Modules/OrchardCore.Commerce/Endpoints/Extentions/HttpContextExtensions.cs b/src/Modules/OrchardCore.Commerce/Endpoints/Extentions/HttpContextExtensions.cs deleted file mode 100644 index 314cfd66f..000000000 --- a/src/Modules/OrchardCore.Commerce/Endpoints/Extentions/HttpContextExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Microsoft.AspNetCore.Http; - -namespace OrchardCore.Modules; - -/// -/// Copy from orchardcore 2.0 branch, will be deleted after merge to OC 2.0. -/// -public static class HttpContextExtensions -{ - public static IResult ChallengeOrForbid(this HttpContext httpContext, params string[] authenticationSchemes) => - httpContext.User?.Identity?.IsAuthenticated == true - ? TypedResults.Forbid(authenticationSchemes: authenticationSchemes) - : TypedResults.Challenge(authenticationSchemes: authenticationSchemes); -} From 4d6ced6bbc2d6d0b0ce7b781b102c9aea6595299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 2 Aug 2024 16:09:27 +0200 Subject: [PATCH 04/12] Use the new AddDeployment extension that registers the underlying polymorphic JSON type too. --- src/Modules/OrchardCore.Commerce/Startup.cs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/Modules/OrchardCore.Commerce/Startup.cs b/src/Modules/OrchardCore.Commerce/Startup.cs index 0e2862460..0ff7e9ceb 100644 --- a/src/Modules/OrchardCore.Commerce/Startup.cs +++ b/src/Modules/OrchardCore.Commerce/Startup.cs @@ -256,18 +256,14 @@ public class DeploymentStartup : StartupBase { public override void ConfigureServices(IServiceCollection services) { - services.AddTransient>(); - services.AddScoped>(serviceProvider => - { - // It's the IStringLocalizer. -#pragma warning disable SA1312 // Variable names should begin with lower-case letter - var T = serviceProvider.GetService>(); -#pragma warning restore SA1312 // Variable names should begin with lower-case letter - return new SiteSettingsPropertyDeploymentStepDriver( - T["Region settings"], - T["Exports the region settings."]); - }); - services.AddSingleton(new SiteSettingsPropertyDeploymentStepFactory()); + services.AddDeployment, SiteSettingsPropertyDeploymentStep>(); + services.AddScoped(ImplementationFactory); + } + + private IDisplayDriver ImplementationFactory(IServiceProvider serviceProvider) + { + var T = serviceProvider.GetService>(); + return new SiteSettingsPropertyDeploymentStepDriver(T["Region settings"], T["Exports the region settings."]); } } From a084f2545ee7164149d1ba945ba13b6fc1579400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 2 Aug 2024 16:17:33 +0200 Subject: [PATCH 05/12] Suppress. --- src/Modules/OrchardCore.Commerce/Startup.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Modules/OrchardCore.Commerce/Startup.cs b/src/Modules/OrchardCore.Commerce/Startup.cs index 0ff7e9ceb..e5964a850 100644 --- a/src/Modules/OrchardCore.Commerce/Startup.cs +++ b/src/Modules/OrchardCore.Commerce/Startup.cs @@ -55,6 +55,7 @@ using OrchardCore.Users.Models; using OrchardCore.Workflows.Helpers; using System; +using System.Diagnostics.CodeAnalysis; using YesSql.Indexes; using static OrchardCore.Commerce.Tax.Constants.FeatureIds; @@ -260,6 +261,7 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(ImplementationFactory); } + [SuppressMessage("Naming Rules", "SA1312:Variable names should begin with lower-case letter", Justification = "It's the IStringLocalizer.")] private IDisplayDriver ImplementationFactory(IServiceProvider serviceProvider) { var T = serviceProvider.GetService>(); From 5c342316b71c38207880fffbd45166020c30a8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 13 Aug 2024 11:27:19 +0200 Subject: [PATCH 06/12] Update OC previews. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 17898f8bd..4fe0e6ff4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - 2.0.0-preview-18288 + 2.0.0-preview-18305 10.0.1-alpha.3.occ-245 10.0.2-alpha.1.occ-245 From ba0f7617b280f6defd611beefb490809eb10ea5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 18 Aug 2024 01:38:44 +0200 Subject: [PATCH 07/12] Update OC preview version. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 03ce42132..3f36deff0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - 2.0.0-preview-18305 + 2.0.0-preview-18309 10.0.1-alpha.6.occ-280 10.0.2-alpha.3.occ-280 From 254182073f932bc94df5de19066c33888fc066fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 20 Aug 2024 12:32:19 +0200 Subject: [PATCH 08/12] Update OC preview version. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 3f36deff0..be4b3e729 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - 2.0.0-preview-18309 + 2.0.0-preview-18312 10.0.1-alpha.6.occ-280 10.0.2-alpha.3.occ-280 From 671182d3f0f32497fdc25c34730668e88f4e0e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 20 Aug 2024 23:30:51 +0200 Subject: [PATCH 09/12] Rename to localizer. --- src/Modules/OrchardCore.Commerce/Startup.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Modules/OrchardCore.Commerce/Startup.cs b/src/Modules/OrchardCore.Commerce/Startup.cs index e5964a850..0e40cdb1f 100644 --- a/src/Modules/OrchardCore.Commerce/Startup.cs +++ b/src/Modules/OrchardCore.Commerce/Startup.cs @@ -55,7 +55,6 @@ using OrchardCore.Users.Models; using OrchardCore.Workflows.Helpers; using System; -using System.Diagnostics.CodeAnalysis; using YesSql.Indexes; using static OrchardCore.Commerce.Tax.Constants.FeatureIds; @@ -261,11 +260,12 @@ public override void ConfigureServices(IServiceCollection services) services.AddScoped(ImplementationFactory); } - [SuppressMessage("Naming Rules", "SA1312:Variable names should begin with lower-case letter", Justification = "It's the IStringLocalizer.")] private IDisplayDriver ImplementationFactory(IServiceProvider serviceProvider) { - var T = serviceProvider.GetService>(); - return new SiteSettingsPropertyDeploymentStepDriver(T["Region settings"], T["Exports the region settings."]); + var localizer = serviceProvider.GetService>(); + return new SiteSettingsPropertyDeploymentStepDriver( + localizer["Region settings"], + localizer["Exports the region settings."]); } } From 37ab46c2bf988fc3ab931522b3e9687a4dcc9e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 21 Aug 2024 17:58:00 +0200 Subject: [PATCH 10/12] Update OC preview version. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index be4b3e729..3bc735226 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - 2.0.0-preview-18312 + 2.0.0-preview-18313 10.0.1-alpha.6.occ-280 10.0.2-alpha.3.occ-280 From 43fbba1dec8353cc6ee0f8e289ac541942285f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 23 Aug 2024 12:51:44 +0200 Subject: [PATCH 11/12] Update OC preview version. --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 3bc735226..f7b47c9ea 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - 2.0.0-preview-18313 + 2.0.0-preview-18315 10.0.1-alpha.6.occ-280 10.0.2-alpha.3.occ-280 From 8b746045a26a8fd9875657f835f19a409667a2a7 Mon Sep 17 00:00:00 2001 From: Hisham Bin Ateya Date: Fri, 23 Aug 2024 21:29:04 +0300 Subject: [PATCH 12/12] Add new line --- src/Modules/OrchardCore.Commerce/Startup.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Modules/OrchardCore.Commerce/Startup.cs b/src/Modules/OrchardCore.Commerce/Startup.cs index eb3f8ffe4..e0bf0f7b9 100644 --- a/src/Modules/OrchardCore.Commerce/Startup.cs +++ b/src/Modules/OrchardCore.Commerce/Startup.cs @@ -265,6 +265,7 @@ public override void ConfigureServices(IServiceCollection services) private IDisplayDriver ImplementationFactory(IServiceProvider serviceProvider) { var localizer = serviceProvider.GetService>(); + return new SiteSettingsPropertyDeploymentStepDriver( localizer["Region settings"], localizer["Exports the region settings."]);