Files
2026-04-17 14:55:32 -04:00

5.3 KiB
Raw Permalink Blame History

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common.Property/Model/GraphPropertyObject.cs
2026-04-16T03:28:40.550784+00:00 Qwen/Qwen3-Coder-Next-FP8 1 9e6ad0b9e1f98318

Model

Purpose

GraphPropertyObject is a data model class designed to expose a standardized set of graph-related metadata properties for display and editing in a WPF PropertyGrid control (specifically, the Xceed WPF Toolkit PropertyGrid). It serves as a base or shared model for objects whose properties need to be presented in a structured, categorized UI—typically for configuration, debugging, or visualization of graph elements (e.g., nodes, edges, or signal traces in a DTS system). The class encapsulates user-facing metadata such as description, filtering criteria, data flags, and engineering unit (EU) conversion parameters, enabling consistent property browsing without requiring custom UI logic.


Public Interface

All members are instance properties; no methods or nested types are defined.

Property Type Attributes Description
Description string [Category("Action")], [DisplayName("Description")], [Description("This property uses a TextBox as the default editor.")] Free-text description of the graph element.
Filter string [Category("Action")], [DisplayName("Filter")], [Description("This property uses a TextBox as the default editor.")], [ItemsSource(typeof(CFCFilterItemSource))] Filter string (likely for narrowing displayed data). Uses CFCFilterItemSource as a source for dropdown suggestions (though the actual CFCFilterItemSource type is not defined in this file).
DataFlag string [Category("Information")], [DisplayName("Data Flag")], [Description("This property uses a TextBox as the default editor.")] A flag indicating data status or type (e.g., "Valid", "Stale").
ShiftT0 double [Category("Information")], [DisplayName("Shift T0 (ms)")], [Description("This property uses a TextBox as the default editor.")] Time shift offset applied to the signals time base, in milliseconds.
EuMultiplier double [Category("Information")], [DisplayName("EU Multiplier")], [Description("This property uses a TextBox as the default editor.")] Multiplicative factor for converting raw values to engineering units.
EuOffset double [Category("Information")], [DisplayName("EU Offset")], [Description("This property uses a TextBox as the default editor.")] Additive offset for converting raw values to engineering units.

Note

: All properties use TextBox editors by default in the PropertyGrid. The ItemsSource attribute on Filter implies integration with CFCFilterItemSource, but its implementation is not included here.


Invariants

  • No explicit validation or invariants are enforced in the class itself (e.g., no null checks, range validation, or required fields).
  • All properties are publicly gettable/settable; no immutability guarantees.
  • The ShiftT0, EuMultiplier, and EuOffset properties are of type double, but no constraints (e.g., non-negative, finite) are specified in metadata or code.
  • The Filter propertys valid values are intended to be constrained by CFCFilterItemSource, but the class does not enforce this at runtime.

Dependencies

External Dependencies (via imports):

  • System.ComponentModel Used for CategoryAttribute, DisplayNameAttribute, and DescriptionAttribute.
  • Xceed.Wpf.Toolkit.PropertyGrid.Attributes Provides ItemsSourceAttribute, used on the Filter property.

Type References (not defined here):

  • CFCFilterItemSource Referenced as a type argument for ItemsSourceAttribute on Filter. Its definition is not included in the provided source; likely a custom IItemSource implementation for the PropertyGrid.

Depended Upon By:

  • Inferred to be used by UI components (e.g., PropertyGrid instances) in WPF applications, likely within the DTS system (e.g., for configuring graph elements in a test or visualization tool).
  • No other code in this file references it, so dependencies must be inferred from usage elsewhere in the codebase.

Gotchas

  • Missing CFCFilterItemSource definition: The ItemsSource attribute on Filter references CFCFilterItemSource, but this type is not declared or imported in the provided source. Its behavior (e.g., item format, filtering logic) is unknown without additional context.
  • No validation on numeric properties: ShiftT0, EuMultiplier, and EuOffset accept any double value (including NaN, Infinity, or negative values), which may lead to runtime errors if consumed by downstream logic expecting valid EU conversion parameters.
  • No inheritance or interface implementation: The class is a plain POCO. If intended for data binding or serialization, consumers must ensure compatibility (e.g., via INotifyPropertyChanged, though none is implemented here).
  • Hard-coded categories: Categories ("Action", "Information") are fixed; renaming or reorganizing them requires code changes.
  • No documentation on EU conversion formula: While EuMultiplier and EuOffset suggest linear conversion (EU = raw * EuMultiplier + EuOffset), this is not stated explicitly in the source.