Compare commits

..

2 commits

Author SHA1 Message Date
eaaa7abc77
chore: disable code format rules in test projects
Some checks failed
default / dotnet-default-workflow (push) Failing after 1m41s
2026-05-09 22:57:40 +02:00
799c4d622e
chore: fix warning as error working
Some checks failed
default / dotnet-default-workflow (push) Failing after 1m6s
2026-05-09 22:50:43 +02:00

View file

@ -8,7 +8,7 @@ namespace Geekeey.Process;
/// <summary>
/// Represents an asynchronous execution of a command.
/// </summary>
public sealed partial class CommandTask<TResult> : IDisposable
public partial class CommandTask<TResult> : IDisposable
{
private readonly Process _process;
@ -19,6 +19,14 @@ public sealed partial class CommandTask<TResult> : IDisposable
ProcessId = processId;
}
/// <summary>
/// Finalizer to ensure resources are released.
/// </summary>
~CommandTask()
{
Dispose();
}
/// <summary>
/// Underlying task.
/// </summary>
@ -79,10 +87,11 @@ public sealed partial class CommandTask<TResult> : IDisposable
public void Dispose()
{
Task.Dispose();
GC.SuppressFinalize(this);
}
}
public sealed partial class CommandTask<TResult>
public partial class CommandTask<TResult>
{
/// <summary>
/// Converts the command task into a regular task.
@ -91,4 +100,4 @@ public sealed partial class CommandTask<TResult>
{
return commandTask.Task;
}
}
}