Files
DP44/docs/ai/DTS Viewer/DTS.Viewer.Loader.md
2026-04-17 14:55:32 -04:00

2.2 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DTS Viewer/DTS.Viewer.Loader/App.xaml.cs
DTS Viewer/DTS.Viewer.Loader/MainWindow.xaml.cs
DTS Viewer/DTS.Viewer.Loader/ViewerLoaderSession.cs
DTS Viewer/DTS.Viewer.Loader/Bootstrapper.cs
2026-04-17T15:52:51.752685+00:00 zai-org/GLM-5-FP8 1 2bbbfac876b8311b

DTS.Viewer.Loader Module Documentation

1. Purpose

The DTS.Viewer.Loader module serves as the application entry point and bootstrapping layer for a Prism-based WPF viewer application. It is responsible for initializing the Unity dependency injection container, configuring module discovery via directory-based catalogs, creating the main shell window, and orchestrating the startup of the viewer session. This module acts as the composition root that wires together the various DTS framework components and dynamically loaded plugins.


2. Public Interface

App (partial class, inherits Application)

File: App.xaml.cs

private void App_OnStartup(object sender, StartupEventArgs e)
  • Application startup event handler.
  • Instantiates a new ViewerLoaderSession and calls CreateSession() to initialize the application.

MainWindow (partial class, inherits Window)

File: MainWindow.xaml.cs

public MainWindow()
  • Default constructor that calls InitializeComponent().
  • Note: Based on the Bootstrapper.CreateShell() implementation, this window appears to be unused; the actual shell is ShellView resolved from the container.

ViewerLoaderSession

File: ViewerLoaderSession.cs

public ViewerLoaderSession()
  • Default constructor. Performs no initialization.
public void CreateSession()
  • Creates the bootstrapper, extracts core services from the Unity container (IUnityContainer, IEventAggregator, IServiceLocator, IRegionManager), resolves IShellViewModel and IViewerModule, starts the viewer session via IViewerModule.StartSession(), and sets the main region context.
public void Terminate()
  • Intended for shutdown cleanup. Currently empty. Documented as being called only when "JMPS is in the process of shutting down."

Public Properties: