3.1 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-16T12:22:08.946405+00:00 | zai-org/GLM-5-FP8 | 1 | fa541836d2cec79b |
Documentation: ILegendView / ILegendViewModel
1. Purpose
This module defines the core interfaces for a Legend component within a Viewer system, following the MVVM (Model-View-ViewModel) architectural pattern. ILegendView represents the view abstraction for legend visualization, while ILegendViewModel defines the contract for its corresponding ViewModel, establishing the relationship between the two layers. These interfaces enable decoupled communication between the legend's presentation logic and its UI rendering.
2. Public Interface
ILegendView
Namespace: DTS.Common.Interface
Inherits: IBaseView
A marker interface representing a legend view component. No members are defined beyond those inherited from IBaseView.
public interface ILegendView : IBaseView { }
ILegendViewModel
Namespace: DTS.Common.Interface
Inherits: IBaseViewModel
Defines the contract for a legend ViewModel with access to its associated view.
| Member | Type | Access | Description |
|---|---|---|---|
View |
ILegendView |
get |
Returns the associated ILegendView instance for this ViewModel. |
public interface ILegendViewModel : IBaseViewModel
{
ILegendView View { get; }
}
3. Invariants
ILegendViewModel.Viewmust return a non-nullILegendViewinstance when accessed (implied by the contract, though nullability annotations are not present in the source).- Both interfaces must maintain their inheritance from
IBaseViewandIBaseViewModelrespectively, ensuring consistency with the broader view/viewmodel hierarchy. - The
Viewproperty onILegendViewModelis read-only (getter only), suggesting the view association is established at construction or through internal mechanisms, not via public setters.
4. Dependencies
This module depends on:
DTS.Common.Base— ProvidesIBaseViewandIBaseViewModelbase interfaces from which these interfaces inherit.
What depends on this module:
- Cannot be determined from source alone. Consumers would include concrete implementations of
ILegendViewandILegendViewModel, as well as any components that render or interact with legend functionality.
5. Gotchas
- Marker Interface:
ILegendViewdefines no members of its own. All functionality comes fromIBaseView. Developers should consultIBaseViewto understand available members. - Tight Coupling via Property: The
ILegendViewModel.Viewproperty creates a direct reference from the ViewModel to the View, which is a deviation from pure MVVM where ViewModels are typically view-agnostic. The rationale for this design choice is not documented in the source. - Missing Nullability Annotations: The source lacks C# 8.0+ nullable reference type annotations, making it unclear whether
Viewis guaranteed to be non-null.