Implemented service bus handling of emails and notification processing
continuous-integration/drone/pr Build is passing
continuous-integration/drone/pr Build is passing
This commit is contained in:
@@ -24,13 +24,13 @@ public class CreateNotificationCommand : IRequest<Result<Guid>>
|
||||
|
||||
public string? CorrelationId { get; set; }
|
||||
|
||||
public string? CorrelationIdType { get; set; }
|
||||
public CorrelationIdTypes CorrelationIdType { get; set; }
|
||||
|
||||
public bool IsInternal { get; set; }
|
||||
|
||||
public bool IsHtml { get; set; }
|
||||
|
||||
private CreateNotificationCommand(NotificationDirection direction, string sender, string senderAddress, string subject, string message, NotificationPlatforms platform, Priorities priority, string recipient, string recipientAddress, string correlationId, string correlationIdType, bool isInternal, bool isHtml = false)
|
||||
private CreateNotificationCommand(NotificationDirection direction, string sender, string senderAddress, string subject, string message, NotificationPlatforms platform, Priorities priority, string recipient, string recipientAddress, string correlationId, CorrelationIdTypes correlationIdType, bool isInternal, bool isHtml = false)
|
||||
{
|
||||
Direction = direction;
|
||||
Sender = sender;
|
||||
@@ -47,7 +47,7 @@ public class CreateNotificationCommand : IRequest<Result<Guid>>
|
||||
IsHtml = isHtml;
|
||||
}
|
||||
|
||||
public static CreateNotificationCommand Create(NotificationDirection direction, string sender, string senderAddress, string subject, string message, NotificationPlatforms platform, Priorities priority, string recipient, string recipientAddress, string correlationId, string correlationIdType, bool isInternal, bool isHtml = false)
|
||||
public static CreateNotificationCommand Create(NotificationDirection direction, string sender, string senderAddress, string subject, string message, NotificationPlatforms platform, Priorities priority, string recipient, string recipientAddress, string correlationId, CorrelationIdTypes correlationIdType, bool isInternal, bool isHtml = false)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(sender))
|
||||
throw new ArgumentException("Sender name is required.", nameof(sender));
|
||||
@@ -67,9 +67,6 @@ public class CreateNotificationCommand : IRequest<Result<Guid>>
|
||||
if (string.IsNullOrWhiteSpace(correlationId))
|
||||
throw new ArgumentException("CorrelationId is required.", nameof(correlationId));
|
||||
|
||||
if (string.IsNullOrWhiteSpace(correlationIdType))
|
||||
throw new ArgumentException("CorrelationIdType is required.", nameof(correlationIdType));
|
||||
|
||||
return new(direction, sender, senderAddress, subject, message, platform, priority, recipient, recipientAddress, correlationId, correlationIdType, isInternal, isHtml);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ public class ProcessEmailNotificationsEvent : EventBase, IEvent
|
||||
|
||||
public int MaxRecords { get; set; }
|
||||
|
||||
public ProcessEmailNotificationsEvent() => MaxRecords = 1000;
|
||||
|
||||
private ProcessEmailNotificationsEvent(int maxRecords = 1000) => MaxRecords = maxRecords;
|
||||
|
||||
public static ProcessEmailNotificationsEvent Create(int maxRecords = 1000) => new(maxRecords);
|
||||
|
||||
Reference in New Issue
Block a user