DreamineVMS 1.0.0.0
Windows PC의 RTSP·USB 카메라 영상을 HLS로 변환해 원격 CCTV Viewer에 전달하는 데스크톱 에이전트입니다.
로딩중...
검색중...
일치하는것 없음
DreamineVMS.Program 클래스 참조

더 자세히 ...

정적 Public 멤버 함수

static void Main ()

정적 Private 멤버 함수

static void RegisterOptions (HostApplicationBuilder builder)
static void RegisterDreamineHybrid (HostApplicationBuilder builder)
static void RegisterAuthServices (HostApplicationBuilder builder)
static void RegisterApplicationServices (HostApplicationBuilder builder)
static void RegisterBlazorViewModels (HostApplicationBuilder builder)
static void RegisterCameraServices (HostApplicationBuilder builder)
static void RegisterHybridState (HostApplicationBuilder builder)
static void RegisterDashboardServices (HostApplicationBuilder builder)
static void RegisterHostedServices (HostApplicationBuilder builder)

상세한 설명

DreamineVMS 하이브리드 애플리케이션의 진입점입니다.

Program.cs 파일의 33 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ Main()

void DreamineVMS.Program.Main ( )
inlinestatic

WPF + Blazor Server 기반 DreamineVMS 애플리케이션을 시작합니다.

Program.cs 파일의 44 번째 라인에서 정의되었습니다.

45 {
46 HostApplicationBuilder builder = Host.CreateApplicationBuilder();
47
48 builder.Configuration
49 .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
50 .AddJsonFile("appsettings.local.json", optional: true, reloadOnChange: true);
51
52 RegisterOptions(builder);
53 RegisterAuthServices(builder);
54
55 // FFmpeg 경로 자동 확인 및 다운로드 (없으면 로컬 ffmpeg\ffmpeg.exe로 대체)
56 string configuredFfmpegPath = builder.Configuration["Ffmpeg:Path"] ?? @"C:\ffmpeg\bin\ffmpeg.exe";
57 var progress = new Progress<string>(msg => Console.WriteLine($"[FFmpeg] {msg}"));
58 string resolvedFfmpegPath = FfmpegBootstrapper.EnsureAsync(configuredFfmpegPath, progress)
59 .GetAwaiter().GetResult();
60 builder.Configuration.AddInMemoryCollection(new Dictionary<string, string?>
61 {
62 ["Ffmpeg:Path"] = resolvedFfmpegPath
63 });
64 RegisterDreamineHybrid(builder);
65 RegisterApplicationServices(builder);
66 RegisterCameraServices(builder);
67 RegisterHybridState(builder);
68 RegisterDashboardServices(builder);
69 RegisterBlazorViewModels(builder);
70 RegisterHostedServices(builder);
71
72 using IHost host = builder.Build();
73
74 // 도메인 핵심 서비스를 미리 인스턴스화하고 Dashboard 상태 동기화를 시작합니다.
75 _ = host.Services.GetRequiredService<IVmsCameraRepository>();
76 _ = host.Services.GetRequiredService<ICameraRuntimeStateService>();
77 _ = host.Services.GetRequiredService<FfmpegHlsStreamService>();
78
79 IVmsDashboardStateService dashboardStateService =
80 host.Services.GetRequiredService<IVmsDashboardStateService>();
81 dashboardStateService.Start();
82
83 host.RunDreamineWpfApp<App>();
84 }

다음을 참조함 : DreamineVMS.Services.Streaming.FfmpegBootstrapper.EnsureAsync(), RegisterApplicationServices(), RegisterAuthServices(), RegisterBlazorViewModels(), RegisterCameraServices(), RegisterDashboardServices(), RegisterDreamineHybrid(), RegisterHostedServices(), RegisterHybridState(), RegisterOptions(), DreamineVMS.Services.Dashboard.IVmsDashboardStateService.Start().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ RegisterApplicationServices()

void DreamineVMS.Program.RegisterApplicationServices ( HostApplicationBuilder builder)
inlinestaticprivate

Register Application Services 작업을 수행합니다.

매개변수
builderbuilder에 사용할 HostApplicationBuilder 값입니다.

Program.cs 파일의 178 번째 라인에서 정의되었습니다.

179 {
180 builder.Services.AddSingleton<AgentSettingsWriter>();
181 builder.Services.AddSingleton<AgentSettingsViewModel>();
182 builder.Services.AddSingleton<MainWindow>();
183 builder.Services.AddSingleton<MainWindowViewModel>();
184 }

다음에 의해서 참조됨 : Main().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RegisterAuthServices()

void DreamineVMS.Program.RegisterAuthServices ( HostApplicationBuilder builder)
inlinestaticprivate

WPF Shell 및 ViewModel 서비스를 등록합니다.

매개변수
builder애플리케이션 Host Builder입니다.

Program.cs 파일의 153 번째 라인에서 정의되었습니다.

154 {
155 builder.Services.AddSingleton<VmsDatabase>();
156
157 // 에이전트: 중앙 서버 통신 + HLS 세그먼트 업로더
158 builder.Services.AddSingleton<AgentApiClient>();
159 builder.Services.AddHostedService<HlsSegmentPusherService>();
160 }

다음에 의해서 참조됨 : Main().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RegisterBlazorViewModels()

void DreamineVMS.Program.RegisterBlazorViewModels ( HostApplicationBuilder builder)
inlinestaticprivate

Blazor ViewModel 및 Blazor Adapter 서비스를 등록합니다.

매개변수
builder애플리케이션 Host Builder입니다.

Program.cs 파일의 202 번째 라인에서 정의되었습니다.

203 {
204 builder.Services.AddScoped<LivePageViewModel>();
205 builder.Services.AddScoped<DashboardPageViewModel>();
206 builder.Services.AddScoped<VmsLocalDashboardViewModel>();
207 }

다음에 의해서 참조됨 : Main().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RegisterCameraServices()

void DreamineVMS.Program.RegisterCameraServices ( HostApplicationBuilder builder)
inlinestaticprivate

카메라 Repository, Runtime State, Stream 서비스를 등록합니다.

매개변수
builder애플리케이션 Host Builder입니다.

Program.cs 파일의 225 번째 라인에서 정의되었습니다.

226 {
227 builder.Services.AddSingleton<IVmsCameraRepository, SqliteCameraRepository>();
228 builder.Services.AddSingleton<ICameraRuntimeStateService, CameraRuntimeStateService>();
229
230 builder.Services.AddSingleton<FfmpegHlsStreamService>();
231
232 builder.Services.AddSingleton<ICameraStreamService>(
233 serviceProvider => serviceProvider.GetRequiredService<FfmpegHlsStreamService>());
234 }

다음에 의해서 참조됨 : Main().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RegisterDashboardServices()

void DreamineVMS.Program.RegisterDashboardServices ( HostApplicationBuilder builder)
inlinestaticprivate

Dashboard 상태 도메인 서비스를 등록합니다.

매개변수
builder애플리케이션 Host Builder입니다.

Program.cs 파일의 274 번째 라인에서 정의되었습니다.

275 {
276 builder.Services.AddSingleton<IVmsDashboardStateService, VmsDashboardStateService>();
277 }

다음에 의해서 참조됨 : Main().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RegisterDreamineHybrid()

void DreamineVMS.Program.RegisterDreamineHybrid ( HostApplicationBuilder builder)
inlinestaticprivate

Dreamine Hybrid WPF 서비스를 등록합니다.

매개변수
builder애플리케이션 Host Builder입니다.

Program.cs 파일의 132 번째 라인에서 정의되었습니다.

133 {
134 builder.Services.AddDreamineHybridWpf();
135 }

다음에 의해서 참조됨 : Main().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RegisterHostedServices()

void DreamineVMS.Program.RegisterHostedServices ( HostApplicationBuilder builder)
inlinestaticprivate

백그라운드 Hosted Service를 등록합니다.

매개변수
builder애플리케이션 Host Builder입니다.

Program.cs 파일의 295 번째 라인에서 정의되었습니다.

296 {
297 builder.Services.AddHostedService(
298 serviceProvider => serviceProvider.GetRequiredService<FfmpegHlsStreamService>());
299
300 builder.Services.AddHostedService<VmsBlazorServerHostedService<AppShell>>();
301 }

다음에 의해서 참조됨 : Main().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RegisterHybridState()

void DreamineVMS.Program.RegisterHybridState ( HostApplicationBuilder builder)
inlinestaticprivate

WPF와 Blazor가 공유하는 Hybrid State Store를 등록합니다.

매개변수
builder애플리케이션 Host Builder입니다.

Program.cs 파일의 252 번째 라인에서 정의되었습니다.

253 {
254 builder.Services.AddSingleton<IHybridStateStore<VmsDashboardState>>(
255 new HybridStateStore<VmsDashboardState>(VmsDashboardState.Empty));
256 }

다음을 참조함 : DreamineVMS.States.VmsDashboardState.Empty.

다음에 의해서 참조됨 : Main().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RegisterOptions()

void DreamineVMS.Program.RegisterOptions ( HostApplicationBuilder builder)
inlinestaticprivate

설정 옵션 바인딩을 등록합니다.

매개변수
builder애플리케이션 Host Builder입니다.

Program.cs 파일의 102 번째 라인에서 정의되었습니다.

103 {
104 builder.Services.Configure<HostOptions>(options =>
105 {
106 options.BackgroundServiceExceptionBehavior = BackgroundServiceExceptionBehavior.Ignore;
107 });
108
109 builder.Services.Configure<VmsServerOptions>(
110 builder.Configuration.GetSection("VmsServer"));
111
112 builder.Services.Configure<FfmpegOptions>(
113 builder.Configuration.GetSection("Ffmpeg"));
114 }

다음에 의해서 참조됨 : Main().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: