Compare commits
2 commits
eaaa7abc77
...
20ffee6d43
| Author | SHA1 | Date | |
|---|---|---|---|
|
20ffee6d43 |
|||
|
5a4b6f2cbb |
1 changed files with 3 additions and 12 deletions
|
|
@ -8,7 +8,7 @@ namespace Geekeey.Process;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an asynchronous execution of a command.
|
/// Represents an asynchronous execution of a command.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class CommandTask<TResult> : IDisposable
|
public sealed partial class CommandTask<TResult> : IDisposable
|
||||||
{
|
{
|
||||||
private readonly Process _process;
|
private readonly Process _process;
|
||||||
|
|
||||||
|
|
@ -19,14 +19,6 @@ public partial class CommandTask<TResult> : IDisposable
|
||||||
ProcessId = processId;
|
ProcessId = processId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finalizer to ensure resources are released.
|
|
||||||
/// </summary>
|
|
||||||
~CommandTask()
|
|
||||||
{
|
|
||||||
Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Underlying task.
|
/// Underlying task.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -87,11 +79,10 @@ public partial class CommandTask<TResult> : IDisposable
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Task.Dispose();
|
Task.Dispose();
|
||||||
GC.SuppressFinalize(this);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class CommandTask<TResult>
|
public sealed partial class CommandTask<TResult>
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts the command task into a regular task.
|
/// Converts the command task into a regular task.
|
||||||
|
|
@ -100,4 +91,4 @@ public partial class CommandTask<TResult>
|
||||||
{
|
{
|
||||||
return commandTask.Task;
|
return commandTask.Task;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue