You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
895 B
37 lines
895 B
1 year ago
|
using Microsoft.Extensions.Hosting;
|
||
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
using System.Windows.Forms;
|
||
|
|
||
|
namespace WinForm
|
||
|
{
|
||
|
public class Program
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 应用程序的主入口点。
|
||
|
/// </summary>
|
||
|
[STAThread]
|
||
|
static void Main()
|
||
|
{
|
||
|
Application.EnableVisualStyles();
|
||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||
|
Application.Run(new Form1());
|
||
|
}
|
||
|
|
||
|
|
||
|
private IHost CreateHostBuilder()
|
||
|
{
|
||
|
return Host
|
||
|
.CreateDefaultBuilder(null)
|
||
|
.UseAutofac()
|
||
|
.UseSerilog()
|
||
|
.ConfigureServices((hostContext, services) =>
|
||
|
{
|
||
|
services.AddApplication<WinFormModule>();
|
||
|
}).Build();
|
||
|
}
|
||
|
}
|
||
|
}
|