init
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/SystemSettings/Tables/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-16T04:40:17.665123+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "519f228272482faa"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
## 1. Purpose
|
||||
This module is an assembly-level metadata configuration file (`AssemblyInfo.cs`) for the `TablesSettings` component within the `DataPRO/Modules/SystemSettings/Tables/Properties/` directory. Its purpose is to define standard .NET assembly attributes—such as title, version, and COM visibility—used for identification, versioning, and interop integration. It does not contain executable logic or business functionality; it serves as a declarative metadata layer for the compiled assembly.
|
||||
|
||||
## 2. Public Interface
|
||||
This file contains **no public types, functions, classes, or methods**. It only declares assembly-level attributes via `System.Reflection` and `System.Runtime.InteropServices` attributes. Therefore, there is no public API surface to document.
|
||||
|
||||
## 3. Invariants
|
||||
- The assembly is **not visible to COM** (`ComVisible(false)`), meaning it cannot be consumed by COM clients unless explicitly overridden per type (not done here).
|
||||
- The assembly version is fixed at `1.0.0.0` for both `AssemblyVersion` and `AssemblyFileVersion`.
|
||||
- The `Guid` attribute is set to `"7446722e-490d-4f6a-beaf-907947e576d5"` for the typelib ID (used only if `ComVisible(true)` were enabled).
|
||||
- No culture-specific settings are defined (`AssemblyCulture("")` indicates a neutral/culture-agnostic assembly).
|
||||
- The `AssemblyTitle` and `AssemblyProduct` are both `"TablesSettings"`; `AssemblyCopyright` is `"Copyright © 2016"`.
|
||||
|
||||
## 4. Dependencies
|
||||
- **Dependencies**:
|
||||
- `System.Reflection`
|
||||
- `System.Runtime.CompilerServices`
|
||||
- `System.Runtime.InteropServices`
|
||||
These are standard .NET runtime namespaces; no external or project-specific dependencies are declared in this file.
|
||||
- **Depended upon by**:
|
||||
- The build system (e.g., MSBuild) uses these attributes to generate assembly metadata in the compiled `.dll`.
|
||||
- Tools that inspect assembly metadata (e.g., reflection-based tools, COM registration utilities) will read these values.
|
||||
- Other modules in the `DataPRO` system may reference this assembly and rely on its identity/version for compatibility checks, though no such usage is evident from this file alone.
|
||||
|
||||
## 5. Gotchas
|
||||
- **Versioning rigidity**: Both `AssemblyVersion` and `AssemblyFileVersion` are hardcoded to `1.0.0.0`. This may cause issues with binding redirects, side-by-side deployment, or version-based feature detection if the assembly is updated without incrementing these values.
|
||||
- **COM incompatibility**: With `ComVisible(false)`, this assembly cannot be consumed by legacy COM clients. If COM interop is required, this setting must be changed *and* types must be explicitly marked `[ComVisible(true)]`, but this is not currently supported.
|
||||
- **Missing strong name**: No `AssemblyKeyFile` or `AssemblyKeyName` is specified, implying the assembly is not strong-named. This may affect deployment scenarios requiring strong-named assemblies (e.g., GAC installation).
|
||||
- **Copyright year**: The `AssemblyCopyright` year is `2016`, which may be outdated if the assembly has been modified since then.
|
||||
- **No documentation**: `AssemblyDescription` and `AssemblyTrademark` are empty strings, offering no human-readable context beyond the title/product name.
|
||||
- *None identified from source alone.* beyond the above—no behavioral logic or hidden side effects exist in this metadata-only file.
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/SystemSettings/Tables/View/TablesSettingsView.xaml.cs
|
||||
generated_at: "2026-04-16T04:40:25.476767+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "19a5ade10e72dc4e"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### 1. **Purpose**
|
||||
This module provides the WPF view implementation for the system settings UI related to table configurations. Specifically, `TablesSettingsView` serves as the visual layer (XAML-backed UI control) that presents and potentially interacts with table-related settings, conforming to the `ITablesSettingsView` interface defined in the `DTS.Common.Interface` namespace. Its role is to decouple UI presentation logic from business logic, enabling testability and separation of concerns within the application’s settings module.
|
||||
|
||||
### 2. **Public Interface**
|
||||
- **`TablesSettingsView()`**
|
||||
*Signature:* `public TablesSettingsView()`
|
||||
*Behavior:* Constructor that initializes the WPF component by calling `InitializeComponent()`, which wires up the XAML-defined UI elements (defined in `TablesSettingsView.xaml`) to the code-behind. No additional initialization logic is present in the provided source.
|
||||
|
||||
### 3. **Invariants**
|
||||
- The class implements the `ITablesSettingsView` interface (as indicated by `public partial class TablesSettingsView : ITablesSettingsView`), so all members required by that interface must be implemented elsewhere (e.g., in a partial class file or via explicit interface implementation in the same file—though not visible in this snippet).
|
||||
- `InitializeComponent()` must be called exactly once during construction; this is standard for WPF user controls and is enforced by the constructor.
|
||||
- No validation, state mutation, or business logic is present in this file; the class is a pure UI container at this level.
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **External dependency:** `DTS.Common.Interface` — provides the `ITablesSettingsView` interface contract.
|
||||
- **WPF framework dependencies:** Implicit reliance on `System.Windows` (via `InitializeComponent()` and XAML compilation), though not explicitly imported.
|
||||
- **Internal dependency (inferred):** `TablesSettingsView.xaml` — the corresponding XAML file must exist and define the UI layout; otherwise, `InitializeComponent()` will fail at runtime.
|
||||
- *Depended upon by:* Any consumer of `ITablesSettingsView`, likely a view model or settings controller that instantiates or binds to `TablesSettingsView`.
|
||||
|
||||
### 5. **Gotchas**
|
||||
- The source file contains no logic beyond the constructor and base WPF initialization, so critical behavior (e.g., event handling, data binding setup, or interface implementation details) resides elsewhere (e.g., in `TablesSettingsView.xaml.cs` partial extensions not shown, or in `TablesSettingsView.xaml`).
|
||||
- The interface `ITablesSettingsView` is referenced but not defined here; its contract (methods, properties, events) is unknown from this file alone and must be consulted separately.
|
||||
- No error handling or null checks are present in the constructor—reliance on WPF’s `InitializeComponent()` behavior (which throws if XAML fails to load) is implicit.
|
||||
- **No identified business logic or side effects**, but absence of code does not guarantee absence of hidden complexity (e.g., XAML may contain triggers, converters, or bindings with non-trivial dependencies).
|
||||
@@ -0,0 +1,116 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/Modules/SystemSettings/Tables/ViewModel/TablesSettingsViewModel.cs
|
||||
generated_at: "2026-04-16T04:40:21.830816+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "d6165d55cd0ea9cd"
|
||||
---
|
||||
|
||||
# ViewModel
|
||||
|
||||
## Documentation: `TablesSettingsViewModel`
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
`TablesSettingsViewModel` is the view model for the *Tables Settings* module within the application’s UI layer. It acts as the data context for `ITablesSettingsView`, coordinating UI state (e.g., busy status, menu/navigation visibility) and bridging communication between the view and the application’s event infrastructure via `IEventAggregator`. It also exposes `InteractionRequest`s to support modal notifications and confirmations through Prism’s interaction patterns. This module is part of a modular, MEF-exported component system and is intended to be shared across the application lifecycle.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### **Class: `TablesSettingsViewModel`**
|
||||
- **Exported as:** `[Export(typeof(ITablesSettingsView))]` — implies it is intended to be resolved as an `ITablesSettingsView` (likely via MEF or Unity).
|
||||
- **Creation Policy:** `Shared` — only one instance exists per application lifetime.
|
||||
|
||||
##### **Properties**
|
||||
| Property | Type | Description |
|
||||
|---------|------|-------------|
|
||||
| `View` | `ITablesSettingsView` | Reference to the associated view; set in constructor. |
|
||||
| `NotificationRequest` | `InteractionRequest<Notification>` | Used to trigger display of notification popups (e.g., informational messages). |
|
||||
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Used to trigger confirmation dialogs. |
|
||||
| `IsDirty` | `bool` | Read-only; currently always `false` (no logic implemented to set it). |
|
||||
| `IsBusy` | `bool` | Gets/sets busy state; raises `PropertyChanged` on change. |
|
||||
| `IsMenuIncluded` | `bool` | Gets/sets whether the menu is included in the view; raises `PropertyChanged`. |
|
||||
| `IsNavigationIncluded` | `bool` | Gets/sets whether navigation is included in the view; raises `PropertyChanged`. |
|
||||
| `HeaderInfo` | `string` | Read-only; always returns `"MainRegion"`. |
|
||||
|
||||
##### **Methods**
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `Cleanup` | `void Cleanup()` | No-op stub. |
|
||||
| `CleanupAsync` | `Task CleanupAsync()` | Returns `Task.CompletedTask`. |
|
||||
| `Initialize` | `void Initialize()` | No-op stub. |
|
||||
| `Initialize` | `void Initialize(object parameter)` | No-op stub. |
|
||||
| `Initialize` | `void Initialize(object parameter, object model)` | No-op stub. |
|
||||
| `InitializeAsync` | `Task InitializeAsync()` | Returns `Task.CompletedTask`. |
|
||||
| `InitializeAsync` | `Task InitializeAsync(object parameter)` | Returns `Task.CompletedTask`. |
|
||||
| `Activated` | `void Activated()` | No-op stub. |
|
||||
|
||||
##### **Event Handlers (Private)**
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `OnBusyIndicatorNotification` | `private void OnBusyIndicatorNotification(bool eventArg)` | Sets `IsBusy` to `eventArg`. |
|
||||
| `OnRaiseNotification` | `private void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)` | Transforms `NotificationContentEventArgs` (with title/message/image) into a `Notification` object and raises `NotificationRequest`. Note: it discards the `Title` and `Image` fields of the original event args and passes them via `NotificationContentEventArgs` constructor with empty strings for some parameters — see *Gotchas*. |
|
||||
|
||||
##### **Interface Implementations**
|
||||
| Interface | Method | Signature | Description |
|
||||
|-----------|--------|-----------|-------------|
|
||||
| `INotifyPropertyChanged` | `PropertyChanged` | `event PropertyChangedEventHandler PropertyChanged` | Raised via `OnPropertyChanged`. |
|
||||
| `IBasePropertyChanged` | `OnPropertyChanged` | `void IBasePropertyChanged.OnPropertyChanged(string propertyName)` | Delegates to `OnPropertyChanged(propertyName)`. |
|
||||
| — | `SetProperty` | `bool SetProperty<T>(ref T storage, T value, string propertyName = null)` | **Throws `NotImplementedException`** — not implemented. |
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- `View.DataContext` is always set to `this` (the view model) in the constructor.
|
||||
- `IsBusy` is initialized to `false` and only modified via `OnBusyIndicatorNotification`, which is subscribed to `BusyIndicatorChangeNotification`.
|
||||
- `NotificationRequest` and `ConfirmationRequest` are initialized in the constructor and never reassigned.
|
||||
- `HeaderInfo` is a constant string `"MainRegion"` and never changes.
|
||||
- `IsDirty` is declared but never set — its value remains `false` for the lifetime of the instance.
|
||||
- `SetProperty` is declared but unimplemented — calling it will always throw `NotImplementedException`.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### **Imports / Dependencies (via constructor parameters and `using` directives)**
|
||||
|
||||
- **Prism Libraries**:
|
||||
- `IEventAggregator` — for pub/sub event handling.
|
||||
- `IRegionManager` — for region navigation (though unused in current implementation).
|
||||
- `Unity` container (`IUnityContainer`) — for dependency injection.
|
||||
- **Custom Infrastructure**:
|
||||
- `DTS.Common.Events.RaiseNotification` — event type subscribed to in constructor.
|
||||
- `DTS.Common.Events.BusyIndicatorChangeNotification` — event type subscribed to in constructor.
|
||||
- `DTS.Common.Base.IBasePropertyChanged` — interface implemented explicitly.
|
||||
- `DTS.Common.Interface.ITablesSettingsView` — view interface.
|
||||
- **MEF**:
|
||||
- `[Export(typeof(ITablesSettingsView))]` — indicates this type is registered as an export for `ITablesSettingsView`.
|
||||
- **UI Framework**:
|
||||
- `Prism.Regions`, `Prism.Events`, `Prism.Interactivity` — used for region management, event aggregation, and interaction requests.
|
||||
|
||||
#### **Depended Upon By**
|
||||
- The view (`ITablesSettingsView`) — this view model is bound to its `DataContext`.
|
||||
- Likely consumed via MEF/Unity resolution as `ITablesSettingsView`.
|
||||
- Other modules may publish `RaiseNotification` or `BusyIndicatorChangeNotification` events to trigger UI feedback via this view model.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **`SetProperty` is unimplemented** — throws `NotImplementedException`. This breaks expected MVVM patterns (e.g., `INotifyPropertyChanged` helpers). Developers should avoid calling it.
|
||||
- **`NotificationContentEventArgs` transformation in `OnRaiseNotification` is lossy**:
|
||||
The method constructs a new `NotificationContentEventArgs` with empty strings for the 2nd and 4th parameters (likely `OkContent` and `CancelContent`), discarding any original values. This may cause unexpected behavior if callers expect those fields to be preserved.
|
||||
- **No-op lifecycle methods**: `Initialize`, `InitializeAsync`, `Activated`, `Cleanup`, and `CleanupAsync` contain no logic — may indicate incomplete implementation or deferred functionality.
|
||||
- **`IsDirty` is never set**: Despite being a public property, it is never assigned — always `false`. This may mislead consumers expecting dirty-state tracking.
|
||||
- **`HeaderInfo` is hardcoded**: Always returns `"MainRegion"` — no dynamic behavior or configuration.
|
||||
- **`IBasePropertyChanged.OnPropertyChanged` is implemented explicitly** — only callable via interface cast.
|
||||
- **Thread context for `BusyIndicatorChangeNotification`**: Subscribed with `ThreadOption.PublisherThread`, meaning the handler runs on the publisher’s thread — may require dispatcher marshaling if the publisher is not on the UI thread (though `IsBusy` setter calls `OnPropertyChanged`, which *should* marshal to UI thread if `INotifyPropertyChanged` is handled by Prism’s binding system).
|
||||
|
||||
---
|
||||
|
||||
*Documentation generated from source file `TablesSettingsViewModel.cs` only. No external behavior or assumptions beyond what is visible in the source.*
|
||||
Reference in New Issue
Block a user