8.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T12:16:00.246337+00:00 | zai-org/GLM-5-FP8 | 1 | 9dfaf004748c958d |
Documentation: View/ViewModel Component Interfaces
1. Purpose
This module defines a set of abstraction interfaces for a Model-View-ViewModel (MVVM) architecture, specifically for displaying and managing grouped assembly information in a UI. It provides two parallel interface hierarchies: one in the DTS.Common.Interface namespace for assembly-based views, and another in the DataPro.Common.Interface namespace for tile/group-based views. These interfaces enable decoupling of UI components from their concrete implementations, supporting view composition patterns where assemblies can be displayed as individual items or grouped lists.
2. Public Interface
DTS.Common.Interface Namespace
IAssemblyView
public interface IAssemblyView : IBaseView { }
Marker interface extending IBaseView. Represents a single assembly view component. No members defined.
IAssemblyListView
public interface IAssemblyListView : IBaseView { }
Marker interface extending IBaseView. Represents a list container for assembly views. No members defined.
IAssemblyViewModel
public interface IAssemblyViewModel : IBaseViewModel
{
IAssemblyView View { get; set; }
string GroupName { get; set; }
List<AssemblyNameImage> AssemblyList { get; set; }
}
ViewModel interface for a single assembly group. Properties:
View- The associated view instanceGroupName- Name identifier for the groupAssemblyList- Collection ofAssemblyNameImageobjects
IAssemblyListViewModel
public interface IAssemblyListViewModel : IBaseViewModel
{
IMainViewModel Parent { get; set; }
IAssemblyListView View { get; set; }
List<IAssemblyView> GroupList { get; set; }
}
ViewModel interface for a collection of assembly groups. Properties:
Parent- Reference to the parentIMainViewModelView- The associated list view instanceGroupList- Collection ofIAssemblyViewinstances
DataPro.Common.Interface Namespace
ITileView
public interface ITileView : IBaseView { }
Marker interface extending IBaseView. Represents a tile-based view component. No members defined.
IGroupView
public interface IGroupView : IBaseView { }
Marker interface extending IBaseView. Represents a group-based view component. No members defined.
ITileListView
public interface ITileListView : IBaseView { }
Marker interface extending IBaseView. Represents a list container for tile views. No members defined.
IGroupListView
public interface IGroupListView : IBaseView { }
Marker interface extending IBaseView. Represents a list container for group views. No members defined.
ITileViewModel
public interface ITileViewModel : IBaseViewModel
{
ITileView View { get; set; }
string GroupName { get; set; }
List<AssemblyNameImage> AssemblyList { get; set; }
}
ViewModel interface for a tile-based assembly group. Properties:
View- The associated tile view instanceGroupName- Name identifier for the groupAssemblyList- Collection ofAssemblyNameImageobjects
IGroupViewModel
public interface IGroupViewModel : IBaseViewModel
{
IGroupView View { get; set; }
string GroupName { get; set; }
List<AssemblyNameImage> AssemblyList { get; set; }
}
ViewModel interface for a group-based assembly display. Properties:
View- The associated group view instanceGroupName- Name identifier for the groupAssemblyList- Collection ofAssemblyNameImageobjects
ITileListViewModel
public interface ITileListViewModel : IBaseViewModel
{
IMainViewModel Parent { get; set; }
ITileListView View { get; set; }
List<ITileView> GroupList { get; set; }
}
ViewModel interface for a collection of tile groups. Properties:
Parent- Reference to the parentIMainViewModelView- The associated tile list view instanceGroupList- Collection ofITileViewinstances
IGroupListViewModel
public interface IGroupListViewModel : IBaseViewModel
{
IMainViewModel Parent { get; set; }
IGroupListView View { get; set; }
List<IGroupView> GroupList { get; set; }
}
ViewModel interface for a collection of groups. Properties:
Parent- Reference to the parentIMainViewModelView- The associated group list view instanceGroupList- Collection ofIGroupViewinstances
3. Invariants
- All View interfaces (
IAssemblyView,IAssemblyListView,ITileView,IGroupView,ITileListView,IGroupListView) must inherit fromIBaseView. - All ViewModel interfaces must inherit from
IBaseViewModel. - The
Viewproperty on a ViewModel must reference an instance of its corresponding View interface type (e.g.,IAssemblyViewModel.Viewmust be of typeIAssemblyView). - List ViewModels maintain a parent-child relationship:
IAssemblyListViewModel,ITileListViewModel, andIGroupListViewModelmust have a validParentreference toIMainViewModel. - The
GroupListproperty on list ViewModels must contain elements of the corresponding single-item View interface type.
4. Dependencies
External Dependencies (referenced but not defined in source):
DTS.Common.Base.IBaseView- Base interface for all views in the DTS namespaceDTS.Common.Base.IBaseViewModel- Base interface for all ViewModels in the DTS namespaceDataPro.Common.Base.IBaseView- Base interface for all views in the DataPro namespaceDataPro.Common.Base.IBaseViewModel- Base interface for all ViewModels in the DataPro namespaceAssemblyNameImage- Data structure representing assembly information (type definition not provided)IMainViewModel- Parent ViewModel interface (type definition not provided)
Namespace Dependencies:
System.Collections.Generic- ForList<T>usageSystem.Collections.ObjectModel- Imported in DataPro ViewModel files but not actively usedSystem.Reflection- Imported in DataPro ViewModel files but not actively used
5. Gotchas
Namespace Inconsistency
The codebase contains two parallel interface hierarchies with inconsistent namespace naming:
DTS.Common.InterfacevsDataPro.Common.InterfaceDTS.Common.BasevsDataPro.Common.Base
This suggests either an ongoing refactoring, a legacy migration, or intentional separation between two subsystems. The relationship between these two namespace families is unclear from source alone.
Unused Imports
The following files import namespaces that are never used in the interface definitions:
ITileViewModel.cs- importsSystem.Collections.ObjectModelandSystem.ReflectionIGroupViewModel.cs- importsSystem.Collections.ObjectModelandSystem.ReflectionITileListViewModel.cs- importsSystem.Collections.ObjectModel,System.Reflection, andSystemIGroupListViewModel.cs- importsSystem.Collections.ObjectModel,System.Reflection, andSystem
Structural Duplication
ITileViewModel and IGroupViewModel have identical member signatures, differing only in their View property types (ITileView vs IGroupView). Similarly, ITileListViewModel and IGroupListViewModel are structurally identical. This may indicate an opportunity for generic abstraction or consolidation.
Missing Type Definitions
The types AssemblyNameImage and IMainViewModel are referenced but not defined in the provided source files. Their structure and contracts cannot be documented from the available information.