From eb53b4668b09323703aab2be5f3c39c8998f9012 Mon Sep 17 00:00:00 2001 From: Hoang Date: Fri, 8 Dec 2023 16:50:15 -0800 Subject: [PATCH] Minor spelling corrections --- .../Contact/ValidateContact.cs | 13 +++++++------ ...remissions.cs => GenerateFacilityPermissions.cs} | 6 +++--- .../Processes/Emails/P200EmailReminderProvider.cs | 5 +++-- .../Emails/P205SendNotificationProvider.cs | 3 ++- 4 files changed, 15 insertions(+), 12 deletions(-) rename OFM.Infrastructure.Plugins/Contact/{GenerateFacilityPremissions.cs => GenerateFacilityPermissions.cs} (96%) diff --git a/OFM.Infrastructure.CustomWorkflowActivities/Contact/ValidateContact.cs b/OFM.Infrastructure.CustomWorkflowActivities/Contact/ValidateContact.cs index 5ee2d1bc..0da4b94e 100644 --- a/OFM.Infrastructure.CustomWorkflowActivities/Contact/ValidateContact.cs +++ b/OFM.Infrastructure.CustomWorkflowActivities/Contact/ValidateContact.cs @@ -8,7 +8,13 @@ namespace OFM.Infrastructure.CustomWorkflowActivities.Contact { public sealed class ValidateContact : CodeActivity - { + { + [Output("Valid")] + public OutArgument valid { get; set; } + + [Output("Validate Message")] + public OutArgument message { get; set; } + protected override void Execute(CodeActivityContext executionContext) { ITracingService tracingService = executionContext.GetExtension(); @@ -38,10 +44,5 @@ protected override void Execute(CodeActivityContext executionContext) this.message.Set(executionContext, "a message."); } - [Output("Valid")] - public OutArgument valid { get; set; } - - [Output("Validate Message")] - public OutArgument message { get; set; } } } \ No newline at end of file diff --git a/OFM.Infrastructure.Plugins/Contact/GenerateFacilityPremissions.cs b/OFM.Infrastructure.Plugins/Contact/GenerateFacilityPermissions.cs similarity index 96% rename from OFM.Infrastructure.Plugins/Contact/GenerateFacilityPremissions.cs rename to OFM.Infrastructure.Plugins/Contact/GenerateFacilityPermissions.cs index b7361e32..c49e732e 100644 --- a/OFM.Infrastructure.Plugins/Contact/GenerateFacilityPremissions.cs +++ b/OFM.Infrastructure.Plugins/Contact/GenerateFacilityPermissions.cs @@ -16,10 +16,10 @@ namespace OFM.Infrastructure.Plugins.Contact /// Plugin development guide: https://docs.microsoft.com/powerapps/developer/common-data-service/plug-ins /// Best practices and guidance: https://docs.microsoft.com/powerapps/developer/common-data-service/best-practices/business-logic/ /// - public class GenerateFacilityPremissions : PluginBase + public class GenerateFacilityPermissions : PluginBase { - public GenerateFacilityPremissions(string unsecureConfiguration, string secureConfiguration) - : base(typeof(GenerateFacilityPremissions)) + public GenerateFacilityPermissions(string unsecureConfiguration, string secureConfiguration) + : base(typeof(GenerateFacilityPermissions)) { // TODO: Implement your custom configuration handling // https://docs.microsoft.com/powerapps/developer/common-data-service/register-plug-in#set-configuration-data diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/Emails/P200EmailReminderProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/Emails/P200EmailReminderProvider.cs index e32246fa..3011bcce 100644 --- a/OFM.Infrastructure.WebAPI/Services/Processes/Emails/P200EmailReminderProvider.cs +++ b/OFM.Infrastructure.WebAPI/Services/Processes/Emails/P200EmailReminderProvider.cs @@ -21,8 +21,8 @@ public class P200EmailReminderProvider : ID365ProcessProvider private readonly ILogger _logger; private readonly TimeProvider _timeProvider; private ProcessData? _data; - private string[] _activeCommunicationTypes = Array.Empty(); - private string[] _communicationTypesForUnreadReminders = Array.Empty(); + private string[] _activeCommunicationTypes = []; + private string[] _communicationTypesForUnreadReminders = []; private string _requestUri = string.Empty; public P200EmailReminderProvider(IOptionsSnapshot notificationSettings, ID365AppUserService appUserService, ID365WebApiService d365WebApiService, ILoggerFactory loggerFactory, TimeProvider timeProvider) @@ -48,6 +48,7 @@ public string RequestUri { var communicationTypesString = _activeCommunicationTypes.Aggregate((partialPhrase, id) => $"{partialPhrase},{id}"); + //for reference only var fetchXml = $""" diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/Emails/P205SendNotificationProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/Emails/P205SendNotificationProvider.cs index c2aef21d..6f4b53df 100644 --- a/OFM.Infrastructure.WebAPI/Services/Processes/Emails/P205SendNotificationProvider.cs +++ b/OFM.Infrastructure.WebAPI/Services/Processes/Emails/P205SendNotificationProvider.cs @@ -238,6 +238,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService { recipientsList.Add($"contacts({contact.contactid})"); }); + string subject = string.Empty; string emaildescription = string.Empty; @@ -341,7 +342,7 @@ private async Task GetTemplateToSendEmail() if (!response.IsSuccessStatusCode) { var responseBody = await response.Content.ReadAsStringAsync(); - _logger.LogError(CustomLogEvent.Process, "Failed to query Emmail Tempalte to update with the server error {responseBody}", responseBody.CleanLog()); + _logger.LogError(CustomLogEvent.Process, "Failed to query Emmail Template to update with the server error {responseBody}", responseBody.CleanLog()); return await Task.FromResult(new ProcessData(string.Empty)); }