init
This commit is contained in:
39
docs/ai/Common/DTS.Common/Base/Model.md
Normal file
39
docs/ai/Common/DTS.Common/Base/Model.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Base/Model/BaseModel.cs
|
||||
generated_at: "2026-04-17T16:10:18.439141+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "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`, implements `IBaseModel`
|
||||
- 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
|
||||
- `TModel` must always be a reference type (class constraint).
|
||||
- `IsSaved` is initialized to `false` (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 `IsSaved` property has a private setter but no method in this class ever sets it to `true`. 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).
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user