Files
DP44/enriched-partialglm/DTS Viewer/DTS.Viewer/Properties.md
2026-04-17 14:55:32 -04:00

63 lines
5.3 KiB
Markdown

---
source_files:
- DTS Viewer/DTS.Viewer/Properties/Settings.Designer.cs
- DTS Viewer/DTS.Viewer/Properties/AssemblyInfo.cs
- DTS Viewer/DTS.Viewer/Properties/Resources.Designer.cs
generated_at: "2026-04-16T11:23:58.003501+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "06945b304ce6ac54"
---
# Documentation: DTS.Viewer.Properties
## 1. Purpose
This module provides the auto-generated infrastructure for application settings, localized resource management, and assembly metadata for the **DTS.Viewer** application. It acts as the configuration and identity layer, enabling strongly-typed access to user preferences via the `Settings` class and culture-specific resource lookups via the `Resources` class. The `AssemblyInfo.cs` file defines the application's version, company attribution (Diversified Technical Systems, Inc.), and WPF theme resource locations.
## 2. Public Interface
### Class: `DTS.Viewer.Properties.Settings`
* **Signature**: `internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase`
* **Properties**:
* `public static Settings Default { get; }`: Returns the singleton instance of the application settings wrapper. This is the primary entry point for accessing application settings.
* **Behavior**: Provides a thread-safe singleton wrapper for application configuration. Note that the provided source contains no custom setting properties; they must be defined in the associated `.settings` file and regenerated into this partial class.
### Class: `DTS.Viewer.Properties.Resources`
* **Signature**: `internal class Resources`
* **Properties**:
* `internal static global::System.Resources.ResourceManager ResourceManager { get; }`: Returns the cached `ResourceManager` instance responsible for looking up localized resources (strings, images, etc.) within the "DTS.Viewer.Properties.Resources" scope.
* `internal static global::System.Globalization.CultureInfo Culture { get; set; }`: Gets or sets the current `CultureInfo` used for resource lookups. Overrides the thread's current UI culture for this resource manager.
* **Behavior**: Acts as a strongly-typed proxy for `.resx` files. Like the `Settings` class, the provided source shows only the infrastructure; specific resource properties (e.g., string constants) are auto-generated into this class based on the `.resx` content.
### Assembly Attributes (AssemblyInfo.cs)
* **Identity**:
* `[assembly: AssemblyTitle("DTS.Viewer")]`
* `[assembly: AssemblyCompany("Diversified Technical Systems, Inc. (DTS)")]`
* **Versioning**:
* `[assembly: AssemblyVersion("1.0.0.0")]`
* `[assembly: AssemblyFileVersion("1.0.0.0")]`
* **COM Visibility**: `[assembly: ComVisible(false)]` — Types are not visible to COM components.
* **Theming**: `[assembly: ThemeInfo(...)]` — Configures WPF to look for generic resource dictionaries in the source assembly.
## 3. Invariants
* **Singleton Guarantee**: The `Settings.Default` property is guaranteed to return a synchronized, thread-safe instance of the `Settings` class (enforced by `ApplicationSettingsBase.Synchronized`).
* **Lazy Initialization**: The `Resources.ResourceManager` property is lazily initialized; the internal `resourceMan` field remains `null` until the property is first accessed.
* **Code Generation**: Both `Settings` and `Resources` are marked with `GeneratedCodeAttribute`. Manual edits to these files will be overwritten by the tooling (Visual Studio Settings Designer or ResGen) during the next regeneration.
## 4. Dependencies
### Dependencies of this Module
* **System.Configuration**: Required for `ApplicationSettingsBase` (used by `Settings`).
* **System.Resources**: Required for `ResourceManager` (used by `Resources`).
* **System.Globalization**: Required for `CultureInfo` (used by `Resources`).
* **System.Windows**: Required for `ResourceDictionaryLocation` (used in `AssemblyInfo.cs` for WPF theming).
* **System.Reflection**, **System.Runtime.InteropServices**: Required for assembly-level metadata attributes.
### Dependents of this Module
* **DTS.Viewer Assembly**: All code within the `DTS.Viewer` project relies on `Properties.Settings.Default` for configuration persistence and `Properties.Resources` for localized strings and assets.
## 5. Gotchas
* **Auto-Generated Code Warning**: The source files `Settings.Designer.cs` and `Resources.Designer.cs` contain explicit warnings that manual changes will be lost. Developers must modify the underlying XML files (`.settings` and `.resx`) rather than the C# source.
* **Missing Custom Properties**: The provided source for `Settings` and `Resources` contains only the infrastructure code (singleton pattern and resource manager plumbing). No actual user settings or resource strings are visible in the provided text; this implies the specific data values are defined elsewhere (in XML) and injected during the build process.
* **Template Copyright**: The `AssemblyInfo.cs` file contains `AssemblyCopyright("Copyright © Microsoft 2016")`. This appears to be a default Visual Studio template value that was not updated to reflect the actual company ("Diversified Technical Systems, Inc. (DTS)").
* **Internal Visibility**: Both `Settings` and `Resources` are marked `internal`, meaning they are not accessible outside the `DTS.Viewer` assembly.