Files
DP44/enriched-qwen3-coder-next/Common/DTS.Common.DBSyncService/Properties.md

76 lines
4.7 KiB
Markdown
Raw Normal View History

2026-04-17 14:55:32 -04:00
---
source_files:
- Common/DTS.Common.DBSyncService/Properties/AssemblyInfo.cs
- Common/DTS.Common.DBSyncService/Properties/Settings.Designer.cs
generated_at: "2026-04-16T02:11:21.572661+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "192083dd898290ec"
---
# Properties
## Documentation: `DTS.Common.DBSyncService`
---
### 1. Purpose
This module is a .NET assembly (`DTS.Common.DBSyncService`) that provides shared configuration and metadata for a database synchronization service. It does not contain business logic or synchronization implementations itself, but rather defines assembly-level attributes (e.g., version, title, COM visibility) and exposes strongly-typed application settings (e.g., `Monitoring`, `Interval`, `ServiceName`, `Service`) via a generated settings class. Its role is to centralize and standardize configuration and assembly identity for the DB Sync Service across deployment and runtime.
---
### 2. Public Interface
#### `DTS.Common.DBSyncService.Properties.Settings`
A sealed, auto-generated class derived from `System.Configuration.ApplicationSettingsBase`. Provides read-only access to application-scoped configuration values. Accessed via the static property `Settings.Default`.
- **`public static Settings Default { get; }`**
Returns the singleton instance of `Settings`. Thread-safe due to `Synchronized()` wrapping.
- **`public bool Monitoring { get; }`**
Returns the value of the `Monitoring` setting. Default: `false`. Application-scoped; cannot be changed at runtime.
- **`public int Interval { get; }`**
Returns the value of the `Interval` setting (in milliseconds). Default: `60000` (i.e., 60 seconds). Application-scoped.
- **`public string ServiceName { get; }`**
Returns the value of the `ServiceName` setting. Default: `"DTS DB Sync Service"`. Application-scoped.
- **`public string Service { get; }`**
Returns the value of the `Service` setting. Default: `"DB Sync Service"`. Application-scoped.
> **Note**: All properties are read-only (`get` only), and values are determined at compile-time via `[DefaultSettingValueAttribute]`. No setters or runtime modification is supported.
---
### 3. Invariants
- The `Settings` class is **application-scoped** and **immutable at runtime** (no `UserScoped` settings present).
- All settings values are validated only at design time (via `Settings.Designer.cs` generation); no runtime validation occurs.
- The assembly is **not COM-visible** (`ComVisible(false)`), and the GUID `5f8e95eb-e89c-4fdc-9bde-3e78dd56ad6f` is reserved for typelib identification if exposed to COM.
- Assembly version is fixed at `1.0.0.0` (both `AssemblyVersion` and `AssemblyFileVersion`).
- Thread-safety of `Settings.Default` is ensured via `ApplicationSettingsBase.Synchronized()`.
---
### 4. Dependencies
#### Dependencies *of* this module:
- `System.Configuration` (for `ApplicationSettingsBase`, `ApplicationScopedSettingAttribute`, etc.)
- `System.Runtime.CompilerServices`, `System.Runtime.InteropServices`, `System.CodeDom.Compiler`, `System.Diagnostics` (for attributes and COM interop)
- `System` (implicit base for `AssemblyInfo` and `Settings` types)
#### Dependencies *on* this module:
- Any service or library referencing `DTS.Common.DBSyncService` can access `Properties.Settings.Default` to retrieve configuration.
- The assembly is likely referenced by the main DB Sync Service executable or related components (e.g., Windows Service host), though this is inferred from naming and not explicit in the provided files.
---
### 5. Gotchas
- **No runtime configuration**: Settings are compile-time constants; changing them requires rebuilding the assembly or modifying the `.config` file *if* the settings were user-scoped (but they are not — they are application-scoped and read from `app.config` only at startup, with no override capability).
- **Hardcoded defaults**: The `Interval` value (`60000`) is in milliseconds but not documented as such in code; callers must infer the unit.
- **Redundant naming**: Two settings (`ServiceName` and `Service`) both appear to represent the service name, with identical default values (`"DTS DB Sync Service"` vs `"DB Sync Service"`). This may indicate legacy duplication or ambiguity in usage context.
- **Auto-generated code**: `Settings.Designer.cs` is explicitly marked as auto-generated; manual edits will be overwritten.
- **Version lock**: `AssemblyVersion("1.0.0.0")` with no `*` wildcard disables automatic build/revision incrementing, which may complicate deployment tracking.
- **No public API surface beyond `Settings`**: This module provides no executable logic—only configuration metadata—so callers must not expect any other public types or methods.
> **None identified from source alone** beyond the above.