79 lines
2.8 KiB
Markdown
79 lines
2.8 KiB
Markdown
---
|
|
source_files:
|
|
- Common/DTS.Common/Interface/SystemSettings/DB/IDBImportView.cs
|
|
- Common/DTS.Common/Interface/SystemSettings/DB/IDBExportView.cs
|
|
- Common/DTS.Common/Interface/SystemSettings/DB/IDBViewModel.cs
|
|
generated_at: "2026-04-17T16:35:54.942184+00:00"
|
|
model: "zai-org/GLM-5-FP8"
|
|
schema_version: 1
|
|
sha256: "9116b3acac6aeb65"
|
|
---
|
|
|
|
# Documentation: DB Import/Export Interfaces
|
|
|
|
## 1. Purpose
|
|
|
|
This module defines a set of interfaces for database import and export functionality within the system settings context. It provides an abstraction layer for view models handling file-based data transfer operations, specifically supporting XML-formatted import/export workflows. The interfaces `IDBImportView` and `IDBExportView` serve as view contracts, while `IDBViewModel` orchestrates the data flow between import/export operations and their associated views.
|
|
|
|
---
|
|
|
|
## 2. Public Interface
|
|
|
|
### `IDBImportView`
|
|
**Namespace:** `DTS.Common.Interface`
|
|
**Inherits:** `IBaseView`
|
|
|
|
A marker interface with no members. Used to identify views responsible for import functionality.
|
|
|
|
---
|
|
|
|
### `IDBExportView`
|
|
**Namespace:** `DTS.Common.Interface`
|
|
**Inherits:** `IBaseView`
|
|
|
|
A marker interface with no members. Used to identify views responsible for export functionality.
|
|
|
|
---
|
|
|
|
### `IDBViewModel`
|
|
**Namespace:** `DTS.Common.Interface`
|
|
**Inherits:** `IBaseViewModel`
|
|
|
|
Defines the contract for a view model that manages database import and export operations.
|
|
|
|
**Properties:**
|
|
|
|
| Name | Type | Access | Description |
|
|
|------|------|--------|-------------|
|
|
| `ImportView` | `IDBImportView` | get/set | The view instance handling import UI |
|
|
| `ExportView` | `IDBExportView` | get/set | The view instance handling export UI |
|
|
| `ImportFileName` | `string` | get/set | File path to import from |
|
|
| `ImportStatusText` | `string` | get/set | Status message for import operations |
|
|
| `ExportFileName` | `string` | get/set | File path to export to |
|
|
| `ExportData` | `string` | get/set | Formatted XML string to write to the export file |
|
|
| `ImportData` | `string` | get/set | Formatted XML string read from the import file |
|
|
|
|
**Methods:**
|
|
|
|
| Name | Return Type | Description |
|
|
|------|-------------|-------------|
|
|
| `Export()` | `void` | Exports `ExportData` to `ExportFileName` |
|
|
|
|
---
|
|
|
|
## 3. Invariants
|
|
|
|
- `IDBImportView` and `IDBExportView` must always be assignable to `IBaseView`.
|
|
- `IDBViewModel` must always be assignable to `IBaseViewModel`.
|
|
- `ExportData` and `ImportData` are expected to contain formatted XML strings (as noted in source comments).
|
|
- The `Export()` method is expected to write the contents of `ExportData` to the path specified by `ExportFileName`.
|
|
|
|
---
|
|
|
|
## 4. Dependencies
|
|
|
|
**This module depends on:**
|
|
- `DTS.Common.Base` — provides `IBaseView` and `IBaseViewModel` base interfaces.
|
|
|
|
**What depends on this module:**
|