RunProcessAsTask icon indicating copy to clipboard operation
RunProcessAsTask copied to clipboard

Three minor issues

Open suchoss opened this issue 5 years ago • 0 comments

Hello,

I found three messages in Visual Studio saying following: 1) IDE0067 - Disposable object created by 'new Process {' is never disposed
in ProcessEx.cs

var process = new Process {

2) CA1031 - Modify 'RunAsync' to catch a more specific exception type, or rethrow the exception.
in ProcessEx.cs

} catch (InvalidOperationException) { }

3) CA1031 - Modify 'RunAsync' to catch a more specific exception type, or rethrow the exception.
in ProcessEx.cs

catch (Exception)
{
    // best effort to try and get a more accurate start time, but if we fail to access StartTime
    // (for instance, process has already existed), we still have a valid value to use.
}

Does it make sense to fix them?

Thanks

suchoss avatar Oct 22 '19 18:10 suchoss