generated from wenjy/Sln.Iot
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
865 B
C#
33 lines
865 B
C#
using System.Reflection;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Sln.Iot.Config;
|
|
using Sln.Iot.PLC;
|
|
using Sln.Iot.Repository;
|
|
using Sln.Iot.Serilog;
|
|
using TouchSocket.Sockets;
|
|
|
|
namespace Sln.Iot
|
|
{
|
|
/// <summary>
|
|
/// 程序主入口
|
|
/// </summary>
|
|
public class Program
|
|
{
|
|
static async Task Main(string[] args)
|
|
{
|
|
//Serilog中间件
|
|
SerilogExtensions.UseSerilogExtensions();
|
|
//日志实例
|
|
var log = SerilogHelper.Instance;
|
|
//配置文件加载
|
|
var appConfig = AppConfigSetting.Load();
|
|
//PLC连接初始化
|
|
PLCConnect.Instance.InitConnect();
|
|
|
|
log.Info($"系统启动成功,日志存放位置:{appConfig.logPath}");
|
|
|
|
await Task.Delay(-1);
|
|
}
|
|
}
|
|
} |