init
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelView.cs
|
||||
- Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/IAddCalculatedChannelViewModel.cs
|
||||
generated_at: "2026-04-16T12:23:49.838372+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "720d768a9bb759bc"
|
||||
---
|
||||
|
||||
# Documentation: IAddCalculatedChannelView & IAddCalculatedChannelViewModel
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines the view and viewmodel interfaces for the "Add Calculated Channel" feature within a larger MVVM (Model-View-ViewModel) architecture. `IAddCalculatedChannelView` serves as a marker interface for the view component, while `IAddCalculatedChannelViewModel` defines the contract for the viewmodel, exposing commands and properties for managing calculated channel creation, ISO export settings, DTS encoding defaults, and search context regions.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### IAddCalculatedChannelView
|
||||
|
||||
**Declaration:**
|
||||
```csharp
|
||||
public interface IAddCalculatedChannelView : IBaseView { }
|
||||
```
|
||||
|
||||
A marker interface extending `IBaseView`. Contains no members.
|
||||
|
||||
---
|
||||
|
||||
### IAddCalculatedChannelViewModel
|
||||
|
||||
**Declaration:**
|
||||
```csharp
|
||||
public interface IAddCalculatedChannelViewModel : IBaseViewModel
|
||||
```
|
||||
|
||||
**Properties:**
|
||||
|
||||
| Name | Type | Access | Description |
|
||||
|------|------|--------|-------------|
|
||||
| `View` | `IBaseView` | get/set | The Search View associated with this viewmodel. |
|
||||
| `Parent` | `IBaseViewModel` | get/set | Reference to the parent viewmodel in the hierarchy. |
|
||||
| `IncludeGroupNameInISOExport` | `bool` | get/set | Controls whether group names are included in ISO export output. |
|
||||
| `DefaultDTSEncoding` | `int` | get/set | The default DTS encoding value for calculated channels. |
|
||||
| `AddCalculatedChannelCommand` | `ICommand` | get | Command to add a calculated channel. |
|
||||
| `ContextSearchRegion` | `object` | get/set | Context object for the search region. |
|
||||
|
||||
**Methods:**
|
||||
|
||||
| Name | Return Type | Description |
|
||||
|------|-------------|-------------|
|
||||
| `PublishChanges()` | `void` | Publishes or commits pending changes. Behavior specifics not documented in source. |
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
- `IAddCalculatedChannelView` must always be assignable to `IBaseView`.
|
||||
- `IAddCalculatedChannelViewModel` must always be assignable to `IBaseViewModel`.
|
||||
- `AddCalculatedChannelCommand` is read-only (getter only); it cannot be replaced after initialization, only executed.
|
||||
- The presence of `Parent` property implies a hierarchical viewmodel structure that must be maintained.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
**This module depends on:**
|
||||
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
|
||||
- `System.Windows.Input` — Provides `ICommand` interface for the `AddCalculatedChannelCommand` property.
|
||||
|
||||
**Consumers:**
|
||||
- Unknown from source alone. These interfaces are intended to be implemented by concrete view and viewmodel classes elsewhere in the codebase.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
- **Namespace mismatch:** Both files include `// ReSharper disable CheckNamespace`, indicating the declared namespace (`DTS.Common.Interface`) may not match the folder structure (`Common/DTS.CommonCore/Interface/DTS.Viewer/CalculatedChannel/`). This could cause confusion when locating files or during refactoring.
|
||||
- **Marker interface:** `IAddCalculatedChannelView` has no members and serves only as a type marker. Any view-specific behavior must come from `IBaseView` or be cast to a more specific type.
|
||||
- **`ContextSearchRegion` type:** The property is typed as `object`, suggesting loose typing. The actual expected type and usage pattern is unclear from source alone.
|
||||
- **`PublishChanges()` semantics:** The method name suggests an event-publishing or change-commit pattern, but the exact behavior (what changes are published, to whom, and when this should be called) is not documented in the source.
|
||||
Reference in New Issue
Block a user