3.2 KiB
3.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:37:52.583907+00:00 | zai-org/GLM-5-FP8 | 1 | 4781a254be509f2c |
Documentation: Viewer Settings Events
1. Purpose
This module defines two Prism event classes used for decoupled communication within the DTS Viewer subsystem. These events facilitate pub/sub messaging related to viewer settings state changes—specifically, calibration behavior configuration and visibility toggling of the viewer settings UI. Both events leverage Prism's PubSubEvent<T> base class to enable loosely-coupled component communication.
2. Public Interface
CalibrationBehaviorSettableInViewerChangedEvent
- Signature:
public class CalibrationBehaviorSettableInViewerChangedEvent : PubSubEvent<bool> - Behavior: A typed event that carries a
boolpayload indicating whether calibration behavior can be set in the viewer. Publishers broadcast the boolean state; subscribers receive it via the Prism event aggregation mechanism.
ViewerSettingsVisibilityChangedEvent
- Signature:
public class ViewerSettingsVisibilityChangedEvent : PubSubEvent<Visibility> - Behavior: A typed event that carries a
System.Windows.Visibilitypayload. Publishers broadcast visibility state changes (e.g.,Visible,Hidden,Collapsed); subscribers receive the new visibility value.
3. Invariants
- Payload types are fixed:
CalibrationBehaviorSettableInViewerChangedEventalways carriesbool;ViewerSettingsVisibilityChangedEventalways carriesVisibility. - Inheritance contract: Both classes inherit from
PubSubEvent<T>and do not override or extend any members, relying entirely on the Prism base implementation. - Namespace consistency: Both types reside in
DTS.Common.Eventsregardless of their file location withinDTS.Viewer/ViewerSettings/subdirectories.
4. Dependencies
This module depends on:
Prism.Events— ProvidesPubSubEvent<T>base class for event aggregationSystem.Windows— ProvidesVisibilityenum (used byViewerSettingsVisibilityChangedEventonly)
What depends on this module:
- Unclear from source alone. Consumers would be any component that publishes or subscribes to these events via Prism's
IEventAggregator, but such usages are not present in the provided files.
5. Gotchas
- Namespace/file path mismatch: The files are located in
Common/DTS.Common/Events/DTS.Viewer/ViewerSettings/, but the declared namespace isDTS.Common.Events. The// ReSharper disable CheckNamespacedirective suppresses IDE warnings about this discrepancy. This may indicate a deliberate organizational choice or historical refactoring artifact. - No explicit constructors or members: Both classes are empty declarations inheriting from
PubSubEvent<T>. This is idiomatic for Prism events but may confuse developers expecting explicit publish/subscribe methods on the class itself—those are accessed viaIEventAggregator.GetEvent<T>().