1.9 KiB
1.9 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-17T16:10:18.439141+00:00 | zai-org/GLM-5-FP8 | 1 | 3b859bff5a41827f |
Model
Purpose
This module provides the abstract BaseModel<TModel> class, which serves as a foundational base class for creating model wrapper objects in the DTS system. It establishes a pattern for wrapping domain model objects with additional infrastructure (property change notification and persistence tracking) while maintaining type safety through generics.
Public Interface
BaseModel<TModel>(abstract class)-
Inherits from:
BasePropertyChanged, implementsIBaseModel -
Generic constraint:
TModel : class -
TModel Model { get; set; }- Gets or sets the wrapped model object. -
bool IsSaved { get; }- Gets a value indicating whether the model has been saved. Has a private setter; no public method exists to set this to true. -
BaseModel()- Public parameterless constructor. Creates a new instance of the base class.
-
Invariants
TModelmust always be a reference type (class constraint).IsSavedis initialized tofalse(default bool value) and can only be modified within the class itself.
Dependencies
- Depends on:
BasePropertyChanged(base class providing property change notification),IBaseModel(interface contract). - Depended on by: Unknown from this source alone, but designed as a base class for model wrappers throughout the system.
Gotchas
- The
IsSavedproperty has a private setter but no method in this class ever sets it totrue. Subclasses or external code cannot modify it, suggesting either incomplete implementation or that reflection/serialization is expected to set it. - The class is abstract but has a public constructor (suppressed ReSharper warning indicates this is intentional, possibly for serialization or reflection scenarios).