Files
DP44/docs/ai/Common/DTS.Common/Events/GroupTemplates/GroupTemplateList.md

70 lines
3.0 KiB
Markdown
Raw Normal View History

2026-04-17 14:55:32 -04:00
---
source_files:
- Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupDoubleClickEvent.cs
- Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupTemplateSelectedEvent.cs
generated_at: "2026-04-17T16:37:52.470436+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "6fe92df199df2a2d"
---
# Documentation: GroupTemplateList Events
## 1. Purpose
This module defines two event types for the GroupTemplateList feature within the DTS application. These events facilitate loosely-coupled communication between UI components using the Prism Event Aggregation pattern. They notify subscribers when user interactions occur with group templates—specifically when a template is selected or double-clicked.
---
## 2. Public Interface
### `GroupTemplateListGroupDoubleClickEvent`
**Signature:**
```csharp
public class GroupTemplateListGroupDoubleClickEvent : PubSubEvent<string> { }
```
**Behavior:**
An event that publishes a `string` payload. Intended to be raised when a user double-clicks on a group template in a list view. Subscribers receive the template identifier as a string.
---
### `GroupTemplateListGroupTemplateSelectedEvent`
**Signature:**
```csharp
public class GroupTemplateListGroupTemplateSelectedEvent : PubSubEvent<string[]> { }
```
**Behavior:**
An event that publishes a `string[]` (string array) payload. Intended to be raised when a template is selected in the group template list. Subscribers receive an array of strings, the contents of which are not documented in the source.
---
## 3. Invariants
- Both event classes inherit from `PubSubEvent<T>` and add no additional members or overrides.
- `GroupTemplateListGroupDoubleClickEvent` always carries a single `string` payload.
- `GroupTemplateListGroupTemplateSelectedEvent` always carries a `string[]` payload.
- Both classes are concrete, non-abstract, and non-sealed.
---
## 4. Dependencies
**This module depends on:**
- `Prism.Events` — Provides the `PubSubEvent<T>` base class for implementing the pub/sub event pattern.
**What depends on this module:**
- Cannot be determined from source alone. Consumers would typically be ViewModels or services that publish or subscribe to these events via Prism's `IEventAggregator`.
---
## 5. Gotchas
1. **Mismatched XML documentation:** The `<summary>` comment in `GroupTemplateListGroupDoubleClickEvent.cs` incorrectly states "The GroupTemplateListGroupTemplateSelectedEvent event" instead of referencing its own class name. This appears to be a copy-paste error.
2. **Inconsistent payload types:** The two events use different payload types (`string` vs `string[]`) despite both having the same remarks comment ("called when a template is selected"). The semantic meaning of the `string[]` payload in `GroupTemplateListGroupTemplateSelectedEvent` is unclear from the source—developers should investigate the publisher to understand what the array contains.
3. **Identical remarks:** Both events share the same remarks text, which is misleading since they represent different user