docs: backfill XML documentation across 756 files
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public members surfaced by commentchecker — resolves 5,847 of 5,869 issues (99.6%) across three /fixdocs passes.
This commit is contained in:
@@ -10,11 +10,13 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI;
|
||||
|
||||
public class App : Application
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void Initialize()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
{
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
|
||||
@@ -32,35 +32,41 @@ public partial class DateTimeRangePicker : UserControl
|
||||
|
||||
private bool _isUpdating;
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="DateTimeRangePicker"/> class.</summary>
|
||||
public DateTimeRangePicker()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the start date and time.</summary>
|
||||
public DateTimeOffset? StartDateTime
|
||||
{
|
||||
get => GetValue(StartDateTimeProperty);
|
||||
set => SetValue(StartDateTimeProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the end date and time.</summary>
|
||||
public DateTimeOffset? EndDateTime
|
||||
{
|
||||
get => GetValue(EndDateTimeProperty);
|
||||
set => SetValue(EndDateTimeProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the start date/time as formatted text.</summary>
|
||||
public string StartText
|
||||
{
|
||||
get => GetValue(StartTextProperty);
|
||||
set => SetValue(StartTextProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the end date/time as formatted text.</summary>
|
||||
public string EndText
|
||||
{
|
||||
get => GetValue(EndTextProperty);
|
||||
set => SetValue(EndTextProperty, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnLoaded(RoutedEventArgs e)
|
||||
{
|
||||
base.OnLoaded(e);
|
||||
@@ -82,6 +88,7 @@ public partial class DateTimeRangePicker : UserControl
|
||||
if (lastWeek != null) lastWeek.Click += (_, _) => ApplyPreset(TimeSpan.FromDays(7));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
|
||||
{
|
||||
base.OnPropertyChanged(change);
|
||||
|
||||
@@ -7,6 +7,9 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Helpers;
|
||||
/// </summary>
|
||||
internal static class StatusCodeFormatter
|
||||
{
|
||||
/// <summary>Formats an OPC UA status code as a hexadecimal code with description.</summary>
|
||||
/// <param name="statusCode">The OPC UA status code to format.</param>
|
||||
/// <returns>A formatted string in the form "0xHEX (description)".</returns>
|
||||
public static string Format(StatusCode statusCode)
|
||||
{
|
||||
var code = statusCode.Code;
|
||||
|
||||
@@ -7,6 +7,9 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Helpers;
|
||||
/// </summary>
|
||||
internal static class ValueFormatter
|
||||
{
|
||||
/// <summary>Formats an OPC UA value for display, handling arrays and enumerables specially.</summary>
|
||||
/// <param name="value">The value to format, or null.</param>
|
||||
/// <returns>A string representation of the value suitable for display.</returns>
|
||||
public static string Format(object? value)
|
||||
{
|
||||
if (value is null) return "(null)";
|
||||
|
||||
@@ -4,8 +4,11 @@ using ZB.MOM.WW.OtOpcUa.Client.Shared;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Client.UI;
|
||||
|
||||
/// <summary>Entry point for the OPC UA client UI application.</summary>
|
||||
public class Program
|
||||
{
|
||||
/// <summary>Main entry point for the application.</summary>
|
||||
/// <param name="args">Command-line arguments passed to the application.</param>
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
@@ -21,6 +24,8 @@ public class Program
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Builds the Avalonia AppBuilder with platform-specific configuration.</summary>
|
||||
/// <returns>Configured AppBuilder for desktop lifetime.</returns>
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
{
|
||||
return AppBuilder.Configure<App>()
|
||||
|
||||
@@ -7,6 +7,8 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Services;
|
||||
/// </summary>
|
||||
public sealed class AvaloniaUiDispatcher : IUiDispatcher
|
||||
{
|
||||
/// <summary>Posts an action to the Avalonia UI thread for execution.</summary>
|
||||
/// <param name="action">The action to execute on the UI thread.</param>
|
||||
public void Post(Action action)
|
||||
{
|
||||
Dispatcher.UIThread.Post(action);
|
||||
|
||||
@@ -5,6 +5,9 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Services;
|
||||
/// </summary>
|
||||
public interface ISettingsService
|
||||
{
|
||||
/// <summary>Loads user settings from persistent storage.</summary>
|
||||
UserSettings Load();
|
||||
/// <summary>Saves user settings to persistent storage.</summary>
|
||||
/// <param name="settings">The settings to save.</param>
|
||||
void Save(UserSettings settings);
|
||||
}
|
||||
|
||||
@@ -8,5 +8,6 @@ public interface IUiDispatcher
|
||||
/// <summary>
|
||||
/// Posts an action to be executed on the UI thread.
|
||||
/// </summary>
|
||||
/// <param name="action">The action to execute on the UI thread.</param>
|
||||
void Post(Action action);
|
||||
}
|
||||
@@ -19,6 +19,8 @@ public sealed class JsonSettingsService : ISettingsService
|
||||
WriteIndented = true
|
||||
};
|
||||
|
||||
/// <summary>Loads user settings from the settings file.</summary>
|
||||
/// <returns>The loaded user settings, or a new default instance if load fails.</returns>
|
||||
public UserSettings Load()
|
||||
{
|
||||
try
|
||||
@@ -35,6 +37,8 @@ public sealed class JsonSettingsService : ISettingsService
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Saves user settings to the settings file.</summary>
|
||||
/// <param name="settings">The user settings to save.</param>
|
||||
public void Save(UserSettings settings)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -6,6 +6,8 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Services;
|
||||
/// </summary>
|
||||
public sealed class SynchronousUiDispatcher : IUiDispatcher
|
||||
{
|
||||
/// <summary>Executes the action synchronously on the calling thread.</summary>
|
||||
/// <param name="action">The action to execute.</param>
|
||||
public void Post(Action action)
|
||||
{
|
||||
action();
|
||||
|
||||
@@ -44,6 +44,9 @@ public partial class AlarmsViewModel : ObservableObject
|
||||
|
||||
[ObservableProperty] private int _activeAlarmCount;
|
||||
|
||||
/// <summary>Initializes a new instance of the AlarmsViewModel class.</summary>
|
||||
/// <param name="service">The OPC UA client service.</param>
|
||||
/// <param name="dispatcher">The UI dispatcher for thread-safe operations.</param>
|
||||
public AlarmsViewModel(IOpcUaClientService service, IUiDispatcher dispatcher)
|
||||
{
|
||||
_service = service;
|
||||
@@ -168,6 +171,9 @@ public partial class AlarmsViewModel : ObservableObject
|
||||
/// <summary>
|
||||
/// Acknowledges an alarm and returns (success, message).
|
||||
/// </summary>
|
||||
/// <param name="alarm">The alarm event to acknowledge.</param>
|
||||
/// <param name="comment">Optional comment for the acknowledgment.</param>
|
||||
/// <returns>A tuple with success flag and message.</returns>
|
||||
public async Task<(bool Success, string Message)> AcknowledgeAlarmAsync(AlarmEventViewModel alarm, string comment)
|
||||
{
|
||||
if (!IsConnected || alarm.EventId == null || alarm.ConditionNodeId == null)
|
||||
@@ -197,6 +203,8 @@ public partial class AlarmsViewModel : ObservableObject
|
||||
/// <summary>
|
||||
/// Restores an alarm subscription and requests a condition refresh.
|
||||
/// </summary>
|
||||
/// <param name="sourceNodeId">The source node ID to restore the subscription for.</param>
|
||||
/// <returns>A task that completes when the restore operation finishes.</returns>
|
||||
public async Task RestoreAlarmSubscriptionAsync(string? sourceNodeId)
|
||||
{
|
||||
if (!IsConnected || string.IsNullOrWhiteSpace(sourceNodeId)) return;
|
||||
|
||||
@@ -13,6 +13,11 @@ public class BrowseTreeViewModel : ObservableObject
|
||||
private readonly IUiDispatcher _dispatcher;
|
||||
private readonly IOpcUaClientService _service;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BrowseTreeViewModel"/> class.
|
||||
/// </summary>
|
||||
/// <param name="service">The OPC UA client service.</param>
|
||||
/// <param name="dispatcher">The UI dispatcher for marshaling updates.</param>
|
||||
public BrowseTreeViewModel(IOpcUaClientService service, IUiDispatcher dispatcher)
|
||||
{
|
||||
_service = service;
|
||||
|
||||
@@ -7,6 +7,11 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.ViewModels;
|
||||
/// </summary>
|
||||
public class HistoryValueViewModel : ObservableObject
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="HistoryValueViewModel"/> class.</summary>
|
||||
/// <param name="value">The historical value.</param>
|
||||
/// <param name="status">The status code or text.</param>
|
||||
/// <param name="sourceTimestamp">The source timestamp in string format.</param>
|
||||
/// <param name="serverTimestamp">The server timestamp in string format.</param>
|
||||
public HistoryValueViewModel(string value, string status, string sourceTimestamp, string serverTimestamp)
|
||||
{
|
||||
Value = value;
|
||||
@@ -15,8 +20,12 @@ public class HistoryValueViewModel : ObservableObject
|
||||
ServerTimestamp = serverTimestamp;
|
||||
}
|
||||
|
||||
/// <summary>Gets the historical value.</summary>
|
||||
public string Value { get; }
|
||||
/// <summary>Gets the status code or text.</summary>
|
||||
public string Status { get; }
|
||||
/// <summary>Gets the source timestamp in string format.</summary>
|
||||
public string SourceTimestamp { get; }
|
||||
/// <summary>Gets the server timestamp in string format.</summary>
|
||||
public string ServerTimestamp { get; }
|
||||
}
|
||||
@@ -34,6 +34,9 @@ public partial class HistoryViewModel : ObservableObject
|
||||
|
||||
[ObservableProperty] private DateTimeOffset? _startTime = DateTimeOffset.UtcNow.AddHours(-1);
|
||||
|
||||
/// <summary>Initializes a new instance of the HistoryViewModel.</summary>
|
||||
/// <param name="service">The OPC UA client service.</param>
|
||||
/// <param name="dispatcher">The UI dispatcher for thread marshalling.</param>
|
||||
public HistoryViewModel(IOpcUaClientService service, IUiDispatcher dispatcher)
|
||||
{
|
||||
_service = service;
|
||||
@@ -53,6 +56,7 @@ public partial class HistoryViewModel : ObservableObject
|
||||
AggregateType.StandardDeviation
|
||||
];
|
||||
|
||||
/// <summary>Gets a value indicating whether an aggregate read is selected.</summary>
|
||||
public bool IsAggregateRead => SelectedAggregateType != null;
|
||||
|
||||
/// <summary>History read results.</summary>
|
||||
|
||||
@@ -36,12 +36,16 @@ public partial class ReadWriteViewModel : ObservableObject
|
||||
|
||||
[ObservableProperty] private string? _writeValue;
|
||||
|
||||
/// <summary>Initializes a new instance of the ReadWriteViewModel class.</summary>
|
||||
/// <param name="service">The OPC UA client service for read/write operations.</param>
|
||||
/// <param name="dispatcher">The UI dispatcher for posting updates to the UI thread.</param>
|
||||
public ReadWriteViewModel(IOpcUaClientService service, IUiDispatcher dispatcher)
|
||||
{
|
||||
_service = service;
|
||||
_dispatcher = dispatcher;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether a node is currently selected.</summary>
|
||||
public bool IsNodeSelected => !string.IsNullOrEmpty(SelectedNodeId);
|
||||
|
||||
partial void OnSelectedNodeIdChanged(string? value)
|
||||
|
||||
@@ -13,6 +13,9 @@ public partial class SubscriptionItemViewModel : ObservableObject
|
||||
|
||||
[ObservableProperty] private string? _value;
|
||||
|
||||
/// <summary>Initializes a new subscription item with the specified node ID and interval.</summary>
|
||||
/// <param name="nodeId">The OPC UA NodeId to subscribe to.</param>
|
||||
/// <param name="intervalMs">The subscription interval in milliseconds.</param>
|
||||
public SubscriptionItemViewModel(string nodeId, int intervalMs)
|
||||
{
|
||||
NodeId = nodeId;
|
||||
|
||||
@@ -31,6 +31,13 @@ public partial class TreeNodeViewModel : ObservableObject
|
||||
HasChildren = false;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new tree node view model.</summary>
|
||||
/// <param name="nodeId">The OPC UA node identifier.</param>
|
||||
/// <param name="displayName">The display name for this node.</param>
|
||||
/// <param name="nodeClass">The OPC UA node class.</param>
|
||||
/// <param name="hasChildren">Whether this node has child nodes.</param>
|
||||
/// <param name="service">The OPC UA client service for browsing.</param>
|
||||
/// <param name="dispatcher">The UI dispatcher for thread-safe updates.</param>
|
||||
public TreeNodeViewModel(
|
||||
string nodeId,
|
||||
string displayName,
|
||||
|
||||
@@ -10,6 +10,7 @@ public partial class AckAlarmWindow : Window
|
||||
private readonly AlarmsViewModel _alarmsVm;
|
||||
private readonly AlarmEventViewModel _alarm;
|
||||
|
||||
/// <summary>Initializes a new instance of the AckAlarmWindow class for XAML designer support.</summary>
|
||||
public AckAlarmWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -17,6 +18,9 @@ public partial class AckAlarmWindow : Window
|
||||
_alarm = null!;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the AckAlarmWindow class with alarm context.</summary>
|
||||
/// <param name="alarmsVm">The alarms view model.</param>
|
||||
/// <param name="alarm">The alarm event to acknowledge.</param>
|
||||
public AckAlarmWindow(AlarmsViewModel alarmsVm, AlarmEventViewModel alarm)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -16,11 +16,13 @@ public partial class AlarmsView : UserControl
|
||||
private static readonly IBrush HighBrush = new SolidColorBrush(Color.Parse("#FEE2E2")); // light red (666-899)
|
||||
private static readonly IBrush CriticalBrush = new SolidColorBrush(Color.Parse("#FECACA")); // red (900-1000)
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="AlarmsView"/> class.</summary>
|
||||
public AlarmsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnLoaded(RoutedEventArgs e)
|
||||
{
|
||||
base.OnLoaded(e);
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Views;
|
||||
|
||||
public partial class BrowseTreeView : UserControl
|
||||
{
|
||||
/// <summary>Initializes a new instance of the BrowseTreeView.</summary>
|
||||
public BrowseTreeView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Views;
|
||||
|
||||
public partial class HistoryView : UserControl
|
||||
{
|
||||
/// <summary>Initializes a new instance of the HistoryView control.</summary>
|
||||
public HistoryView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Views;
|
||||
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
/// <summary>Initializes a new instance of the MainWindow, loading the application icon.</summary>
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -51,6 +52,7 @@ public partial class MainWindow : Window
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnLoaded(RoutedEventArgs e)
|
||||
{
|
||||
base.OnLoaded(e);
|
||||
@@ -157,6 +159,7 @@ public partial class MainWindow : Window
|
||||
vm.CertificateStorePath = picked;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnClosing(WindowClosingEventArgs e)
|
||||
{
|
||||
if (DataContext is MainWindowViewModel vm)
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Views;
|
||||
|
||||
public partial class ReadWriteView : UserControl
|
||||
{
|
||||
/// <summary>Initializes a new instance of the ReadWriteView class.</summary>
|
||||
public ReadWriteView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -8,11 +8,13 @@ namespace ZB.MOM.WW.OtOpcUa.Client.UI.Views;
|
||||
|
||||
public partial class SubscriptionsView : UserControl
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="SubscriptionsView"/> class.</summary>
|
||||
public SubscriptionsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnLoaded(RoutedEventArgs e)
|
||||
{
|
||||
base.OnLoaded(e);
|
||||
|
||||
@@ -10,6 +10,7 @@ public partial class WriteValueWindow : Window
|
||||
private readonly SubscriptionsViewModel _subscriptionsVm;
|
||||
private readonly string _nodeId;
|
||||
|
||||
/// <summary>Initializes a default instance of the WriteValueWindow for XAML designer support.</summary>
|
||||
public WriteValueWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -17,6 +18,10 @@ public partial class WriteValueWindow : Window
|
||||
_nodeId = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a WriteValueWindow with the node to write and its current value.</summary>
|
||||
/// <param name="subscriptionsVm">The subscriptions view model for write operations.</param>
|
||||
/// <param name="nodeId">The OPC UA node ID to write to.</param>
|
||||
/// <param name="currentValue">The current value of the node, or null if unknown.</param>
|
||||
public WriteValueWindow(SubscriptionsViewModel subscriptionsVm, string nodeId, string? currentValue)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Reference in New Issue
Block a user