Fix codefactor if part 1 (#19266)

This commit is contained in:
CarloToso authored and GitHub committed 2023-03-03 23:51:53 +05:00
1 parent 5acc664666
commit d00407612c
25 files changed
+283 -68

No files matched your search

@@ -1146,7 +1146,11 @@ namespace System.Management.Automation
{
lock (_sync)
{
if (_stopped) return;
if (_stopped)
{
return;
}
_stopped = true;
}
@@ -1651,9 +1655,15 @@ namespace System.Management.Automation
// we incrementing refCount on the same thread and before running any processing
// so it's safe to do it without Interlocked.
if (process.StartInfo.RedirectStandardOutput) { _refCount++; }
if (process.StartInfo.RedirectStandardOutput)
{
_refCount++;
}
if (process.StartInfo.RedirectStandardError) { _refCount++; }
if (process.StartInfo.RedirectStandardError)
{
_refCount++;
}
// once we have _refCount, we can start processing
if (process.StartInfo.RedirectStandardOutput)