init
This commit is contained in:
65
docs/ai/Common/DTS.Common/Interface/CustomChannels.md
Normal file
65
docs/ai/Common/DTS.Common/Interface/CustomChannels.md
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Interface/CustomChannels/ICustomChannelsView.cs
|
||||
- Common/DTS.Common/Interface/CustomChannels/ICustomChannelsExportView.cs
|
||||
- Common/DTS.Common/Interface/CustomChannels/ICustomChannelsImportView.cs
|
||||
- Common/DTS.Common/Interface/CustomChannels/ICustomChannelModel.cs
|
||||
- Common/DTS.Common/Interface/CustomChannels/ICustomChannelsViewModel.cs
|
||||
generated_at: "2026-04-17T16:02:22.282441+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "f9183b9c91865b30"
|
||||
---
|
||||
|
||||
# CustomChannels
|
||||
|
||||
### Purpose
|
||||
This module defines the contract for a Custom Channels feature, providing interfaces for a Model-View-ViewModel (MVVM) architecture that supports importing and exporting custom channel configurations. It serves as an abstraction layer between the UI components and the business logic for managing channel selection and file-based data transfer operations.
|
||||
|
||||
### Public Interface
|
||||
|
||||
**ICustomChannelsView** : `IBaseView`
|
||||
- Marker interface for the main custom channels view. No members defined beyond the base interface.
|
||||
|
||||
**ICustomChannelsExportView** : `IBaseView`
|
||||
- Marker interface for the export view. No members defined beyond the base interface.
|
||||
|
||||
**ICustomChannelsImportView** : `IBaseView`
|
||||
- Marker interface for the import view. No members defined beyond the base interface.
|
||||
|
||||
**ICustomChannelModel**
|
||||
- `string Name { get; }` — Read-only property for the channel name.
|
||||
- `bool Included { get; set; }` — Read/write property indicating whether the channel is selected for inclusion.
|
||||
|
||||
**ICustomChannelsViewModel** : `IBaseViewModel`
|
||||
- `ICustomChannelsImportView ImportView { get; set; }` — Gets or sets the import view instance.
|
||||
- `ICustomChannelsExportView ExportView { get; set; }` — Gets or sets the export view instance.
|
||||
- `void Unset()` — Clears or resets the view model state.
|
||||
- `void OnSetActive(bool bImport)` — Called when the view becomes active; `bImport` indicates import mode (true) or export mode (false).
|
||||
- `string ExportFileName { get; set; }` — Gets or sets the filename for export operations.
|
||||
- `string ImportFileName { get; set; }` — Gets or sets the filename for import operations.
|
||||
- `void ReadImportFile()` — Reads and parses the import file specified by `ImportFileName`.
|
||||
- `ObservableCollection<ICustomChannelModel> AllCustomChannels { get; }` — Read-only collection of all available custom channel models.
|
||||
- `void SelectAll()` — Marks all channels in `AllCustomChannels` as included.
|
||||
- `void ClearSelection()` — Marks all channels in `AllCustomChannels` as not included.
|
||||
- `void Export()` — Executes the export operation for selected channels.
|
||||
- `void Import()` — Executes the import operation.
|
||||
|
||||
### Invariants
|
||||
- `AllCustomChannels` collection must be initialized before UI binding.
|
||||
- `ImportFileName` and `ExportFileName` should be set before calling `ReadImportFile()` and `Export()` respectively.
|
||||
- `ImportView` and `ExportView` must be assigned before calling `OnSetActive()`.
|
||||
- The `Name` property on `ICustomChannelModel` implementations is immutable after creation.
|
||||
|
||||
### Dependencies
|
||||
**Depends on:**
|
||||
- `DTS.Common.Base` (`IBaseView`, `IBaseViewModel`)
|
||||
- `System.Collections.ObjectModel` (`ObservableCollection`)
|
||||
|
||||
**Dependents:** Unknown from source alone (likely concrete View/ViewModel implementations and a higher-level coordinator).
|
||||
|
||||
### Gotchas
|
||||
- The `ICustomChannelsView` interface in file `ICustomChannelsView.cs` is in namespace `DTS.Common.Interface`, while the other interfaces are in `DTS.Common.Interface.CustomChannels`. This namespace inconsistency may cause resolution issues if not explicitly imported.
|
||||
- No error handling contract is defined for `ReadImportFile()`, `Export()`, or `Import()` — behavior on failure is unspecified.
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user