3.6 KiB
3.6 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-16T12:08:15.186938+00:00 | zai-org/GLM-5-FP8 | 1 | 59ff4edea9524aba |
Documentation: IRegionOfInterest
1. Purpose
This module defines the IRegionOfInterest interface within the DTS.Common.Interface.RegionOfInterest namespace. It establishes a contract for representing a specific bounded interval (defined by Start and End) that can be toggled, marked as default, and associated with specific data channels. By inheriting from INotifyPropertyChanged, this interface is designed to support data-binding scenarios, typically in UI or reactive environments, allowing consumers to react to changes in the region's state.
2. Public Interface
Interface: IRegionOfInterest
Namespace: DTS.Common.Interface.RegionOfInterest
Inherits: INotifyPropertyChanged
Properties
string Suffix { get; set; }- Gets or sets a string suffix associated with the region.
double Start { get; set; }- Gets or sets the starting boundary of the region.
double End { get; set; }- Gets or sets the ending boundary of the region.
bool IsEnabled { get; set; }- Gets or sets a value indicating whether the region is currently active.
- `bool IsDefault { get; set; }
- Gets or sets a value indicating whether this region is the default selection.
string[] ChannelNames { get; set; }- Gets or sets an array of strings representing the names of channels associated with this region.
Methods
void SetChannelNamesNoNotify(string[] names)- Sets the
ChannelNamesproperty without raising thePropertyChangedevent. This is likely used for bulk updates or initialization where UI notification overhead is unnecessary or undesirable.
- Sets the
void ResetSuffix()- Resets the
Suffixproperty to a default value. The specific default value is determined by the implementation and is not defined in the interface.
- Resets the
3. Invariants
- Notification Contract: Implementations must raise the
PropertyChangedevent (from the inheritedINotifyPropertyChangedinterface) when the value of any property changes, with the specific exception of changes made via theSetChannelNamesNoNotifymethod. - Boundary Types: The
StartandEndproperties are defined asdouble, implying the region operates over a continuous numeric domain (e.g., time, distance, or index).
4. Dependencies
- External Dependencies:
System.ComponentModel: Required for theINotifyPropertyChangedinterface.
- Downstream Dependencies:
- Unknown from this source file alone. However, classes implementing this interface and ViewModels consuming these regions will depend on this contract.
5. Gotchas
- Silent Updates via
SetChannelNamesNoNotify: Consumers listening toPropertyChangedevents will not be notified whenSetChannelNamesNoNotifyis invoked. Logic that relies on event propagation to validate or synchronize state must account for this silent update path. - Array Mutability: The
ChannelNamesproperty exposes astring[]array. Depending on the implementation, the array itself may be mutable, meaning modifying the array elements after retrieval might bypass the setter and its potential side effects or notifications. - Undefined Reset Logic: The behavior of
ResetSuffix()is implementation-specific. Developers must inspect the concrete class to determine what string the suffix is reset to.