--- source_files: - DataPRO/DataPRO.Core/DataProConstants.cs generated_at: "2026-04-16T03:50:00.722601+00:00" model: "Qwen/Qwen3-Coder-Next-FP8" schema_version: 1 sha256: "1f1b18c028b06794" --- # DataPRO.Core 1. **Purpose** This module defines compile-time constants used across the DataPRO.Core assembly, specifically centralizing configuration file path resolution. Its role is to ensure consistent referencing of the application’s configuration file (`DataPRO.exe.config`) throughout the codebase, avoiding hardcoded string duplication and enabling future maintainability if the path needs to be updated. 2. **Public Interface** - `public static class DataProConstants` A static class containing only one public constant field: - `public const string CustomConfigPath = @"DataPRO.exe.config";` Represents the relative path to the application configuration file. *Note: An alternative absolute path (`@"C:\Program Files\DataPro\bin\DataPro.config"`) is commented out, indicating it was previously considered or used but is no longer active.* 3. **Invariants** - `CustomConfigPath` is guaranteed to be a non-null, non-empty string literal at compile time. - The value is fixed at compile time and cannot be modified at runtime. - The path is relative (not absolute), implying the configuration file is expected to reside in the application’s base directory (or current working directory, depending on deployment context). 4. **Dependencies** - **Depends on**: None (this is a pure constants container with no external dependencies). - **Depended on by**: Other modules within `DataPro.Core` (and potentially higher-level assemblies referencing `DataPro.Core`) that require access to the configuration file path. The commented-out absolute path suggests past or potential usage in deployment-specific contexts (e.g., installer logic, setup tools), but no direct callers are visible in the provided source. 5. **Gotchas** - The commented-out `CustomConfigPath` value (`@"C:\Program Files\DataPro\bin\DataPro.config"`) may indicate legacy behavior or platform-specific assumptions (e.g., Windows-only, 32-bit vs 64-bit install paths). Developers should avoid re-enabling it without verifying compatibility with current deployment practices (e.g., ClickOnce, MSIX, containerized environments). - The use of a *relative* path (`DataPRO.exe.config`) assumes the configuration file is co-located with the executable at runtime; this may not hold in all hosting scenarios (e.g., unit test runners, plugin architectures, or when the app is launched from a different working directory). - No validation or existence check is performed on the path—consumers must handle cases where the file is missing or unreadable. - None identified from source alone.