fix(EnvelopeMailService): Vermeiden Sie gemeinsam genutzte veränderbare Zustände in EnvelopeMailService-Platzhaltern
EnvelopeMailService wurde umgestaltet, um gemeinsam genutzte Veränderungen des _placeholders-Wörterbuchs zu vermeiden. Die Konfigurationseigenschaft MailParams.Placeholders wurde von einem veränderbaren Dictionary<string, string> zu einem ImmutableDictionary<string, string> geändert, und _placeholders wird nun bei der Dienstkonstruktion als neues Wörterbuch instanziiert.
This commit is contained in:
parent
286e17a900
commit
c7d26a87b0
@ -1,4 +1,6 @@
|
|||||||
namespace EnvelopeGenerator.Application.Configurations;
|
using System.Collections.Immutable;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Configurations;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
@ -8,5 +10,5 @@ public class MailParams
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public required Dictionary<string, string> Placeholders { get; init; }
|
public required ImmutableDictionary<string, string> Placeholders { get; init; }
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ private readonly IAuthenticator _authenticator;
|
|||||||
_envRcvService = envelopeReceiverService;
|
_envRcvService = envelopeReceiverService;
|
||||||
_dConfig = dispatcherConfigOptions.Value;
|
_dConfig = dispatcherConfigOptions.Value;
|
||||||
_configService = configService;
|
_configService = configService;
|
||||||
_placeholders = mailConfig.Value.Placeholders;
|
_placeholders = new Dictionary<string, string>(mailConfig.Value.Placeholders);
|
||||||
_authenticator = authenticator;
|
_authenticator = authenticator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user