运行程序我们会看到控制台每隔3秒就会打出日志:
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] User profile is available. Using 'C:\Users\Administrator\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. info: MailQueueManager[0] 线程即将启动 info: MailQueueManager[0] 线程已经启动,线程Id是:9 trce: MailQueueManager[0] 队列是空,开始睡眠 Hosting environment: Development Content root path: D:\publish Now listening on: [::]:5000 Application started. Press Ctrl+C to shut down. trce: MailQueueManager[0] 队列是空,开始睡眠 trce: MailQueueManager[0] 队列是空,开始睡眠到此,我们的邮件队列就完成了! :D