Camera Information System
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.

40 lines
1.3 KiB

using Cis.Application.Core;
using Cis.Application.Core.Component.CameraSDK;
using Cis.Application.Core.Component.MarkSeacher;
using Cis.Application.Core.Component.Onvif;
using Cis.Application.Core.Component.PtzServer;
using Cis.Application.Core.Component.ZLMediaKit;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
namespace Cis.Application;
[AppStartup(100)]
public class Startup : AppStartup
{
/// <summary>
/// 配置应用所需服务,在该方法中可以添加应用所需要的功能或服务
/// </summary>
/// <param name="services"></param>
public void ConfigureServices(IServiceCollection services)
{
services.AddConfigurableOptions<CameraDataOptions>();
services.AddSingleton<ICameraSdkServer, CameraSdkServer>();
services.AddSingleton<IOnvifServer, OnvifServer>();
services.AddSingleton<IZlmServer, ZlmServer>();
services.AddSingleton<IMarkSearcherServer, MarkSearcherServer>();
services.AddSingleton(typeof(CameraDataCenter));
2 years ago
}
/// <summary>
/// 配置应用请求处理管道
/// </summary>
/// <param name="app"></param>
/// <param name="env"></param>
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
InstanceCenter.Init();
}
}