merge placeholders dictionary
This commit is contained in:
parent
1b7a42fd7e
commit
95fe1aefcf
@ -45,7 +45,7 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual Dictionary<string, string> BodyPlaceHolders { get; } = new();
|
protected virtual Dictionary<string, string> PlaceHolders { get; } = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
@ -57,11 +57,6 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected readonly DispatcherParams DispatcherParams;
|
protected readonly DispatcherParams DispatcherParams;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
protected virtual Dictionary<string, string> SubjectPlaceHolders { get; } = new();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -99,9 +94,9 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
|
|||||||
?? throw new InvalidOperationException($"Receiver information is missing in the notification." +
|
?? throw new InvalidOperationException($"Receiver information is missing in the notification." +
|
||||||
$"{typeof(TNotification)}:\n {JsonConvert.SerializeObject(notification, Format.Json.ForDiagnostics)}");
|
$"{typeof(TNotification)}:\n {JsonConvert.SerializeObject(notification, Format.Json.ForDiagnostics)}");
|
||||||
|
|
||||||
temp.Subject = ReplacePlaceHolders(temp.Subject, SubjectPlaceHolders, MailParams.Placeholders);
|
temp.Subject = ReplacePlaceHolders(temp.Subject, PlaceHolders, MailParams.Placeholders);
|
||||||
|
|
||||||
temp.Body = ReplacePlaceHolders(temp.Body, BodyPlaceHolders, MailParams.Placeholders);
|
temp.Body = ReplacePlaceHolders(temp.Body, PlaceHolders, MailParams.Placeholders);
|
||||||
|
|
||||||
var emailOut = new EmailOut
|
var emailOut = new EmailOut
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user