Files
DP44/enriched-qwen3-coder-next/Common/DTS.Common/Events/GroupTemplates/GroupTemplateList.md
2026-04-17 14:55:32 -04:00

3.7 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupDoubleClickEvent.cs
Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupTemplateSelectedEvent.cs
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.

  • GroupTemplateListGroupDoubleClickEvent

    public class GroupTemplateListGroupDoubleClickEvent : PubSubEvent<string> { }
    

    A Prism PubSubEvent carrying a single string payload. 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.

  • GroupTemplateListGroupTemplateSelectedEvent

    public class GroupTemplateListGroupTemplateSelectedEvent : PubSubEvent<string[]> { }
    

    A Prism PubSubEvent carrying a string[] 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

  • GroupTemplateListGroupDoubleClickEvent always 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.
  • GroupTemplateListGroupTemplateSelectedEvent may 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 (specifically PubSubEvent<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 (string vs string[]) 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: GroupTemplateListGroupDoubleClickEvent is documented as GroupTemplateListGroupTemplateSelectedEvent in its XML comment (a copy-paste error in the source). This may cause confusion during code review or debugging.
  • No ordering guarantee: The Prism PubSubEvent implementation does not guarantee delivery order to subscribers if multiple handlers exist.