From 69c44028b18e9a1971630865585f62676a8afb42 Mon Sep 17 00:00:00 2001 From: jtkech Date: Wed, 13 Sep 2023 03:27:13 +0200 Subject: [PATCH 1/2] Missing language types in .cs --- .../OrchardCore.Facebook/Filters/FBInitFilter.cs | 2 +- .../Http/Filters/WorkflowActionFilter.cs | 4 ++-- .../Http/Services/WorkflowInstanceRouteEntries.cs | 2 +- .../RequireSettings.cs | 2 +- .../Settings/MyTestPartSettingsDisplayDriver.cs | 4 ++-- .../Modules/Manifest/FeatureAttributeTests.Attribute.cs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Facebook/Filters/FBInitFilter.cs b/src/OrchardCore.Modules/OrchardCore.Facebook/Filters/FBInitFilter.cs index 7618d431c25..9ef00fa13d9 100644 --- a/src/OrchardCore.Modules/OrchardCore.Facebook/Filters/FBInitFilter.cs +++ b/src/OrchardCore.Modules/OrchardCore.Facebook/Filters/FBInitFilter.cs @@ -29,7 +29,7 @@ public async Task OnResultExecutionAsync(ResultExecutingContext context, ResultE { var site = (await _siteService.GetSiteSettingsAsync()); var settings = site.As(); - if (!String.IsNullOrWhiteSpace(settings?.AppId)) + if (!string.IsNullOrWhiteSpace(settings?.AppId)) { if (settings.FBInit) { diff --git a/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Filters/WorkflowActionFilter.cs b/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Filters/WorkflowActionFilter.cs index 9da4c5d610d..29e8158603b 100644 --- a/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Filters/WorkflowActionFilter.cs +++ b/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Filters/WorkflowActionFilter.cs @@ -44,13 +44,13 @@ public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionE if (workflowTypeEntries.Any()) { - var workflowTypeIds = workflowTypeEntries.Select(x => Int64.Parse(x.WorkflowId)).ToList(); + var workflowTypeIds = workflowTypeEntries.Select(x => long.Parse(x.WorkflowId)).ToList(); var workflowTypes = (await _workflowTypeStore.GetAsync(workflowTypeIds)).ToDictionary(x => x.Id); var correlationId = routeValues.GetValue("correlationid"); foreach (var entry in workflowTypeEntries) { - if (workflowTypes.TryGetValue(Int64.Parse(entry.WorkflowId), out var workflowType)) + if (workflowTypes.TryGetValue(long.Parse(entry.WorkflowId), out var workflowType)) { var activity = workflowType.Activities.Single(x => x.ActivityId == entry.ActivityId); diff --git a/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Services/WorkflowInstanceRouteEntries.cs b/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Services/WorkflowInstanceRouteEntries.cs index 448a9973786..0a42033d2bb 100644 --- a/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Services/WorkflowInstanceRouteEntries.cs +++ b/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Services/WorkflowInstanceRouteEntries.cs @@ -63,7 +63,7 @@ internal static IEnumerable GetWorkflowRoutesEntries(Workfl var activity = activityLibrary.InstantiateActivity(x); var entry = new WorkflowRoutesEntry { - WorkflowId = workflow.WorkflowId, + WorkflowId = workflow.Id.ToString(), ActivityId = x.ActivityId, HttpMethod = activity.HttpMethod, RouteValues = activity.RouteValues, diff --git a/src/OrchardCore/OrchardCore.ResourceManagement.Abstractions/RequireSettings.cs b/src/OrchardCore/OrchardCore.ResourceManagement.Abstractions/RequireSettings.cs index c01c2eb60c0..ab4cf9c069c 100644 --- a/src/OrchardCore/OrchardCore.ResourceManagement.Abstractions/RequireSettings.cs +++ b/src/OrchardCore/OrchardCore.ResourceManagement.Abstractions/RequireSettings.cs @@ -82,7 +82,7 @@ public RequireSettings AtLocation(ResourceLocation location) [MethodImpl(MethodImplOptions.AggressiveInlining)] public RequireSettings UseCulture(string cultureName) { - if (!String.IsNullOrEmpty(cultureName)) + if (!string.IsNullOrEmpty(cultureName)) { Culture = cultureName; } diff --git a/src/Templates/OrchardCore.ProjectTemplates/content/OrchardCore.Templates.Cms.Module/Settings/MyTestPartSettingsDisplayDriver.cs b/src/Templates/OrchardCore.ProjectTemplates/content/OrchardCore.Templates.Cms.Module/Settings/MyTestPartSettingsDisplayDriver.cs index ed6a53e9519..bea241dbf06 100644 --- a/src/Templates/OrchardCore.ProjectTemplates/content/OrchardCore.Templates.Cms.Module/Settings/MyTestPartSettingsDisplayDriver.cs +++ b/src/Templates/OrchardCore.ProjectTemplates/content/OrchardCore.Templates.Cms.Module/Settings/MyTestPartSettingsDisplayDriver.cs @@ -12,7 +12,7 @@ public class MyTestPartSettingsDisplayDriver : ContentTypePartDefinitionDisplayD { public override IDisplayResult Edit(ContentTypePartDefinition contentTypePartDefinition, IUpdateModel updater) { - if (!String.Equals(nameof(MyTestPart), contentTypePartDefinition.PartDefinition.Name)) + if (!string.Equals(nameof(MyTestPart), contentTypePartDefinition.PartDefinition.Name)) { return null; } @@ -28,7 +28,7 @@ public override IDisplayResult Edit(ContentTypePartDefinition contentTypePartDef public override async Task UpdateAsync(ContentTypePartDefinition contentTypePartDefinition, UpdateTypePartEditorContext context) { - if (!String.Equals(nameof(MyTestPart), contentTypePartDefinition.PartDefinition.Name)) + if (!string.Equals(nameof(MyTestPart), contentTypePartDefinition.PartDefinition.Name)) { return null; } diff --git a/test/OrchardCore.Abstractions.Tests/Modules/Manifest/FeatureAttributeTests.Attribute.cs b/test/OrchardCore.Abstractions.Tests/Modules/Manifest/FeatureAttributeTests.Attribute.cs index 93d5f2645d9..3b75b2ff89b 100644 --- a/test/OrchardCore.Abstractions.Tests/Modules/Manifest/FeatureAttributeTests.Attribute.cs +++ b/test/OrchardCore.Abstractions.Tests/Modules/Manifest/FeatureAttributeTests.Attribute.cs @@ -245,7 +245,7 @@ protected readonly struct RenderKeyValuePair /// /// /// - /// Given value may be Null, Nullable, Sring, or Boolean. Otherwise, + /// Given value may be Null, Nullable, String, or Boolean. Otherwise, /// makes a best effort to convert directly to string. private static string DefaultRender(object _) { From 27d64171c8336d76754baf8c8e07b24e513f1b80 Mon Sep 17 00:00:00 2001 From: jtkech Date: Wed, 13 Sep 2023 06:00:01 +0200 Subject: [PATCH 2/2] Revert unrelated change --- .../Http/Services/WorkflowInstanceRouteEntries.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Services/WorkflowInstanceRouteEntries.cs b/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Services/WorkflowInstanceRouteEntries.cs index 0a42033d2bb..448a9973786 100644 --- a/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Services/WorkflowInstanceRouteEntries.cs +++ b/src/OrchardCore.Modules/OrchardCore.Workflows/Http/Services/WorkflowInstanceRouteEntries.cs @@ -63,7 +63,7 @@ internal static IEnumerable GetWorkflowRoutesEntries(Workfl var activity = activityLibrary.InstantiateActivity(x); var entry = new WorkflowRoutesEntry { - WorkflowId = workflow.Id.ToString(), + WorkflowId = workflow.WorkflowId, ActivityId = x.ActivityId, HttpMethod = activity.HttpMethod, RouteValues = activity.RouteValues,