--- source_files: - Common/DTS.Common/Events/ISO/ExtraPropertiesChangedEvent.cs generated_at: "2026-04-16T03:25:01.894095+00:00" model: "Qwen/Qwen3-Coder-Next-FP8" schema_version: 1 sha256: "61eef1209c66c784" --- # ISO ### 1. Purpose This module defines event infrastructure for propagating changes to *extra properties* within the ISO domain layer of the DTS system. Specifically, it provides a Prism-based pub/sub event (`ExtraPropertiesChangedEvent`) and its associated argument container (`ExtraPropertiesChangedEventArgs`) to decouple producers and consumers of property updates—enabling reactive UI or business logic components to respond when a collection of `IExtraProperty` instances is modified, while preserving provenance via `Producer` and `Consumer` references. --- ### 2. Public Interface - **`ExtraPropertiesChangedEvent`** - *Type:* `class` inheriting from `PubSubEvent` - *Behavior:* A Prism `PubSubEvent` used to publish and subscribe to notifications about changes to extra properties. Subscribers receive an `ExtraPropertiesChangedEventArgs` payload. - **`ExtraPropertiesChangedEventArgs`** - *Type:* `class` - *Constructor:* `ExtraPropertiesChangedEventArgs(IList extraProperties, object producer, object consumer)` - *Properties:* - `IList ExtraProperties { get; }` — The updated collection of extra properties. - `object Producer { get; }` — The object instance that initiated or caused the change. - `object Consumer { get; }` — The object instance that is the intended recipient or target of the change. - *Behavior:* Encapsulates the data for an `ExtraPropertiesChangedEvent` payload. All properties are read-only after construction. --- ### 3. Invariants - `ExtraProperties` is non-null (enforced by constructor assignment; no null-check is present, so passing `null` will result in a `NullReferenceException` at runtime). - `Producer` and `Consumer` may be `null` (no validation is enforced in the constructor). - The `ExtraProperties` list reference is immutable in terms of property exposure (only a getter), but the *contents* of the list are not defensively copied—consumers must treat the list as potentially mutable if the producer retains a reference. - The event is strictly *publish-once-per-change*; no batching or deduplication semantics are implied. --- ### 4. Dependencies - **Dependencies *on* this module:** - `DTS.Common.Interface.ISO.ExtraProperties` — Provides the `IExtraProperty` interface used in `ExtraPropertiesChangedEventArgs.ExtraProperties`. - `Prism.Events` — Provides the `PubSubEvent` base class. - `System.Collections.Generic` — Provides `IList`. - **Dependencies *of* this module:** - This module is consumed by components that use Prism event aggregation (e.g., view models, services) to react to extra property changes in the ISO domain. - No other modules in this file depend on it—this is a leaf event definition. --- ### 5. Gotchas - **No defensive copying:** The `ExtraProperties` list is assigned directly from the constructor argument; if the caller mutates the list *after* constructing the args object, subscribers may observe unexpected changes. - **No validation on `Producer`/`Consumer`:** These may be `null`, and subscribers must handle this case explicitly. - **No versioning or metadata:** The event carries no timestamp, correlation ID, or change type (e.g., add/remove/replace), limiting traceability or differential processing. - **Assumes Prism event aggregator usage:** The class is tightly coupled to Prism’s `PubSubEvent`—not usable in isolation without Prism infrastructure. - **No documentation on semantics of `Producer` vs `Consumer`:** The distinction between the two is not clarified in the source—consumers must infer intent (e.g., `Producer` = source of change, `Consumer` = target component).