using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Threading.Tasks;

namespace Bailun.DC.MonthSalePutin
{
    class Program
    {
        static async Task Main(string[] args)
        {
            Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
            {
                services.AddHostedService<Services>();
            });

            await builder.RunConsoleAsync();
        }

        //static void Main(string[] args)
        //{
        //    //Console.WriteLine("Hello World!");

        //    Services _service = new Services();

        //    //_service.Init(DateTime.Parse("2020-01-01"));
        //    _service.UnReasonable("2020-01");
        //    _service.Analyze("2020-01");
        //}
    }
}
