3.7 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-16T03:25:57.698700+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | fe288275e1339690 |
GroupTemplateList
Documentation: GroupTemplateList Events
1. Purpose
This module defines Prism-based pub/sub events used to communicate user interactions with the group template list UI component—specifically, when a template is selected (potentially multiple templates) or when a template is double-clicked. These events decouple the UI layer (e.g., a list control) from downstream logic (e.g., template loading or editing), enabling modular and testable event-driven behavior in the application.
2. Public Interface
All types reside in the DTS.Common.Events.GroupTemplates.GroupTemplateList namespace.
-
GroupTemplateListGroupDoubleClickEventpublic class GroupTemplateListGroupDoubleClickEvent : PubSubEvent<string> { }A Prism
PubSubEventcarrying a singlestringpayload. Published when a user double-clicks a single group template in the list. The payload is the identifier (e.g., name or GUID) of the selected template. -
GroupTemplateListGroupTemplateSelectedEventpublic class GroupTemplateListGroupTemplateSelectedEvent : PubSubEvent<string[]> { }A Prism
PubSubEventcarrying astring[]payload. Published when one or more templates are selected (e.g., via click or keyboard selection). The payload is an array of template identifiers.
3. Invariants
GroupTemplateListGroupDoubleClickEventalways carries exactly one template identifier (i.e., the array length is implicitly 1), though the type system does not enforce this—consumers must assume a single-element array or handle accordingly.GroupTemplateListGroupTemplateSelectedEventmay carry zero, one, or multiple template identifiers (i.e., the array may be empty or have length ≥ 1).- The string identifiers used in both events are assumed to be stable and meaningful to downstream consumers (e.g., database keys or file paths), but their exact format is not defined in this module.
4. Dependencies
- Depends on:
Prism.Events(specificallyPubSubEvent<T>). - Used by: UI components (e.g., a list view control) that raise these events on user interaction, and consumers (e.g., view models or services) that subscribe to them to trigger actions like opening a template editor or loading configuration.
- No other modules in this codebase are referenced in the source files, indicating this is a self-contained event definition layer.
5. Gotchas
- Ambiguity in "selected" vs. "double-clicked" semantics: The documentation comments for both events say “called when a template is selected,” but the event names and payload types (
stringvsstring[]) imply different user actions (single double-click vs. multi-select). Consumers must distinguish based on event type, not comment text. - No validation on payload contents: Neither event validates or constrains the template identifiers (e.g., null checks, format). Subscribers must handle invalid or unexpected values.
- Potential confusion from naming:
GroupTemplateListGroupDoubleClickEventis documented asGroupTemplateListGroupTemplateSelectedEventin its XML comment (a copy-paste error in the source). This may cause confusion during code review or debugging. - No ordering guarantee: The Prism
PubSubEventimplementation does not guarantee delivery order to subscribers if multiple handlers exist.