cli
This commit is contained in:
29
cli/Services/EMailer.cs
Normal file
29
cli/Services/EMailer.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using Microsoft.AspNet.Razor;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace cli.Services
|
||||
{
|
||||
public class EMailer
|
||||
{
|
||||
RazorTemplateEngine razorEngine;
|
||||
IStringLocalizer<EMailer> stringLocalizer;
|
||||
ILogger logger;
|
||||
public EMailer(RazorTemplateEngine razorTemplateEngine, IStringLocalizer<EMailer> localizer, ILoggerFactory loggerFactory)
|
||||
{
|
||||
logger = loggerFactory.CreateLogger<EMailer>();
|
||||
|
||||
razorEngine = razorTemplateEngine;
|
||||
|
||||
stringLocalizer = localizer;
|
||||
}
|
||||
|
||||
public string Gen(long templateCode)
|
||||
{
|
||||
string subtemp = stringLocalizer["MonthlySubjectTemplate"].Value;
|
||||
logger.LogInformation ( $"Using code: {templateCode} and subject: {subtemp} " );
|
||||
throw new NotImplementedException("razorEngine.GenerateCode");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user