3.7 KiB
3.7 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||||
|---|---|---|---|---|---|---|---|---|---|
|
2026-04-17T16:02:22.282441+00:00 | zai-org/GLM-5-FP8 | 1 | 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;bImportindicates 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 byImportFileName.ObservableCollection<ICustomChannelModel> AllCustomChannels { get; }— Read-only collection of all available custom channel models.void SelectAll()— Marks all channels inAllCustomChannelsas included.void ClearSelection()— Marks all channels inAllCustomChannelsas not included.void Export()— Executes the export operation for selected channels.void Import()— Executes the import operation.
Invariants
AllCustomChannelscollection must be initialized before UI binding.ImportFileNameandExportFileNameshould be set before callingReadImportFile()andExport()respectively.ImportViewandExportViewmust be assigned before callingOnSetActive().- The
Nameproperty onICustomChannelModelimplementations 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
ICustomChannelsViewinterface in fileICustomChannelsView.csis in namespaceDTS.Common.Interface, while the other interfaces are inDTS.Common.Interface.CustomChannels. This namespace inconsistency may cause resolution issues if not explicitly imported. - No error handling contract is defined for
ReadImportFile(),Export(), orImport()— behavior on failure is unspecified.