init
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Property/Model/GraphPropertyObject.cs
|
||||
generated_at: "2026-04-16T03:28:40.550784+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "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 signal’s 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` property’s 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.
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Property/Properties/AssemblyInfo.cs
|
||||
generated_at: "2026-04-16T03:28:27.855508+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "fde27770883326da"
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
## Documentation: DTS.Common.Property Assembly (DTS.Viewer.GraphProperties)
|
||||
|
||||
### 1. Purpose
|
||||
This module is an assembly containing shared property-related types for the `DTS.Viewer.GraphProperties` component. It serves as a foundational library for property management within the DTS (Data Tracking System) viewer, likely providing data structures, interfaces, or utilities used by UI or core graph visualization modules to represent and manipulate property metadata. The assembly itself contains no application logic—its purpose is purely to package and version shared property abstractions.
|
||||
|
||||
### 2. Public Interface
|
||||
**No public types are defined in this file.**
|
||||
The file `AssemblyInfo.cs` contains only assembly-level metadata attributes (e.g., `AssemblyTitle`, `AssemblyVersion`). It does not declare any classes, interfaces, structs, enums, or methods. Therefore, there are **no public functions, classes, or methods** documented here. Public APIs must reside in other source files within the `DTS.Common.Property` project.
|
||||
|
||||
### 3. Invariants
|
||||
- The assembly identity is fixed at version `1.0.0.0` (both `AssemblyVersion` and `AssemblyFileVersion`).
|
||||
- The assembly is **not COM-visible** (`ComVisible(false)`), meaning its types cannot be consumed by COM clients unless explicitly exposed via other means (e.g., `ComVisible(true)` on individual types).
|
||||
- The GUID `d076086a-82c6-4c14-a8d6-ce0eea28e3cb` uniquely identifies the typelib for COM interop (though irrelevant given `ComVisible(false)`).
|
||||
- The assembly title and product are consistently named `"DTS.Viewer.GraphProperties"`.
|
||||
- Copyright is attributed to Microsoft (2017), indicating legacy or internal Microsoft ownership.
|
||||
|
||||
### 4. Dependencies
|
||||
- **Dependencies**: This file has no runtime dependencies beyond the .NET Framework base assemblies (`System`, `System.Runtime.InteropServices`, etc.) required for `System.Reflection` and `System.Runtime.CompilerServices`.
|
||||
- **Dependents**: This assembly (`DTS.Common.Property`) is presumably referenced by other modules in the `DTS.Viewer` suite (e.g., `DTS.Viewer.GraphProperties` UI layer, core graph engine), though the dependency direction cannot be inferred from this file alone.
|
||||
|
||||
### 5. Gotchas
|
||||
- **Misleading filename**: The assembly title and product name (`DTS.Viewer.GraphProperties`) do not match the folder path (`Common/DTS.Common.Property`), which may cause confusion about the assembly’s scope.
|
||||
- **No public surface area**: Developers should not expect to find APIs in this file; it is purely metadata. Actual property-related types are likely in other files (e.g., `Property.cs`, `IProperty.cs`).
|
||||
- **Versioning rigidity**: Both `AssemblyVersion` and `AssemblyFileVersion` are hardcoded to `1.0.0.0`. This may indicate legacy code or intentional immutability, but could complicate deployment if version-based binding is expected.
|
||||
- **COM compatibility**: While `ComVisible(false)` is set, the presence of a `Guid` attribute suggests historical COM exposure intent—verify if any types *within the same assembly* (not in this file) are marked `ComVisible(true)`.
|
||||
|
||||
None identified from source alone beyond the above.
|
||||
48
enriched-qwen3-coder-next/Common/DTS.Common.Property/View.md
Normal file
48
enriched-qwen3-coder-next/Common/DTS.Common.Property/View.md
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Property/View/PropertyView.xaml.cs
|
||||
generated_at: "2026-04-16T03:28:35.882669+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "3a321f21820c1d34"
|
||||
---
|
||||
|
||||
# View
|
||||
|
||||
### 1. **Purpose**
|
||||
This module defines the WPF UI view (`PropertyView`) for displaying and editing properties of a graph node or element within the DTS (Data Transformation Services) system. It serves as the concrete implementation of the `IPropertyView` interface, bridging the UI layer with the underlying property model via data binding. Its existence enables a standardized, reusable property editing surface in the application’s UI, likely used in conjunction with a graph editor or configuration panel.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
- **`PropertyView()`**
|
||||
*Signature:* `public PropertyView()`
|
||||
*Behavior:* Constructor that initializes the WPF component by calling `InitializeComponent()`, which wires up the XAML-defined UI elements (from `PropertyView.xaml`) to the code-behind. No additional initialization logic is present in the provided source.
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
- The class implements the `IPropertyView` interface (from `DTS.Common.Interface`), implying it adheres to a contract defined elsewhere for property view behavior (e.g., exposing a `DataContext` of a property model, supporting refresh/update methods).
|
||||
- `InitializeComponent()` must be called exactly once during construction—standard WPF practice—ensuring the XAML UI is properly instantiated before use.
|
||||
- No explicit validation or state constraints are visible in this file alone; invariants are likely enforced by the `IPropertyView` interface or by consumers of this view.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
- **Internal Dependencies:**
|
||||
- `DTS.Common.Interface` namespace (specifically the `IPropertyView` interface).
|
||||
- **External Dependencies (WPF):**
|
||||
- `System.Windows.Controls` (via `partial class PropertyView : Window/UserControl` implied by XAML).
|
||||
- `PropertyView.xaml` (must exist in the same project/folder; not shown but required for `InitializeComponent()`).
|
||||
- **Depended Upon By:**
|
||||
- Likely consumed by higher-level UI components (e.g., a graph editor or property pane) that depend on `IPropertyView` for polymorphic UI injection.
|
||||
- No direct consumers are visible in this file; dependency direction is inferred from interface usage.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
- **No logic in constructor**: The constructor does not accept parameters or perform property initialization—consumers must set the `DataContext` (e.g., to a property model object) *after* instantiation to populate the view.
|
||||
- **Interface contract ambiguity**: While `IPropertyView` is referenced, its members (e.g., methods/properties like `Refresh()`, `ApplyChanges()`) are not visible here; behavior expectations rely on external documentation.
|
||||
- **XAML coupling**: The view’s behavior is partially defined in `PropertyView.xaml` (not provided), so runtime behavior (e.g., data binding paths, event handlers) cannot be fully inferred from this file.
|
||||
- **No error handling visible**: Absence of try/catch or validation logic in the constructor means exceptions during `InitializeComponent()` (e.g., XAML parsing errors) will propagate unhandled.
|
||||
- **None identified from source alone.**
|
||||
@@ -0,0 +1,102 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.Common.Property/ViewModel/PropertyViewModel.cs
|
||||
generated_at: "2026-04-16T03:28:26.668106+00:00"
|
||||
model: "Qwen/Qwen3-Coder-Next-FP8"
|
||||
schema_version: 1
|
||||
sha256: "07b6bc1210aae7cd"
|
||||
---
|
||||
|
||||
# ViewModel
|
||||
|
||||
## Documentation: `PropertyViewModel` Module
|
||||
|
||||
---
|
||||
|
||||
### 1. **Purpose**
|
||||
|
||||
The `PropertyViewModel` class serves as the view model for a property editing UI in the DTS (Data Tracking System) application, implementing Prism’s MVVM pattern and integrating with Unity dependency injection and region management. It acts as a bridge between the `IPropertyView` UI layer and underlying domain data (`_properties`), while also exposing Prism `InteractionRequest`s for displaying notifications and confirmations. It inherits from `BaseViewModel<IGraphPropertyViewModel>`, suggesting it participates in a broader graph-based property editing context (e.g., for editing properties of nodes/edges in a graph model), though current implementation is largely skeletal.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Public Interface**
|
||||
|
||||
#### `PropertyViewModel(IPropertyView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)`
|
||||
- **Behavior**: Constructor. Assigns the provided `view`, sets `view.DataContext = this`, initializes `NotificationRequest` and `ConfirmationRequest`, registers `OnRaiseNotification` as a handler for the `RaiseNotification` event via `EventAggregator`, and stores references to infrastructure services.
|
||||
|
||||
#### `InteractionRequest<Notification> NotificationRequest { get; }`
|
||||
- **Behavior**: Prism interaction request used to raise notification popups (e.g., informational messages). Triggered internally via `OnRaiseNotification` when a `RaiseNotification` event is published.
|
||||
|
||||
#### `InteractionRequest<Confirmation> ConfirmationRequest { get; }`
|
||||
- **Behavior**: Prism interaction request used to raise confirmation dialogs (e.g., yes/no prompts). *Currently unused in the provided source*.
|
||||
|
||||
#### `IPropertyView View { get; }`
|
||||
- **Behavior**: Read-only reference to the associated view instance. Set during construction and never modified.
|
||||
|
||||
#### `string HeaderInfo { get; }`
|
||||
- **Behavior**: Returns the static header string `"Graph Property"`.
|
||||
|
||||
#### `object Properties { get; set; }`
|
||||
- **Behavior**: Holds arbitrary property data (likely a domain object or DTO representing editable properties). Raises `PropertyChanged` when set.
|
||||
|
||||
#### `override void Initialize(object parameter)`
|
||||
- **Behavior**: Assigns `Parent` from the cast `parameter` to `IBaseWindowModel`. *Note: Does not call `base.Initialize(parameter)`.*
|
||||
|
||||
#### `void Initialize(object parameter, object properties)`
|
||||
- **Behavior**: Assigns `Parent` and `_properties` from the respective parameters. *Note: Does not raise `PropertyChanged` for `Properties` here — only the property setter does.*
|
||||
|
||||
#### `override event PropertyChangedEventHandler PropertyChanged`
|
||||
- **Behavior**: Overrides base `INotifyPropertyChanged` implementation. *Note: Uses `new` to hide base implementation.*
|
||||
|
||||
#### `override void Cleanup()`, `override Task CleanupAsync()`, `override void Activated()`, `override Task InitializeAsync()`, `override Task InitializeAsync(object parameter)`
|
||||
- **Behavior**: All currently throw `NotImplementedException`. *These lifecycle methods are declared but not implemented.*
|
||||
|
||||
#### `override void Initialize()`, `override Task InitializeAsync()`
|
||||
- **Behavior**: Empty overrides (no-op). *No base call or logic.*
|
||||
|
||||
---
|
||||
|
||||
### 3. **Invariants**
|
||||
|
||||
- `View.DataContext` is always set to `this` (`PropertyViewModel` instance) immediately after construction.
|
||||
- `NotificationRequest` and `ConfirmationRequest` are initialized once and never reassigned.
|
||||
- `EventAggregator.GetEvent<RaiseNotification>().Subscribe(OnRaiseNotification)` is called exactly once in the constructor — implying a single subscription for the lifetime of the instance (no unsubscription logic is present).
|
||||
- `Parent` is assigned only via `Initialize(object parameter)` or `Initialize(object parameter, object properties)` — not in the constructor.
|
||||
- `Properties` property setter triggers `OnPropertyChanged("Properties")`, ensuring UI binding updates.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Dependencies**
|
||||
|
||||
#### **External Dependencies (via imports):**
|
||||
- `DTS.Common.Base` → `BaseViewModel<IGraphPropertyViewModel>`
|
||||
- `DTS.Common.Events` → `RaiseNotification`, `NotificationContentEventArgs`
|
||||
- `DTS.Common.Interface` → `IPropertyView`, `IBaseWindowModel`, `IGraphPropertyViewModel`
|
||||
- `Microsoft.Practices.Prism.Events` → `IEventAggregator`, `EventAggregator`
|
||||
- `Microsoft.Practices.Prism.Interactivity.InteractionRequest` → `InteractionRequest<T>`, `Notification`, `Confirmation`
|
||||
- `Microsoft.Practices.Prism.Regions` → `IRegionManager`
|
||||
- `Microsoft.Practices.Unity` → `IUnityContainer`
|
||||
|
||||
#### **Internal Dependencies (inferred):**
|
||||
- `BaseViewModel<IGraphPropertyViewModel>` — base class providing region/event/container infrastructure.
|
||||
- `RaiseNotification` event (from `DTS.Common.Events`) — expected to be published elsewhere in the system to trigger notifications via this VM.
|
||||
- `IBaseWindowModel` — expected to be passed as `parameter` during initialization (likely represents a parent window or graph context).
|
||||
- `IPropertyView` — must be provided at construction; implies a corresponding view class implementing this interface.
|
||||
|
||||
#### **Depended upon by:**
|
||||
- Likely consumed by Prism region navigation (e.g., via `IRegionManager.RequestNavigate`) given `IRegionManager` usage.
|
||||
- `IUnityContainer` usage suggests it is registered and resolved via Unity DI.
|
||||
|
||||
---
|
||||
|
||||
### 5. **Gotchas**
|
||||
|
||||
- **Critical Unimplemented Methods**: `Activated()`, `Cleanup()`, `CleanupAsync()`, `InitializeAsync()`, and `InitializeAsync(object)` all throw `NotImplementedException`. This may cause runtime failures if Prism’s lifecycle expects these to be called (e.g., during region navigation or view disposal).
|
||||
- **Missing `IsBusy`/`IsDirty` Implementation**: Properties `IsBusy` and `IsDirty` throw `NotImplementedException` in both getter and setter — likely placeholders.
|
||||
- **No Unsubscription from `RaiseNotification` Event**: The constructor subscribes to `RaiseNotification` but never unsubscribes. If `PropertyViewModel` instances are long-lived or reused, this could lead to memory leaks or duplicate notifications.
|
||||
- **`Properties` setter uses `"Properties"` string literal**: Prone to refactoring errors (e.g., renaming field/property without updating string). No `nameof()` usage.
|
||||
- **`new` keyword usage**: `new event PropertyChangedEventHandler`, `new IRegionManager`, `new bool IsBusy`, `new bool IsDirty` — suggests the base class (`BaseViewModel<...>`) declares members with the same names. This can cause confusion and subtle bugs if consumers expect base behavior.
|
||||
- **`NotificationRequest.Raise(...)` expects `NotificationContentEventArgsWithoutTitle`**: The comment states the `Notification` object expects a `NotificationContentEventArgsWithoutTitle`, but the code constructs a `NotificationContentEventArgs`. This mismatch may indicate a bug or undocumented type alias/conversion — unclear from source alone.
|
||||
- **No validation or null checks**: `parameter` is cast directly to `IBaseWindowModel` — will throw `InvalidCastException` if incorrect type is passed.
|
||||
|
||||
*None identified from source alone.* — *Correction*: The above gotchas are apparent from source analysis.
|
||||
Reference in New Issue
Block a user