Files
2026-04-17 14:55:32 -04:00

4.4 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Interface/ExportData/IExportDataView.cs
Common/DTS.Common/Interface/ExportData/IExportDataViewModel.cs
Common/DTS.Common/Interface/ExportData/IExportHeader.cs
2026-04-16T03:03:17.276925+00:00 Qwen/Qwen3-Coder-Next-FP8 1 4ffe82b09ec78621

ExportData

Documentation: Export Data Module Interfaces

1. Purpose

This module defines core interfaces for the export data feature within the DTS (Data Transfer System) framework. It establishes the contract for view, view model, and header abstractions used in data export functionality—likely supporting UI-driven configuration of export column selection and metadata. The interfaces are minimal, leveraging base abstractions (IBaseView, IBaseViewModel) and standard .NET patterns (INotifyPropertyChanged) to integrate with MVVM or similar UI architectures, enabling decoupled, testable export workflows.

2. Public Interface

  • IExportDataView

    public interface IExportDataView : IBaseView
    

    Represents the view layer for the export data feature. Inherits IBaseView (from DTS.Common.Base), implying it adheres to a common view contract (e.g., binding context, lifecycle hooks), though specifics of IBaseView are not provided here. No additional members are declared.

  • IExportDataViewModel

    public interface IExportDataViewModel : IBaseViewModel
    

    Represents the view model layer for the export data feature. Inherits IBaseViewModel (from DTS.Common.Base), implying it provides data-binding capabilities and command exposure for the view. No additional members are declared.

  • IExportHeader

    public interface IExportHeader : INotifyPropertyChanged
    {
        string HeaderName { get; set; }
        bool IsSelected { get; set; }
    }
    

    Represents a single export column header with metadata.

    • HeaderName: Gets or sets the display name of the column (e.g., "Customer ID").
    • IsSelected: Gets or sets whether this column is included in the export.
      Implements INotifyPropertyChanged, enabling UI binding for dynamic updates (e.g., toggling selection).

3. Invariants

  • IExportHeader.IsSelected must be observable via PropertyChanged events for IsSelected changes (due to INotifyPropertyChanged inheritance).
  • IExportHeader.HeaderName and IsSelected are mutable properties (both have setters), but no constraints on valid values (e.g., HeaderName may be empty or null unless enforced elsewhere).
  • IExportDataView and IExportDataViewModel inherit from base interfaces (IBaseView, IBaseViewModel), implying they must satisfy those base contracts (e.g., IBaseView likely requires a DataContext of type IBaseViewModel or similar—though exact details are unspecified here).

4. Dependencies

  • Dependencies of this module:
    • DTS.Common.Base (provides IBaseView, IBaseViewModel).
    • System.ComponentModel (for INotifyPropertyChanged).
  • Dependencies on this module:
    • UI layers (e.g., WPF/WinForms) consuming IExportDataView and IExportDataViewModel for export UI.
    • Export logic components (e.g., exporters, serializers) likely consume IExportHeader collections to determine which columns to include.
    • Note: No direct references to concrete implementations are present in the source—suggesting this is a pure abstraction layer.

5. Gotchas

  • Ambiguity in base interfaces: IBaseView and IBaseViewModel are referenced but not defined here. Their contracts (e.g., required properties/methods) are unknown and critical for proper implementation.
  • No validation on HeaderName: IExportHeader allows null or empty HeaderName values, which could cause UI rendering issues if not guarded against upstream.
  • No export-specific behavior defined: Despite the module name (ExportData), the interfaces contain no methods for triggering export, managing column order, or handling errors—suggesting behavior is delegated to implementations or other modules.
  • Namespace inconsistency: IExportHeader resides in DTS.Common.Interface.ExportData, while IExportDataView and IExportDataViewModel use DTS.Common.Interface (without the ExportData sub-namespace). This may indicate incomplete refactoring or intentional separation of concerns (e.g., headers are reusable across modules).