Fix warning

This commit is contained in:
Stone_Red
2023-06-13 22:50:04 +02:00
parent 9ac40ba0cb
commit 06e011cb83
@@ -4,20 +4,20 @@ namespace Elektrifikatsiya.Utilities;
public class EmailSettings public class EmailSettings
{ {
public string User { get; set; } public string User { get; set; }
public string DefaultEmail { get; set; } public string DefaultEmail { get; set; }
public string Key { get; set; } public string Key { get; set; }
public Dictionary<string, string> Templates { get; set; } public Dictionary<string, string> Templates { get; set; }
public string SmtpServer { get; set; } public string SmtpServer { get; set; }
public int SmtpPort { get; set; } public int SmtpPort { get; set; }
public Dictionary<string, HandlebarsTemplate<object, object>> CompiledTemplates = new(); public Dictionary<string, HandlebarsTemplate<object, object>> CompiledTemplates { get; } = new();
public void CompileTemplates() public void CompileTemplates()
{ {
foreach ((string templateName, string templatePath) in Templates) foreach ((string templateName, string templatePath) in Templates)
{ {
CompiledTemplates.Add(templateName, Handlebars.Compile(File.ReadAllText(templatePath))); CompiledTemplates.Add(templateName, Handlebars.Compile(File.ReadAllText(templatePath)));
} }
} }
} }