5.3 KiB
5.3 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-16T11:23:58.003501+00:00 | zai-org/GLM-5-FP8 | 1 | 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
.settingsfile 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 cachedResourceManagerinstance 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 currentCultureInfoused for resource lookups. Overrides the thread's current UI culture for this resource manager.
- Behavior: Acts as a strongly-typed proxy for
.resxfiles. Like theSettingsclass, the provided source shows only the infrastructure; specific resource properties (e.g., string constants) are auto-generated into this class based on the.resxcontent.
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.Defaultproperty is guaranteed to return a synchronized, thread-safe instance of theSettingsclass (enforced byApplicationSettingsBase.Synchronized). - Lazy Initialization: The
Resources.ResourceManagerproperty is lazily initialized; the internalresourceManfield remainsnulluntil the property is first accessed. - Code Generation: Both
SettingsandResourcesare marked withGeneratedCodeAttribute. 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 bySettings). - System.Resources: Required for
ResourceManager(used byResources). - System.Globalization: Required for
CultureInfo(used byResources). - System.Windows: Required for
ResourceDictionaryLocation(used inAssemblyInfo.csfor 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.Viewerproject relies onProperties.Settings.Defaultfor configuration persistence andProperties.Resourcesfor localized strings and assets.
5. Gotchas
- Auto-Generated Code Warning: The source files
Settings.Designer.csandResources.Designer.cscontain explicit warnings that manual changes will be lost. Developers must modify the underlying XML files (.settingsand.resx) rather than the C# source. - Missing Custom Properties: The provided source for
SettingsandResourcescontains 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.csfile containsAssemblyCopyright("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
SettingsandResourcesare markedinternal, meaning they are not accessible outside theDTS.Viewerassembly.