benz-obstacle-detection/BenzObstacleDetect/Program.cs

15 lines
456 B
C#

using Autolabor.Benz.ObstacleDetection;
using Autolabor.Benz.ObstacleDetection.DataType;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddHostedService<Worker>();
// 注册配置绑定到 RectRoiSettings 类
builder.Services.Configure<RectRoiSettings>(builder.Configuration.GetSection("RectRoiSettings"));
var host = builder.Build();
host.Run();