5.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
2026-04-16T12:12:55.166080+00:00 | zai-org/GLM-5-FP8 | 1 | 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:
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
INetworkingViewandINetworkAdapterViewmust be assignable toIBaseView(inheritance constraint).INetworkAdapterViewModelandINetworkingViewModelmust be assignable toIBaseViewModel(inheritance constraint).SLICE6MulticastAddressHasErroris a read-only property; its value is determined internally by the implementing class, likely based on the validity ofSLICE6MulticastAddress.- The
SetStatusmethod has defined default parameters; callers may omitmessage,percentage, andprocessIdarguments. - The semantic meaning of
percentage = -1as a default is unspecified in the source (possibly indicates "no percentage" or "indeterminate").
4. Dependencies
This module depends on:
DTS.Common.Base— ProvidesIBaseViewandIBaseViewModelbase interfaces.DTS.Common.Events— ProvidesStatusInfoclass used inSetStatusmethod signature.System.Net.NetworkInformation— ProvidesNetworkInterfacetype used inINetworkAdapterViewModel.System.Collections.Generic— Imported inINetworkingViewModel.csbut not directly used in the visible interface definition (may be used byIBaseViewModelor reserved for future use).System.Threading.Tasks— Imported inINetworkingViewModel.csbut not directly used in the visible interface definition (may be used byIBaseViewModelor 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.csfile importsSystem.Collections.GenericandSystem.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 fromIBaseViewModel. - 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:
INetworkingViewandINetworkAdapterVieware empty marker interfaces. Their purpose beyond type identification is unclear from the source alone. - Validation coupling: The presence of
SLICE6MulticastAddressHasErrorimplies validation logic tied toSLICE6MulticastAddress, but the validation rules (e.g., valid IP multicast format, acceptable range) are not defined in these interfaces.