This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,99 @@
---
source_files:
- Common/DTS.CommonCore/Interface/Networking/INetworkingView.cs
- Common/DTS.CommonCore/Interface/Networking/INetworkAdapterView.cs
- Common/DTS.CommonCore/Interface/Networking/INetworkAdapterViewModel.cs
- Common/DTS.CommonCore/Interface/Networking/INetworkingViewModel.cs
generated_at: "2026-04-16T12:12:55.166080+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "9f8faed114584889"
---
# Documentation: Networking Interfaces
## 1. Purpose
This module defines the core interfaces for networking-related Views and ViewModels within the DTS application framework. It establishes the contract for a Model-View-ViewModel (MVVM) architecture concerning network configuration, specifically providing abstractions for network adapter selection and SLICE6 multicast communication settings. These interfaces enable decoupling between UI components and networking logic, allowing for testability and separation of concerns.
---
## 2. Public Interface
### `INetworkingView`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseView`
A marker interface with no additional members. Serves as a type contract for networking-related view components.
---
### `INetworkAdapterView`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseView`
A marker interface with no additional members. Serves as a type contract for network adapter selection view components.
---
### `INetworkAdapterViewModel`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseViewModel`
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `SelectedNetworkInterface` | `NetworkInterface` | get/set | Represents the currently selected network interface from `System.Net.NetworkInformation`. |
---
### `INetworkingViewModel`
**Namespace:** `DTS.Common.Interface`
**Inherits:** `IBaseViewModel`
| Member | Type | Access | Description |
|--------|------|--------|-------------|
| `View` | `INetworkingView` | get/set | Reference to the associated view instance. |
| `SLICE6MulticastAddress` | `string` | get/set | The multicast address string for SLICE6 communication. |
| `SLICE6MulticastAddressHasError` | `bool` | get | Indicates whether the multicast address has a validation error. |
| `SLICE6MulticastCommandPort` | `int` | get/set | The port number for SLICE6 multicast commands. |
| `SLICE6MulticastResponsePort` | `int` | get/set | The port number for SLICE6 multicast responses. |
**Methods:**
```csharp
void SetStatus(StatusInfo.StatusState status, string message = "", decimal percentage = -1, int processId = 0)
```
Sets the operational status with an optional message, completion percentage, and process identifier. Default values are provided for `message` (empty string), `percentage` (-1), and `processId` (0).
---
## 3. Invariants
- `INetworkingView` and `INetworkAdapterView` must be assignable to `IBaseView` (inheritance constraint).
- `INetworkAdapterViewModel` and `INetworkingViewModel` must be assignable to `IBaseViewModel` (inheritance constraint).
- `SLICE6MulticastAddressHasError` is a read-only property; its value is determined internally by the implementing class, likely based on the validity of `SLICE6MulticastAddress`.
- The `SetStatus` method has defined default parameters; callers may omit `message`, `percentage`, and `processId` arguments.
- The semantic meaning of `percentage = -1` as a default is unspecified in the source (possibly indicates "no percentage" or "indeterminate").
---
## 4. Dependencies
**This module depends on:**
- `DTS.Common.Base` — Provides `IBaseView` and `IBaseViewModel` base interfaces.
- `DTS.Common.Events` — Provides `StatusInfo` class used in `SetStatus` method signature.
- `System.Net.NetworkInformation` — Provides `NetworkInterface` type used in `INetworkAdapterViewModel`.
- `System.Collections.Generic` — Imported in `INetworkingViewModel.cs` but not directly used in the visible interface definition (may be used by `IBaseViewModel` or reserved for future use).
- `System.Threading.Tasks` — Imported in `INetworkingViewModel.cs` but not directly used in the visible interface definition (may be used by `IBaseViewModel` or reserved for future use).
**What depends on this module:**
- Cannot be determined from the provided source alone. Concrete implementations of these interfaces and consumers of these interfaces are not present in the provided files.
---
## 5. Gotchas
- **Unused imports:** The `INetworkingViewModel.cs` file imports `System.Collections.Generic` and `System.Threading.Tasks`, but neither namespace appears to be used in the interface definition. This may indicate dead code, refactoring remnants, or types used by inherited members from `IBaseViewModel`.
- **SLICE6 naming:** The "SLICE6" prefix on multicast-related properties suggests a specific protocol or device integration. The significance of this naming is not documented in the source.
- **Marker interfaces:** `INetworkingView` and `INetworkAdapterView` are empty marker interfaces. Their purpose beyond type identification is unclear from the source alone.
- **Validation coupling:** The presence of `SLICE6MulticastAddressHasError` implies validation logic tied to `SLICE6MulticastAddress`, but the validation rules (e.g., valid IP multicast format, acceptable range) are not defined in these interfaces.