preparing to feed abstract
test should run ok [modulo config]
This commit is contained in:
parent
bcd2f1e743
commit
0211026426
36 changed files with 765 additions and 243 deletions
29
test/src/Program.cs
Normal file
29
test/src/Program.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using Microsoft.AspNet.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Yavsc.Lib;
|
||||
using Yavsc.Services;
|
||||
|
||||
namespace Yavsc.test
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public Program()
|
||||
{
|
||||
var host = new WebHostBuilder();
|
||||
|
||||
var hostengnine = host
|
||||
.UseEnvironment("Development")
|
||||
.UseServer("test")
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
||||
var app = hostengnine.Start();
|
||||
var sender = app.Services.GetService(typeof(IEmailSender)) as IEmailSender;
|
||||
var mailer = app.Services.GetService(typeof(EMailer)) as EMailer;
|
||||
var loggerFactory = app.Services.GetService(typeof(ILoggerFactory)) as ILoggerFactory;
|
||||
ILogger logger = loggerFactory.CreateLogger<Program>() ;
|
||||
mailer.SendMonthlyEmail(1,"UserOrientedTemplate");
|
||||
logger.LogInformation("Finished");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue