This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
---
source_files:
- Common/DTS.CommonCore/Interface/ExportData/IExportDataView.cs
- Common/DTS.CommonCore/Interface/ExportData/IExportDataViewModel.cs
- Common/DTS.CommonCore/Interface/ExportData/IExportHeader.cs
generated_at: "2026-04-16T02:24:36.468213+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "ccb8183959611900"
---
# ExportData
## Documentation: Export Data Module Interfaces
### 1. Purpose
This module defines core interfaces for the export data feature, establishing the contract between the view, view model, and header data structures in a MVVM (Model-View-ViewModel) architecture. It provides typed abstractions for UI components that handle data export functionality—specifically, enabling selection and display of exportable fields/columns via `IExportHeader`, while decoupling UI (`IExportDataView`) and state/logic (`IExportDataViewModel`) layers through base interfaces. The module serves as a minimal, extensible foundation for export-related UIs, likely used in desktop or WPF-based client applications given the `INotifyPropertyChanged` dependency.
### 2. Public Interface
#### `IExportDataView`
- **Namespace**: `DTS.Common.Interface`
- **Inherits**: `IBaseView`
- **Description**: Marker interface for the view layer in the export data feature. No additional members beyond those inherited from `IBaseView`. Used to enforce type safety and enable dependency injection or view resolution for export-related UI components.
#### `IExportDataViewModel`
- **Namespace**: `DTS.Common.Interface`
- **Inherits**: `IBaseViewModel`
- **Description**: Marker interface for the view model layer in the export data feature. No additional members beyond those inherited from `IBaseViewModel`. Represents the state and behavior (e.g., export logic, header management) backing an `IExportDataView`.
#### `IExportHeader`
- **Namespace**: `DTS.Common.Interface.ExportData`
- **Inherits**: `INotifyPropertyChanged`
- **Properties**:
- `string HeaderName { get; set; }` The display name of the export header/column.
- `bool IsSelected { get; set; }` Indicates whether this header is included in the current export operation.
- **Description**: Represents a single column or field available for export. Implements `INotifyPropertyChanged` to support data binding (e.g., UI controls reflecting selection state changes).
### 3. Invariants
- `IExportHeader.IsSelected` must be observable via `INotifyPropertyChanged.PropertyChanged` events when modified, as required by `INotifyPropertyChanged`.
- `IExportHeader.HeaderName` must be non-null (though not validated in the interface itself—implementation responsibility).
- `IExportDataView` and `IExportDataViewModel` are *marker interfaces*; their implementations must conform to the base contracts of `IBaseView` and `IBaseViewModel` respectively (behavior of which is defined elsewhere and not derivable from this source).
- No ordering guarantees are specified for `IExportHeader` instances (e.g., no requirement for stable sort order or index-based access).
### 4. Dependencies
- **Depends on**:
- `DTS.Common.Base.IBaseView` (from `DTS.Common.Base`)
- `DTS.Common.Base.IBaseViewModel` (from `DTS.Common.Base`)
- `System.ComponentModel.INotifyPropertyChanged` (standard .NET interface)
- **Depended on by**:
- Likely concrete implementations in UI layer (e.g., WPF views, view models, and header models) within the `DTS` codebase.
- No direct usage of these interfaces is visible in the provided sources, so concrete consumers must be inferred from other modules (e.g., export service, UI project).
### 5. Gotchas
- **Ambiguity in base interfaces**: Behavior of `IBaseView` and `IBaseViewModel` is not defined here; their contracts (e.g., lifecycle methods, event patterns) must be referenced separately.
- **No header ordering or grouping**: `IExportHeader` provides no mechanism for specifying column order, group, or priority—implementation must handle this externally (e.g., via collection ordering in the view model).
- **No validation on `HeaderName`**: While `HeaderName` is non-nullable in C# reference type semantics, the interface does not enforce non-empty strings; implementations may need to guard against empty/whitespace names.
- **No export-specific metadata**: The interface lacks fields for data type, format string, or export constraints (e.g., required, max length)—these would need to be added in derived interfaces or implementations.
- **Namespace inconsistency**: `IExportHeader` resides in `DTS.Common.Interface.ExportData`, while `IExportDataView` and `IExportDataViewModel` are in `DTS.Common.Interface` (no `ExportData` sub-namespace). This may cause discoverability or organization confusion.