Files
DP44/docs/ai/Common/DTS.Common/Events/DTS.Viewer/TestModification.md
2026-04-17 14:55:32 -04:00

4.5 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common/Events/DTS.Viewer/TestModification/RefreshTestRequestEvent.cs
Common/DTS.Common/Events/DTS.Viewer/TestModification/ShowT0CursorEvent.cs
Common/DTS.Common/Events/DTS.Viewer/TestModification/TestModificationChangedEvent.cs
Common/DTS.Common/Events/DTS.Viewer/TestModification/SetUseZeroForUnfilteredEvent.cs
Common/DTS.Common/Events/DTS.Viewer/TestModification/TestModificationEvent.cs
Common/DTS.Common/Events/DTS.Viewer/TestModification/ShiftT0Event.cs
2026-04-17T16:03:15.426783+00:00 zai-org/GLM-5-FP8 1 f69e333ecbb396d6

TestModification

Purpose

This module defines a set of Prism events for coordinating test modification operations within the DTS Viewer system. It provides a loosely-coupled messaging mechanism for components to communicate changes to test data, T0 cursor state, and filtering behavior without direct references. All events inherit from CompositePresentationEvent<T> from the legacy Microsoft.Practices.Prism library.

Public Interface

RefreshTestRequestEvent

  • Signature: public class RefreshTestRequestEvent : CompositePresentationEvent<string>
  • Payload: string (test ID)
  • Behavior: Published to request a refresh of a specific test identified by its ID.

ShowT0CursorEvent

  • Signature: public class ShowT0CursorEvent : CompositePresentationEvent<bool>
  • Payload: bool (true to show, false to hide)
  • Behavior: Controls visibility of the T0 cursor in the viewer.

TestModificationChangedEvent

  • Signature: public class TestModificationChangedEvent : CompositePresentationEvent<ITestModificationModel>
  • Payload: ITestModificationModel
  • Behavior: Notifies subscribers when the data folder or test modification model has changed.

SetUseZeroForUnfilteredEvent

  • Signature: public class SetUseZeroForUnfilteredEvent : CompositePresentationEvent<bool>
  • Payload: bool
  • Behavior: Controls whether 0 or P is used in the isocode filter field when modifying an isocode from a filter.

TestModificationEvent

  • Signature: public class TestModificationEvent : CompositePresentationEvent<TestModificationArgs>
  • Payload: TestModificationArgs
  • Behavior: Published whenever a test is modified by the viewer. Used by DataPro to regenerate an ROI when an event is modified.

TestModificationArgs

  • Properties:
    • string DataSetDirectory { get; private set; } - Path to the DTS file
    • string TestId { get; private set; } - Identifier of the modified test
  • Constructor: TestModificationArgs(string dtsFilePath, string testId)

ShiftT0Event

  • Signature: public class ShiftT0Event : CompositePresentationEvent<ShiftT0EventArguments>
  • Payload: ShiftT0EventArguments
  • Behavior: Published to shift the T0 marker position.

ShiftT0EventArguments

  • Properties:
    • double T0Time { get; } - The T0 time value
    • bool IsInitialization { get; } - Whether this shift is part of initialization
    • int T0Steps { get; } - Steps/samples from T0 to shift
    • bool IsKeyPress { get; } - Whether shift was caused by arrow key press
  • Constructors:
    • ShiftT0EventArguments(double t0, bool isInitialization) - Sets T0Time, defaults T0Steps=0, IsKeyPress=false
    • ShiftT0EventArguments(int steps, bool isInitialization, bool isKeyPress) - Sets T0Steps, defaults T0Time=0D

Invariants

  • TestModificationArgs.DataSetDirectory and TestId are set only at construction and cannot be modified.
  • ShiftT0EventArguments properties are immutable after construction.
  • When using the time-based constructor for ShiftT0EventArguments, T0Steps is always 0 and IsKeyPress is always false.
  • When using the steps-based constructor for ShiftT0EventArguments, T0Time is always 0D.

Dependencies

  • Depends on: Microsoft.Practices.Prism.Events (legacy Prism event aggregation), DTS.Common.Interface (for ITestModificationModel)
  • Depended on by: Unclear from source alone; likely consumed by viewer components, DataPro, and any module that modifies test data.

Gotchas

  • The XML comment for TestModificationChangedEvent states "The Data Folder changed event" which appears inconsistent with the class name and payload type (ITestModificationModel).
  • Several files use // ReSharper disable CheckNamespace suggesting namespace inconsistencies that were suppressed rather than fixed.
  • The ShiftT0EventArguments class has two mutually exclusive constructors; the time-based and steps-based approaches cannot be combined in a single instance.