--- source_files: - DTS Viewer/DTS.Viewer.Loader/Properties/Settings.Designer.cs - DTS Viewer/DTS.Viewer.Loader/Properties/AssemblyInfo.cs - DTS Viewer/DTS.Viewer.Loader/Properties/Resources.Designer.cs generated_at: "2026-04-16T14:06:04.504892+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "c2c4643ad51e5dc7" --- # Documentation: DTS.Viewer.Loader Properties ## 1. Purpose This module provides configuration and resource management for the `DTS.Viewer.Loader` assembly, a component of the DTS Viewer application developed by Diversified Technical Systems, Inc. The module exists to define application-level settings—specifically the location of runtime plugin modules—and to provide strongly-typed resource access for localization. It serves as the configuration layer that enables the loader to discover and load plugins from an external directory at runtime. --- ## 2. Public Interface ### Settings (class) **Namespace:** `DTS.Viewer.Loader.Properties` **Inheritance:** `global::System.Configuration.ApplicationSettingsBase` **Modifiers:** `internal sealed partial` #### `Default` (static property) ```csharp public static Settings Default { get; } ``` Returns the singleton instance of the `Settings` class, synchronized for thread-safe access. This is the primary entry point for accessing application settings. #### `PluginFolder` (instance property) ```csharp [ApplicationScopedSetting] [DefaultSettingValue("../../../../RunTimeModules")] public string PluginFolder { get; } ``` Returns the configured path to the plugin/modules directory. The default value is `"../../../../RunTimeModules"`. This is an application-scoped setting, meaning it is read-only at runtime and must be configured via application config or the settings file. --- ### Resources (class) **Namespace:** `DTS.Viewer.Loader.Properties` **Modifiers:** `internal class` #### `ResourceManager` (static property) ```csharp [EditorBrowsable(EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get; } ``` Returns the cached `ResourceManager` instance for this assembly, used for looking up localized strings and resources. The resource base name is `"DTS.Viewer.Loader.Properties.Resources"`. #### `Culture` (static property) ```csharp [EditorBrowsable(EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get; set; } ``` Gets or sets the current `CultureInfo` used for resource lookups. Setting this property overrides the current thread's `CurrentUICulture` for all resource lookups via this class. --- ## 3. Invariants - **Singleton Pattern**: The `Settings.Default` property always returns the same synchronized instance; `ApplicationSettingsBase.Synchronized` ensures thread-safe access. - **Application-Scoped Immutability**: `PluginFolder` is decorated with `[ApplicationScopedSetting]`, meaning it cannot be changed at runtime and requires application configuration changes to modify. - **Internal Visibility**: Both `Settings` and `Resources` classes are marked `internal`, restricting access to within the `DTS.Viewer.Loader` assembly. - **Auto-Generated Code**: `Settings.Designer.cs` and `Resources.Designer.cs` are tool-generated; manual modifications will be overwritten upon regeneration. - **Relative Path Dependency**: The `PluginFolder` default value uses a relative path (`"../../../../RunTimeModules"`), which is resolved relative to the application's working directory at runtime. --- ## 4. Dependencies ### This module depends on: - `System.Configuration.ApplicationSettingsBase` — for application settings management - `System.Resources.ResourceManager` — for resource lookup - `System.Globalization.CultureInfo` — for localization support - `System.Reflection` — for assembly metadata (via `AssemblyInfo.cs`) - `System.Runtime.InteropServices` — for COM visibility attributes - `System.Windows` — for WPF `ThemeInfo` resource dictionary location ### What depends on this module: **Cannot be determined from source alone.** The `Settings` and `Resources` classes are internal, suggesting they are consumed by other components within the `DTS.Viewer.Loader` assembly, but the specific consumers are not present in the provided files. --- ## 5. Gotchas - **Relative Path Fragility**: The `PluginFolder` default value (`"../../../../RunTimeModules"`) is a relative path that depends on the application's current working directory. If the application is launched from a different working directory, this path may resolve incorrectly. The actual behavior depends on how the application sets its working directory at startup. - **Auto-Generated Files**: Both `Settings.Designer.cs` and `Resources.Designer.cs` are auto-generated by Visual Studio tools. Any manual changes will be lost when the files are regenerated. To modify settings, use the Visual Studio Settings designer or edit the `.settings` file directly. - **Missing Resource Values**: The `Resources` class provides infrastructure for localized resources, but no actual resource keys/strings are exposed in the generated code. The presence and content of the underlying `.resx` file cannot be determined from the provided source. - **Version Information Static**: Assembly version is fixed at `1.0.0.0` in `AssemblyInfo.cs`. Whether this is updated during build processes (e.g., via CI/CD) is not evident from the source.