29 lines
629 B
C#
29 lines
629 B
C#
namespace MxGateway.Server.Workers;
|
|
|
|
public sealed class WorkerProcessHandle : IDisposable
|
|
{
|
|
public WorkerProcessHandle(
|
|
IWorkerProcess process,
|
|
WorkerProcessCommandLine commandLine,
|
|
DateTimeOffset launchedAt)
|
|
{
|
|
Process = process;
|
|
ProcessId = process.Id;
|
|
CommandLine = commandLine;
|
|
LaunchedAt = launchedAt;
|
|
}
|
|
|
|
public IWorkerProcess Process { get; }
|
|
|
|
public int ProcessId { get; }
|
|
|
|
public WorkerProcessCommandLine CommandLine { get; }
|
|
|
|
public DateTimeOffset LaunchedAt { get; }
|
|
|
|
public void Dispose()
|
|
{
|
|
Process.Dispose();
|
|
}
|
|
}
|