init
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/GroupTemplates/CustomChannels/CustomChannelExportFileSetEvent.cs
|
||||
- Common/DTS.Common/Events/GroupTemplates/CustomChannels/CustomChannelImportEvent.cs
|
||||
generated_at: "2026-04-16T03:25:48.906062+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "7dcb7f08a2b119d1"
|
||||
---
|
||||
|
||||
# CustomChannels
|
||||
|
||||
## Documentation: Custom Channel Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based pub/sub events used to coordinate custom channel import and export operations within the application. Specifically, `CustomChannelExportFileSetEvent` signals that a custom channel export file set has been prepared (and the application should update its busy/available state accordingly), while `CustomChannelImportEvent` communicates the completion status of a custom channel import operation. These events decouple the UI and business logic layers during asynchronous custom channel workflows.
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
- **`CustomChannelExportFileSetEvent`**
|
||||
- *Type*: `class` inheriting from `PubSubEvent<string>`
|
||||
- *Behavior*: A Prism event used to notify subscribers that a custom channel export file set has been generated. Despite inheriting `PubSubEvent<string>`, the event payload type is not actively used in the current implementation (see *Gotchas*). Subscribers should interpret publication of this event as a signal to mark the application as available (e.g., disable busy indicators).
|
||||
|
||||
- **`CustomChannelImportEvent`**
|
||||
- *Type*: `class` inheriting from `PubSubEvent<CustomChannelImportEventArgs>`
|
||||
- *Behavior*: A Prism event used to notify subscribers of the completion status of a custom channel import operation. Currently only supports a single status (`Done`).
|
||||
|
||||
- **`CustomChannelImportEventArgs`**
|
||||
- *Type*: `class`
|
||||
- *Properties*:
|
||||
- `Status ImportStatus { get; }` – The completion status of the import operation.
|
||||
- *Constructors*:
|
||||
- `CustomChannelImportEventArgs(Status status)` – Initializes the args with the given `Status`.
|
||||
- *Nested Enum*:
|
||||
- `enum Status { Done }` – Represents possible import outcomes. Only `Done` is defined.
|
||||
|
||||
### 3. Invariants
|
||||
- `CustomChannelImportEventArgs.ImportStatus` is immutable after construction (read-only property).
|
||||
- `CustomChannelImportEventArgs.Status` currently supports only one value (`Done`). No other statuses (e.g., `Failed`, `Cancelled`) are defined or used in the source.
|
||||
- `CustomChannelExportFileSetEvent` inherits from `PubSubEvent<string>`, but no payload is expected or used (see *Gotchas*).
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies *of* this module**:
|
||||
- `Prism.Events` (specifically `PubSubEvent<T>`).
|
||||
- No other internal modules or types are referenced in the source files.
|
||||
|
||||
- **Dependencies *on* this module**:
|
||||
- Not specified in the provided source, but by convention, modules handling custom channel import/export workflows (e.g., UI view models, service layers) are expected to subscribe to these events.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Payload type mismatch in `CustomChannelExportFileSetEvent`**:
|
||||
The class inherits from `PubSubEvent<string>`, implying a `string` payload, but the XML documentation and naming suggest it is used as a *signal* (not a data carrier). There is no evidence in the source that any subscriber expects or receives a `string` argument. This may indicate legacy or incomplete refactoring. Subscribers should treat this event as a *unit signal* (i.e., ignore the payload).
|
||||
|
||||
- **Extensibility limitation in `CustomChannelImportEventArgs.Status`**:
|
||||
The `Status` enum currently contains only `Done`. If future workflows require additional statuses (e.g., `Error`, `Cancelled`), this enum must be extended—but doing so without updating all subscribers could lead to unhandled cases.
|
||||
|
||||
- **No error reporting mechanism**:
|
||||
`CustomChannelImportEvent` only signals completion (`Done`). There is no provision for conveying error details, partial success, or cancellation. If import failures need to be communicated, a new event or extension of `CustomChannelImportEventArgs` would be required.
|
||||
|
||||
- **Empty `<remarks>` sections**:
|
||||
Neither event includes meaningful remarks in its XML documentation, suggesting minimal initial documentation effort or reliance on external design documents.
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupDoubleClickEvent.cs
|
||||
- Common/DTS.Common/Events/GroupTemplates/GroupTemplateList/GroupTemplateListGroupTemplateSelectedEvent.cs
|
||||
generated_at: "2026-04-16T03:25:57.698700+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "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`**
|
||||
```csharp
|
||||
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`**
|
||||
```csharp
|
||||
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.
|
||||
@@ -0,0 +1,81 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common/Events/GroupTemplates/TemplateChannelList/TemplateChannelListOrderChangedEvent.cs
|
||||
- Common/DTS.Common/Events/GroupTemplates/TemplateChannelList/TemplateChannelListSelectionChangedEvent.cs
|
||||
- Common/DTS.Common/Events/GroupTemplates/TemplateChannelList/TemplateChannelListRequiredChangedEvent.cs
|
||||
generated_at: "2026-04-16T03:26:02.944009+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0971a3dcff5effca"
|
||||
---
|
||||
|
||||
# TemplateChannelList
|
||||
|
||||
## Documentation: TemplateChannelList Events Module
|
||||
|
||||
### 1. Purpose
|
||||
This module defines Prism-based pub/sub events used to signal changes in the state of a *template channel list*—a UI or business construct representing ordered, configurable channels associated with a group template. Specifically, it enables decoupled communication between components that manage or consume channel lists (e.g., UI views, view models, or services), notifying them when the *order*, *selection*, or *required-ness* of channels changes. Though the XML documentation comments are misleading (referring to “template selection” instead of channel list state), the actual event types and payloads indicate they are concerned with channel-level state transitions.
|
||||
|
||||
---
|
||||
|
||||
### 2. Public Interface
|
||||
|
||||
#### `TemplateChannelListOrderChangedEvent`
|
||||
- **Type**: `class`
|
||||
- **Inherits**: `PubSubEvent<IGroupTemplateChannel>`
|
||||
- **Behavior**: Published when the *ordering* of channels in a template channel list changes. The payload is the *single channel* whose position has changed (e.g., moved up/down in the list). Subscribers can use this to reorder internal structures or update UI bindings accordingly.
|
||||
|
||||
#### `TemplateChannelListSelectionChangedEvent`
|
||||
- **Type**: `class`
|
||||
- **Inherits**: `PubSubEvent<IGroupTemplateChannel>`
|
||||
- **Behavior**: Published when the *selection state* of a channel in the list changes (e.g., user selects/deselects a channel). The payload is the *channel* whose selection status changed.
|
||||
|
||||
#### `TemplateChannelListRequiredChangedEvent`
|
||||
- **Type**: `class`
|
||||
- **Inherits**: `PubSubEvent<TemplateChannelListRequiredChangeEventArgs>`
|
||||
- **Behavior**: Published when the *required status* of one or more channels changes (e.g., a channel becomes mandatory or optional). The payload is a `TemplateChannelListRequiredChangeEventArgs` object containing:
|
||||
- `Consumer`: The object (e.g., view model or service) triggering the change.
|
||||
- `Channels`: An array of `IGroupTemplateChannel` instances whose required status has changed.
|
||||
|
||||
#### `TemplateChannelListRequiredChangeEventArgs`
|
||||
- **Type**: `class`
|
||||
- **Properties**:
|
||||
- `public object Consumer { get; }` — The entity initiating the required-status change.
|
||||
- `public IGroupTemplateChannel[] Channels { get; }` — The channels affected by the required-status change.
|
||||
- **Constructor**:
|
||||
```csharp
|
||||
public TemplateChannelListRequiredChangeEventArgs(object o, IGroupTemplateChannel[] channels)
|
||||
```
|
||||
Initializes the args with the specified consumer and channel array.
|
||||
|
||||
---
|
||||
|
||||
### 3. Invariants
|
||||
- All events are **asynchronous** (via Prism’s `PubSubEvent`), so ordering of delivery to subscribers is *not guaranteed*.
|
||||
- The `IGroupTemplateChannel` type is assumed to represent a single channel with identity, name, and state (e.g., selection, required flag), but its exact contract is defined externally (see *Dependencies*).
|
||||
- For `TemplateChannelListOrderChangedEvent` and `TemplateChannelListSelectionChangedEvent`, only *one* channel is emitted per event—no batch semantics are implied.
|
||||
- For `TemplateChannelListRequiredChangedEvent`, the `Channels` array may contain *zero or more* channels, but the event is only published when at least one channel’s required status changes.
|
||||
- The `Consumer` field in `TemplateChannelListRequiredChangeEventArgs` is *not validated*—it may be `null`, though this is discouraged.
|
||||
|
||||
---
|
||||
|
||||
### 4. Dependencies
|
||||
|
||||
#### Dependencies *of this module*:
|
||||
- `Prism.Events` — Provides the base `PubSubEvent<T>` class.
|
||||
- `DTS.Common.Interface.GroupTemplate.IGroupTemplateChannel` — Defines the interface for channel objects. Its contract is assumed to include properties like `IsSelected`, `IsRequired`, and identity (e.g., `Id`), but this is not visible in the source.
|
||||
|
||||
#### Dependencies *on this module*:
|
||||
- Any component managing or reacting to channel list state (e.g., UI views, view models, or services in the `DTS.Common` or higher layers) will subscribe to these events.
|
||||
- The `TemplateChannelListRequiredChangedEvent` suggests integration with a consumer registration pattern (via the `Consumer` property), implying downstream systems track which entities are responsible for channel requirements.
|
||||
|
||||
---
|
||||
|
||||
### 5. Gotchas
|
||||
- **Misleading documentation**: All three events’ XML comments incorrectly state *“called when a template is selected”*—this is inconsistent with their actual payloads and naming. This may cause confusion during debugging or onboarding.
|
||||
- **Ambiguous semantics of `Consumer`**: The `Consumer` field in `TemplateChannelListRequiredChangeEventArgs` is typed as `object`, offering no compile-time safety or clarity about expected types. This increases the risk of runtime errors if consumers misidentify the source of the change.
|
||||
- **No distinction between *initiator* and *affected channels***: In `TemplateChannelListRequiredChangedEvent`, the `Consumer` and `Channels` are bundled together, but it is unclear whether *all* channels in the array changed *because of* the consumer or *for* the consumer. This could lead to incorrect assumptions about causality.
|
||||
- **No event for bulk operations**: If multiple channels’ order or selection changes simultaneously (e.g., drag-and-drop reordering of several items), this module provides no event to signal the full set—only per-channel events. Subscribers must deduce batch changes by correlating events, which is error-prone.
|
||||
- **No cancellation or rollback mechanism**: These are *notification-only* events (fire-and-forget). There is no way for subscribers to veto a change (e.g., prevent an invalid reordering).
|
||||
|
||||
None identified beyond the above.
|
||||
Reference in New Issue
Block a user