fca978de07
Sweep of 203 source files resolving CommentChecker findings: add <summary>/<param>/<returns>/<inheritdoc> where missing, and remove resolved task/issue tracking markers (Tests-NNN, Worker-NNN, Server-NNN, Task N) from code comments. Comment/doc-only — no logic changes. Server+Tests build clean under TreatWarningsAsErrors.
39 lines
1.4 KiB
C#
39 lines
1.4 KiB
C#
namespace ZB.MOM.WW.MxGateway.Server.Workers;
|
|
|
|
/// <summary>Handle to a running worker process with metadata.</summary>
|
|
public sealed class WorkerProcessHandle : IDisposable
|
|
{
|
|
/// <summary>Initializes a new instance of the WorkerProcessHandle class.</summary>
|
|
/// <param name="process">The underlying worker process.</param>
|
|
/// <param name="commandLine">The command line and arguments used to launch the process.</param>
|
|
/// <param name="launchedAt">The time when the process was launched.</param>
|
|
public WorkerProcessHandle(
|
|
IWorkerProcess process,
|
|
WorkerProcessCommandLine commandLine,
|
|
DateTimeOffset launchedAt)
|
|
{
|
|
Process = process;
|
|
ProcessId = process.Id;
|
|
CommandLine = commandLine;
|
|
LaunchedAt = launchedAt;
|
|
}
|
|
|
|
/// <summary>Gets the underlying worker process.</summary>
|
|
public IWorkerProcess Process { get; }
|
|
|
|
/// <summary>Gets the process ID.</summary>
|
|
public int ProcessId { get; }
|
|
|
|
/// <summary>Gets the command line and arguments used to launch the process.</summary>
|
|
public WorkerProcessCommandLine CommandLine { get; }
|
|
|
|
/// <summary>Gets the time when the process was launched.</summary>
|
|
public DateTimeOffset LaunchedAt { get; }
|
|
|
|
/// <summary>Disposes the underlying worker process.</summary>
|
|
public void Dispose()
|
|
{
|
|
Process.Dispose();
|
|
}
|
|
}
|