--- source_files: - Common/DTS.CommonCore/Events/GroupTemplates/CustomChannels/CustomChannelExportFileSetEvent.cs - Common/DTS.CommonCore/Events/GroupTemplates/CustomChannels/CustomChannelImportEvent.cs generated_at: "2026-04-16T02:49:05.802703+00:00" model: "Qwen/Qwen3-Coder-Next-FP8" schema_version: 1 sha256: "46fed4b1ba64a18a" --- # CustomChannels ## Documentation: Custom Channel Events Module ### 1. Purpose This module defines Prism-based events used to coordinate custom channel import and export operations within the application’s Group Templates feature. Specifically, it provides a mechanism to signal when a custom channel export file set is ready (triggering UI busy state) and to report the completion status of a custom channel import operation. These events facilitate decoupled communication between components involved in custom channel lifecycle management. ### 2. Public Interface - **`CustomChannelExportFileSetEvent`** - *Type*: `class` - *Inherits*: `CompositePresentationEvent` - *Behavior*: A Prism event used to notify subscribers that a custom channel export file set has been generated. The payload is a `string`, which (based on naming and typical usage) is expected to represent the file path or identifier of the exported file set. Subscribers should interpret this string as the location or reference to the exported data. - **`CustomChannelImportEvent`** - *Type*: `class` - *Inherits*: `CompositePresentationEvent` - *Behavior*: A Prism event used to signal the completion status of a custom channel import operation. - **`CustomChannelImportEventArgs`** - *Type*: `class` - *Properties*: - `ImportStatus`: `Status` — read-only; indicates the outcome of the import operation. - *Constructors*: - `CustomChannelImportEventArgs(Status status)` — initializes the event args with the given import status. - *Nested Type*: - `Status` — `enum` with a single member: - `Done` — indicates the import operation has completed. ### 3. Invariants - `CustomChannelExportFileSetEvent` payloads are non-null `string` values representing an exported file set reference (e.g., a file path). Null payloads are not explicitly guarded against in the event definition, but their presence would likely cause downstream failures. - `CustomChannelImportEventArgs` instances must be constructed with a valid `Status` value; currently, only `Status.Done` is defined, implying that *only successful import completions are reported*. No error or cancellation states are modeled in the current implementation. - Events are published via Prism’s `EventAggregator`, so subscribers must be registered and unregistered appropriately to avoid memory leaks or missed notifications. ### 4. Dependencies - **Depends on**: - `Microsoft.Practices.Prism.Events` (Prism library for event aggregation) - `DTS.CommonCore` (namespace context for shared core types) - **Used by**: - Components responsible for custom channel export (publishing `CustomChannelExportFileSetEvent`) - Components responsible for custom channel import (publishing `CustomChannelImportEvent`) - UI or service layers that react to these events (e.g., to toggle busy states or update import history) ### 5. Gotchas - The `CustomChannelExportFileSetEvent` inherits `CompositePresentationEvent`, but the documentation comment does not clarify the *meaning* of the `string` payload (e.g., is it a file path, a GUID, or serialized metadata?). This ambiguity may lead to inconsistent interpretation by subscribers. - `CustomChannelImportEventArgs.Status` currently only supports `Done`. If import failures or partial successes occur, they are *not* reported via this event, potentially masking errors or leaving subscribers unaware of non-success outcomes. - The `CustomChannelImportEvent` and `CustomChannelExportFileSetEvent` share the same namespace (`DTS.Common.Events.GroupTemplates.CustomChannels`), suggesting they are part of a related workflow, but no explicit ordering or dependency between them is enforced (e.g., export must precede import). - No validation is performed on the `string` payload of `CustomChannelExportFileSetEvent`; subscribers must assume responsibility for path existence, format, or permissions. - None identified from source alone.