init
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupChannelList/GroupChannelDeleteRequestEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupChannelList/GroupChannelsChangedEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupChannelList/GroupUpdatedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:37.172100+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "1f00e06c87e755ec"
|
||||
---
|
||||
|
||||
# GroupChannelList
|
||||
|
||||
## Documentation: GroupChannelList Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based event types used for communication related to group channel list management within the DTS system. It enables decoupled notification of changes to group channel structures—such as channel deletions, overall channel count updates, and logical group updates (e.g., channel insertion or assignment changes)—across UI layers and business logic components. These events follow the Prism `CompositePresentationEvent<T>` pattern, supporting subscription on multiple threads and view-model-level decoupling.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `GroupChannelDeleteRequestEvent`
|
||||
- **Type**: `class` (inherits `CompositePresentationEvent<GroupChannelDeleteRequestEventArgs>`)
|
||||
- **Behavior**: Publishes a request to delete a specific channel from a group. Subscribers are expected to handle the deletion logic.
|
||||
|
||||
#### `GroupChannelDeleteRequestEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `object Page` — The UI page or context where the deletion was initiated.
|
||||
- `IGroupChannel Channel` — The channel object requested for deletion.
|
||||
- **Constructor**: `GroupChannelDeleteRequestEventArgs(object page, IGroupChannel channel)`
|
||||
|
||||
#### `GroupChannelsChangedEvent`
|
||||
- **Type**: `class` (inherits `CompositePresentationEvent<GroupChannelsChangedEventArgs>`)
|
||||
- **Behavior**: Published when the number of channels in a group has changed (e.g., after bulk add/remove operations).
|
||||
- **Note**: The XML comment incorrectly labels this as “The GroupUpdated event” and states it is “called when a template is selected,” which appears inconsistent with its name and payload. Actual semantics are inferred from the type name and data.
|
||||
|
||||
#### `GroupChannelsChangedEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `object Group` — The group whose channel count has changed.
|
||||
- `int ChannelCount` — The new total number of channels in the group.
|
||||
- **Constructor**: `GroupChannelsChangedEventArgs(object group, int channelCount)`
|
||||
|
||||
#### `GroupUpdatedEvent`
|
||||
- **Type**: `class` (inherits `CompositePresentationEvent<GroupUpdatedEventArgs>`)
|
||||
- **Behavior**: Published when a logical update occurs within a group’s channel list, such as insertion of new channels or assignment of channels to users/groups.
|
||||
|
||||
#### `GroupUpdatedEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `object Page` — The UI page or context where the update occurred.
|
||||
- `Status UpdateStatus` — Indicates the type of update performed (see enum below).
|
||||
- **Enum `Status`**:
|
||||
- `ChannelsInserted` — New channels were inserted into the group.
|
||||
- `AssignmentsMade` — Channel assignments (e.g., user/group permissions) were modified.
|
||||
- **Constructor**: `GroupUpdatedEventArgs(object page, Status status)`
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
|
||||
- All event args classes are **immutable** after construction (no setters beyond the constructor).
|
||||
- `Channel` in `GroupChannelDeleteRequestEventArgs` is guaranteed non-null at construction time (enforced by constructor), but nullability of `Page` and `Group` is not explicitly constrained—callers may pass `null`.
|
||||
- `ChannelCount` in `GroupChannelsChangedEventArgs` must reflect the **current total** number of channels in the group after the change.
|
||||
- `UpdateStatus` in `GroupUpdatedEventArgs` must be one of the two defined enum values (`ChannelsInserted` or `AssignmentsMade`).
|
||||
- Events are published using Prism’s `CompositePresentationEvent<T>`, implying they support **thread-safe subscription** and **background thread publishing**, though the source does not specify default threading behavior (e.g., `ThreadOption`).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of* this module:
|
||||
- `Microsoft.Practices.Prism.Events` — Provides `CompositePresentationEvent<T>`.
|
||||
- `DTS.Common.Interface.Channels.IGroupChannel` — Interface defining the contract for group channels (imported from `DTS.Common.Interface.Channels`).
|
||||
|
||||
#### Dependencies *on* this module:
|
||||
- Any module handling group channel UI or state (e.g., view models, services) likely subscribes to these events.
|
||||
- The presence of `IGroupChannel` implies this module is part of a larger channel abstraction layer; consumers must implement or reference `DTS.Common.Interface.Channels`.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
|
||||
- **Misleading XML comments**:
|
||||
- `GroupChannelsChangedEvent` is documented as “The GroupUpdated event” and described as “called when a template is selected,” which contradicts its name and payload. This may cause confusion during maintenance.
|
||||
- `GroupUpdatedEvent` is documented identically, despite having a distinct purpose and payload.
|
||||
- **Ambiguous `Page`/`Group` semantics**:
|
||||
- The `object` type for `Page` and `Group` provides flexibility but lacks compile-time safety. Consumers must agree on expected types (e.g., `Page` likely represents a `FrameworkElement` or view model, but this is not specified).
|
||||
- **No explicit validation**:
|
||||
- No validation is enforced on `ChannelCount` (e.g., non-negative), though negative values would be semantically invalid.
|
||||
- **No event payload versioning**:
|
||||
- Adding new fields to event args (e.g., `ChannelCount` → `ChannelCount`, `ChannelIds`) would break backward compatibility for existing subscribers.
|
||||
- **None identified from source alone** for behavioral quirks beyond the above.
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupsList/GroupListEditGroupEvent.cs
|
||||
- Common/DTS.CommonCore/Events/Groups/GroupsList/GroupListGroupSelectedEvent.cs
|
||||
generated_at: "2026-04-16T02:49:31.134710+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "d421bd098cb2332c"
|
||||
---
|
||||
|
||||
# GroupsList
|
||||
|
||||
## Documentation Page: Group List Events
|
||||
|
||||
### 1. Purpose
|
||||
This module defines two Prism-based events used for inter-module communication in the DTS application related to group list UI interactions. Specifically, `GroupListEditGroupEvent` signals when a user selects a single group for editing, and `GroupListGroupSelectedEvent` signals when one or more groups are selected (e.g., for batch operations). These events decouple UI components (e.g., group list views) from handlers (e.g., view models or controllers) by leveraging the Prism event aggregation pattern.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `GroupListEditGroupEvent`
|
||||
- **Namespace**: `DTS.Common.Events.Groups.GroupList`
|
||||
- **Inherits**: `CompositePresentationEvent<int>`
|
||||
- **Behavior**: Published when a *single* group is selected for editing. The payload is the `int` ID of the selected group.
|
||||
|
||||
#### `GroupListGroupSelectedEvent`
|
||||
- **Namespace**: `DTS.Common.Events.Groups.GroupList`
|
||||
- **Inherits**: `CompositePresentationEvent<int[]>`
|
||||
- **Behavior**: Published when *one or more* groups are selected (e.g., via multi-select). The payload is an `int[]` array of group IDs in the current selection.
|
||||
|
||||
> **Note**: Despite the XML documentation comments referencing `"GroupTemplateListGroupTemplateSelectedEvent"` and `"called when a template is selected"`, the actual class names and payload types (`int` vs `int[]`) and the namespace context (`GroupList`) strongly indicate these events pertain to *groups*, not templates. This appears to be a copy-paste error in the comments.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- `GroupListEditGroupEvent` **always** carries exactly one group ID (`int`), implying the event is intended for single-selection contexts.
|
||||
- `GroupListGroupSelectedEvent` **always** carries an array of group IDs (`int[]`), which may be empty, contain one element, or multiple elements.
|
||||
- Both events derive from `CompositePresentationEvent<T>`, meaning they are thread-safe for publishing/subscribing across UI threads (Prism’s default behavior for `CompositePresentationEvent`).
|
||||
- No validation rules or constraints are enforced on the group IDs (e.g., negative IDs or non-existent IDs are not prevented by the event definition itself).
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *on***:
|
||||
- `Microsoft.Practices.Prism.Events` (Prism library, specifically `CompositePresentationEvent<T>`).
|
||||
- **Dependencies *of***:
|
||||
- UI components (e.g., group list controls) that publish these events when selection changes.
|
||||
- Subscribers (e.g., view models, services) that react to group selection changes (e.g., to load group details, enable edit commands, or trigger batch operations).
|
||||
- **No other internal module dependencies** are visible in the provided source files.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Misleading XML comments**: Both event classes include documentation referencing `"GroupTemplateListGroupTemplateSelectedEvent"` and "template selection", which contradicts the class names, namespaces, and payload semantics (group IDs, not template IDs). This is likely stale documentation and could mislead developers.
|
||||
- **Ambiguity in selection semantics**: `GroupListGroupSelectedEvent` uses `int[]`, but the array’s ordering (e.g., sorted, user-selection order) and whether duplicates are possible are not specified. Subscribers must not assume ordering or uniqueness without external guarantees.
|
||||
- **No null safety**: Since `int` and `int[]` are value types (with `int[]` being a reference type but non-nullable in C# without `?`), the event payload is never `null`, but an empty array (`new int[0]`) is valid for `GroupListGroupSelectedEvent`. Subscribers must handle the empty-array case explicitly if needed.
|
||||
- **No versioning or deprecation markers**: The events lack attributes or comments indicating planned changes or obsolescence, but given the namespace (`DTS.CommonCore`), they are likely part of a stable shared layer—caution is warranted when modifying them.
|
||||
|
||||
None identified beyond the above.
|
||||
Reference in New Issue
Block a user