--- 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-16T11:27:08.948966+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 infrastructure for the `DTS.Viewer.Loader` assembly, a component developed by Diversified Technical Systems, Inc. The module exists to manage application-level settings—specifically the path to a plugin/modules folder—and to provide strongly-typed resource access for localization. It serves as the configuration layer for a plugin loading mechanism within the larger DTS Viewer application system. --- ## 2. Public Interface ### `Settings` class (partial, sealed) **Namespace:** `DTS.Viewer.Loader.Properties` **Base class:** `global::System.Configuration.ApplicationSettingsBase` | Member | Signature | Description | |--------|-----------|-------------| | `Default` | `public static Settings Default { get; }` | Static property returning the singleton instance of `Settings`, synchronized for thread safety. | | `PluginFolder` | `public string PluginFolder { get; }` | Application-scoped setting returning the relative path to the runtime modules directory. Default value: `"../../../../RunTimeModules"`. | ### `Resources` class (internal) **Namespace:** `DTS.Viewer.Loader.Properties` | Member | Signature | Description | |--------|-----------|-------------| | `ResourceManager` | `internal static global::System.Resources.ResourceManager ResourceManager { get; }` | Returns the cached `ResourceManager` instance for this assembly's resources. | | `Culture` | `internal static global::System.Globalization.CultureInfo Culture { get; set; }` | Gets or sets the current thread's `CurrentUICulture` for resource lookups. | --- ## 3. Invariants - **Singleton Pattern**: The `Settings` class maintains exactly one instance via `defaultInstance`, created through `ApplicationSettingsBase.Synchronized()`, ensuring thread-safe access. - **Application-Scoped Immutability**: `PluginFolder` is decorated with `[ApplicationScopedSettingAttribute()]`, meaning it is read-only at runtime and cannot be modified programmatically—only through configuration file changes. - **Auto-Generated Code**: Both `Settings` and `Resources` are designer-generated files; manual modifications will be overwritten upon regeneration. - **Internal Visibility**: Both `Settings` and `Resources` classes are marked `internal sealed`, restricting access to within the `DTS.Viewer.Loader` assembly. --- ## 4. Dependencies ### This module depends on: - `System.Configuration.ApplicationSettingsBase` — for application settings management - `System.Resources.ResourceManager` — for resource lookup - `System.Globalization.CultureInfo` — for culture-specific resource handling - `System.Reflection` — for assembly metadata attributes - `System.Runtime.CompilerServices` — for compiler-generated attributes - `System.Runtime.InteropServices` — for COM visibility attributes - `System.Windows` — for WPF `ThemeInfo` attribute ### What depends on this module: - **Unclear from source alone.** The `Settings.Default.PluginFolder` property suggests consumers within the `DTS.Viewer.Loader` assembly use this to locate runtime modules/plugins, but the actual loader implementation is not present in these files. --- ## 5. Gotchas 1. **Relative Path Dependency**: The `PluginFolder` setting uses a relative path `"../../../../RunTimeModules"`. This path is relative to the application's working directory at runtime, not the assembly location. The actual resolved path will vary depending on how the application is launched. 2. **Auto-Generated Files**: Both `Settings.Designer.cs` and `Resources.Designer.cs` are tool-generated. Changes must be made through the corresponding `.settings` and `.resx` files in Visual Studio, not directly in these source files. 3. **Empty Resources**: The `Resources` class infrastructure exists but no actual string resources are defined in the provided source. The `ResourceManager` will look for a resource file named `"DTS.Viewer.Loader.Properties.Resources"`. 4. **Version Hardcoded**: Assembly version is fixed at `1.0.0.0` for both `AssemblyVersion` and `FileVersion`. Automatic versioning is commented out in the source.